Provides utility functions for accessing data repository for openradar examples/notebooks
Project description
Open-Radar-Data
A place to share radar data with the community, shared between the open radar packages
Sample data sets
The files contained in this repository are used as sample data in openradar examples/notebooks and are downloaded by open-radar-data package. It includes single sweep PPI and RHI as well as complete volume files of weather radar (and lidar) in many different source formats. You can explore the contents in the open_radar_data/registry.txt.
Adding new datasets
To add a new dataset file, please follow these steps:
- Add the dataset file to the
data/directory - From the command line, run
python make_registry.pyscript to update the registry file residing inopen_radar_data/registry.txt - Commit and push your changes to GitHub
Using datasets in notebooks and/or scripts
-
Ensure the
open_radar_datapackage is installed in your environmentpython -m pip install open-radar-data # or python -m pip install git+https://github.com/openradar/open-radar-data # or conda install -c conda-forge open-radar-data
-
Import
DATASETSand inspect the registry to find out which datasets are availableIn [1]: from open_radar_data import DATASETS In [2]: DATASETS.registry_files Out[2]: ['sample_sgp_data.nc`]
-
To fetch a data file of interest, use the
.fetchmethod and provide the filename of the data file. This will- download and cache the file if it doesn't exist already.
- retrieve and return the local path
In [4]: filepath = DATASETS.fetch('sample_sgp_data.nc') In [5]: filepath Out[5]: '/Users/mgrover/Library/Caches/open-radar-data/sample_sgp_data.nc'
-
Once you have access to the local filepath, you can then use it to load your dataset into pandas or xarray or your package of choice:
In [6]: radar = pyart.io.read(filepath)
Changing the default data cache location
The default cache location (where the data are saved on your local system) is dependent on the operating system. You can use the locate() method to identify it:
from open_radar_data import locate
locate()
The location can be overwritten by the OPEN_RADAR_DATA_DIR environment
variable to the desired destination.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file open_radar_data-0.7.0.tar.gz.
File metadata
- Download URL: open_radar_data-0.7.0.tar.gz
- Upload date:
- Size: 17.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6276c68c8b4823a9482cc05dd589adcfd49f3f1391ad581adec9b2d51e4aaf70
|
|
| MD5 |
c1e85097022755c08fbcb943999cde10
|
|
| BLAKE2b-256 |
a0741d92a492e497f2d7e0a8b2d62fadeca6a75371cad46b73efc855dc5cb249
|
File details
Details for the file open_radar_data-0.7.0-py3-none-any.whl.
File metadata
- Download URL: open_radar_data-0.7.0-py3-none-any.whl
- Upload date:
- Size: 12.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
241b104bee086adbb82cf99913daec0f9003f36e1f9c2bf055883e7584c84274
|
|
| MD5 |
b72dc3cb6105b9a000de1743929b9503
|
|
| BLAKE2b-256 |
f72ad57d07b4f78d8b32fd27ac98fa666145bfb2c49a727c662c73888cf7bd62
|