Blog Archives

Navigate through Decennial Census and American Community Survey

February 2, 2019
By
Navigate through Decennial Census and American Community Survey

Finding the right content in census data can be daunting. Just give you an idea how complex the census data are, there are 1127 tables and 25070 columns of table contents in the 2012-2017 ACS 5-year summary file alone. dataset number of tables number of columns 2010 decennial census summary file 1 333 8959 2012-2017 5-year ACS summary file 1127 25070 2017 1-year ACS summary file 1372 33593 The complexity does not...

Read more »

Cities boomed and doomed

December 14, 2018
By

Population in the United States grew by 3.76% from 313.91 million in 2012 to 325.72 million in 2017. The growth, however, is not uniform geographically. One of the geographical areas of particular interest is the city. Some cities are shrinking in population while some others exploding. The purpose of this post is to find cities that decrease and increase...

Read more »

Find Salamander — Congressional District Gerrymandering

October 22, 2018
By
Find Salamander — Congressional District Gerrymandering

When Republicans or Democrats are in charge, they tend to draw election district boundaries to their favor. This can go very ugly, creating wacky boundaries by a practice called Gerrymandering. The word “Gerrymander” is a blend of two species: the Massachusetts Governor Elbridge Gerry and a mythological salamander, a dragon-like monster. Governor Gerry signed a bill 200 year ago that...

Read more »

Map prisons in the United States

February 4, 2018
By

Despite 1 in every 110 adults are locked behind bars, most ordenary people have no idea where are these prisons. This post helps you find out the location of and number of inmates in federal prisons, state prisons, and local jails. The data are extracted from Census 2010. According to the census, a total number of 2,263,602 persons were incarcerated...

Read more »

Is your hometown named after Lincoln or Washington?

January 26, 2018
By
Is your hometown named after Lincoln or Washington?

Washington and Lincoln are the two greatest presidents in the history of the United States. This post, however, does not discuss how great they are. Instead, I want to show a fun fact related the two presidents: how many cities and towns (and equivalents) are named after them. I am living in Lincoln, Rhode Island, a town so named...

Read more »

Plot pie charts of racial composition in largest metro areas on a map in R

January 16, 2018
By
Plot pie charts of racial composition in largest metro areas on a map in R

Pie chart has been criticized for being a poor visualization and is not recommended in R community. The popular ggplot2 package discourages the use of pie charts and there is no dedicated geom_pie for it. Although the criticism is mostly valid, there is a case that pie chart can be useful: pie charts on maps. Pie charting on map is...

Read more »

Determine relationship between census geographic entities with totalcensus package

December 27, 2017
By
Determine relationship between census geographic entities with totalcensus package

This is an application example of totalcensus package. The geographic hierarchy primer in Census 2010 summary file 1 technical documentation displays the relationship between geographic entities. The lower one of the two entities connected by a line is entirely within the boundary of the upper one. For example, a county subdivision is always within the boundaries of a county and...

Read more »

Proccess 5-digit ZIP Code Tabulation Area (ZCTA5) data with totalcensus package

December 22, 2017
By
Proccess 5-digit ZIP Code Tabulation Area (ZCTA5) data with totalcensus package

This is an example of applications of totalcensus package. To install the package, follow the instructions at https://github.com/GL-Li/totalcensus. In this example, we examine data related to 5-digit ZIP Code Tabulation Area (ZCTA5), using 2016 ACS 5-year survey summary files. Let’s first load the libraries and then answer a couple questions related to zip code library(totalcensus) library(data.table) library(magrittr) library(ggplot2) library(ggmap) What’s the population in a ZCTA5 These population...

Read more »

Search R-bloggers

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)