Gazetteer

Wikipedia defines a Gazetteer as:

A gazetteer is a geographical dictionary or directory used in conjunction with a map or atlas.

This is exactly what you get from this package, the gazetteer data that is released under public domain from U.S. Census Bureau all nicely packaged as R data structures.

Some Core Concepts

Before diving into the data it will be helpful if you familiarize yourself with some core concepts related to the U.S. census data. Instead of repeating the information here, I'm simply linking to pages from the census bureau site. If you are new to this data I highly encourage you to read the links below.

Every geo data uses some kind of ID to uniquely determine a geographic entity. The links below will help you understand the various types of geo IDs in use. Understanding these types of IDs is essential to joining the gazetteer data with geo-spatial data from other sources.

The Data

The package contains one data.frame called state.areas.2010 and 6 lists, gazetteer.2010, gazetteer.2012, gazetteer.2013, gazetteer.2014, gazetteer.2015, and gazetteer.2016.

state.area.2010 contains state level gazetteer data, compiled from data from U.S. Census Bureau, and Wikipedia. In all the data.frame has 77 rows, 50 states + DC + Territories.

Here's a small sample of it.

library(usgazetteer)
knitr::kable(head(state.areas.2010[,c(1:9,23,24)]), format = 'html')

You get various geo-IDs for each state including FIPS/GNISID/USPS/USCG as well as land and water areas and coordinates for an internal point in the state.

In addition to the state level data, the gazetteer.20* lists each contain data.frames for gazetteer data for each type of geographic entity. Each element of the list is assigned a name that indicates the data that element holds. The suffix of the list name is indicative of the year for which the data was relased. e.g. gazetteer.2015 contains data valid from 2015.

e.g. The names of data stored in the gazetteer.2016 list is shown below.

knitr::kable(data.frame(`Data Name`=names(gazetteer.2016)), format = 'html')

You can retrieve the names of any list using the standard names(<list>) call. e.g. names(gazetteer.2014)

To retrieve information from any particular gazetteer simply reference it from the list by its name.

counties.2016 <- gazetteer.2016$Counties
knitr::kable(head(counties.2016[,c(1:4,9:12)]),  format = 'html')

Using the Gazetteer Data

While the data on its own is not very useful, it is very much useful when working with geo-spatial data obtained from other sources. It allows you to map names of geographic entities (states,counties, congressional districts etc.) to their corresponding geoids. It also gives you some useful data like land/water/total area of each entity as well as latitude/longitude values of an internal point in that said entity. These can be used to normalize geo-data by area (using the land/water/total area) or place labels/markers on geographic entities when mapping them.

Lastly this is perhaps the authoritative source of data of this kind. So while there are other packages that offer similar data, none offer so much comprehensive data in one place. This package along with the acs package, which allows you to query dynamic census data, and the tigris package which allows you to pull census shapefiles, provide comprehensive resources for any need you may have when it comes to obtaining/analyzing/plotting data from the U.S. Census Bureau.



bhaskarvk/usgazetteer documentation built on May 12, 2019, 8:24 p.m.