home

Blog

Hereโ€™s a cool graph on the US census data

Run R

library(ggplot2)
census = read.csv('/usr/share/data/kaggle/census.csv')

x <- ggplot(data = census) +
  geom_histogram(stat="identity", aes(x = State, y = Transit)) +
  theme(axis.text.x = element_text(angle = 90, hjust = 1))
## Warning: Ignoring unknown parameters: binwidth, bins, pad
print(x)
## Warning: Removed 797 rows containing missing values (position_stack).

home