You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

This import is available in DELFT-FEWS versions 2018.02 and has been back-ported to version 2017.02 specifically.

Imports weather data from a JSON web service provided by the Singapore National Environmental Agency (NEA)

NEA provides API's for readings of temperature, humidity, precipitation and wind conditions at up to one-minute intervals. The data is provided at weather-station level.

The API descriptions can be found on https://data.gov.sg For rainfall: https://data.gov.sg/dataset/realtime-weather-readings?resource_id=8bd37e06-cdd7-4ca4-9ad8-5754eb70a33d

Data can only be requested one day at at time, for example: https://api.data.gov.sg/v1/environment/rainfall?date=2018-07-26

Sample configuration file for importing Singapore rainfall data

<?xml version="1.0" encoding="UTF-8"?><timeSeriesImportRun xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/timeSeriesImportRun.xsd">
	<import>
		<general>
			<importType>SingaporeNEA</importType>
			<serverUrl>https://api.data.gov.sg/v1/environment/rainfall</serverUrl>
			<relativeViewPeriod unit="day" start="-7" end="0"/>
			<idMapId>IdImportNEA_Meteo</idMapId>
			<unitConversionsId>ImportUnitConversions</unitConversionsId>
		</general>
		<timeSeriesSet>
			<moduleInstanceId>ImportNEA_Meteo</moduleInstanceId>
			<valueType>scalar</valueType>
			<parameterId>P.obs</parameterId>
			<locationSetId>NEA.Meteo.precip</locationSetId>
			<timeSeriesType>external historical</timeSeriesType>
			<timeStep unit="nonequidistant"/>
			<readWriteMode>add originals</readWriteMode>
		</timeSeriesSet>
	</import>
</timeSeriesImportRun>

Note: The Singapore time zone is GMT+8 and currently does not use Daylight Saving Time (since 1936)

The parser always uses standard singapore time so there is no need to use include a <importTimeZone> element to configure this specific timezone..

 

 

  • No labels