Skip to content

Instantly share code, notes, and snippets.

@timwis
Last active November 28, 2016 22:26
Show Gist options
  • Save timwis/bcdc4e3f7b52391a98f5a2a2df80ee42 to your computer and use it in GitHub Desktop.
Save timwis/bcdc4e3f7b52391a98f5a2a2df80ee42 to your computer and use it in GitHub Desktop.
Comparing FY16 adopted budget scripts

First, fetch the published file and prepare it for comparison

# Fetch file
curl 'https://data.phila.gov/resource/6quj-54t7.csv?$limit=5000' | \

# Fix currency formatting
sed -E 's/,\$([0-9]+)\.00/,\1/g' | \

# Sort
body csvsort > data/out/published.csv

Then, run clean.js from the fy16-adopted repo, processing the data/in/FY2016-adopted-unique.csv file to data/out/FY2016-adopted-unique.csv

node clean.js

Then sort the result

cat data/out/FY2016-adopted-unique.csv | body csvsort > data/out/published.csv

And there are a few differences. Nearly all are additions of lines with 0 totals, but there are two arbitrary removals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment