Crash course to Open Data and APIs

1,509 views

Published on

Crash course to Open Data and APIs was presented at Reaktor Dev Day 2013 by Jaakko Rajaniemi and Juha Yrjölä

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,509
On SlideShare
0
From Embeds
0
Number of Embeds
592
Actions
Shares
0
Downloads
15
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Crash course to Open Data and APIs

  1. 1. Crash Course to Open Data and APIs Jaakko Rajaniemi Juha Yrjölä City of Helsinki
  2. 2. What is Open Data? ● Availability and Free Access ● Reuse and Redistribution ● For Everybody, All Purposes and Free of Charge
  3. 3. Why open data? •Efficiency •Transparency •New cool and useful apps for citizens!
  4. 4. The Classification of Open Data ★ Open license ★★ Machine readable ★★★ Non-proprietary format ★★★★ Open standards ★★★★★ Linked Data o/
  5. 5. Helsinki Region Transport ● Most popular open data source ● API, Kalkati XML dump and GTFS ● http://developer.reittiopas.fi/pages/en/home.php ● Check also http://dev.hsl.fi/
  6. 6. National Land Survey Place names,Roads, Laser scanning data, Elevation data, ... See more: www.maanmittauslaito Municipal Division in Finland Topographic database Topographic map raster Basic map raster Aerial and orto photos
  7. 7. Finnish Meteorological Institute ● Weather observation 400 locations ● Weather forecasts ● Street condition 375 locations ● Rain and radar lightning data ● Time series ● https://github.com/fmidev/ ● http://en.ilmatieteenlaitos.fi/open-data-manual ● Open Geospatial Consortium http://ilmatieteenlaitos.fi/avoin-data-avattavat-aineistot http://ilmatieteenlaitos.fi/avoin-data-havaintoanimaattori
  8. 8. Where to find data? Helsinki Region Infoshare
  9. 9. dev.hel.fi #heldev
  10. 10. Code for Europe ● Motivation: Current IT service development practices not perfect; introduce new ideas and technologies from outside ● Who: European Union and participating cities ● Method: Independent Fellows hired for a limited period to develop services ● 2014 Fellowship coming up
  11. 11. Real-time Snowplow Location API github.com/codeforeurope/aura/wiki/API
  12. 12. Helsinki From Above 1942-2012 ● Open Datasets used: ○ aerial photography from five decades building database ○ address database ○ district boundaries ○ OpenStreetMap ● Aerial photos converted into an image pyramid and imported into Geoserver, then served over WMS API ● HTML5 application to access it: dev.hel.fi/ilmakuvat/ (Fork me on GitHub)
  13. 13. Service Map API ● 8,000 points of interest ● 800 services ● REST API with more than 200000 hits per month ● http://www.hel.fi/palvelukarttaws/rest/ver2_en.html
  14. 14. Service Map API demo http://dev.hel.fi/open311-test/servicemapdemo.html
  15. 15. Issue reporting API / Palauterajapinta ● First read-write API in Finland! ● Based on Open311 (also known as GeoReport v2) ○ http://open311.org/ ● http://dev.hel.fi/apis/issuereporting ● Used in more than 30 cities in US and now coming to Europe
  16. 16. CitySDK - Common interfaces between cities Issue reporting aka Open311 API developed in other cities http://www.citysdk.eu/developers/
  17. 17. Issue reporting API functionalities 1. Query service request types ○ defines request types and extra attributes 1. Submit service request ○ description, image, location, contact information 1. Query individual service request ○ status and other service request details 1. Query services requests ○ based on time and location
  18. 18. Issue Reporting demo Service request types: https://asiointi.hel.fi/palautews/rest/v1/services.json?locale=fi_FI Last services requests: https://asiointi.hel.fi/palautews/rest/v1/requests.json Individual service request: https://asiointi.hel.fi/palautews/rest/v1/requests/2278m9r1a1f50dhb1mug.json?extens More queries: https://docs.google.com/document/d/12eU3RVVTnEfHw1YsV48Li1E6ZGz-WmXoY70T3eIdA9w/edit?usp=sharing Demos http://dev.hel.fi/open311-test/pinpoint.html http://dev.hel.fi/open311-test/servicemap.html
  19. 19. Python Three Three is simple open source Open311 client from three import Three >>t = Three('https://pate.affecto.com/restWAR/open311/v1', api_key='API_KEY_HERE') >>resp = t.post('202', name='Jaakko Rajaniemi', lat='60.168321', long='24.952397', description='Traffic sign is broken.',email='jaakko.rajaniemi@hel.fi', media=open('traffic_sign.jpg', 'rb'))
  20. 20. GeoReporter Open source mobile application for Open311 reporting ● https://github.com/City-of-Bloomington/open311-mobile/ ● https://github.com/City-of-Bloomington/open311-android
  21. 21. OpenAhjo Decision Data API ● Access to the enriched decision-making data of City of Helsinki ● Built on top of document and decision management system Ahjo ● REST API with geospatial and full-text search capabilities ● Autogenerated API documentation: dev.hel.fi/openahjo/doc/ ● HTML5 application for browsing the data: dev.hel.fi/openahjo/
  22. 22. OpenAhjo Under the Hood Backend ● Python ● Django application ● Tastypie REST API ● PostgreSQL database with PostGIS ● Solr search engine with Finnish stemming Frontend ● CoffeeScript ● Backbone ●
  23. 23. Thank you! Jaakko Rajaniemi ● jaakko.rajaniemi@hel.fi ● +358 40 5165931 ● @jaakko Juha Yrjölä ● juha.yrjola@forumvirium.fi

×