Giter Club home page Giter Club logo

Comments (7)

amotl avatar amotl commented on May 31, 2024

Dear @Noordsestern,

thanks for writing in.

DWD usually segments their data feeds into "now", "recent" and "historical", where the most recent measurements of "now" are between half an hour and two days in the past. "recent" might expand that range to about six months to a year whereas "historical" goes further into the past.

Currently, the dwdweather2 client supports acquisition of the "10minutes" and "hourly" categories and the "recent" and "historical" subfolders:
https://github.com/hiveeyes/dwdweather2/blob/0.9.0/dwdweather/core.py#L269-L274

So, you are right: We should add acquisition capabilities from the "now" subfolder where it is available. On the other hand, you will be able to acquire reasonable recent data from the "recent" variant already.

We hope this helps. Feel free to ask further questions or push us to support more acquisition variants of the DWD data publications if you require that for your use case.

With kind regards,
Andreas.

from dwdweather2.

Noordsestern avatar Noordsestern commented on May 31, 2024

Ok... i tried to follow the source where the data is retrieved from and believed to have found out, that the data is at least half day old, which is not sufficient for me, because I would like to know the weather right now or almost now. But the dwd data is a mess to me, maybe I took wrong turns.

So, to cut things short: how would i retrieve the most recent data for a station with dwdweather2?

I do something like this:

client = DwdWeather(resolution='hourly',category_names=["air_temperature"])
client.import_measures(station_id)
data = client.query(station_id, datetime.datetime.now())

I get no result for data, because there is no data for today. Only when I use an older date, like yesterday, I get results for some stations. What do I do wrong?

Thank you.

from dwdweather2.

amotl avatar amotl commented on May 31, 2024

Dear @Noordsestern,

thanks for clarifying your requirements. We will try to check what goes wrong here. May we humbly ask what the value of station_id is in your case?

With kind regards,
Andreas.

from dwdweather2.

Noordsestern avatar Noordsestern commented on May 31, 2024

Dear @amotl,

station_id is 2667 (Kรถln-Bonn). If I use yesterday, do get results. For most other stations I do not get any results and cannot find any data at opendata.

Thank you!

from dwdweather2.

amotl avatar amotl commented on May 31, 2024

Dear @Noordsestern,

using an invocation like

dwdweather weather 2667 20190930T2150 --resolution 10_minutes

we have been able to get more recent data for air temperature for station 2667 from [1]. This will start working when upgrading to dwdweather2-0.10.0.

With kind regards,
Andreas.

[1] https://opendata.dwd.de/climate_environment/CDC/observations_germany/climate/10_minutes/air_temperature/now/

from dwdweather2.

amotl avatar amotl commented on May 31, 2024

Dear @Noordsestern,

dwdweather2 received some updates recently and should now be working on Python 3 as well. May I humbly ask you to check again with the most recent release?

Thanks already and with kind regards,
Andreas.

from dwdweather2.

amotl avatar amotl commented on May 31, 2024

Dear @Noordsestern,

Accessing 10_minutes / now

you asked on Sep 5, 2019:

How would i retrieve the most recent data for a station with dwdweather2?

I answered:

We should add acquisition capabilities from the "now" subfolder where it is available.

#13 brought this feature to dwdweather2 in the meanwhile.

Moving on to Wetterdienst

However, I would also suggest to have a look at Wetterdienst. As far as I am concerned, this will be the designated successor of dwdweather2.

Example for station=2667

wetterdienst readings --resolution=10_minutes --period=now --parameter=air_temperature --date=2020-07-05T18:00 --persist --station=2667
[
    {
        "station_id":2667,
        "date":"2020-07-05T18:00:00.000Z",
        "qn":2.0,
        "pp_10":1000.0,
        "tt_10":23.1,
        "tm5_10":23.0,
        "rf_10":62.0,
        "td_10":15.4
    }
]

With kind regards,
Andreas.

from dwdweather2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.