regTable | R Documentation |
This function registers a new areal data table into the geospatial database.
regTable(
...,
subset = NULL,
dSeries = NULL,
gSeries = NULL,
label = NULL,
begin = NULL,
end = NULL,
schema = NULL,
archive = NULL,
archiveLink = NULL,
downloadDate = NULL,
updateFrequency = NULL,
metadataLink = NULL,
metadataPath = NULL,
notes = NULL,
diagnose = FALSE,
overwrite = FALSE
)
... |
|
subset |
|
dSeries |
|
gSeries |
|
label |
|
begin |
|
end |
|
schema |
|
archive |
|
archiveLink |
|
downloadDate |
|
updateFrequency |
|
metadataLink |
|
metadataPath |
|
notes |
|
diagnose |
|
overwrite |
|
When processing areal data tables, carry out the following steps:
Determine the main territory (such as a nation, or any
other polygon), a subset
(if applicable), the ontology
label
and the dataseries of the areal data and of the geometry, and
provide them as arguments to this function.
Provide a begin
and end
date for the areal data.
Run the function.
(Re)Save the table with the following properties:
Format: csv
Encoding: UTF-8
File name: What is provided as message by this function
make sure that the file is not modified or reshaped. This will happen during data normalisation via the schema description, which expects the original table.
Confirm that you have saved the file.
Every areal data dataseries (dSeries
) may come as a slight
permutation of a particular table arrangement. The function
normTable
expects internally a schema description (a list
that describes the position of the data components) for each data table,
which is saved as paste0("meta_", dSeries, TAB_NUMBER)
. See package
tabshiftr
.
Returns a tibble of the entry that is appended to 'inv_tables.csv' in
case update = TRUE
.
Other register functions:
regDataseries()
,
regGeometry()
if(dev.interactive()){
# build the example database
adb_exampleDB(until = "regGeometry", path = tempdir())
# the schema description for this table
library(tabshiftr)
schema_madeUp <-
setIDVar(name = "al1", columns = 1) %>%
setIDVar(name = "year", columns = 2) %>%
setIDVar(name = "commodities", columns = 3) %>%
setObsVar(name = "harvested",
factor = 1, columns = 4) %>%
setObsVar(name = "production",
factor = 1, columns = 5)
regTable(nation = "Estonia",
subset = "barleyMaize",
label = "al1",
dSeries = "madeUp",
gSeries = "gadm",
begin = 1990,
end = 2017,
schema = schema_madeUp,
archive = "example_table.7z|example_table1.csv",
archiveLink = "...",
nextUpdate = "2024-10-01",
updateFrequency = "quarterly",
metadataLink = "...",
metadataPath = "my/local/path")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.