Comments (4)
Hi,
What's your value for lat
, lon
and radius
? It might well be that the weather stations in this area don't provide wpgt
data.
from meteostat-python.
from meteostat import Stations, Daily, Point
def get_latitude_longitude(address):
geolocator = Nominatim(user_agent="geoapiExercises")
try:
location = geolocator.geocode(address)
if location:
return location.latitude, location.longitude
else:
return None, None
except GeocoderTimedOut:
return get_latitude_longitude(address)
if __name__ == "__main__":
address = input("Enter the address: ")
latitude, longitude = get_latitude_longitude(address)
if latitude and longitude:
print(f"Latitude: {latitude}, Longitude: {longitude}")
else:
print("Location not found.")
lat = latitude
lon = longitude
radius = 100000 # meters
num_stations = 5
start = datetime(2022, 9, 11)
end = datetime(2022, 11, 9)
for index, station in stations.iterrows():
station_id = station['icao']
station_name = station['name']
station_lat = station['latitude']
station_lon = station['longitude']
station_ele = station.elevation
point = Point(station_lat, station_lon, station_ele)
data = Daily(point, start, end)
data = data.fetch()
for index, row in data.iterrows():
station_info = {
"station": [station_id],
"staion name": [station_name],
"time": [index.strftime("%Y-%m-%d")],
"tavg": [(row.tavg * 9/5 + 32)],
"tmin": [(row.tmin * 9/5 + 32)],
"tmax": [(row.tmax* 9/5 + 32)],
"prcp": [row.prcp * 0.0393701],
"wdir": [row.wdir],
"wspd": [row.wspd * 0.621371192],
"wpgt": [row.wpgt * 0.621371192],
"pres": [round(row.pres* 0.0145037738)],
"distance": [haversine(lat, lon, station_lat, station_lon)]
}
from meteostat-python.
Can you share the result of print(f"Latitude: {latitude}, Longitude: {longitude}")
or the address?
from meteostat-python.
-lat/lon of structure;
structure_lat = 27.929571
structure_lon = -82.747118
-for the date range, September 9, 2022 thru September 27, 2022;
start = datetime(2022, 9, 27)
end = datetime(2022, 9, 29)
-This brings up weather stations;
KCLW, KPIE, KTPA, KSPG, KMCF
However, it is not localized to only this lat/lon, all wpgt value for any station for any date range does not return values. When I use the UI on meteostat, the results also do not return wind gust as a visible output. Do you experience the same?
from meteostat-python.
Related Issues (20)
- Missing Data Frame Values
- interpolation error "ValueError: The name station occurs multiple times, use a level number" HOT 3
- `Hourly` attempts to fetch data of next year HOT 1
- Hacktoberfest? HOT 1
- DeprecationWarning
- Data from ISD datasource no longer included? HOT 7
- Data from METAR missing for some stations? HOT 2
- Support for proxies HOT 2
- NaN discrepancy between older versions (<=1.5.11) and newer versions (>=1.6.0) HOT 2
- Got Different Results in Local and AzureML
- Point interpolation weighted method error
- Stations and Hourly data availability times don't match
- README Example Faisl With [SSL: CERTIFICATE_VERIFY_FAILED] HOT 1
- Bug in Stations module
- Update `numpy` dependency HOT 1
- Humidity data HOT 2
- Would it be possible to get "HourlySkyConditions"/Cloud_status feature anytime soon?
- Nested Sequences Support Deprecation Warning
- Correct documentation for Stations.inventory
- Message: PermissionError: [Errno 13] Permission denied: '/nonexistent' | Message: os.makedirs(directory)
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 meteostat-python.