НачатьНачать бесплатно

Understanding the structure of tigris objects

By default, tigris returns objects of class Spatial*DataFrame from the sp package. Objects of class Spatial* represent components of spatial data in different slots, which include descriptions of the object's geometry, attributes, and coordinate system. In this exercise, we'll briefly examine the structure of objects returned by tigris functions.

Это упражнение является частью курса

Analyzing US Census Data in R

Посмотреть курс

Инструкции к упражнению

  • Check the class of the Colorado counties object.
  • Look at the first few rows of the data slot of the Colorado counties object.
  • Check the coordinate system of the co_counties object by viewing the proj4string slot.

Интерактивное практическое упражнение

Попробуйте выполнить это упражнение, дополнив этот пример кода.

# Check the class of the data
___(co_counties)

# Take a look at the information in the data slot
head(co_counties@___)

# Check the coordinate system of the data
___@proj4string
Редактировать и запускать код