Skip to main content

Access Meteo France API to fetch weather data.

Project description

PyPI - Version PyPI - Python Version


Tool to fetch weather data from Meteo France API based on latitude and longitude coordinates.

Table of Contents

Installation

pip install meteofr

Quickstart

Set up a (free) API key at portail-api.meteofrance.fr.

A first download of the list of weather stations is required to compute closest active at the time station from given point.

from pandas import Timestamp, Timedelta, DatetimeIndex
from meteofr.get_data import get_weather

test_point = (47.218102, -1.552800)

td = Timestamp("today", tz="Europe/Paris").normalize().tz_convert("UTC")
dates = DatetimeIndex([td - Timedelta("30d"), td])  # 1 year max

df = get_weather(dates=dates, point=test_point)
print(df.head)

#       POSTE      DATE   RR  QRR  DRR  QDRR   TN  QTN  HTN  ...  QTMERMAX  TMERMIN  QTMERMIN  HNEIGEF  QHNEIGEF  NEIGETOTX  QNEIGETOTX  NEIGETOT06  QNEIGETOT06  
# 0  44109012  20250301  0.0    1  NaN   NaN  2.8    1  448  ...       NaN      NaN       NaN      NaN       NaN        NaN         NaN         NaN          NaN  
# 1  44109012  20250302  0.0    1  NaN   NaN  1.8    1  442  ...       NaN      NaN       NaN      NaN       NaN        NaN         NaN         NaN          NaN  
# 2  44109012  20250303  0.0    1  NaN   NaN  2.3    1  553  ...       NaN      NaN       NaN      NaN       NaN        NaN         NaN         NaN          NaN  
# 3  44109012  20250304  0.0    1  NaN   NaN  4.9    1  547  ...       NaN      NaN       NaN      NaN       NaN        NaN         NaN         NaN          NaN  
# 4  44109012  20250305  0.2    1  NaN   NaN  4.0    1  647  ...       NaN      NaN       NaN      NaN       NaN        NaN         NaN         NaN          NaN  

# [5 rows x 136 columns]

License

meteofr is distributed under the terms of the MIT license.

See also

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

meteofr-0.0.6.tar.gz (2.2 MB view details)

Uploaded Source

Built Distribution

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

meteofr-0.0.6-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file meteofr-0.0.6.tar.gz.

File metadata

  • Download URL: meteofr-0.0.6.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for meteofr-0.0.6.tar.gz
Algorithm Hash digest
SHA256 0bc295b979749e5e111fb899f7dc814f2986fe399b52f17e6348ffba7c7deedb
MD5 debad019e48b6b48b4a474fd6436aa42
BLAKE2b-256 5c91a113baa2002114f328e10b2c4f2ad2cd81d44d6f3f110adcbd66a6307f22

See more details on using hashes here.

File details

Details for the file meteofr-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: meteofr-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for meteofr-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e62c2df301f028961cffd8b88e89d23c721212adfe979d1b6ff3b2ea7bca5238
MD5 07705227ffe836e3105e0e8c100ee102
BLAKE2b-256 76167adaf34df9838de1eee2e120cbf9469bcf9246f5d6b1876dea3dcd15edc3

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