Content
WEB-REQUEST TO GET TIME SERIES DATA
In SDSS there are two ways to obtain digital time series data from the database. One of them, described in the section Time series plotting,
is the output of values displayed on the plot to XML file. Another
possibility to dounload the digital data from a database to a CSV file
is sending a web request with the Internet browser. The query line can
be represented as
http://sdss.caiag.kg/sdss/service.php?mode=get_data&
which followed by a list of parameters in the form of name=value separated with symbol &.
The following parameters can be specified in the query line:
station (obligatory) - short station name, for example, station=tara;
date (obligatory)
is the date of measurement in the form YYYY-MM-DD, where YYYY is
4-digit year value, MM is 2-digit month number in year, starting
from 1, DD is the 2-digit day of the month. For example,
date=2015-03-12;
duration - number of measurement
days, the data for which you want to download, for example, duration=5.
If the duration parameter is not specified, it is assumed that one
day's data will be downloaded only.
descriptor
is a keyword (descriptor) of input data, under which the data enter to
SDSS, for example, descriptor=AirTC. If the descriptor is not
specified, the data is downloaded for all the
descriptors of the given station but under the stipulation that the login and password for the user of the catagory Editor are specified in the same query.
login
- a login of the registered user of category Editor. It is necessary
for data downloading of all measurement parameters (descriptors) of one
station at once.
password - a password of the registered user of category Editor. It is necessary for data downloading of all measurement parameters (descriptors) of one station at once.
Examples:
- Downloading the time series data for Air temperature at the station asai on August 18, 2015
http://sdss.caiag.kg/sdss/service.php?mode=get_data&station=asai&date=2015-08-18&descriptor=AirTC
- Downloading the time series data for all descriptors at the station asai on August 18, 2015
http://sdss.caiag.kg/sdss/service.php?mode=get_data&station=asai&date=2015-08-18&login=x12&password=hge245tsbdf9
In Unix machines, you can use the wget command to
retrieve the data from SDSS. For example, it is necessary to download
the relative humidity data from station asai for 3 days starting from May 11, 2016 to file asai_rh_20160511.csv
wget
"http://sdss.caiag.kg/sdss/service.php?mode=get_data&station=asai&date=2016-05-11&duration=3&descriptor=RH" -o asai_rh_20160511.csv