Skip to content

Instantly share code, notes, and snippets.

View marsha5813's full-sized avatar

Joey Marshall marsha5813

  • Washington, D.C. metro area
View GitHub Profile
@AlexandraKapp
AlexandraKapp / osrm_docker_windows.md
Last active July 15, 2024 16:16
How to set up your own OSRM backend with Docker on Windows

How to set up your own OSRM backend with Docker on Windows

The OSRM docker quick start provides a great explanation on how to set up the container: https://hub.docker.com/r/osrm/osrm-backend/

Yet - for Docker on Windows minor changes were necessary for me (otherwise I'd get "File not found" or "Permission" errors).

This is how it worked for me:

1. Pull the image

@ramhiser
ramhiser / latlong2fips.r
Created May 6, 2014 03:35
Latitude/Longitude to FIPS Codes via the FCC's API
# FCC's Census Block Conversions API
# http://www.fcc.gov/developers/census-block-conversions-api
latlong2fips <- function(latitude, longitude) {
url <- "http://data.fcc.gov/api/block/find?format=json&latitude=%f&longitude=%f"
url <- sprintf(url, latitude, longitude)
json <- RCurl::getURL(url)
json <- RJSONIO::fromJSON(json)
as.character(json$County['FIPS'])
}