Description Usage Arguments Value
View source: R/census_linking_focal.R
This function performs spatial linking based on coordinates data and the results of focal analyses based on raster grid cell data from the German Census 2011. By default it uses simulated coordinates data for demonstration purposes. Own coordinates, however, can be used as well.
1 2 3 4 5 6 7 | census_linking_focal(download = FALSE, own.data = FALSE,
which = c("Einwohner", "Frauen_A", "Alter_D", "unter18_A", "ab65_A",
"Auslaender_A", "HHGroesse_D", "Leerstandsquote", "Wohnfl_Bew_D",
"Wohnfl_Whg_D"), categorical = FALSE, set.missings = TRUE,
data.path = ".", coords.file = "", coords.object = "",
focal.matrix = matrix(c(1, 1, 1, 1, 1, 1, 1, 1, 1), nr = 3, nc = 3),
fun = "mean", suffix = "mean")
|
download |
Download census data (calls
|
own.data |
Use own already downloaded census data (calls
|
which |
Vector of Census attributeses that should be linked to the data |
data.path |
Has to be defined when using option |
coords.file |
Path to file with coordinates; must be formatted as csv text file with a 'X' andheader... |
coords.object |
An R object ("Rdata" or "rda") containing the coordinates |
focal.matrix |
Matrix on which upon focal analyses are computed; cells
can be weighted as well as set to |
fun |
Function that is used in the focal analyses |
suffix |
Suffix that is appended to variable names |
set.missing |
Toggle whether to set missings on Census attributes |
na.delete |
logical. If TRUE, NA will be removed from focal computations. The result will only be NA if all focal cells are NA. Except for some special cases (weights of 1, functions like min, max, mean), using na.rm=TRUE is generally not a good idea in this function because it will unbalance the effect of the weights |
A data.frame
with census attributes based on focal analyses
for each coordinate
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.