Skip to main content

Provides utility functions for accessing data repository for Project Pythia 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

These files are used as sample data in Pythia Project examples/notebooks and are downloaded by open-radar-data package:

  • 0080_20210730_160000_01_02.scn.gz
  • 2006_20220324_000000_000.scnx.gz
  • 2013051000000600dBZ.vol
  • 71_20181220_060628.pvol.h5
  • DWD-Vol-2_99999_20180601054047_00.h5
  • SUR210819000227.RAWKPJV
  • 20220628072500_savevol_COSMO_LOOKUP_TEMP.nc
  • MLA2119412050U.nc
  • MLL2217907250U.003.nc
  • T_PAGZ35_C_ENMI_20170421090837.hdf
  • cfrad.20080604_002217_000_SPOL_v36_SUR.nc
  • cor-main131125105503.RAW2049
  • sample_sgp_data.nc
  • sample_rainbow_5_59.nc

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
    
  • 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.0.4.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

open_radar_data-0.0.4-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file open-radar-data-0.0.4.tar.gz.

File metadata

  • Download URL: open-radar-data-0.0.4.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for open-radar-data-0.0.4.tar.gz
Algorithm Hash digest
SHA256 0beee16c581c2c2ec68941af2b5805c75305d4f860c188145771479271b33e15
MD5 fe3b177402457e2162eab66c92113cb1
BLAKE2b-256 c3f52272c58df64a58bdb20b781fdb907bfcbbfd90a6886e267f9a82c94fbd2c

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for open_radar_data-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 bf2abf47a3e12721ae420b9f498e8ef26ade8c8101bf10a22830c0f4ee1d3530
MD5 eb6c658a3b0e07e48eddfffa286868a9
BLAKE2b-256 91808c06514cfcbeb917d1630a582f32e65af0ebf5d997cf5e33056d53f9d612

See more details on using hashes here.

Provenance

Supported by

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