View source: R/get_Solardata.R
get_Solardata | 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_Solardata(
lat_center,
lon_center,
radius_km,
time_lag = "hourly",
meteo_var = "solar",
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.
#########
solar_radiation <- get_Solardata(lat_center = 52.4537,
lon_center = 13.3017,
radius_km = 70,
time_lag = "hourly",
meteo_var = "solar",
start_date = "2018-12-31",
end_date = "2021-01-01");
solar_radiation[[1]][[1]];
summary(solar_radiation[[1]][[1]]);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.