Skip to content

Instantly share code, notes, and snippets.

View MatthewSchumwinger's full-sized avatar

Matt Schumwinger MatthewSchumwinger

View GitHub Profile
@MatthewSchumwinger
MatthewSchumwinger / README.md
Last active November 22, 2016 18:27
gathering

Map the travel patterns of many people to a single destination. Suggested uses:

  • professional conferences and conventions
  • family reunions
  • athletic tournaments

This framework was originally used plot the cross-country travel of 50 relatives to a family reunion. It can be readily applied to professional gatherings – as seen here with speakers attending the 2015 JSGeo conference.

@MatthewSchumwinger
MatthewSchumwinger / gist:8870864
Created February 7, 2014 20:15
R snippet for color histogram is used in Milwaukee building ages map
library(ggplot2)
library(grid)
## create bins for color legend
s.data$YR_BUILT <- as.numeric(s.data$YR_BUILT)
bin1 <- s.data$TAXKEY %in% subset(s.data, YR_BUILT < 1897)$TAXKEY
s.data$bin[bin1] <- "< 1897"
bin2 <- s.data$TAXKEY %in% subset(s.data, YR_BUILT >= 1897 & YR_BUILT < 1935)$TAXKEY
s.data$bin[bin2] <- "1897-1935"
bin3 <- s.data$TAXKEY %in% subset(s.data, YR_BUILT >= 1935 & YR_BUILT < 1945)$TAXKEY