Skip to main content

Provides utility functions for accessing data repository for openradar examples/notebooks

Project description

Open-Radar-Data

CI PyPI Version Conda Version

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:

  1. Add the dataset file to the data/ directory
  2. From the command line, run python make_registry.py script to update the registry file residing in open_radar_data/registry.txt
  3. Commit and push your changes to GitHub

Using datasets in notebooks and/or scripts

  • Ensure the open_radar_data package is installed in your environment

    python -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 DATASETS and inspect the registry to find out which datasets are available

    In [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 .fetch method 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

open_radar_data-0.6.0.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

open_radar_data-0.6.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file open_radar_data-0.6.0.tar.gz.

File metadata

  • Download URL: open_radar_data-0.6.0.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for open_radar_data-0.6.0.tar.gz
Algorithm Hash digest
SHA256 c5f52fab028fb731f866e2ff7ea405c1664ca1a6785e57edb46bdfbba3acd3f6
MD5 c80d295ff23edbb4c61b6d981fb77f3a
BLAKE2b-256 f158445ad08f14afc584f8a2b3ce4f2cf9107363514dad03db78a0ae46e43d32

See more details on using hashes here.

File details

Details for the file open_radar_data-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for open_radar_data-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ee857e1e9c448f4da91e652d5166b3fe0357949b64eee3a47b6402bf964b9824
MD5 c2708eeb7b1d428fe7d3f5ab52bbc21b
BLAKE2b-256 628744f15946fd3f2bb730a7dd26601c1ca03e76a9c7af0f8e3c096260238b31

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page