A Python package for fetching ISD Lite data
Project description
PyISD: A Python Package for NOAA's ISD Lite Dataset
PyISD is a Python package designed for efficiently accessing and processing NOAA's ISD Lite dataset. The ISD Lite dataset, a streamlined version of the full Integrated Surface Database (ISD), provides hourly weather observations worldwide. It includes eight essential surface parameters in a fixed-width format, free of duplicate values, sub-hourly data, and complex flags. For more information, visit the official ISD homepage.
Installation
pip install isd-fetch
Features
- Easy access to global weather station data with spatial and temporal filtering
- Support for various coordinate reference systems (CRS)
- Parallel data downloading for improved performance
- Flexible data organization by location or weather variable
- Comprehensive station metadata handling
Quick Start Guide
Basic Usage
from pyisd import IsdLite
# Initialize the client
isd = IsdLite(crs=4326, verbose=True)
# View available stations
isd.raw_metadata.sample(5)
USAF WBAN STATION NAME CTRY ST ... BEGIN END x y geometry
5416 172650 99999 ADIYAMAN TU NaN ... 2007-01-27 2024-11-17 38.283 37.750 POINT (38.283 37.75)
1362 032130 99999 ESKMEALS UK NaN ... 1973-01-02 1997-12-26 -3.400 54.317 POINT (-3.4 54.317)
4729 153150 99999 SEMENIC RO NaN ... 1973-07-21 2024-11-17 22.050 45.183 POINT (22.05 45.183)
28589 999999 13855 TULLAHOMA AEDC SITE US TN ... 1963-01-01 1969-08-01 -86.233 35.383 POINT (-86.233 35.383)
6422 268530 99999 BEREZINO BO NaN ... 1960-04-01 2024-11-17 28.983 53.833 POINT (28.983 53.833)
Fetching Weather Data
There are multiple ways to fetch data based on your needs:
# Get data for all French weather stations
france_data = isd.get_data(
start='2023-01-01',
end='2023-12-31',
countries='FR', # ISO country code for France
organize_by='field' # Organize data by weather variable
)
# Access temperature data from all French stations
france_data['temp'].sample(4)
070200 070240 070270 ... 077680 077750 077700
2023-05-12 09:00:00 11.4 11.6 13.1 ... 19.7 19.7 16.5
2024-06-26 15:00:00 21.8 25.8 26.7 ... 25.8 25.4 23.2
2023-10-09 18:00:00 18.0 16.7 17.9 ... 22.0 20.9 21.8
2023-12-19 14:00:00 NaN 12.0 11.8 ... 14.6 15.7 13.6
# You can also query multiple countries
european_data = isd.get_data(
start='2023-01-01',
end='2023-12-31',
countries=['FR', 'DE', 'IT'], # France, Germany, Italy
organize_by='field'
)
Spatial Filtering Options
PyISD offers flexible spatial filtering through the geometry
parameter:
- Bounding Box: Using coordinates (xmin, ymin, xmax, ymax)
geometry = (-2.5, 48.5, 2.5, 49.5) # Paris region
- GeoDataFrame/Geometry: Using any shapely or geopandas geometry
import geopandas as gpd
city = gpd.read_file('city_boundary.geojson')
data = isd.get_data(geometry=city)
- Place Name: Using the
get_box()
helper function
geometry = get_box('London', width=2.0, crs=4326)
- Global Data: Setting geometry to None (⚠️ use with caution - large downloads)
data = isd.get_data(geometry=None) # Downloads data for all stations
Available Weather Variables
temp
: Air temperature (°C)dewtemp
: Dew point temperature (°C)pressure
: Sea level pressure (hPa)winddirection
: Wind direction (degrees)windspeed
: Wind speed (m/s)skycoverage
: Sky coverage/ceiling (code)precipitation-1h
: One-hour precipitation (mm)precipitation-6h
: Six-hour precipitation (mm)
Station Coverage
The ISD Lite network includes thousands of weather stations worldwide:
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file isd_fetch-0.1.5.tar.gz
.
File metadata
- Download URL: isd_fetch-0.1.5.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0156930f8e3a919c32bc9f08380be547ed6e999b87ae67a7792e56dd737d6483 |
|
MD5 | f4e8a7a94e7c87b25df8779b2450e60c |
|
BLAKE2b-256 | 26c59d85e40217e6d86795e863d67e80be04ba4015a892bf092b2948f318fa9d |
File details
Details for the file isd_fetch-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: isd_fetch-0.1.5-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48e400b36e48cfe046ab16f9a38d157b22b7b3783c828812d147031f8a8caa4e |
|
MD5 | 3483cfb937c0c83e152b97307774364f |
|
BLAKE2b-256 | d28122ca11ad6f660c2bedbc8ab1427799e27b089479283bb33dbefd54268f08 |