CommencerCommencer gratuitement

Getting data as simple features objects

The sf package, which stands for simple features, promises to revolutionize the way that vector spatial data are handled within R. sf objects represent spatial data much like regular data frames, with a list-column that contains the geometry of the geographic dataset. tigris can return spatial data as simple features objects either by declaring class = "sf" within a function call or by setting as a global option. In this exercise, you'll get acquainted with simple features in tigris.

Cet exercice fait partie du cours

Analyzing US Census Data in R

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Get data from tigris as simple features
options(___ = "sf")
Modifier et exécuter le code