Skip to content

Instantly share code, notes, and snippets.

@fgregg
fgregg / app_ideas.md
Created February 20, 2020 19:00
app ideas
  • councilmatic for ann arbor
  • twitter bot for the wolverine
  • clearstreets for ann arbor
  • twitter bot for new restaurants in washtenaw county
  • plotting bad sidewalks in AA
  • pollution in michigan water
@fgregg
fgregg / ward_community_area_overlap.csv
Created December 14, 2018 19:46
Ward Community Area Overlap
ward community proportion_of_ward_in_community_area
1 WEST TOWN 0.583178464274206
1 LOGAN SQUARE 0.392380054759725
1 HUMBOLDT PARK 5.05596447686876e-05
1 NORTH CENTER 0.00942203809405585
1 LINCOLN PARK 0.0149688832272447
10 HEGEWISCH 0.265895481584491
10 SOUTH CHICAGO 0.0768757437832051
10 RIVERDALE 3.43949272079429e-09
10 EAST SIDE 0.151634348793321
@fgregg
fgregg / plots.R
Created September 22, 2018 20:36
Declines in Felony Cases
library(tidyverse)
library(lubridate) # we'll use this for some date processing
# Read in the data
intake <- read.csv("Intake.csv")
initiation <- read.csv("Initiation.csv")
# Turn RECEIVED_DATE from strings to date objects
intake <- intake %>%
mutate(RECEIVED_DATE = as.Date(RECEIVED_DATE, '%m/%d/%Y'))
@fgregg
fgregg / bisect.py
Last active September 3, 2018 18:00
Probabilistic Bisection Algorithm
# This software is a modified version of the bisect module found
# https://github.com/choderalab/thresholds/blob/master/thresholds/bisect.py
#
# MIT License
# Copyright (c) 2018 Chodera lab // Memorial Sloan Kettering Cancer
# Center
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
sudo openconnect --servercert 8c4a5addfc002902f117e35c3145d6545be6d5d6 ccvendorvpn.cookcountyil.gov --dump-http-traffic
POST https://ccvendorvpn.cookcountyil.gov/
Attempting to connect to server 162.217.185.248:443
Connected to 162.217.185.248:443
SSL negotiation with ccvendorvpn.cookcountyil.gov
Server certificate verify failed: unable to get local issuer certificate
Connected to HTTPS on ccvendorvpn.cookcountyil.gov
> POST / HTTP/1.1
> Host: ccvendorvpn.cookcountyil.gov
> User-Agent: Open AnyConnect VPN Agent v7.08
@fgregg
fgregg / stalled.csv
Last active December 4, 2017 16:34
Bills sponsored by majority of alderman but not passed
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 2 columns, instead of 3 in line 1.
O 2017-6854 Amendment of Municipal Code 9-115-150, 9-114-265 - Transportation network driver fingerprint/photo requirements and fare rates higher than regular rates
O 2017-6485 Amendment of Municipal Code Chapter 5-12 by modifying various sections of Residential Landlord and Tenants Ordinance concerning landlord access to dwelling unit, building security, and tenant immigration status
O 2017-225 Amendment of Municipal Code Chapter 10-36 by adding new Section 10-36-215 concerning ground handling service contracts
O 2016-5666 Creation of Public School Revitalization Grant for distribution of tax increment financing (TIF) Surplus Funds to financially distressed school districts
O 2017-1018 Amendment of Municipal Code Chapter 2-173 regarding Welcoming City Ordinance
O 2017-3200 Amendment of Municipal Code Chapter 4-4 by adding new Section 4-4-340 requiring licensed establishments to allow non-patrons to use public toilet facilities for emergency purposes
O 2017-3289 Amendment of Munic
@fgregg
fgregg / stalled.csv
Created December 4, 2017 15:39
Majority sponsored, stalled bills
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
O 2017-6854
Or 2016-673
O 2017-6485
R 2017-734
O 2017-225
R 2017-726
O 2016-5666
O 2017-1018
R 2016-908
Or 2017-365
name address
foo bar
@fgregg
fgregg / complaints.md
Created May 28, 2015 22:38
Complaint Types for Board of Review
  • A = ADD - review of assessment
  • E = EXEMPT - review of exempt status of parcel, because owned by tax exempt private entity
  • G = GOVERNMENT - review of exempt status of parcel, because owned by a government
  • P = PRE-FILE give data - a review of assessment where complainant has pre-filed evidence
  • T = TWO TOWNSHIPS - the property straddles two townships
  • C = C OF C - certificate of correction, the tax assessor has made an error and is requesting an adjustment to the assessement
  • X = PRORATED PIN - a property that the complainant did not include in their filing, but which the BOR believes is relevant to its judgement
  • U = UNDERVAL - a third party complains that a property owner is paying too little taxes