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
.
Usage
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",
...
)
Arguments
- id.table
ID columname to merge to that is found in the database eg.
kommune
- id.file
ID columname from the file to merge from. This depends on the columnames in the files. If
id.table
iskommune
, thenid.file
must be the columname representing geo codes that is equivalent tokommune
codes. Bothid.table
andid.file
will be used for merging and these codes must be unique.- geo.col
Columname where the new geo codes are eg. if the new geo codes is on levekaar, then
geo.col
is the columname where codes for levekaar can be found.- geo.level
Geographical level of the merged file will be representing eg. "levekaar". This will be the value in column
level
in thetblGeo
in the database. the value in columnname
in thetblGeo
in the database.- geo.name
Column containing names of the geographical units in the merged file. This will be the value in column
name
in thetblGeo
in the database.- file
Complete path of filename to merge from
- localtable
a data.table generated with
geo_map_multi()
. To create complete mapping table of geo codes including manually merged codes.- year
Year the code is valid for. If not sepecified
orgdata.year
is used.- write
Write table to the
orgdata.geo
database. It will overwrite the table if it already exists- table.name
Name of the table for geo recode in geocodes database. This can be found with
getOptions("orgdata.geo")
. The default istblGeo
.- ...
Other possible arguments