Skip to content

Instantly share code, notes, and snippets.

View walkerke's full-sized avatar

Kyle Walker walkerke

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@walkerke
walkerke / index.html
Created January 30, 2017 12:06 — forked from tristen/index.html
Dynamic template
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title></title>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.26.0/mapbox-gl.css' rel='stylesheet' />
<link href='https://www.mapbox.com/base/latest/base.css' rel='stylesheet' />
<link href='site.css' rel='stylesheet' />
</head>
<body class='clip loading'>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
library(tigris)
library(sp)
library(geosphere)
library(mapview)
pdx_city_hall <- c(-122.6800162, 45.5149686)
mult <- tracts("OR", "Multnomah")
multxy <- coordinates(mult)
library(ggplot2)
library(animation)
library(readxl)
library(tidyr)
library(dplyr)
library(stringr)
library(magrittr)
# Data source: Jonathan Schroeder at http://conservancy.umn.edu/handle/11299/181605
df <- read_excel('cbsa2013_hist_pops.xlsx')
library(tigris)
library(sp)
div <- divisions()
zips <- zctas(cb = TRUE)
ne <- div[div$NAME == "New England", ]
ne_over <- over(ne, zips, returnList = TRUE)[[1]]
library(leaflet)
library(tigris)
library(sp)
compare_urban_metro <- function(metro_name) {
cbsa <- core_based_statistical_areas(cb = TRUE, resolution = '20m')
ua <- urban_areas(cb = TRUE)
dfw_cbsa <- cbsa[cbsa$NAME == metro_name, ]
@walkerke
walkerke / app.R
Last active September 12, 2022 13:27
library(shiny)
library(spdep)
library(leaflet)
library(RColorBrewer)
atx <- readRDS('travis.rds')
atx$id <- 1:nrow(atx)
atx2 <- atx[!is.na(atx$income), ]
library(readxl)
library(tigris)
library(sp)
library(maptools)
library(ggplot2)
library(rgdal)
library(ggthemes)
library(viridis)
library(extrafont)
library(rgeos)
library(idbr)
library(dplyr)
library(ggplot2)
library(tidyr)
library(countrycode)
library(gganimate)
library(tweenr)
ctrys <- countrycode(c('Russia', 'Ukraine', 'Belarus', 'Moldova', 'Georgia', 'Kazakhstan',
'Uzbekistan', 'Lithuania', 'Latvia', 'Estonia', 'Kyrgyzstan',