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://beta.data.gov.sg/datasets/d_72ef872af64a49bbf85c037e714267c0/view
Data can only be requested one day at at time, for example: https://api.data.gov.sg/v1/environment/rainfall?date=2018-07-26
The API supports two versions: v1 and v2. Since 2024.02, Fews also supports v2. The import type of v2 api is SingaporeNEAv2. SingaporeNEAv2 supports all the same options as v1, but reads the data format of the v1 api.
Since 2024.02: It is possible to configure a proxy port and url.
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> <properties> <string key="proxyUrl" value="url"/> <int key="proxyPort" value="8080"></int> </properties> <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)
If the <relativeViewPeriod> element specifies a period covering more than one day in Singapore time, multiple days of data will be read and combined into a single time series.
The parser always uses standard singapore time so there is no need to use include a <importTimeZone> element to configure this specific timezone..