get_SMCdata | R Documentation |
This is a function to download DWD data based on a buffer distance. The meteorological variables are provide in data.frame per station id.
get_SMCdata(
lat_center,
lon_center,
radius_km,
time_lag = "daily",
meteo_var = "soil",
start_date,
end_date,
data_dir = tempdir()
)
lat_center |
latitude central point for the buffer |
lon_center |
longitude central point for the buffer |
radius_km |
for the buffer |
time_lag |
default "hourly" , it can be change for daily or other timestamp available |
meteo_var |
type of meteorological data target in the DWD ftp (see option below) |
start_date |
select stations with date later than |
end_date |
select stations with date earlier than |
data_dir |
where to save the downlaod data, default temporary. |
period |
default "historical", if change to "recent" you get one year lag up to "now". |
var_name |
variable name target in the the downloaded meteo_var file (see option below) |
a list with: 1- a data.frame with the selected variable per station id for the set timestamp, and 2- a data.frame with metadata information, such as stations_id, start_date, end_date, station_height, latitude, longitude, stations_name, region, time_lag, variable, period, file, distance, url.
#########
SMC_daily <- get_SMCdata(lat_center = 52.4537,
lon_center = 13.3017,
radius_km = 70,
time_lag = "daily",
meteo_var = "soil",
start_date = "2019-01-01",
end_date = "2020-12-31");
SMC_daily[[1]][[1]];
summary(SMC_daily[[1]][[1]]);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.