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.5.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.5-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: meteofr-0.0.5.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.5.tar.gz
Algorithm Hash digest
SHA256 85faecafa8b55bdeea6efbfc48bf2f2f2e423a4b51281e7998850c8954ae33d9
MD5 96287e2b907f01c7994de15e9598cec9
BLAKE2b-256 e0726e2aada09082e0aba9f90e22c2df8d6398833a80e0dadb59a9cb1a2d79fc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: meteofr-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 9.3 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 73fefa11d132beb553f36bf17e6e50d07e47b5eee017e7453fe8d7b3555fe35d
MD5 37227be909840709cf74939d7337efd1
BLAKE2b-256 fe833320b62a4e6898ede93eb0c88b2d63a50451db9ac47b9356f92540fc0383

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