Skip to content

This is an API tutorial for a workshop at "Code for DC's National Day of Civic Hacking"

Notifications You must be signed in to change notification settings

JAStark/API_tutorial2016

Folders and files

NameName
Last commit message
Last commit date

Latest commit

944c987 · Jun 4, 2016

History

5 Commits
Jun 3, 2016
Jun 4, 2016
Jun 3, 2016
Jun 4, 2016
Jun 4, 2016
Jun 3, 2016
Jun 4, 2016
Jun 3, 2016
Jun 3, 2016
Jun 3, 2016
Jun 3, 2016

Repository files navigation

API_tutotial2016

This is an API tutorial for a workshop at "Code for DC's National Day of Civic Hacking"

What is an API?

  • Application Programming Interface
  • “set of routines, protocols, and tools for building software and applications” [Wikipedia]
  • Usually used when someone makes an app that uses data
  • Access:
    • Databases (comment sections on websites, open government data)
    • streaming data (e.g uber, twitter)

Files description:

  • One .keynote with some basic API info and a resources slide
  • Two .py files:
    • API_code.py contains code to grab data from the 30-day crime API
    • scheduled_API_code.py contains code to schedule grabing of the data so you can collect multiple times at regular intervals (eg when running on a server): - Data is appended to a csv, - Duplicates are removed, - Scheduling is (currently, but you can change it) once every ~29 days
  • One .ipynb file that steps through the process more clearly (hopefully)
    • the code is a little different from API_code.py but essentally does the same thing
  • One .geojson file as an example of API output
  • Two .csv. example output files. They are slightly different:
    • spyder_foo.csv is an output when running the scheduled_API_code.py from my Spyder IDE
    • ipython_foo.csv is the output when running the ipython notebook code.

Resources

APIs you could play with

About

This is an API tutorial for a workshop at "Code for DC's National Day of Civic Hacking"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published