Skip to content

Instantly share code, notes, and snippets.

View UNFPAmaldives's full-sized avatar
💭
the distance between what we have and what we want

UNFPA Maldives UNFPAmaldives

💭
the distance between what we have and what we want
View GitHub Profile
@ajdamico
ajdamico / survey design subsetting.R
Created February 28, 2019 17:11
incorrect standard errors when not including the full design information
library(survey)
data(api)
x <- apistrat
x <- subset( x , comp.imp == 'Yes' )
dstrat_before<-svydesign(id=~1,strata=~stype, weights=~pw, data=x, fpc=~fpc)
@denisemauldin
denisemauldin / .block
Last active March 19, 2019 19:14
Choropleth V5
license: gpl-3.0
height: 600
border: no
@ryanburge
ryanburge / RIP.10.17.2018.R
Created October 17, 2018 13:40
An animated gif from tweenr. State evangelicals and vote choice 2000-2016.
library(fst)
library(building)
library(car)
library(tidycensus)
library(extrafont)
library(viridis)
library(urbnmapr)
library(urbnthemes)
library(gganimate)
library(tweenr)
@bradoyler
bradoyler / .block
Last active September 6, 2018 23:00
Annotated Venn
license: mit
@HarryStevens
HarryStevens / README.md
Last active June 28, 2019 12:58
Albers USA with Puerto Rico

Create a resizable map with an Albers USA projection that includes Puerto Rico. Adapted from this block but compatiable with D3 v4 & v5 and including a fitSize() function to help with resizing.

@Hirosaji
Hirosaji / .block
Last active February 19, 2020 02:25
d3v4 - Switchable Table
# d3v4 - Switchable Table
license:
mit
@UNFPAmaldives
UNFPAmaldives / incomes.csv
Created April 16, 2018 01:07 — forked from samirrayani/incomes.csv
income by country
val cutoff year country
6910 cop5 1981 Australia
6864 cop5 1985 Australia
6555 cop5 1989 Australia
6551 cop5 1995 Australia
7002 cop5 2001 Australia
7090 cop5 2003 Australia
8818 cop5 1987 Austria
8744 cop5 1994 Austria
5813 cop5 1995 Austria
@UNFPAmaldives
UNFPAmaldives / incomes.csv
Created April 16, 2018 01:04 — forked from pstuffa/incomes.csv
NYT Incomes
6910 cop5 1981 Australia
6864 cop5 1985 Australia
6555 cop5 1989 Australia
6551 cop5 1995 Australia
7002 cop5 2001 Australia
7090 cop5 2003 Australia
8818 cop5 1987 Austria
8744 cop5 1994 Austria
5813 cop5 1995 Austria
Year Jurisdiction Grade Measure Race Score
2013 Boston 8 algebra White 311
2013 Boston 8 algebra Black 278
2013 Boston 8 algebra Hispanic 278
2013 Boston 8 algebra All races 287
2013 Chicago 8 algebra White 299
2013 Chicago 8 algebra Black 264
2013 Chicago 8 algebra Hispanic 275
2013 Chicago 8 algebra All races 274
2013 San Diego 8 algebra White 307

OSRM North America route server on EC2

Overview

OSRM route server is an extremely useful tool for getting the driving distance/time through multiple locations. The route server requires data that has to be downloaded and processsed before it can be used to serve routes from.

Processing OSRM data for large region like North America can be a real challenge due to memory and disk size requirements. It's also really time consuming. If you cut and try from scratch, you will repeatedly run into some constraints and fail after hours of running.

The following are summary notes from trying this with eventual success.