https://github.com/martibosch/meteostations-geopy
Pythonic interface to access data from meteorological stations
https://github.com/martibosch/meteostations-geopy
Last synced: 2 months ago
JSON representation
Pythonic interface to access data from meteorological stations
- Host: GitHub
- URL: https://github.com/martibosch/meteostations-geopy
- Owner: martibosch
- License: gpl-3.0
- Created: 2023-04-19T14:16:02.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-04T00:55:34.000Z (3 months ago)
- Last Synced: 2025-02-04T01:32:04.175Z (3 months ago)
- Language: Python
- Size: 475 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://pypi.python.org/pypi/meteostations-geopy)
[](https://meteostations-geopy.readthedocs.io/en/latest/?badge=latest)
[](https://github.com/martibosch/meteostations-geopy/blob/main/.github/workflows/dev.yml)
[](https://results.pre-commit.ci/latest/github/martibosch/meteostations-geopy/main)
[](https://codecov.io/gh/martibosch/meteostations-geopy)
[](https://github.com/martibosch/meteostations-geopy/blob/main/LICENSE)
[](https://mybinder.org/v2/gh/martibosch/meteostations-geopy/HEAD?labpath=docs%2Fuser-guide%2Fagrometeo.ipynb)# Meteostations geopy
Pythonic interface to access data from meteorological stations
## Installation
Although meteostations-geopy is not available in PyPI and conda-forge yet (hopefully will be soon), it can be installed using conda/mamba and pip as follows:
```bash
# install GDAL-based requirements
conda install -c conda-forge contextily geopandas osmnx
# install meteostations-geopy from GitHub
pip install https://github.com/martibosch/meteostations-geopy/archive/main.zip
```## Overview
This library provides a set of provider-specific clients to get observations from meteorological stations.
```python
from meteostations.clients import agrometeostart_date = "2021-08-13"
end_date = "2021-08-16"client = agrometeo.AgrometeoClient(region="Canton de Genève")
ts_df = client.get_ts_df(start_date=start_date, end_date=end_date)
ts_df.head()
```
name
DARDAGNY
LA-PLAINE
SATIGNY
PEISSY
ANIERES
LULLY
LULLIER
BERNEX
TROINEX
MEINIER
time
2021-08-13 00:00:00
19.3
17.8
18.5
17.9
20.6
18.4
20.3
18.6
19.4
25.8
2021-08-13 00:10:00
19.6
17.9
18.4
17.7
20.0
18.3
19.6
18.7
19.1
28.6
2021-08-13 00:20:00
19.0
17.7
18.2
17.6
19.4
18.4
19.1
18.7
19.2
24.1
2021-08-13 00:30:00
18.3
18.0
18.1
17.4
19.1
18.3
19.1
18.6
18.9
22.5
2021-08-13 00:40:00
18.7
18.0
18.1
17.6
19.1
18.0
19.0
18.7
18.5
21.5
5 rows × 10 columns
```python
ts_df.resample("H").mean().plot()
```
See [the user guide](https://meteostations-geopy.readthedocs.io/en/latest/user-guide.html) for more details.
## See also
This library intends to provide a unified way to access data from meteorological stations from multiple providers. The following libraries provide access to data from a specific provider:
- [martibosch/agrometeo-geopy](https://github.com/martibosch/agrometeo-geopy)
- [martibosch/netatmo-geopy](https://github.com/martibosch/netatmo-geopy)Eventually these packages will be fully integrated into meteostations-geopy.
## Acknowledgements
- Many utils such as the requests cache mechanism or the logging system are based on code from [gboeing/osmnx](https://github.com/gboeing/osmnx).
- This package was created with the [martibosch/cookiecutter-geopy-package](https://github.com/martibosch/cookiecutter-geopy-package) project template.
- With the support of the École Polytechnique Fédérale de Lausanne (EPFL).