Learn R Programming

mapping (version 1.4.1)

loadCoordFR: Get France coordinates

Description

Loads and returns names, id, and coordinates for France statistical unit, to use with mapping functions and other "map" functions that accept an sf object.

Usage

loadCoordFR(unit = c("region"), year = c("2021", "2020", "2019"), 
            unit_subset = NULL, matchWith = NULL, dir = NULL, 
            use_cache = TRUE, use_internet = TRUE, crs = NULL)

Value

A data.frame object with column indicating names, id, and the geometry to map.

Arguments

unit

the type of Italian statistical unit to link

year

year of the analysis

unit_subset

character vector of unit names to extract

matchWith

the type of id

dir

local directory in which shape files are stored

use_cache

a logical value indicating whether to use the cache

use_internet

a logical value indicating wheter the coordinates are downloaded from https://github.com/mappinguniverse/geospatial. If FALSE the maps downloaded during package installation will be used

crs

coordinate reference system. Look at st_crs

Details

Coordinates are download from the Github repo https://github.com/mappinguniverse/geospatial from FR folder https://github.com/mappinguniverse/geospatial/tree/master/FR.

If unit is not specified, country borders are loaded.

Examples

Run this code

# \donttest{
FR_coords = loadCoordFR(unit = "region", year = "2020")
str(FR_coords)

# }

Run the code above in your browser using DataLab