Intro to Programming Using Open Government Data: Difference between revisions

From OpenHatch wiki
Content added Content deleted
imported>Shauna
No edit summary
imported>Shauna
 
(6 intermediate revisions by the same user not shown)
Line 16: Line 16:


Three project ideas:
Three project ideas:
* API project - Paul responsible for first draft of project (by 1/31/2013)
* API project - lead people: James and Erin
* Stats project - Shauna responsible for first draft of project (by 1/31/2013)
* Stats project - lead person: Shauna
* Graphical project (visualizing data) - Shauna responsible for first draft of project (by 1/31/2013) (but feel free to take this over from her!)
* Graphical project (visualizing data) - Shauna?


Projects should be:
Projects should be:
Line 41: Line 41:
* Show examples of querying - how to look for intersects, unions, if-then, etc.
* Show examples of querying - how to look for intersects, unions, if-then, etc.
* Maybe link it to a simple display - html page?
* Maybe link it to a simple display - html page?

'''Notes'''
Use [http://www.codecademy.com/courses/python-intermediate-en-6zbLp this intro to APIs] as inspiration?


===Stats project===
===Stats project===
Line 63: Line 66:
* Options:
* Options:
** Matplotlib - possibly hard to install? But maybe install it on our own server and have attendees access it.
** Matplotlib - possibly hard to install? But maybe install it on our own server and have attendees access it.
** Maybe do two visualizations - a straightforward/simple scatterplot or pie chart (ugh) and then a more complicated (and abstracted away) map
** Use [http://www.highcharts.com/ HighCharts] which is javascript, so we'd have to write an abstraction layer between python script and this.
** Use [http://www.census.gov/housing/ahs/ american household survey data]? Use this [https://github.com/sunlightlabs/census census wrapper]?
** Maybe let's ask the internet.
** Things to visualize:
*** Two non-categorical variables, for the scatter plot, for instance average income of an area by some other value.
*** Things that vary by state, that we can show color-coded on a map: income, ethnic diversity, occupations, age

Latest revision as of 17:44, 24 February 2013

Interested in helping? You can:

  • Edit the Saturday projects on Github
  • Download the files from Github, try them out, and send feedback to shaunagm (at gmail dot com)

To Do (in rough chronological order):

  • Saturday projects
  • Go through curriculum and flavor examples to be gov data
  • Create an "survey of open government projects" presentation (20 - 30 min) to give folks a taste of what is possible.
  • Logistics (funding, date, location, staff)

Saturday Projects

Goal: Create open gov projects based off of the Python Workshop Saturday projects.

Three project ideas:

  • API project - lead people: James and Erin
  • Stats project - lead person: Shauna
  • Graphical project (visualizing data) - Shauna?

Projects should be:

  • as simple as possible
  • modular - introduce one thing at a time, possibly in separate scripts labeled "proj1", "proj2" (see the original WordPlay project) for an example.
  • well commented (at least for the first draft)

Put projects in this GitHub repo.

API project

What do we want people to learn?

  • What an API is.
  • Using the URL bar to query an API vs doing so within a script.
  • Endpoints and return values. Get vs put vs post vs delete

Good possible APIs to use:
Capitol Words? Or general Real Time Congress, or Influence Explorer. The key is that whichever API we use should be as simple as possible, with straightforward attribute names.

What should the API do?

  • Easily access government data from online database.
  • Show examples of querying - how to look for intersects, unions, if-then, etc.
  • Maybe link it to a simple display - html page?

Notes Use this intro to APIs as inspiration?

Stats project

What do we want people to learn?

  • How to use python to do basic math/statistics:
    • Find minimums, maximums, averages, sums.
  • How to get data into appropriate format i.e. from string to integer (if time.)
  • How to handle arrays and data objects (if time.)

Good datasets to use.:
Whatever's the most interesting - and maybe something complementary to whatever we use for other projects.

What should the Stats project do?

  • Access a file with a cleaned-up dataset.
  • Show people what data objects are/look like in python. Introduce or go over how to access elements of arrays/hashes.
  • Optional: Access a file with a dirty dataset and clean it up (mainly data typing.)

Visualization project

  • Options:
    • Matplotlib - possibly hard to install? But maybe install it on our own server and have attendees access it.
    • Maybe do two visualizations - a straightforward/simple scatterplot or pie chart (ugh) and then a more complicated (and abstracted away) map
    • Use american household survey data? Use this census wrapper?
    • Things to visualize:
      • Two non-categorical variables, for the scatter plot, for instance average income of an area by some other value.
      • Things that vary by state, that we can show color-coded on a map: income, ethnic diversity, occupations, age