เริ่มต้นใช้งานเริ่มต้นใช้งานได้ฟรี

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.

แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร

Analyzing US Census Data in R

ดูคอร์ส

แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ

ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์

# Get data from tigris as simple features
options(___ = "sf")
แก้ไขและรันโค้ด