meteofrance_publicapi.observations module#

The interface for the observational data from the meteo-France API.

See : - https://portail-api.meteofrance.fr/web/fr/api/DonneesPubliquesObservation - https://portail-api.meteofrance.fr/web/fr/api/DonneesPubliquesPaquetObservation

class meteofrance_publicapi.observations.Observations(api_key: str | None = None, token: str | None = None, application_id: str | None = None)[source]#

Bases: MeteoFranceAPI

Wrapper around the meteo-France API for the observational data.

It wrapps both the “station” and “paquet” endpoints.

Ressources are: - list_stations - /station/horaire - /station/infrahoraire-6m - /paquet/infrahoraire-6m - /paquet/horaire - /paquet/stations/infrahoraire-6m - /paquet/stations/horaire

Documentation#

See: - https://portail-api.meteofrance.fr/web/fr/api/DonneesPubliquesPaquetObservation - https://donneespubliques.meteofrance.fr/?fond=produit&id_produit=93&id_rubrique=32

base_url = 'https://public-api.meteofrance.fr/public/DPObs/'#
get_station_6min(station_id: str, datetime: str | None = None, rename_columns: bool = True)[source]#

Get the 6min data for a given station.

Parameters:#

station_id: str

the id of the station

datetime: str

the date of the data, in the format ISO 8601 (YYYY-MM-DDTHH:MM:SSZ)

format: {“json”, “csv”, “geojson”}

the format of the data.

Returns:#

pd.DataFrame: a DataFrame with the data.

get_station_horaire(station_id: str, datetime: str | None = None, rename_columns: bool = True)[source]#

Get the hourly data for a given station.

Parameters:#

station_id: str

the id of the station

datetime: str

the date of the data, in the format ISO 8601 (YYYY-MM-DDTHH:MM:SSZ)

format: {“json”, “csv”, “geojson”}

the format of the data.

Returns:#

pd.DataFrame: a DataFrame with the data.

list_stations()[source]#

Liste the available stations.

Returns:#

pd.DataFrame: a DataFrame with the list of stations.

version = 'v1'#