Download - Crash course to Open Data and APIs
Crash Course to Open Data and APIs
Jaakko RajaniemiJuha Yrjölä
City of Helsinki
What is Open Data?
● Availability and Free Access
● Reuse and Redistribution
● For Everybody, All Purposes and Free of Charge
Why open data?
•Efficiency
•Transparency
•New cool and useful apps for citizens!
The Classification of Open Data
★ Open license
★★ Machine readable
★★★ Non-proprietary format
★★★★ Open standards
★★★★★ Linked Data \o/
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/
National Land Survey
Place names,Roads, Laser scanning data, Elevation data, ...
See more:
www.maanmittauslaitos.fi/en/opendata
Municipal Division in Finland
Topographic database Topographic map raster Basic map raster
Aerial and orto photos
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-aineistothttp://ilmatieteenlaitos.fi/avoin-data-havaintoanimaattori
Where to find data?
Helsinki Region Infoshare
dev.hel.fi
#heldev
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
Real-time Snowplow Location API
github.com/codeforeurope/aura/wiki/API
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)
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
Service Map API demo
http://dev.hel.fi/open311-test/servicemapdemo.html
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
CitySDK - Common interfaces between cities
Issue reporting aka Open311 API developed in other cities
http://www.citysdk.eu/developers/
Issue reporting API functionalities
1. Query service request types○ defines request types and extra attributes
2. Submit service request○ description, image, location, contact
information
3. Query individual service request○ status and other service request details
4. Query services requests○ based on time and location
Issue Reporting demoService 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?extensions=true
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
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='[email protected]', media=open('traffic_sign.jpg', 'rb'))
GeoReporterOpen source mobile application for Open311 reporting● https://github.com/City-of-Bloomington/open311-mobile/
● https://github.com/City-of-Bloomington/open311-android
Android: https://itunes.apple.com/us/app/georeporter/id487304759?mt=8
iPhone: https://play.google.com/store/apps/details?id=gov.in.bloomington.georeporter&hl=fi
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/
OpenAhjo Under the Hood
Backend● Python● Django application● Tastypie REST API● PostgreSQL database with PostGIS● Solr search engine with Finnish stemming
Frontend● CoffeeScript● Backbone● Leaflet JS map library
Thank you!
Jaakko Rajaniemi● [email protected]
● +358 40 5165931
● @jaakko
Juha Yrjölä● [email protected]