Skip to content

Instantly share code, notes, and snippets.

View mheadd's full-sized avatar

Mark Headd (He/Him) mheadd

View GitHub Profile
@mheadd
mheadd / philly-311-stats.csv
Last active August 23, 2016 14:10
Counts for service name and service code from Philly 311 data
Service Code Service Name # of Requests
SR-IR01 Information Request 674869
SR-LI21 Maintenance Residential or Commercial 40001
SR-ST03 Rubbish/Recyclable Material Collection 31159
Directory Assistance 25545
SR-ST02 Illegal Dumping 24401
SR-PD01 Abandoned Vehicle 22109
SR-ST01 Street Defect 22005
SR-CL01 Graffiti Removal 17160
SR-ST18 Salting 14282
@mheadd
mheadd / trip-1.md
Last active August 8, 2016 17:26
Calculating commuter routes with & without 81 N through Downtown Syracuse

From Town of Tully (Town Hall) to Syracuse Coworks

Standard Route

  • Start out going west on Meetinghouse Rd toward State Route 281/NY-281.
  • Turn right onto State Route 281/NY-281.
  • State Route 281/NY-281 becomes US Route 11/US-11 N.
  • Merge onto I-81 N via the ramp on the left.
  • Take the Adams St exit, EXIT 18, toward Harrison St.
  • Stay straight to go onto Almond St.
  • Turn left onto E Genesee St/NY-92.
@mheadd
mheadd / datausa_census_api.rmd
Created July 11, 2016 14:42 — forked from lecy/datausa_census_api.md
Building Census Dataset in R Using datausa.io API
# Using the dataUSA.io API for Census Data in R
This gist contains some notes on constructing a query for census and economic data from the [DataUSA.io](http://datausa.io/) site. This is a quick-start guide to their API; for in-depth documentation check out their [API documentation](https://github.com/DataUSA/datausa-api/wiki/Overview).
A great way to learn how to structure a query is to visit a specific datausa.io page and click on the "Options" button on top of any graph, then select "API" to see the query syntax that created the graph.
![Analytics](https://ga-beacon.appspot.com/UA-27835807-2/gist-id?pixel)
## Example Use
@mheadd
mheadd / Overview.md
Last active July 13, 2016 14:25
Unpermitted Upstate

Summary

Use state-level data on business registration, permitting and inspections to cross check against local data sets for non-permitted businesses.

Opportunities

  • Identify unlicensed or unpermitted businesses or business activity.
  • Identify business that are not in compliance with local zoning ordinances (e.g., areas that are not zoned for commercial activities).
  • Validate (or optimize) snow plowing routes, particularly during times of snow or weather related emergencies.
  • Generate macro-level indicators of business activity in a city or region.
@mheadd
mheadd / city-of-syracuse.md
Last active May 24, 2016 18:58
Street name auto complete services for City of Syracuse and Onondaga County
~$ curl -s 'http://ipsweb.ci.syracuse.ny.us/searchList.svc/getStreets' \
-H 'Content-Type: application/json' \
--data-binary '{"street":"Geddes St"}' 
"Arden Dr & Geddes St S"
"Bear St W To Geddes St N"
"Bellevue Ave & Geddes St"
mysql> select distinct(Conviction_Description) from convictions where Conviction_Description like '%SPEED%';
+----------------------------------------------------+
| Conviction_Description                             |
+----------------------------------------------------+
| SPEED IN ZONE                                      |
| SPEEDING                                           |
| SPEEDING +15                                       |
| SPEED NOT REASONABLE AND PRUDENT                   |
| SPEEDING IN A WORK ZONE OR ON A RESTRICTED HIGHWAY |
@mheadd
mheadd / app-challenge-tips.md
Last active April 28, 2016 22:14
Tips & tricks for an effective app challenge demo / presentation

App Challenge Presentation: Tips & Tricks

The purpose of an app challenge demo or presentation is to succinctly present your work on a civic app or solution to a panel of judges. It is usually the culmination of days (or even weeks) of work, and may only be limited to a few minutes.

Here are a set of suggestions that can help make these few minutes in front of a judging panel as effective and impactful as possible.

Get ready

Prepare your presentation ahead of time - while judges may understand the desire to work on a project right up to the last minute, making sure your presentation is solid and tells a compelling story is as important as your project itself. Take the time to prepare slides or a similar visual presentation that can accompany your remarks to the judges.

@mheadd
mheadd / hello.cbl
Last active November 27, 2019 02:34
Hello world - Node.js, Express and COBOL
IDENTIFICATION DIVISION.
PROGRAM-ID. CLIOPTIONS.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 argv pic x(100) value spaces.
PROCEDURE DIVISION.
ACCEPT argv FROM argument-value
@mheadd
mheadd / microcivic.json
Last active January 21, 2016 14:55
A JSON format to describe civic data resources & microservices
{
"name": "phl-property-tax-balances",
"keywords": ["tax", "property", "delinquent", "deadbeat"],
"license": "CC0",
"sources": [{
"name": "City of Philadelphia",
"web": "http://opendataphilly.org",
"email": "data@opendataphilly.org"
}],
"resources": [{