ekapope / worldweatheronline Goto Github PK
View Code? Open in Web Editor NEWWorldWeatherOnline historical weather data API Python wrapper
WorldWeatherOnline historical weather data API Python wrapper
Hello i have a problem with the script than i used a small modification
from wwo_hist import retrieve_hist_data
import os
**import requests**
**os.chdir(os.getcwd())**
frequency = 3
start_date = '11-DEC-2018'
end_date = '11-MAR-2019'
api_key = '..........'
location_list = ['singapore', 'california']
hist_weather_data = retrieve_hist_data(api_key,
location_list,
start_date,
end_date,
frequency,
location_label=False,
export_csv=True,
store_df=True)
Hi, Thank you very much for this useful package. I've noticed that the scrapped tempC and maxtempC are the same. Is it a bug in the script or the data error from the WWO? Thank you.
Best,
Erica
How am I supposed a input a list of longitude and latitude, as the location parameter is required to be a string?
It appears if you reach the historical limit for weather data (e.g. I was trying to scrape for a date in 2008), the API returns an error message:
{'error': [{'msg': 'There is no weather data available for the date provided.'}]}
However the library currently does not handle for this, and just errors with:
File "/my/path/lib/python3.8/site-packages/wwo_hist/__init__.py", line 103, in retrieve_this_location
data = json_data['data']['weather']
KeyError: 'weather'
Would it be desirable to at least provide this error message back to the user? I'm happy to make a pull request if you agree
The readme says this, but im too stupid to find the dataframes?
`store_df: bool, default = False
If True, retrieved dataframe(s) will be stored as list in the work space.`
Hi,
Thanks for your information. The problem I faced with this is that I need the historical data of each 15-minutes for a specific period of time. But it seems that this website just provides information regarding the 3-hours period of time. Even if I change the frequency to 1, it again retrieves the data for the 3-hour period of time.
When I run the script through a loop from different Zip codes on different days the program overwrites the original file when same zips are processed. For instance, I have the same 5 zips on different days, the .csv file is overwritten each time.
How do I store all processed zips, with different dates, into one .csv file without overwrite?
In newer versions of pandas, pd.date_range no longer uses the keyword "closed" this should be replaced by "inclusive"
When I run the sample code, it told me that "module urllib has no attribute requests" I found the solution that you can change the "import urllib" to "import urllib.requests" at line 13 in file "init.py"
Hello,
Thank you very much for the work. It looks very helpful and easy to use but I got a SyntaxError in the function retrieve_this_location in the line
file_path = f'{response_cache_path}/{location}{start_d}{end_d}'
May you tell me how to solve it, please?
Thank you!
Thanks for the helpful wrapper. Is there a way to adjust the frequency to get a monthly average?
Hello,
Is there any way to make the export_csv
function append to a csv file? Right now, the export_csv
just writes over the CSV file.
Thanks,
AN
Trying to work with the repo (thanks!)
What is the timezone of the dates given? UTC or local time?
First of all: amazing work! You saved me a lot of time for trying out on my own. Thank you very much!
While using the package a behavior occured I could not understand. I collected historical weather data for complete year 2018 from 01-JAN-2018 to 31-DEC-2018. For some reason the december was retrieved two times. no problem at all - I just deleted one december afterwards but maybe you have an idea how to repair this.
best regards,
fabian
In the endo of month when trying to get forecasted data based on 2 days more precisely ,(30 Nov 2019 & 01 Dec 2019) it give reindex problem as trying to loop back whole November data.Can someone helps me in this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.