Skip to content

Instantly share code, notes, and snippets.

View d-wasserman's full-sized avatar

David Wasserman d-wasserman

View GitHub Profile
@d-wasserman
d-wasserman / Census_Proportional_Downsampling.Rmd
Last active August 16, 2018 18:14
Take input census blocks and census block groups. Develop spatial joins of relationships and proportionally allocate Census block group estimates to blocks based on block proportions.
---
title: "Census Proportional Downsampling"
author: "David Wasserman"
date: "August 6, 2018"
purpose: "Take input census blocks and census block groups. Develop spatial joins of relationships and proportionally allocate Census block group estimates to blocks based on block proportions."
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
@d-wasserman
d-wasserman / Associate_Frequent_Transit_to_Parcel_Data.ipynb
Last active May 5, 2019 02:16
This notebook associates the distance and frequency of the most frequent rail and bus stops to a parcel dataset given the output from Count High Frequency Routes at Stops in the Esri BBB Toolbox.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@d-wasserman
d-wasserman / Elasticity_Derivation_Of_Low_Stress_Accessibility_To_Bike_Boardings.ipynb
Last active February 13, 2019 01:03
This notebook attempts to augment and replicate the regression analysis methodology documented in TCRP 153 for bicycle ridership by using various measures of bicycling accessiblity using level of traffic stress (Mineta, 2012). This notebook starts with some exploratory charting, tabulations, correlation analysis to help select test variables, an…
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@d-wasserman
d-wasserman / generate_pdna_store_from_shp.py
Last active April 3, 2023 04:09
Pandana Network Store from Shapefile
# This GIST provides a template for conveting shapefiles into pandana networks.
# Under a MIT Open Source License. https://opensource.org/licenses/MIT
# Researchers cite as Wasserman, D. Geopandas to Pandana Network Converter. (2019) GitHub repository, https://gist.github.com/d-wasserman/2d50671b37ee46b088e155293399a90c
def get_nodes_and_edges(shp_file,rounding=5):
"""Use geopandas to read line shapefile and compile all paths and nodes in a line file based on a rounding tolerance.
shp_file:path to polyline file with end to end connectivity
rounding: tolerance parameter for coordinate precision"""
edges = gpd.read_file(shp_file)
edges["from_x"]=edges["geometry"].apply(lambda x:round(x.coords[0][0],rounding))
@d-wasserman
d-wasserman / Geotagged_Photo_Clustering_Analysis.ipynb
Last active September 23, 2019 14:21
This notebook documents a clustering analysis of geotagged photos in order to identify photos of interest from a moderately long trip.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@d-wasserman
d-wasserman / Climate_Risk_Index.geojson
Last active September 25, 2020 05:25
This index is taken from a Propublica Article with data from the Rhodium Group. Only contains data for the lower 48 states. Other null counties are filled with average values and tagged. Source:https://projects.propublica.org/climate-migration/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.