fssgeo: Function that creates an sf-object from IFS data

View source: R/fssgeo.R

fssgeoR Documentation

Function that creates an sf-object from IFS data

Description

Function that creates an sf-object from IFS data

Usage

fssgeo(ifs, crsOut = 3035, locAdj = FALSE)

Arguments

ifs

A data.frame or tibble with the locations and the data of the survey or census data

crsOut

The coordinate reference system (crs) to be used

locAdj

parameter to adjust the coordinates if they are exactly on the borders between grid cells. The values can either be FALSE, or "jitter" (adding a small random value to the coordinates, essentially spreading them randomly around the real location), "UR", "UL", "LR" or "LL", to describe which corner of the grid cell the location belong (upper right, upper left, lower right or lower left).

Details

The geo-location in the FSS file has a particular format. For 2020, it includes country, coordinate reference system (CRS), resolution (precision of coordinates) and coordinates in one attribute ("GEO_LCT"). For past years, the FSS data structure differs and it includes three separate columns, like latitudes, longitudes and coordinate reference system. This function splits the attribute in its individual parts, and creates an sf-object with the correct coordinates and CRS.

Value

An sf-object with the locations of the survey or census data

Examples

data(ifs_dk)
ifg = fssgeo(ifs_dk)



MRG documentation built on Oct. 28, 2024, 5:07 p.m.

Related to fssgeo in MRG...