Package 'metsyn'

Title: Interface with the Meteo France Synop Data API
Description: Provides an interface with the Meteo France Synop data API (see <https://donneespubliques.meteofrance.fr/?fond=produit&id_produit=90&id_rubrique=32> for more information). The Meteo France Synop data are made of meteorological data recorded every three hours on 62 French meteorological stations.
Authors: Paul Poncet [aut, cre]
Maintainer: Paul Poncet <[email protected]>
License: MIT + file LICENSE
Version: 0.1.3
Built: 2024-10-29 03:45:35 UTC
Source: https://github.com/paulponcet/metsyn

Help Index


Download Meteo France Synop Data

Description

The functions download_daily_synop and download_monthly_synop enable to download Meteo France Synop Data described here.

Usage

download_daily_synop(path = ".", date, ...)

download_monthly_synop(path = ".", date, ...)

Arguments

path

character. Data once downloaded are saved in the folder file.path(path, "data-raw").

date

character. For download_daily_synop, a date in the form "YYYYMMDDHH". For download_monthly_synop, a date in the form "YYYYMM".

...

Additional parameters to be passed to download.file.

See Also

make_metsyn.


Creation of the 'metdes' dataset, made of descriptive information on the 'metsyn' dataset

Description

The function make_metdes creates the metdes dataset, which contains descriptive information on the metsyn dataset.

The dataset contains the following columns:

  • Short_Name: short name of the variable, in French;

  • Long_name_French: name of the variable, in French;

  • Long_Name_English: currently not provided yet;

  • Type: type of the variable (one of character, numeric, integer);

  • Unit: physical unit of the variable.

Usage

make_metdes(path = ".", save_it = FALSE)

Arguments

path

character. Data once created are saved in the folder file.path(path, "data").

save_it

logical. If TRUE, the result is saved as an .RData file in the folder file.path(path, "data").

Value

Returns invisibly the tibble created, with 5 columns and 59 rows.

Note

This dataset is distributed by Meteo France under the terms of the Open Licence 1.0, provided by Etalab and designed to be compatible with the "Creative Commons Attribution 2.0" (CC-BY 2.0) licence of Creative Commons. Etalab is the task force under the French Prime Minister's authority leading Open Government Data policy for France.

Source

Meteo France, see here.

See Also

metsyn for the dataset containing Meteo France Synop data; metsta for the dataset on the meteorological stations involved.

Examples

## Not run: 
make_metdes(save_it = TRUE)

## End(Not run)

Creation of the 'metsta' dataset made of Meteo France Synop meteorogical stations

Description

The function make_metsta creates the metsta dataset from the file postesSynop.csv downloaded here. make_metsta looks for this file in the file.path(path, "data-raw") folder.

This dataset contains the following columns:

  • Id: WMO meteorological station id;

  • Name: name of the meteorological station;

  • Latitude, Longitude, Altitude: coordinates of the meteorological station.

Usage

make_metsta(path = ".", save_it = FALSE)

Arguments

path

character. Data once created are saved in the folder file.path(path, "data").

save_it

logical. If TRUE, the result is saved as an .RData file in the folder file.path(path, "data").

Value

Returns invisibly the tibble created, with 5 columns and 62 rows.

Note

This dataset is distributed by Meteo France under the terms of the Open Licence 1.0, provided by Etalab and designed to be compatible with the "Creative Commons Attribution 2.0" (CC-BY 2.0) licence of Creative Commons. Etalab is the task force under the French Prime Minister's authority leading Open Government Data policy for France.

Source

Meteo France, see here.

See Also

metsyn for the dataset containing Meteo France Synop data; metdes for the dataset which gives some descriptive information on metsyn.

Examples

## Not run: 
dir.create("data-raw", showWarnings = FALSE)
make_metsta(save_it = TRUE)

## End(Not run)

Creation of the 'metsyn' dataset made of Meteo France Synop data

Description

The function make_metsyn creates the metsyn dataset from the files downloaded with download_monthly_synop. make_metsyn looks for these files in the file.path(path, "data-raw") folder.

This dataset is made of meteorological data recorded every three hours on 62 French meteorological stations.

The columns contained in this dataset are described by the metdes dataset.

Usage

make_metsyn(path = ".", save_it = FALSE)

Arguments

path

character. Data once created are saved in the folder file.path(path, "data").

save_it

logical. If TRUE, the result is saved as an .RData file in the folder file.path(path, "data").

Value

Returns invisibly the tibble created, with 59 columns.

Note

This dataset is distributed by Meteo France under the terms of the Open Licence 1.0, provided by Etalab and designed to be compatible with the "Creative Commons Attribution 2.0" (CC-BY 2.0) licence of Creative Commons. Etalab is the task force under the French Prime Minister's authority leading Open Government Data policy for France.

Source

Meteo France, see here.

See Also

download_monthly_synop; metdes for the dataset which gives some descriptive information on metsyn; metsta for the dataset on the meteorological stations involved.

Examples

## Not run: 
dir.create("data-raw", showWarnings = FALSE)
for (y in 1996:2016) {
  for (m in 1:12) {
    m <- if (m < 10) paste0(0, m) else m
    download_monthly_synop(date = paste0(y, m), 
                           mode = "wb")
  }
}
make_metsyn(save_it = TRUE)

## End(Not run)