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

Uploaded Python 3

File details

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

File metadata

  • Download URL: meteofr-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 9955f669a89c643f34c6c252cb0806370391aef77a46f8c11e750978cc4e4eaf
MD5 2dd7f4fa94e8f482d65d66de2b1d9450
BLAKE2b-256 0c15a4987613001385fccb3571d9b2fc00b7917146fccb4a83df76db5a1832d5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: meteofr-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 8.8 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2a4d8432b5b1c794f4e8cb3ea3e71d44cd7f84a065333caa218550eb2797eb29
MD5 1808fba592923a2cf3fdc610b775f157
BLAKE2b-256 dd9750484bf948b303fee83ff6f80727a54c9c740dc234f71257a356cf90e197

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