30
VivaCity 2.0 Open Data Smart City Pla6orm Marco Montanari

Viva city open smart city platform

Embed Size (px)

Citation preview

Page 1: Viva city open smart city platform

 VivaCity  2.0  Open  Data  Smart  City  Pla6orm  

Marco  Montanari  

Page 2: Viva city open smart city platform

   

HI,  I’M  MARCO  

Page 3: Viva city open smart city platform

@ingmmo  [email protected]    marco.montanari  or  sirmmo  on  facebook,  slideshare,  …                hDp://ingmmo.com  hDp://www.mmo.it  hDps://github.com/sirmmo      

HI,  I’M  MARCO  

   

Page 4: Viva city open smart city platform

We  <3  open  data!!!      

-­‐  Almost  everyone  

Page 5: Viva city open smart city platform

Oh  Open  Data  are  so  cool  …  •  Lots  of  data  collecPons  (281*)  •  Lots  of  data  sources  •  Growing  movement  (*)  •  More  and  more  ciPes  and  regions  

are  giving  out  datasets  

•  Lots  of  geographic  datasets  •  Lots  of  geologic  datasets  •  Lots  of  public  transportaPon  

datasets                *  As  of  today  (20.09.12),  on  census.okfn.org  

Page 6: Viva city open smart city platform

…  But  There’s  a  catch  

Page 7: Viva city open smart city platform

…  But  There’s  a  catch  

NYC  Parks  (shp)  ORGANIZATI  STATUS  TYPE  GISPROPNUM  OMPPROPID  LOCATION  JURISDICTI  WATERFRONT  MAPPED  SIGNNAME  BOROUGH  Precinct  

ACRES  

Chicago  Parks  (csv)  PARK  NUMBER  PARK  NAME  STREET  ADDRESS  ZIP  ACRES    WARD  PARK  CLASS  LABEL  WHEELCHAIR  ACCESSIBLE  BALL  FIELDS  ALFRED  CALDWELL  LILY  POND  ARCHERY  RANGE  ARTIFICIAL  TURF  FIELDS  BAND  SHELL  BASEBALL  BATTING  CAGES  BASKETBALL  BACKBOARDS  BASKETBALL  COURTS  BEACH  BOAT  LAUNCH  (MOTORIZED)  BOAT  LAUNCH  (NON-­‐

MOTORIZED)  BOAT  SLIPS  BOCCE  COURT  BOWLING  GREEN  CASTING  AREA  CHESS  PAVILLION  FOOTBALL  SOCCER  COMBO  COMMUNITY  GARDEN  CONSERVATORY  CULTURAL  CENTER  DOG-­‐FRIENDLY  FITNESS  CENTER  FITNESS  COURSES  GALLERY  GARDEN  GOLF  COURSE  GOLF  DRIVING  RANGE  GOLF  PUTTING  GREENS  GYMNASIUM  GYMNASTIC  CENTERS  HANDBALL/RAQUETBALL  COURT  HANDBALL  

HORSESHOE  COURTS  ICE  SKATING  POOL  INDOOR  BASEBALL  JR/SOFTBALL/T-­‐BALL  MOUNTAIN  BIKE  TRAIL  NATURE  CENTER,POOL  OUTDOOR  PAVILLION  ZOO  PLAYGROUND  PLAYGROUND  PARK  ROWING  CLUB  VOLLEYBALL  SENIOR  CENTER  SHUFFLEBOARD  SKATE  PARK  SLED  HILL  SPORT  ROLLER  COURTS  SPRAY  FEATURE  BASEBALL  SR  TENNIS  COURTS  TRACK  

VOLLEYBALL  SAND  WATER  PLAYGROUND  WATER  SLIDE  BOXING  CENTER  WETLAND  AREA  LAGOON  CAROUSEL  CROQUET  GOLF  COURSE  MINIATURE  MODEL  TRAIN  DISPLAY  MODEL  YACHT  BASIN  CRICKET  FIELD  LOCATION    

Bologna  Parks  (shp)  COD_UG    NOME    

Page 8: Viva city open smart city platform

…  But  There’s  a  (bunch  of)    catch(es)  

NYC  Parks  (shp)  ORGANIZATI  STATUS  TYPE  GISPROPNUM  OMPPROPID  LOCATION  JURISDICTI  WATERFRONT  MAPPED  SIGNNAME  BOROUGH  Precinct  

ACRES    AREAS  

