geo_merge | R Documentation |
Geo codes other than those downloaded from SSB API can be merged
to the main geo table ie. tblGeo
in the geocodes database. The file must
consist of id column to merge into ie. id.file
and the geo codes to add
to ie. geo.col
.
geo_merge(
id.table = NULL,
id.file = NULL,
geo.col = NULL,
geo.level = NULL,
geo.name = NULL,
file = NULL,
localtable = NULL,
year = NULL,
write = FALSE,
table.name = "tblGeo",
...
)
id.table |
ID columname to merge to that is found in the database eg.
|
id.file |
ID columname from the file to merge from. This depends on the
columnames in the files. If |
geo.col |
Columname where the new geo codes are eg. if the new geo codes
is on levekaar, then |
geo.level |
Geographical level of the merged file will be representing
eg. "levekaar". This will be the value in column |
geo.name |
Column containing names of the geographical units in the merged
file. This will be the value in column |
file |
Complete path of filename to merge from |
localtable |
a data.table generated with |
year |
Year the code is valid for. If not sepecified |
write |
Write table to the |
table.name |
Name of the table for geo recode in geocodes database. This
can be found with |
... |
Other possible arguments |
## Not run:
dt <- geo_merge(id.table = "grunnkrets",
id.file = "id",
geo.col = "col2",
geo.level = "levekaar",
geo.name = "col3",
file = "C:/path/to/file.csv",
year = 2022)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.