SlideShare a Scribd company logo
1 of 26
Civic Hacking
       Luigi Montanez
luigi@sunlightfoundation.com
Question? @LuigiMontanez
Open Source + Open Data
           =
  Better Government


                Question? @LuigiMontanez
High Quality Raw Data




               Question? @LuigiMontanez
High Quality Raw Data
✴   First: Raw data in JSON, XML, or CSV




                                 Question? @LuigiMontanez
High Quality Raw Data
✴   First: Raw data in JSON, XML, or CSV
✴   Second: RESTful APIs in JSON or XML




                                 Question? @LuigiMontanez
High Quality Raw Data
✴   First: Raw data in JSON, XML, or CSV
✴   Second: RESTful APIs in JSON or XML
✴   Third: Nothing really...




                                 Question? @LuigiMontanez
How We Use MongoDB




             Question? @LuigiMontanez
How We Use MongoDB
✴   RESTful JSON APIs




                        Question? @LuigiMontanez
How We Use MongoDB
✴   RESTful JSON APIs
✴   Results from Scraping




                            Question? @LuigiMontanez
Drumbone
{legislator: {
   in_office: true,
   title: "Rep",
   nickname: "",
   district: "9",
   bioguide_id: "L000551",
   govtrack_id: "400237",
   phone: "202-225-2661",
   website: "http://lee.house.gov/index.html",
   twitter_id: "",
   last_name: "Lee",
   name_suffix: "",
   last_updated: "2010/04/13 00:00:14 +0000",
   party: "D",
   chamber: "house",
   state: "CA",
   youtube_url: "http://www.youtube.com/RepLee",
   first_name: "Barbara",
   gender: "F",
   congress_office: "2444 Rayburn House Office Building",
   earmarks: {
        average_number: 20,
        total_amount: 10000000,
        average_amount: 22994535,
        total_number: 28,
        last_updated: "2010-03-18",
        fiscal_year: 2010,
   }
   ...
}
?sections=last_name,first_name,state,earmarks


{legislator: {
   last_name: "Lee",
   state: "CA",
   first_name: "Barbara",
   earmarks: {
        average_number: 20,
        total_amount: 10000000,
        average_amount: 22994535,
        total_number: 28,
        last_updated: "2010-03-18",
        fiscal_year: 2010,
   }
}
?sections=last_name,first_name,state,earmarks.total_amount,earmarks.total_number




    {legislator: {
       last_name: "Lee",
       state: "CA",
       first_name: "Barbara",
       earmarks: {
            total_amount: 10000000,
            total_number: 28
       }
    }
50 State
 Project
Thanks!
sunlightlabs.com
@LuigiMontanez



               Question? @LuigiMontanez

More Related Content

More from Luigi Montanez

Civic Hacking @ Strange Loop 2010
Civic Hacking @ Strange Loop 2010Civic Hacking @ Strange Loop 2010
Civic Hacking @ Strange Loop 2010Luigi Montanez
 
Civic Hacking @ Strange Loop 2010
Civic Hacking @ Strange Loop 2010Civic Hacking @ Strange Loop 2010
Civic Hacking @ Strange Loop 2010Luigi Montanez
 
Civic Coding @ SunnyConf
Civic Coding @ SunnyConfCivic Coding @ SunnyConf
Civic Coding @ SunnyConfLuigi Montanez
 
Search-Friendly Web Development @ Ruby|Web Conference 2010
Search-Friendly Web Development @ Ruby|Web Conference 2010Search-Friendly Web Development @ Ruby|Web Conference 2010
Search-Friendly Web Development @ Ruby|Web Conference 2010Luigi Montanez
 
Search-Friendly Web Development @ Lone Star Ruby Conference 2010
Search-Friendly Web Development @ Lone Star Ruby Conference 2010Search-Friendly Web Development @ Lone Star Ruby Conference 2010
Search-Friendly Web Development @ Lone Star Ruby Conference 2010Luigi Montanez
 
Search-Friendly Web Development @ DC RUG - August 2010
Search-Friendly Web Development @ DC RUG - August 2010Search-Friendly Web Development @ DC RUG - August 2010
Search-Friendly Web Development @ DC RUG - August 2010Luigi Montanez
 
Civic Hacking @ Ruby Midwest 2010
Civic Hacking @ Ruby Midwest 2010Civic Hacking @ Ruby Midwest 2010
Civic Hacking @ Ruby Midwest 2010Luigi Montanez
 
Civic Hacking @ Ignite RailsConf
Civic Hacking @ Ignite RailsConfCivic Hacking @ Ignite RailsConf
Civic Hacking @ Ignite RailsConfLuigi Montanez
 
Civic Hacking @ Ruby Hoedown
Civic Hacking @ Ruby HoedownCivic Hacking @ Ruby Hoedown
Civic Hacking @ Ruby HoedownLuigi Montanez
 

More from Luigi Montanez (10)

Civic Hacking @ Strange Loop 2010
Civic Hacking @ Strange Loop 2010Civic Hacking @ Strange Loop 2010
Civic Hacking @ Strange Loop 2010
 
Civic Hacking @ Strange Loop 2010
Civic Hacking @ Strange Loop 2010Civic Hacking @ Strange Loop 2010
Civic Hacking @ Strange Loop 2010
 
Civic Coding @ SunnyConf
Civic Coding @ SunnyConfCivic Coding @ SunnyConf
Civic Coding @ SunnyConf
 
Search-Friendly Web Development @ Ruby|Web Conference 2010
Search-Friendly Web Development @ Ruby|Web Conference 2010Search-Friendly Web Development @ Ruby|Web Conference 2010
Search-Friendly Web Development @ Ruby|Web Conference 2010
 
Search-Friendly Web Development @ Lone Star Ruby Conference 2010
Search-Friendly Web Development @ Lone Star Ruby Conference 2010Search-Friendly Web Development @ Lone Star Ruby Conference 2010
Search-Friendly Web Development @ Lone Star Ruby Conference 2010
 
Search-Friendly Web Development @ DC RUG - August 2010
Search-Friendly Web Development @ DC RUG - August 2010Search-Friendly Web Development @ DC RUG - August 2010
Search-Friendly Web Development @ DC RUG - August 2010
 
Civic Hacking @ Ruby Midwest 2010
Civic Hacking @ Ruby Midwest 2010Civic Hacking @ Ruby Midwest 2010
Civic Hacking @ Ruby Midwest 2010
 
Civic Hacking @ Ignite RailsConf
Civic Hacking @ Ignite RailsConfCivic Hacking @ Ignite RailsConf
Civic Hacking @ Ignite RailsConf
 
Civic Hacking @ Ruby Hoedown
Civic Hacking @ Ruby HoedownCivic Hacking @ Ruby Hoedown
Civic Hacking @ Ruby Hoedown
 
Thin
ThinThin
Thin
 

Recently uploaded

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Recently uploaded (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Civic Hacking @ MongoNYC

  • 1. Civic Hacking Luigi Montanez luigi@sunlightfoundation.com
  • 2.
  • 4. Open Source + Open Data = Better Government Question? @LuigiMontanez
  • 5. High Quality Raw Data Question? @LuigiMontanez
  • 6. High Quality Raw Data ✴ First: Raw data in JSON, XML, or CSV Question? @LuigiMontanez
  • 7. High Quality Raw Data ✴ First: Raw data in JSON, XML, or CSV ✴ Second: RESTful APIs in JSON or XML Question? @LuigiMontanez
  • 8. High Quality Raw Data ✴ First: Raw data in JSON, XML, or CSV ✴ Second: RESTful APIs in JSON or XML ✴ Third: Nothing really... Question? @LuigiMontanez
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16. How We Use MongoDB Question? @LuigiMontanez
  • 17. How We Use MongoDB ✴ RESTful JSON APIs Question? @LuigiMontanez
  • 18. How We Use MongoDB ✴ RESTful JSON APIs ✴ Results from Scraping Question? @LuigiMontanez
  • 19.
  • 20.
  • 22. {legislator: { in_office: true, title: "Rep", nickname: "", district: "9", bioguide_id: "L000551", govtrack_id: "400237", phone: "202-225-2661", website: "http://lee.house.gov/index.html", twitter_id: "", last_name: "Lee", name_suffix: "", last_updated: "2010/04/13 00:00:14 +0000", party: "D", chamber: "house", state: "CA", youtube_url: "http://www.youtube.com/RepLee", first_name: "Barbara", gender: "F", congress_office: "2444 Rayburn House Office Building", earmarks: { average_number: 20, total_amount: 10000000, average_amount: 22994535, total_number: 28, last_updated: "2010-03-18", fiscal_year: 2010, } ... }
  • 23. ?sections=last_name,first_name,state,earmarks {legislator: { last_name: "Lee", state: "CA", first_name: "Barbara", earmarks: { average_number: 20, total_amount: 10000000, average_amount: 22994535, total_number: 28, last_updated: "2010-03-18", fiscal_year: 2010, } }
  • 24. ?sections=last_name,first_name,state,earmarks.total_amount,earmarks.total_number {legislator: { last_name: "Lee", state: "CA", first_name: "Barbara", earmarks: { total_amount: 10000000, total_number: 28 } }
  • 26. Thanks! sunlightlabs.com @LuigiMontanez Question? @LuigiMontanez

Editor's Notes

  1. I work for the Sunlight Labs, a group of developers and designers who use technology to transform government. We focus on transparency -- the idea that government can be more effective and more accountable when it makes data about its process, operations, and influences freely available to the public. Our work revolves around pushing government to open up its data, and then creating incredibly useful applications on top of that government data. We're creating an open source community around these ideas. So far, we have over a thousand members -- people committed to the idea that freeing data and writing code is the best way to make government better. I'm one of sixteen paid staff of the Sunlight Labs, and we're all employed by the Sunlight Foundation, based in Washington, D.C.
  2. We want government to make more data about itself public. How it spends money. How it collects money. Where campaign contributions come from and how campaign money is spent. We want government agencies and departments who generate statistical economic data and scientific data for their own use to make that data public for all of us to use. That means well-structured, well-documented data published online and in real-time. That's what we want out of government transparency. Sometimes the phrase government data scares people, because it might conjure up thoughts of personally identifiable data, or classified national security data. That's not what we're trying to open up. We're talking about data that can be made public with compromising anyone's safety.
  3. Something important to note is that we're not asking government to build some great, ground-breaking app. We're not asking them to invent the next Twitter, or have the creative energy of a startup. We're just asking them to publish government data, data that has been paid for by tax dollars, in an open, well-documented format. They open up the data, then we build the apps around that data.
  4. So we believe that government's first and primary goal should be to publish its data in well-documented, widely-accepted formats: XML, JSON, CSV. Second, government should build APIs to allow us to get to that data programmatically, without having to keep up to date on downloaded data files. That's really all we want from government: open data sets and open APIs. When government starts building things with that data, they start to editorialize it, and enforce their opinions. We all know that even statistics can be molded to support pretty much any argument. But raw data is as close to an objective truth as we can get.
  5. So we believe that government's first and primary goal should be to publish its data in well-documented, widely-accepted formats: XML, JSON, CSV. Second, government should build APIs to allow us to get to that data programmatically, without having to keep up to date on downloaded data files. That's really all we want from government: open data sets and open APIs. When government starts building things with that data, they start to editorialize it, and enforce their opinions. We all know that even statistics can be molded to support pretty much any argument. But raw data is as close to an objective truth as we can get.
  6. So we believe that government's first and primary goal should be to publish its data in well-documented, widely-accepted formats: XML, JSON, CSV. Second, government should build APIs to allow us to get to that data programmatically, without having to keep up to date on downloaded data files. That's really all we want from government: open data sets and open APIs. When government starts building things with that data, they start to editorialize it, and enforce their opinions. We all know that even statistics can be molded to support pretty much any argument. But raw data is as close to an objective truth as we can get.
  7. Fly On Time looks at the flight records compiled by the FAA, the Federal Aviation Administration, and tells you the likelihood of your particular flight being delayed, and some historic trends for your route and for your airport.
  8. Here’s an example.
  9. The National Geological Survey keeps track of earthquakes around the world, and Quakespotter is a 3D modeling of the globe with recent earthquakes. The data is very recent, sometimes only minutes old. The circles represent earthquakes and their magnitude is reflected by their radius. This is a desktop app that runs on Ruby Processing, and it won the contest’s best visualization prize.
  10. Late last year, New York City held the Big Apps competition. Earlier in the fall, they released about a hundred data sets in what they called the DataMine, and put up $20,000 in prize money for developers. Here are some winners.
  11. WayFinder is an augmented reality app for Android. It uses geolocation, the phone’s compass, and MTA transit data to point the user to the direction of the nearest subway station.
  12. TaxiHack uses the city's taxi driver database to allow riders to tweet and email notes about their rides. Feedback positive and negative.
  13. Big Apple Ed uses performance data about the NYC school system to help parents find the best school for their children. Yes, this one is a Rails app!
  14. sinatra_resource
  15. sinatra_resource
  16. rich document