Chicago  Parks  (csv)  PARK  NUMBER  PARK  NAME  STREET  ADDRESS  ZIP  ACRES    WARD  PARK  CLASS  LABEL  WHEELCHAIR  ACCESSIBLE  BALL  FIELDS  ALFRED  CALDWELL  LILY  POND  ARCHERY  RANGE  ARTIFICIAL  TURF  FIELDS  BAND  SHELL  BASEBALL  BATTING  CAGES  BASKETBALL  BACKBOARDS  BASKETBALL  COURTS  BEACH  BOAT  LAUNCH  (MOTORIZED)  BOAT  LAUNCH  (NON-­‐

MOTORIZED)  BOAT  SLIPS  BOCCE  COURT  BOWLING  GREEN  CASTING  AREA  CHESS  PAVILLION  FOOTBALL  SOCCER  COMBO  COMMUNITY  GARDEN  CONSERVATORY  CULTURAL  CENTER  DOG-­‐FRIENDLY  FITNESS  CENTER  FITNESS  COURSES  GALLERY  GARDEN  GOLF  COURSE  GOLF  DRIVING  RANGE  GOLF  PUTTING  GREENS  GYMNASIUM  GYMNASTIC  CENTERS  HANDBALL/RAQUETBALL  COURT  HANDBALL  

HORSESHOE  COURTS  ICE  SKATING  POOL  INDOOR  BASEBALL  JR/SOFTBALL/T-­‐BALL  MOUNTAIN  BIKE  TRAIL  NATURE  CENTER,POOL  OUTDOOR  PAVILLION  ZOO  PLAYGROUND  PLAYGROUND  PARK  ROWING  CLUB  VOLLEYBALL  SENIOR  CENTER  SHUFFLEBOARD  SKATE  PARK  SLED  HILL  SPORT  ROLLER  COURTS  SPRAY  FEATURE  BASEBALL  SR  TENNIS  COURTS  TRACK  

VOLLEYBALL  SAND  WATER  PLAYGROUND  WATER  SLIDE  BOXING  CENTER  WETLAND  AREA  LAGOON  CAROUSEL  CROQUET  GOLF  COURSE  MINIATURE  MODEL  TRAIN  DISPLAY  MODEL  YACHT  BASIN  CRICKET  FIELD  LOCATION      POINTS  

Bologna  Parks  (shp)  COD_UG    NOME      AREAS  

Page 9: Viva city open smart city platform
Page 10: Viva city open smart city platform

It’s  all  about  semanPcs  

•  Adding  semanPcs  to  SHP  (dbf),  CSV  – Easy  but  elaborate  

•  Adding  a  normalizaPon  process  to  the  CSV  – Quite  easy  but  quite  elaborate  

 

•  We  could  define  a  meta-­‐semanPc  model…  

Page 11: Viva city open smart city platform

It’s  all  about  dimensions  

Time  •  Date  •  Timestamp  •  Reference  Period  

Topic    •  PoliPcs  •  Finance  •  Social  issues  

Space  •  Coordinates  •  Areas  •  Regions  and  sub-­‐regions  

Page 12: Viva city open smart city platform

It’s  all  about  dimensions  

Time  •  Date  •  Timestamp  •  Reference  Period  

Topic    •  PoliPcs  •  Finance  •  Social  issues  

Space  •  Coordinates  •  Areas  •  Regions  and  sub-­‐regions  

Page 13: Viva city open smart city platform

It’s  all  about  dimensions  

Time  •  Date  •  Timestamp  •  Reference  Period  

Topic    •  PoliPcs  •  Finance  •  Social  issues  

Space  •  Coordinates  •  Areas  •  Regions  and  sub-­‐regions  

Page 14: Viva city open smart city platform

It’s  all  about  dimensions  

Time  •  Date  •  Timestamp  •  Reference  Period  

Topic    •  PoliPcs  •  Finance  •  Social  issues  

Space  •  Coordinates  •  Areas  •  Regions  and  sub-­‐regions  

Page 15: Viva city open smart city platform

It’s  all  about  ontologies  

•  Lots  of  ontologies  explainig  the  most  various  topics  – DMTF  è  CIM  ontology  (useless?  Why?)  –  INSPIRE  – Dublin  Core  –  Foaf  – …  

•  Do  we  need  more?    –  Sure!  But  projects  are  already  ongoing  (and  if  there  is  no  standard,  we  can  always  try  to  become  a  de-­‐facto  standard)  

Page 16: Viva city open smart city platform

But  in  the  end  it’s  all  about  visualizing  the  data…  

•  Who  likes  a  table?  (besides  developers)  

Page 17: Viva city open smart city platform

