Comments (7)
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.
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.
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.
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.
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.
from dwdweather2.
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.
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)
- Retrieve and merge current weather information from stations close to each other HOT 11
- Library usage example is wrong HOT 3
- Implementation of solar retrieval seems to be incorrect HOT 4
- DwdWeather: queried weather data isn't stored correctly in local db HOT 6
- Float data mapped as int in Dataset HOT 1
- Running on Windows fails silently due to certificate verification problem HOT 8
- Building upon the dwdbulk codebase HOT 1
- Daily Data HOT 4
- Getting data for a list of N closest stations HOT 3
- Add support for RADOLAN data HOT 3
- Problem using categories on daily data HOT 2
- Differences in column names between macOS and Windows? HOT 2
- Requests restricted HOT 2
- DwdWeather.query() doesn't returns a dictionary because 3 arguments are required HOT 1
- paths still correct? get no values... HOT 2
- requests dependency outdated
- Encoding problem during `pip install` HOT 3
- Support for Python3 HOT 16
- Continuous Integration HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dwdweather2.