Learn R Programming

metsyn (version 0.1.2)

make_metsyn: 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.

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

Run this code
# 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)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab