Skip to content

Instantly share code, notes, and snippets.

View mobility-covid-growth.py
# This code released under an MIT license. In notebook form with more explanation:
# https://github.com/nikhaldi/covid-notebooks/blob/master/Mobility%20vs%20COVID-19%20growth%20plot.ipynb
import numpy as np
import pandas as pd
us_counties = pd.read_csv(
"https://raw.githubusercontent.com/nytimes/covid-19-data/master/us-counties.csv",
dtype={"fips": str},
parse_dates=["date"]
)
@nikhaldi
nikhaldi / 4sq.json
Last active Dec 27, 2015
Parsing Gnip data offline into a CSV
View 4sq.json
{
"id":"tag:gnip.foursquare.com:2013:checkin/5277ee1311d238dfb8e36484",
"postedTime":"2013-11-04T18:57:22+00:00",
"verb":"checkin",
"actor":{
"objectType":"person",
"gender":"female"},
"object":{
"id":"tag:gnip.foursquare.com:2013:venue/4b69feebf964a52098c02be3",
"displayName":"The Vitamin Shoppe",
@nikhaldi
nikhaldi / method.rb
Created Jan 17, 2013
Testing gist embedding in WordPress
View method.rb
# Whether a given string includes any whitespace.
def includes_whitespace?(string)
not string.match(/\s/).nil?
end