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 / 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.
@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 / 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 / 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 / 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 / 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 / Scikit_Image_Experiments.ipynb
Created April 29, 2018 08:24
This is just a series of random experiments using the scikit-image library (filters, histograms, etc) to inspect an image.
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 / EDA_HIN_Transit_Charts.ipynb
Created February 11, 2018 21:09
This notebook is a quick exploration of the relationship between different metrics of transit frequency at the stop level (~12,000 stops in the SF Bay Area) and the collision density indexes (severity weighted) from a Bay Area wide High Injury Network (HIN) analysis.
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 / Citi_Bike_OD_Analysis.ipynb
Last active March 27, 2018 19:35
Project: Summarize 1 Month of 2017 Citibike OD Data into a a format accepted by Spatial Sankey (geojson for ODs, and flow csv). Uses Google Datalab.
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 / EDAStatsModels.ipynb
Last active February 21, 2018 15:27
Exploratory Data Analysis of Transit Ridership and Variables Relating to Demographics and Service Characteristics - This notebook demonstrates the use of pandas, statsmodels, and seaborn for the purpose of urban data analysis. This regression modeling script is an exploratory exercise used to identify possible determinants of P & R ridership.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.