Skip to content
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

Adding weather data from KNMI #68

Open
amotl opened this issue Nov 24, 2020 · 5 comments
Open

Adding weather data from KNMI #68

amotl opened this issue Nov 24, 2020 · 5 comments

Comments

@amotl
Copy link

amotl commented Nov 24, 2020

Dear Pim and Marten,

I just became aware of #67 and want to humbly make you aware about what @gutzbenj, @wetterfrosch and all other contributors are conceiving over at https://github.com/earthobservations/wetterdienst.

While this is currently just about ingesting weather information from @DeutscherWetterdienst, we want to tap into data from other domestic weather agencies soon.

So, maybe you can share some information about where we might want to look into when approaching open weather data from the Dutch weather agency?

With kind regards,
Andreas.

cc @ClemensGruber

@amotl amotl changed the title Adding weather data Adding weather data from domestic agencies Nov 24, 2020
@amotl
Copy link
Author

amotl commented Nov 24, 2020

We see at

// Add weather data
$user_location_coord_where = '('.implode(' OR ', $user_dloc_coords).')';
try{
$weather = $influx::query('SELECT COUNT("temperature") as "count" FROM "weather" WHERE '.$user_location_coord_where.' AND time >= \''.$user_consents[0]->updated_at.'\' AND time <= \''.$moment_end->format('Y-m-d H:i:s').'\' GROUP BY time(1d)')->getPoints(); // get first weather date
} catch (InfluxDB\Exception $e) {
// return Response::json('influx-group-by-query-error', 500);
}
if (count($weather) > 0)
{
foreach ($weather as $point)
$user_weather_data[substr($point['time'],0,10)] = $point['count'];
}
that you are going to InfluxDB for acquiring weather information. This aligns well with the InfluxDB feature support we have been bringing in with version 0.8.0 and are currently refining with the most recent improvements to the development head.

@amotl amotl changed the title Adding weather data from domestic agencies Adding weather data from KNMI Nov 24, 2020
@amotl
Copy link
Author

amotl commented Nov 24, 2020

Hi again,

quickly answering myself here, I found the following information for acquiring data from the Royal Netherlands Meteorological Institute (KNMI). They provide some of their data sets as open data, however one will have to request an API key first.

About

These have been the links I followed in order to find their open data product offerings.

Example

Please note: For realtime data download or downloading larger(bulk) parts of a dataset, you should use the (Open Data) API.

Open Data API

This looks really straight-forward. They even provide complete examples for Python, beyond what can be expected.

With kind regards,
Andreas.

cc @gutzbenj

@pvgennip
Copy link
Collaborator

@amotl Thank you for your considerations, and self answering :-)
We currently load weather data for each hive that has lat/lon coordinates filled from the global weather API DarkSky (that has been recently taken over by Apple unfortunately, so this will discontinue end of 2021). We are looking into converting to another fair use global weather API.

@pvgennip
Copy link
Collaborator

pvgennip commented Nov 26, 2020

@amotl
Copy link
Author

amotl commented Dec 3, 2020

Dear Pim,

thanks for your pointers.

We are looking into converting to another fair use global weather API.

Regarding another promising weather API, I would like to point out Bright Sky [1,2] by @jdemaeyer and contributors. However, it is unfortunately not a global weather API as it only works upon data by @DeutscherWetterdienst.

With kind regards,
Andreas.

[1] https://brightsky.dev/
[2] https://github.com/jdemaeyer/brightsky

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants