Name | radar-api JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | Python software to retrieve weather radar data from cloud buckets |
upload_time | 2025-02-03 11:40:27 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | MIT License
Copyright (c) 2025 Gionata Ghiggi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
|
keywords |
weather
radar
precipitation
nexrad
fmi
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
|
<div align="center">
# Welcome to RADAR-API

| | |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Deployment | [](https://pypi.org/project/radar_api/) [](https://anaconda.org/conda-forge/radar-api) |
| Activity | [](https://pypi.org/project/radar_api/) [](https://anaconda.org/conda-forge/radar-api) |
| Python Versions | [](https://www.python.org/downloads/) |
| Supported Systems | [](https://github.com/ghiggi/radar_api/actions/workflows/tests.yaml) [](https://github.com/ghiggi/radar_api/actions/workflows/tests.yaml) [](https://github.com/ghiggi/radar_api/actions/workflows/tests_windows.yaml) |
| Project Status | [](https://www.repostatus.org/#active) |
| Build Status | [](https://github.com/ghiggi/radar_api/actions/workflows/tests.yaml) [](https://github.com/ghiggi/radar_api/actions/workflows/lint.yaml) [](https://radar-api.readthedocs.io/en/latest/) |
| Linting | [](https://github.com/psf/black) [](https://github.com/astral-sh/ruff) [](https://github.com/codespell-project/codespell) |
| Code Coverage | [](https://coveralls.io/github/ghiggi/radar_api?branch=main) [](https://codecov.io/gh/ghiggi/radar_api) |
| Code Quality | [](https://www.codefactor.io/repository/github/ghiggi/radar_api) [](https://codebeat.co/projects/github-com-ghiggi-radar_api-main) [](https://app.codacy.com/gh/ghiggi/radar_api/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) [](https://codescene.io/projects/63299) |
| License | [](https://github.com/ghiggi/radar_api/blob/main/LICENSE) |
| Community | [](https://openradar.discourse.group/) [](https://github.com/ghiggi/radar_api/discussions) |
| Citation | [](https://doi.org/10.5281/zenodo.14743651) </div> |
[**Documentation: https://radar-api.readthedocs.io**](https://radar-api.readthedocs.io/)
<div align="left">
## 🚀 Quick start
RADAR-API provides an easy-to-use python interface to find, download and
read weather radar data from several meteorological services.
RADAR-API currently provides data access to the following
radar networks: ``NEXRAD``, ``IDEAM`` and ``FMI``.
The list of available radars can be retrieved using:
```python
import radar_api
radar_api.available_networks()
radar_api.available_radars()
radar_api.available_radars(network="NEXRAD")
```
Before starting using RADAR-API, we highly suggest to save into a configuration file
the directory on your local disk where to save the radar data of interest.
To facilitate the creation of the RADAR-API configuration file, you can adapt and execute the following script:
```python
import radar_api
base_dir = (
"<path/to/directory/RADAR" # path to the directory where to download the data
)
radar_api.define_configs(base_dir=base_dir)
# You can check that the config file has been correctly created with:
configs = radar_api.read_configs()
print(configs)
```
______________________________________________________________________
### 📥 Download radar data
You can start to download radar data editing the following code example:
```python
import radar_api
start_time = "2021-02-01 12:00:00"
end_time = "2021-02-01 13:00:00"
radar = "KABR"
network = "NEXRAD"
filepaths = radar_api.download_files(
network=network,
radar=radar,
start_time=start_time,
end_time=end_time,
)
```
______________________________________________________________________
### 💫 Open radar files into xarray or pyart
RADAR-API allows to read directly radar data from the cloud without the
need to previously download and save the files on your disk.
RADAR-API make use of pyart and xradar readers to open the files into either
an xarray object or pyart radar object.
```python
import radar_api
import pyart
# Search for files on cloud bucket
filepaths = radar_api.find_files(
network=network,
radar=radar,
start_time=start_time,
end_time=end_time,
protocol="s3",
)
print(filepaths)
# Define the file to open
filepath = filepaths[0]
# Open all sweeps of a radar volume into a xradar datatree
dt = radar_api.open_datatree(filepath, network=network)
# Extract the radar sweep of interest
ds = dt["sweep_0"].to_dataset()
# Open directly a single radar sweep into a xradar dataset
ds = radar_api.open_dataset(filepath, network=network, sweep="sweep_0")
# Open all sweeps of a radar volume into a pyart radar object
radar_obj = radar_api.open_pyart(filepath, network=network)
# Display the data with pyart
display = pyart.graph.RadarDisplay(radar_obj)
display.plot("reflectivity")
display.set_limits((-150, 150), (-150, 150))
```
______________________________________________________________________
## 📖 Documentation
To discover RADAR-API utilities and functionalities,
please read the software documentation available at [https://radar-api.readthedocs.io/en/latest/](https://radar-api.readthedocs.io/en/latest/).
All RADAR-API tutorials are available as Jupyter Notebooks in the [`tutorial`](https://github.com/ghiggi/radar_api/tree/main/tutorials) directory.
______________________________________________________________________
## 🛠️ Installation
### conda
RADAR-API can be installed via [conda][conda_link] on Linux, Mac, and Windows.
Install the package by typing the following command in the terminal:
```bash
conda install radar-api
```
In case conda-forge is not set up for your system yet, see the easy to follow instructions on [conda-forge][conda_forge_link].
### pip
RADAR-API can be installed also via [pip][pip_link] on Linux, Mac, and Windows.
On Windows you can install [WinPython][winpy_link] to get Python and pip running.
Then, install the RADAR-API package by typing the following command in the terminal:
```bash
pip install radar-api
```
To install the latest development version via pip, see the [documentation][dev_install_link].
## 💭 Feedback and Contributing Guidelines
If you aim to contribute your data or discuss the future development of RADAR-API,
we suggest to join the [**Open Radar Science Discourse Group**](https://openradar.discourse.group/).
Feel free to also open a [GitHub Issue](https://github.com/ghiggi/radar_api/issues) or a [GitHub Discussion](https://github.com/ghiggi/radar_api/discussions) specific to your questions or ideas.
## Citation
If you are using RADAR-API in your publication please cite our Zenodo repository:
> Ghiggi Gionata. ghiggi/radar_api. Zenodo. [](https://doi.org/10.5281/zenodo.14743651)
If you want to cite a specific software version, have a look at the [Zenodo site](https://doi.org/10.5281/zenodo.14743651).
## License
The content of this repository is released under the terms of the [MIT license](LICENSE).
</div>
[conda_forge_link]: https://github.com/conda-forge/radar-api-feedstock#installing-radar-api
[conda_link]: https://docs.conda.io/en/latest/miniconda.html
[dev_install_link]: https://radar-api.readthedocs.io/en/latest/02_installation.html#installation-for-contributors
[pip_link]: https://pypi.org/project/radar-api
[winpy_link]: https://winpython.github.io/
Raw data
{
"_id": null,
"home_page": null,
"name": "radar-api",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "Weather, Radar, Precipitation, NEXRAD, FMI",
"author": null,
"author_email": "Gionata Ghiggi <gionata.ghiggi@epfl.ch>",
"download_url": "https://files.pythonhosted.org/packages/a5/2b/63e5f111d036b4d184640239247593ad66953c6330b5896e575be8c5d37b/radar_api-0.1.0.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n\n# Welcome to RADAR-API\n\n\n\n| | |\n| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Deployment | [](https://pypi.org/project/radar_api/) [](https://anaconda.org/conda-forge/radar-api) |\n| Activity | [](https://pypi.org/project/radar_api/) [](https://anaconda.org/conda-forge/radar-api) |\n| Python Versions | [](https://www.python.org/downloads/) |\n| Supported Systems | [](https://github.com/ghiggi/radar_api/actions/workflows/tests.yaml) [](https://github.com/ghiggi/radar_api/actions/workflows/tests.yaml) [](https://github.com/ghiggi/radar_api/actions/workflows/tests_windows.yaml) |\n| Project Status | [](https://www.repostatus.org/#active) |\n| Build Status | [](https://github.com/ghiggi/radar_api/actions/workflows/tests.yaml) [](https://github.com/ghiggi/radar_api/actions/workflows/lint.yaml) [](https://radar-api.readthedocs.io/en/latest/) |\n| Linting | [](https://github.com/psf/black) [](https://github.com/astral-sh/ruff) [](https://github.com/codespell-project/codespell) |\n| Code Coverage | [](https://coveralls.io/github/ghiggi/radar_api?branch=main) [](https://codecov.io/gh/ghiggi/radar_api) |\n| Code Quality | [](https://www.codefactor.io/repository/github/ghiggi/radar_api) [](https://codebeat.co/projects/github-com-ghiggi-radar_api-main) [](https://app.codacy.com/gh/ghiggi/radar_api/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) [](https://codescene.io/projects/63299) |\n| License | [](https://github.com/ghiggi/radar_api/blob/main/LICENSE) |\n| Community | [](https://openradar.discourse.group/) [](https://github.com/ghiggi/radar_api/discussions) |\n| Citation | [](https://doi.org/10.5281/zenodo.14743651) </div> |\n\n[**Documentation: https://radar-api.readthedocs.io**](https://radar-api.readthedocs.io/)\n\n<div align=\"left\">\n\n## \ud83d\ude80 Quick start\n\nRADAR-API provides an easy-to-use python interface to find, download and\nread weather radar data from several meteorological services.\n\nRADAR-API currently provides data access to the following\nradar networks: ``NEXRAD``, ``IDEAM`` and ``FMI``.\n\nThe list of available radars can be retrieved using:\n\n```python\nimport radar_api\n\nradar_api.available_networks()\nradar_api.available_radars()\nradar_api.available_radars(network=\"NEXRAD\")\n```\n\nBefore starting using RADAR-API, we highly suggest to save into a configuration file\nthe directory on your local disk where to save the radar data of interest.\n\nTo facilitate the creation of the RADAR-API configuration file, you can adapt and execute the following script:\n\n```python\nimport radar_api\n\nbase_dir = (\n \"<path/to/directory/RADAR\" # path to the directory where to download the data\n)\nradar_api.define_configs(base_dir=base_dir)\n\n# You can check that the config file has been correctly created with:\nconfigs = radar_api.read_configs()\nprint(configs)\n```\n\n______________________________________________________________________\n\n### \ud83d\udce5 Download radar data\n\nYou can start to download radar data editing the following code example:\n\n```python\nimport radar_api\n\nstart_time = \"2021-02-01 12:00:00\"\nend_time = \"2021-02-01 13:00:00\"\n\nradar = \"KABR\"\nnetwork = \"NEXRAD\"\n\nfilepaths = radar_api.download_files(\n network=network,\n radar=radar,\n start_time=start_time,\n end_time=end_time,\n)\n```\n\n______________________________________________________________________\n\n### \ud83d\udcab Open radar files into xarray or pyart\n\nRADAR-API allows to read directly radar data from the cloud without the\nneed to previously download and save the files on your disk.\n\nRADAR-API make use of pyart and xradar readers to open the files into either\nan xarray object or pyart radar object.\n\n```python\nimport radar_api\nimport pyart\n\n# Search for files on cloud bucket\nfilepaths = radar_api.find_files(\n network=network,\n radar=radar,\n start_time=start_time,\n end_time=end_time,\n protocol=\"s3\",\n)\nprint(filepaths)\n \n# Define the file to open\nfilepath = filepaths[0]\n\n# Open all sweeps of a radar volume into a xradar datatree\ndt = radar_api.open_datatree(filepath, network=network)\n\n# Extract the radar sweep of interest\nds = dt[\"sweep_0\"].to_dataset()\n\n# Open directly a single radar sweep into a xradar dataset\nds = radar_api.open_dataset(filepath, network=network, sweep=\"sweep_0\")\n\n# Open all sweeps of a radar volume into a pyart radar object\nradar_obj = radar_api.open_pyart(filepath, network=network)\n\n# Display the data with pyart\ndisplay = pyart.graph.RadarDisplay(radar_obj)\ndisplay.plot(\"reflectivity\")\ndisplay.set_limits((-150, 150), (-150, 150))\n```\n\n______________________________________________________________________\n\n## \ud83d\udcd6 Documentation\n\nTo discover RADAR-API utilities and functionalities,\nplease read the software documentation available at [https://radar-api.readthedocs.io/en/latest/](https://radar-api.readthedocs.io/en/latest/).\n\nAll RADAR-API tutorials are available as Jupyter Notebooks in the [`tutorial`](https://github.com/ghiggi/radar_api/tree/main/tutorials) directory.\n\n______________________________________________________________________\n\n## \ud83d\udee0\ufe0f Installation\n\n### conda\n\nRADAR-API can be installed via [conda][conda_link] on Linux, Mac, and Windows.\nInstall the package by typing the following command in the terminal:\n\n```bash\nconda install radar-api\n```\n\nIn case conda-forge is not set up for your system yet, see the easy to follow instructions on [conda-forge][conda_forge_link].\n\n### pip\n\nRADAR-API can be installed also via [pip][pip_link] on Linux, Mac, and Windows.\nOn Windows you can install [WinPython][winpy_link] to get Python and pip running.\nThen, install the RADAR-API package by typing the following command in the terminal:\n\n```bash\npip install radar-api\n```\n\nTo install the latest development version via pip, see the [documentation][dev_install_link].\n\n## \ud83d\udcad Feedback and Contributing Guidelines\n\nIf you aim to contribute your data or discuss the future development of RADAR-API,\nwe suggest to join the [**Open Radar Science Discourse Group**](https://openradar.discourse.group/).\n\nFeel free to also open a [GitHub Issue](https://github.com/ghiggi/radar_api/issues) or a [GitHub Discussion](https://github.com/ghiggi/radar_api/discussions) specific to your questions or ideas.\n\n## Citation\n\nIf you are using RADAR-API in your publication please cite our Zenodo repository:\n\n> Ghiggi Gionata. ghiggi/radar_api. Zenodo. [](https://doi.org/10.5281/zenodo.14743651)\n\nIf you want to cite a specific software version, have a look at the [Zenodo site](https://doi.org/10.5281/zenodo.14743651).\n\n## License\n\nThe content of this repository is released under the terms of the [MIT license](LICENSE).\n\n</div>\n\n[conda_forge_link]: https://github.com/conda-forge/radar-api-feedstock#installing-radar-api\n[conda_link]: https://docs.conda.io/en/latest/miniconda.html\n[dev_install_link]: https://radar-api.readthedocs.io/en/latest/02_installation.html#installation-for-contributors\n[pip_link]: https://pypi.org/project/radar-api\n[winpy_link]: https://winpython.github.io/\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2025 Gionata Ghiggi\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n ",
"summary": "Python software to retrieve weather radar data from cloud buckets",
"version": "0.1.0",
"project_urls": {
"changelog": "https://github.com/ghiggi/radar_api/blob/main/CHANGELOG.md",
"documentation": "https://radar-api.readthedocs.io",
"homepage": "https://github.com/ghiggi/radar_api",
"repository": "https://github.com/ghiggi/radar_api",
"source": "https://github.com/ghiggi/radar_api",
"tracker": "https://github.com/ghiggi/radar_api/issues"
},
"split_keywords": [
"weather",
" radar",
" precipitation",
" nexrad",
" fmi"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "201879ba7da90d3f9d6e88804d9856a824a2b6d24db50cf52ba84b668a15646c",
"md5": "db993920de072d615703b8a73eb11099",
"sha256": "c25082b06b136fcb4b42ebec2b40ac86f5d8878e5c52bb5f08480eef30f256bf"
},
"downloads": -1,
"filename": "radar_api-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "db993920de072d615703b8a73eb11099",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 125577,
"upload_time": "2025-02-03T11:40:25",
"upload_time_iso_8601": "2025-02-03T11:40:25.701651Z",
"url": "https://files.pythonhosted.org/packages/20/18/79ba7da90d3f9d6e88804d9856a824a2b6d24db50cf52ba84b668a15646c/radar_api-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "a52b63e5f111d036b4d184640239247593ad66953c6330b5896e575be8c5d37b",
"md5": "bc50fc547d8bac5e75fa0da60061aebf",
"sha256": "0238a6008653b05af16e6716cd5991f0b91f5bec8b6915c9ef7d9dd45084b203"
},
"downloads": -1,
"filename": "radar_api-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "bc50fc547d8bac5e75fa0da60061aebf",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 62245,
"upload_time": "2025-02-03T11:40:27",
"upload_time_iso_8601": "2025-02-03T11:40:27.070490Z",
"url": "https://files.pythonhosted.org/packages/a5/2b/63e5f111d036b4d184640239247593ad66953c6330b5896e575be8c5d37b/radar_api-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-03 11:40:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ghiggi",
"github_project": "radar_api",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"lcname": "radar-api"
}