IES Cities Hackathon, Zaragoza, 10-12 July 2015
IES Cities Project Overview and API
IES Cities Explanation
What does IES Cities propose?
Main objectives
Added value
IES Cities Apps examples
IES Cities Platform and APIS
Hackathon contest and conditions
IES Cities Project Overview and API: IES Cities Hackathon, Zaragoza
1. Internet-Enabled Services
for Cities across Europe
IES Cities Project Overview and API
Hackathon Zaragoza App Store, 10, 11 and 12 July 2015
Etopia Centro de Arte y Tecnología, Zaragoza, SPAIN
http://zaragozappstore.exitae.es/
Dr. Diego López-de-Ipiña, dipina@deusto.es
http://morelab.deusto.es
2. Index
IES Cities Explanation
What does IES Cities propose?
Main objectives
Added value
IES Cities Apps examples
IES Cities Platform and APIS
Hackathon contest and conditions
7/12/2015 2Index
3. IES Cities Explanation
7/12/2015 3Why IES Cities?
IES Cities aims to validate user-centric mobile services
based on an open platform where information is provided
by Open Data and the Citizens.
Welcome to a Smart City for People: welcome to a
more citizen-aware city a Collaboration-
centred City.
4. What IES Cities Proposes (I)
7/12/2015 4What does IES Cities Propose?
IES Cities integrates and
enhances an open platform from
previous European funded
projects for current mobile
devices and external data
sources so that users are able to
use, produce and provide
information for Internet-based
services improving their
knowledge about the cities and
increasing the value of the open
data facilitated by the public
administrations.
5. What IES Cities Proposes (II)
7/12/2015 5What does IES Cities Propose?
Citizens:
Users collaborate in the definition of the digital identity of the city.
Citizens consume and generate contents, giving an added value to the
existing data, so that they can be considered at the same time
producers and consumers of contents (super-prosumer concept).
SMEs:
IES Cities allows the creation of services benefiting the local
businesses.
ICT-developing companies:
The platform gives the chance to create new apps and services based
on user needs, bringing new possibilities and added value.
Public administration:
The interaction with the stakeholders enables them to improve and
foster the use of their deployed sensors in urban areas and open
databases.
“Stakeholders: citizens, SMEs, ICT developing companies
and public adm.“
6. IES Cities Objectives (I)
7/12/2015 6IES Cities Objectives
IES Cities adapts and uses most of the technical
components and achievements coming from previous
projects in order to facilitate the use of an open
technological platform in different cities across
Europe, allowing the citizens to produce and consume
Internet-based services based on their own and
external data related to the cities.
“IES Cities will re-adjust an OPEN
PLATFORM and it will permit the users
to USE, PRODUCE AND PROVIDE
INFORMATION“
7. IES Cities Objectives (II)
7/12/2015 7IES Cities Objectives
To create a new open-platform adapting the technologies
and over taking the knowledge from previous initiatives.
To validate and test a set of predefined services across
the cities.
To validate, analyse and retrieve technical feedback from
the different pilots in order to detect and solve the major
incidences of the technical solutions used in the cities.
To adequately manage the users’ interaction within the
project framework for the inclusion of users in the pilots and
their behaviour during the validations.
To maximise the impact of the project through
adequate dissemination activities.
“Specific Objectives“
8. IES Cities Added Value (I)
7/12/2015 8IES Cities Added Value
No project before has considered so much the potential
impact that the users may have on this kind of initiatives.
IES Cities fosters the super-prosumer concept for the end
users, where they are at the same time producers and
consumers of data and services. The project advances in
the implementation of these kinds of new concepts from the
theory to the reality. IES Cities will give “voice to the
citizen”.
The project is aligned and applies the Open
Data philosophy, contributing to the realization
of the potential of this kind of data in Europe.
“Added value of IES Cities“
“Users may help on improving, extending and enriching
the open data in which micro-services are based”
9. IES Cities Added Value (II)
7/12/2015 9IES Cities Added Value
“Added value of IES Cities“
“The availability of platform + tools + data in an
open and free way, and the way end users are
involved creates new open innovation
environment within the cities ”
12. IES Cities Platform (I)
IES Cities platform v2 ready for execution of 2nd pilots phase:
All the components of the platform developed and revised:
Query Mapper eases app development, updates in update & ACL
Logging & Rating interfaces enables to monitor usage & acceptance
IES Cities Entities Management manages apps, datasets, users
IES Cities Player broker among users and platform
IES Cities Web Interface offers a web UI for all platform stakeholders
Most remarkable features:
Security and legal issues associated to the IES Cities platform and apps
HTTPS support to RESTful API
Apps & IES Cities web interface include “Terms and Conditions of Use” document: a)
policy of use, b) data privacy, c) property of data, d) legal protection and e) cookies usage.
Permissions management system improved
Access to dataset information controlled using different mechanisms including ACL control
New methods to the data update API using JSON objects
Platform automatically creates and publishes new datasets when an application developer
specifies a schema of dataset for their app
Business logic can rely on the client side whilst data persistence hosting is done at
the IES Cities back-end
127/12/2015 IES Cities Platform
13. IES Cities Platform (II)
User/stakeholder support tools:
IES Cities Web Interface (http://www.iescities.com):
Facilities for citizens, developers and public administration
Includes KPI graphical visualization
User-support tools integrated to ensure platform sustainability:
IES Cities Forum: http://iescities.freeforums.org/
IES Cities Contact Form in three supported languages
IES Cities Manual including support for installation, developers and
users: https://iescities.com/IESCities/manual/index.html
137/12/2015 IES Cities Platform
20. Data sources
20IES Cities back-end
Registered datasets can connect with external datasources
Supported types: SPARQL, CSV, JSON, Relational DB
lGeneral mapping
IES Cities
Dataset
Query
Response
Update
Data source
Data source
type
Mapping
attributes
Permission
section
04/06/2015
21. JSON data source
21IES Cities back-end
Connects with a JSON file
Maps the data to a database accesible with SQL.Data source
type
http://www.zaragoza.es/georref/taxi/itinerantes.jsp?srsname=wgs84
JSON file URI
Root entry
Update
interval
Primary
key
04/06/2015
22. CSV data source
22IES Cities back-end
Connects with a CSV file
Maps the data to a database accesible with SQL.
https://opendata.bristol.gov.uk/Mobility/Latest-journey-times/8hvd-j3b8
Data source
type
Update
interval
Primary key
04/06/2015
23. Relational data source
23IES Cities back-end
Connects relational dbs: MySQL, PostgreSQL, SQLite
Redirects queries to the connected database.
Mapping type
Database type
Connection
info
04/06/2015
24. SPARQL data source
24IES Cities back-end
Connects with SPARQL data sources.
Transform queries and updates to SPARQL/SPARULMapping type
Table
mapping
Endpoint &
graph
04/06/2015
25. User created datasets
25IES Cities back-end
Users provide descriptions for required dataset structure.
The plaforms creates the database to store the data
04/06/2015
30. Conclusion
IES Cities platform to manage the ecosystem of
datasets and apps associated to a city
Full developer support at:
https://iescities.com/IESCities/swagger/index.html
https://iescities.com/IESCities/manual/index.html
Hackathon participants are encouraged to make usage
of the platform
Hackathon IES Cities Info Data Sheet:
http://zaragozappstore.exitae.es/assets/archivos/IESCities
Player-Julio2015.pdf
1st prize for the best app that uses IES Cities
http://zaragozappstore.exitae.es/ (Premios section)
7/12/2015 30Conclusion
32. Examples
Open https://iescities.com/IESCities/swagger/
Use /data/query/{datasetid}/sql method in 'data' section.
JSON
====
ID: 226
SELECT * FROM paradasTaxi LIMIT 10;
http://www.zaragoza.es/georref/taxi/itinerantes.jsp?srsname=wgs84
CSV
===
ID: 247
SELECT * FROM results LIMIT 10;
https://opendata.bristol.gov.uk/Mobility/Latest-journey-times/8hvd-j3b8
RELATIONAL
==========
ID: 211
SELECT * FROM EVENTOS LIMIT 10;
SPARQL
======
ID: 237
SELECT * FROM Evento LIMIT 10;
http://www.zaragoza.es/ciudad/risp/detalle_Risp?id=282
JSON-LD
=======
Use /data/query/{datasetid}/sql/jsonld in 'data' section.
ID: 237
SELECT programa, destacada FROM Evento LIMIT 10
7/12/2015 32Examples
33. Examples
User created dataset
====================
Council ID: 220
Use /entities/datasets method in 'entities' section.
Use the data from the user_dataset.json file. The example.json file contains a
pretty formatted version of the dataset description. Use the following user/pass
user: test_user
pass: jH9M4WHNLpMy
Select and insert only works for the following user
user: test_user2
pass: bktc2pFuLDsN
POST /data/update/{datasetid}/sql
ID: Use the id returned by the method when creating the dataset.
INSERT INTO Comments (id, text, author, rating, app, date)VALUES (null, 'sometext', 'theauthor', 5, 'theapp',
'2015-06-4');
SELECT * FROM Comments;
Delete the dataset
Only the owner of the dataset can delete it
Use DELETE /entities/dataset/??
With user test_user2 (cannot remove) and with test_user (owner, can remove)
7/12/2015 33Examples
34. Examples
ATENTION: when creating a dataset, what you specify is the schema, although it looks like you are inserting
one instance of the specified dataset. Futhermore, observe that all the values, particularly observe
jsonMapping, have to be specified as if they were a string. The contents supplied to the /entities/datasets
API method have to be in the format returned by JSON.stringfy when you serialize a JavaScript value into a
JSON string.
As an example find below, the correct format for file user_dataset.json, earlier referred, note the usage of
“ to be able to use " within a string:
{ "name": "Test", "description": "Testing dataset", "jsonMapping": "{n
"mapping":"json_schema",n "schema":{n "tables":[n {n "key":"id",n
"name":"Comments",n "Comments":[n {n "id": 1,n
"text": "some_string",n "author": "some_string",n "rating":
1,n "app": "some_string",n "date": "2015-01-01"n
}n ]n }n ]n },n "permissions" : {n "insert": [n
{n "table": "Comments",n "access": "OWNER"}n
], "select": [n {n "table": "Comments",n
"access": "OWNER"}n ], n "update": [n {n
"table": "Comments",n "access": "OWNER"}n ]n }n}"}
7/12/2015 34Examples
35. Thanks a lot! / ¡Gracias!
Hackathon Zaragoza App Store, 10, 11 and 12 July 2015
Etopia Centro de Arte y Tecnología, Zaragoza, SPAIN
http://zaragozappstore.exitae.es/
Dr. Diego López-de-Ipiña, dipina@deusto.es
http://morelab.deusto.es