…and  puong  it  into  context  (generate  informaPon)…  

Page 18: Viva city open smart city platform

…and  puong  it  into  context  (generate  informaPon)…  

Page 19: Viva city open smart city platform

…and  puong  it  into  context  (generate  informaPon)…  

Page 20: Viva city open smart city platform

…  and  elaborate  

•  MDX  queries  and  aggregaPons  based  on  the  various  dimensions  defined  by  the  topic-­‐based  ontologies  

•  SPARQL  queries  to  harness  the  graph-­‐structure  of  the  backend  •  SQL  queries  to  enable  access  to  table-­‐like  front-­‐ends  •  WFS  queries  to  enable  access  to  GIS  tools  

Page 21: Viva city open smart city platform
Page 22: Viva city open smart city platform
Page 23: Viva city open smart city platform

VivaCity  Park_name   Ball  fields   Borough   City   Geometry  

Margherita   3   Murri   Bologna   …  

Montagnola   0   Porto   Bologna   …  

Borough   Phone   Manager   City   Geometry  

Murri   +39051000000   Mario  Rossi   Bologna   …  

Porto   +39051000001   Luigi  Neri   Bologna   …  

Page 24: Viva city open smart city platform

VivaCity  PARK  

TREE  

SPECIES  

SERVICE  

PLAY  FIELD  

BALL  FIELD  

BASKET  FIELD  

MGMT  

PHONE  NUMBER  

Page 25: Viva city open smart city platform

VivaCity  Park_name   Ball  fields   Borough   City   Geometry  

Margherita   3   Murri   Bologna   …  

Montagnola   0   Porto   Bologna   …  

Borough   Phone   Manager   City   Geometry  

Murri   +39051000000   Mario  Rossi   Bologna   …  

Porto   +39051000001   Luigi  Neri   Bologna   …  

PARK  

TREE  

SPECIES  

SERVICE  

PLAY  FIELD  

BALL  FIELD  

BASKET  FIELD  

MGMT  

PHONE  NUMBER  

Page 26: Viva city open smart city platform

                         

The  semanPc  is  given  to  any  meta-­‐descripPon  of  a  

dataset    

At  every  change  a  new  semanPc  has  

to  be  given  

                         

ETL  is  complex  in  many  forms  

 Can  be  from  filed  

and  APIs    

Versioned    

VivaCity  

Ontology   SemanPcs   Raw  Data   VivaCity  

Page 27: Viva city open smart city platform

VivaCity  

•  Not  just  a  front  end  •  Not  just  an  uniforming  tool  

•  A  way  to  understand  and  help  interprePng  the  data  exposed  as  Open  Data  

•  A  pla6orm  for  the  city  to  evolve  from  data  producer  to  data  integrator  

Page 28: Viva city open smart city platform

The  stack  

VivaCity  1.0  •  Openlayers  2  

–  Geojson  where  possible  

•  Django  –  Data  manager  –  Exposed  basic  WFS    

•  Postgresql  (PostGIS)  –  Neo4j  was  young  and  needed  more  evoluPon  –  Mongodb  supported  only  points,  had  only  

superficial  support  of  queries  –  PostGIS  is  THE  best  for  many  cases  –  Not  for  graphs…    

VivaCity  2.0  •  Leaflet  (with  plugins)  [maybe  OL3.js  soon]  

–  GeoJSON,  TopoJSON  where  possible  

•  Django  –  With  the  role  of  data  manager  –  Exposes  the  “data”  APIs  

•  Fyzz  for  sparql  interpretaPon  •  MDXParse  (developed  for  this  project)  for  MDX  

interpretaPon  •  SQLParse  for  SQL  interpretaPon  

–  Exposes  the  OGC  APIs  –  Celery  to  manage  the  import  of  data  

•  Mongodb  +  Neo4j  spaPal  –  Mongo  for  basic  document  queries  and  a  document  centric  

approach  –  Neo4j  for  complex  relaPonal  queries  and  a  relaPonship-­‐

centric  approach  

Page 29: Viva city open smart city platform

It’s  Open  Source  

Or  beDer,  it  will  be  soon  (end  november)    

Right  now  there  is  version  1.0  on  github  (for  last  year’s  never-­‐made  FOSS4G12)  -­‐  hDps://github.com/ciPzennerd/VivaCity      

IT’S  A  PROTOTYPE!!!      

Page 30: Viva city open smart city platform

Thanks!  

[email protected]  ,  @ingmmo,  ingmmo.com,  hDps://github.com/sirmmo,