-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add waterinfo api #93
Comments
@rubencalje also wrote some code in art_tools which can be used. I think it is faster than ddlpy because Ruben chunks the data in bigger parts. |
Maybe the Matroos api could work as well. I can download some files but they are empty ... From this example: https://github.com/openearth/sealevel/blob/62c8d6254ad42b491dd7777c3f53f60f190e4796/data/rws/matroos/download_matroos.ipynb import yarl
import pathlib
stations = [
"schoonhoven",
]
url = yarl.URL('http://noos.matroos.rws.nl/direct/get_series.php')
station = stations[0]
defaults = {
"tstart": 201701010000,
"tstop": 201901010100,
"format": "text"
}
params_list = [
{
"source": "observed",
"unit": "waterlevel",
"name": "waterlevel_observed"
},
]
for station in stations:
for params in params_list:
download_url = url.update_query(defaults).update_query(params).update_query({"loc": station})
filepath = "{}_{}.txt".format(station, params["name"])
!wget -c -O "$filepath" "$download_url"
print(pathlib.Path("schoonhoven_waterlevel_observed.txt").read_text()) |
Another repository that obtains data from waterinfo: |
There is already code to read a waterinfo csv file but no code yet to use an API to get waterinfo data. This package (https://github.com/openearth/ddlpy) uses the API so maybe we can use this package.
The text was updated successfully, but these errors were encountered: