View source: R/export_geoclim_month.R
export_geoclim_month | R Documentation |
export_geoclim_month
takes a data frame that is given by
month. This data frame is then rearranged using prepare_geoclim_month
to a
format suitable for use in GeoCLIM, and then written to a file or connection.
export_geoclim_month(
data,
year,
month,
element,
station_id,
latitude,
longitude,
metadata = NULL,
join_by = NULL,
add_cols = NULL,
file_path = paste0("GEOCLIM-", element, ".csv"),
...
)
data |
|
year |
|
month |
|
element |
|
station_id |
|
latitude |
|
longitude |
|
metadata |
|
join_by |
|
add_cols |
|
file_path |
|
... |
Other parameters passed to |
Invisibly returns the file path of the saved data.
# Calculate monthly summaries for the rainfall column
summary_data <- daily_niger %>% dplyr::group_by(year, month, station_name) %>%
dplyr::summarise(mean_rain = mean(rain))
export_geoclim_month(data = summary_data, year = "year", month = "month",
station_id = "station_name",
element = "mean_rain", metadata = stations_niger,
join_by = "station_name",
latitude = "lat", longitude = "long")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.