View source: R/sw_dbW_WeatherDatabase.R
dbW_createDatabase | R Documentation |
Create a weather database
dbW_createDatabase(
dbFilePath = "dbWeatherData.sqlite3",
site_data = data.frame(Label = NA_character_, Longitude = NA_real_, Latitude =
NA_real_, stringsAsFactors = FALSE)[0, , drop = FALSE],
Scenarios = NULL,
scen_ambient = "Current",
compression_type = "gzip",
verbose = FALSE,
...
)
dbFilePath |
A character string. The file path of the weather database.
This will be a file of type |
site_data |
A data.frame. The site data with column names
|
Scenarios |
A vector of character strings. The climate scenarios of
which the first one is enforced to be |
scen_ambient |
A character string. The first/default climate scenario. |
compression_type |
A character string. The type of compression for
the weather blob. See |
verbose |
A logical value. |
... |
Additional/deprecated arguments which are currently ignored. |
TRUE
on success; FALSE
otherwise. If the file
dbFilePath
didn't already exist, but creating it failed, then the
attempt will be disconnected and removed.
A rSOILWAT2 weather database has the following format:
contains two fields Desc and Value which contain
the records Version and Compression_type
contains four fields Site_id, Latitude, Longitude, and Label
contains six fields wdid (the ID of the weather data record), Site_id, Scenario (i.e., the ID of the scenario), StartYear, EndYear, and data
contains two fields id and Scenario (i.e., the scenario name)
'site_data' requires columns 'Longitude', 'Latitude', and 'Label'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.