Upgrade to Pro — share decks privately, control downloads, hide ads and more …

When Drupal meets Opendata

When Drupal meets Opendata

Techniques and principles to build creative applications based on Opendata.
Overview of already developed solutions, modules and succesful case histories in the Public/Government sector

Avatar for Stefano Mainardi

Stefano Mainardi

March 21, 2012
Tweet

More Decks by Stefano Mainardi

Other Decks in Research

Transcript

  1. Chi siamo? Stefano Mainardi, sviluppatore PHP, CEO di Twinbit e

    fondatore del network italiano ILDN Piacere di conoscervi! [email protected] twitter : @stefanomainardi giovedì 22 marzo 12
  2. Chi siamo? Stefano Mainardi, sviluppatore PHP, CEO di Twinbit e

    fondatore del network italiano ILDN Piacere di conoscervi! [email protected] twitter : @stefanomainardi Paolo Mainardi, sviluppatore PHP, CTO di Twinbit e fondatore del network italiano ILDN Piacere di conoscervi! [email protected] twitter : @paolomainardi giovedì 22 marzo 12
  3. Chi siamo? Stefano Mainardi, sviluppatore PHP, CEO di Twinbit e

    fondatore del network italiano ILDN Piacere di conoscervi! [email protected] twitter : stefanomainardi Paolo Mainardi, sviluppatore PHP, CTO di Twinbit e fondatore del network italiano ILDN Piacere di conoscervi! [email protected] twitter : paolomainardi Piacere, io sono Drupal! :-) giovedì 22 marzo 12
  4. Con Open Data si fa riferimento ad una filosofia, che

    è al tempo stesso una pratica, che implica che alcune tipologie di dati siano liberamente accessibili a tutti sul Web, senza restrizioni di copyright, brevetti o altre forme di controllo che ne limitino la riproduzione. definizione “accademica” da Wikipedia giovedì 22 marzo 12
  5. http://www.flickr.com/photos/f7oor/405046410/ Data is a precious thing and will last longer

    than the systems themselves. Tim Berners-Lee 1/2 giovedì 22 marzo 12
  6. http://www.flickr.com/photos/f7oor/405046410/ I dati sono noiose scatole marroni, ed è così

    che ce li immaginiamo, no? Perché i dati di per sé non sono di immediata applicazione Ma in realtà, i dati determinano tantissime cose nelle nostre vite e ciò accade perché c’è qualcuno che prende quei dati e ne fa qualcosa. Tim Berners-Lee 2/2 credits: Ernesto Bellisario “Come si fa OpenData” giovedì 22 marzo 12
  7. 47 web, iPhone & Facebook Apps $2,300,000 risparmiati $50,000 il

    costo delle applicazioni +5000% in ROI giovedì 22 marzo 12
  8. Perchè Drupal ? • Una piattaforma pensata per fare Open

    Data (D7 RDFa, Nodes, Taxonomy) giovedì 22 marzo 12
  9. Perchè Drupal ? • Una piattaforma pensata per fare Open

    Data (D7 RDFa, Nodes, Taxonomy) • Semplici interfacce di amministrazione per utenti non esperti (D7 UX) giovedì 22 marzo 12
  10. Perchè Drupal ? • Una piattaforma pensata per fare Open

    Data (D7 RDFa, Nodes, Taxonomy) • Semplici interfacce di amministrazione per utenti non esperti (D7 UX) • Semplice integrazione con i servizi di terze parti (CKAN, OpenCalais, OSM, Mapbox ecc..) giovedì 22 marzo 12
  11. Perchè Drupal ? • Una piattaforma pensata per fare Open

    Data (D7 RDFa, Nodes, Taxonomy) • Semplici interfacce di amministrazione per utenti non esperti (D7 UX) • Semplice integrazione con i servizi di terze parti (CKAN, OpenCalais, OSM, Mapbox ecc..) • Importanti case history governative di successo (List of Drupal sites in Government: http://groups.drupal.org/node/19885) giovedì 22 marzo 12
  12. Perchè Drupal ? •CCK - Fields in core •Feeds •Views

    - Views datasource giovedì 22 marzo 12
  13. Perchè Drupal ? •CCK - Fields in core •Feeds •Views

    - Views datasource •Geo Modules (Openlayers, Geofield) giovedì 22 marzo 12
  14. Perchè Drupal ? •CCK - Fields in core •Feeds •Views

    - Views datasource •Geo Modules (Openlayers, Geofield) •Supporto nativo per i Linked Data (RDFa) giovedì 22 marzo 12
  15. Perchè Drupal ? •CCK - Fields in core •Feeds •Views

    - Views datasource •Geo Modules (Openlayers, Geofield) •Supporto nativo per i Linked Data (RDFa) •SPARQL giovedì 22 marzo 12
  16. Phase 1: Creare Open Data Qualsiasi contenuto è potenzialmente un

    OpenData..... “A piece of content or data is open if anyone is free to use, reuse, and redistribute it — subject only, at most, to the requirement to attribute and share alike.” (Open Knowledge Definition) giovedì 22 marzo 12
  17. Phase 1: Creare Open Data Qualsiasi contenuto è potenzialmente un

    OpenData..... Seguiamo queste semplici regole: “A piece of content or data is open if anyone is free to use, reuse, and redistribute it — subject only, at most, to the requirement to attribute and share alike.” (Open Knowledge Definition) giovedì 22 marzo 12
  18. Phase 1: Creare Open Data Qualsiasi contenuto è potenzialmente un

    OpenData..... Seguiamo queste semplici regole: •Specificare la fonte “A piece of content or data is open if anyone is free to use, reuse, and redistribute it — subject only, at most, to the requirement to attribute and share alike.” (Open Knowledge Definition) giovedì 22 marzo 12
  19. Phase 1: Creare Open Data Qualsiasi contenuto è potenzialmente un

    OpenData..... Seguiamo queste semplici regole: •Specificare la fonte •Usare una licenza aperta “A piece of content or data is open if anyone is free to use, reuse, and redistribute it — subject only, at most, to the requirement to attribute and share alike.” (Open Knowledge Definition) giovedì 22 marzo 12
  20. Phase 1: Creare Open Data Qualsiasi contenuto è potenzialmente un

    OpenData..... Seguiamo queste semplici regole: •Specificare la fonte •Usare una licenza aperta •Usare formati aperti e semplici da processare automaticamente (CSV, XLS, XML, JSON) “A piece of content or data is open if anyone is free to use, reuse, and redistribute it — subject only, at most, to the requirement to attribute and share alike.” (Open Knowledge Definition) giovedì 22 marzo 12
  21. Phase 1: Creare Open Data Qualsiasi contenuto è potenzialmente un

    OpenData..... Seguiamo queste semplici regole: •Specificare la fonte •Usare una licenza aperta •Usare formati aperti e semplici da processare automaticamente (CSV, XLS, XML, JSON) “A piece of content or data is open if anyone is free to use, reuse, and redistribute it — subject only, at most, to the requirement to attribute and share alike.” (Open Knowledge Definition) OpenDefinition: http://www.opendefinition.org/okd/ Open Data Commons: http://www.opendatacommons.org Cretive Commons: http://www.opendatacommons.org giovedì 22 marzo 12
  22. Phase 1: Creare Open Data Creare un nuovo content type

    ed un vocabolario giovedì 22 marzo 12
  23. Phase 1: Creare Open Data Creare un nuovo content type

    ed un vocabolario giovedì 22 marzo 12
  24. Phase 1: Creare Open Data Creare un nuovo content type

    ed un vocabolario DataTypes Vocabulary License Vocabulary giovedì 22 marzo 12
  25. Phase 1: Creare Open Data Creare un nuovo content type

    ed un vocabolario Fields DataTypes Vocabulary License Vocabulary giovedì 22 marzo 12
  26. Phase 1: Creare Open Data Creare un nuovo content type

    ed un vocabolario giovedì 22 marzo 12
  27. Phase 1: Creare Open Data Creare un nuovo content type

    ed un vocabolario Open data creation form giovedì 22 marzo 12
  28. Phase 1: Creare Open Data Creare un nuovo content type

    ed un vocabolario Open data creation form giovedì 22 marzo 12
  29. Phase 1: Creare Open Data Creare un nuovo content type

    ed un vocabolario Taxonomy Open data creation form giovedì 22 marzo 12
  30. Phase 1: Creare Open Data Creare un nuovo content type

    ed un vocabolario Data properties Taxonomy Open data creation form giovedì 22 marzo 12
  31. Phase 1: Creare Open Data Creare un nuovo content type

    ed un vocabolario Data properties Taxonomy Comments Open data creation form giovedì 22 marzo 12
  32. Phase 2: Distribuire Open Data Come posso distribuire i miei

    dati ? x/html core giovedì 22 marzo 12
  33. Phase 2: Distribuire Open Data Come posso distribuire i miei

    dati ? x/html core RDFa giovedì 22 marzo 12
  34. Phase 2: Distribuire Open Data Come posso distribuire i miei

    dati ? x/html core RDFa RSS giovedì 22 marzo 12
  35. Phase 2: Distribuire Open Data Come posso distribuire i miei

    dati ? x/html core rdf csv contrib modules xml json RDFa RSS giovedì 22 marzo 12
  36. Phase 2: Distribuire Open Data Come posso distribuire i miei

    dati ? x/html core rdf csv contrib modules xml json RDFa RSS Views + Views Datasource giovedì 22 marzo 12
  37. Phase 2: Distribuire Open Data Come posso distribuire i miei

    dati ? x/html core rdf csv contrib modules xml json RDFa RSS kml charts {$other formats} Views + Views Datasource giovedì 22 marzo 12
  38. Phase 2: Distribuire Open Data Come posso distribuire i miei

    dati ? x/html core rdf csv contrib modules xml json http://drupal.org/project/modules RDFa RSS kml charts {$other formats} Views + Views Datasource giovedì 22 marzo 12
  39. Phase 2: Distribuire Open Data Come posso distribuire i miei

    dati ? x/html core rdf csv contrib modules xml json http://drupal.org/project/modules RDFa RSS kml charts {$other formats} Views + Views Datasource Posso essere anche solo un servizio per la tua applicazione: http://drupal.org/project/services XMLRPC, JSON, JSON-RPC, REST, SOAP, AMF, etc. giovedì 22 marzo 12
  40. Phase 2: Distribuire Open Data Views Example: Create a new

    display Filter by “data” type contents giovedì 22 marzo 12
  41. Phase 2: Distribuire Open Data Views Example: Create a new

    display Filter by “data” type contents Select fields to print giovedì 22 marzo 12
  42. Phase 2: Distribuire Open Data Views Example: Create a new

    display Filter by “data” type contents Select fields to print Print results on a table giovedì 22 marzo 12
  43. Phase 2: Distribuire Open Data Views Example: Create a new

    display Filter by “data” type contents Select fields to print Print results on a table Expose search fields giovedì 22 marzo 12
  44. Phase 2: Distribuire Open Data Views Example: Create a new

    display Filter by “data” type contents Select fields to print Print results on a table Expose search fields Output type giovedì 22 marzo 12
  45. Phase 2: Distribuire Open Data Views Example: Results Results Exposed

    form RSS Export Click to download in other formats! giovedì 22 marzo 12
  46. Phase 2: Distribuire Open Data Example: Geo tools Layer manager

    Views Datasource (json) giovedì 22 marzo 12
  47. Phase 2: Distribuire Open Data Example: Apache Solr -- http://drupal.org/project/apachesolr

    Used on Drupal.org Faceted Search • Powerful text extraction • Multisite search • Attachment search giovedì 22 marzo 12
  48. Phase 3: Data processing Feeds Xpath Parser: http://drupal.org/project/feeds_xpathparser Feeds QueryPath

    Parser: http://drupal.org/project/feeds_querypath_parser Feeds Parser http://drupal.org/project/migrate Data importing projects “The migrate module provides a flexible framework for migrating content into Drupal from other sources (e.g., when converting a web site from another CMS to Drupal)” http://drupal.org/project/data “Data module helps you model, manage and query related sets of tables. It offers an administration interface and a low level API for manipulating tables and accessing their contents. D module provides Views integration for displaying table data and Drupal search integration for searching table content.” giovedì 22 marzo 12
  49. RDF http://drupal.org/project/rdfx http://drupal.org/project/rdf (d6) • RDFx: extends core RDF support

    by providing extra APIs and additional serialization formats such as RDF/XML, NTriples, Turtle... API http://api.drupal.org/api/drupal/modules--rdf--rdf.module/group/rdf/7 giovedì 22 marzo 12
  50. RDF http://drupal.org/project/rdfx http://drupal.org/project/rdf (d6) • RDFx: extends core RDF support

    by providing extra APIs and additional serialization formats such as RDF/XML, NTriples, Turtle... • RDF UI: allows site administrators to specify the RDF mappings via a user interface API http://api.drupal.org/api/drupal/modules--rdf--rdf.module/group/rdf/7 giovedì 22 marzo 12
  51. RDF http://drupal.org/project/rdfx http://drupal.org/project/rdf (d6) • RDFx: extends core RDF support

    by providing extra APIs and additional serialization formats such as RDF/XML, NTriples, Turtle... • RDF UI: allows site administrators to specify the RDF mappings via a user interface • Evoc: user interface to import vocabularies which can be used in RDF UI API http://api.drupal.org/api/drupal/modules--rdf--rdf.module/group/rdf/7 giovedì 22 marzo 12
  52. RDF http://drupal.org/project/rdfx http://drupal.org/project/rdf (d6) • RDFx: extends core RDF support

    by providing extra APIs and additional serialization formats such as RDF/XML, NTriples, Turtle... • RDF UI: allows site administrators to specify the RDF mappings via a user interface • Evoc: user interface to import vocabularies which can be used in RDF UI This RDF data can be made available in a SPARQL endpoint with the SPARQL module. API http://api.drupal.org/api/drupal/modules--rdf--rdf.module/group/rdf/7 giovedì 22 marzo 12
  53. SPARQL http://drupal.org/project/sparql SPARQL is a query language for pattern matching

    against RDF graphs. The syntax resembles SQL, making for a friendly learning curve, but SPARQL is far more powerful, enabling queries spanning multiple disparate (local or remote) data sources containing heterogeneous semistructured data. giovedì 22 marzo 12
  54. SPARQL http://drupal.org/project/sparql SPARQL is a query language for pattern matching

    against RDF graphs. The syntax resembles SQL, making for a friendly learning curve, but SPARQL is far more powerful, enabling queries spanning multiple disparate (local or remote) data sources containing heterogeneous semistructured data. •SPARQL API module giovedì 22 marzo 12
  55. SPARQL http://drupal.org/project/sparql SPARQL is a query language for pattern matching

    against RDF graphs. The syntax resembles SQL, making for a friendly learning curve, but SPARQL is far more powerful, enabling queries spanning multiple disparate (local or remote) data sources containing heterogeneous semistructured data. •SPARQL API module •SPARQL Registry module giovedì 22 marzo 12
  56. SPARQL http://drupal.org/project/sparql SPARQL is a query language for pattern matching

    against RDF graphs. The syntax resembles SQL, making for a friendly learning curve, but SPARQL is far more powerful, enabling queries spanning multiple disparate (local or remote) data sources containing heterogeneous semistructured data. •SPARQL API module •SPARQL Registry module •SPARQL Endpoint module giovedì 22 marzo 12
  57. LOD Cloud “Linking Open Data cloud diagram, by Richard Cyganiak

    and Anja Jentzsch. http://lod-cloud.net/” giovedì 22 marzo 12
  58. References http://www.ibm.com/developerworks/web/library/wa-rdf/index.html?ca=drs- The Semantic Web, Linked Data and Drupal, Part

    1: Expose your data using RDF http://www.ibm.com/developerworks/web/library/wa-rdf/index.html?ca=drs- The Semantic Web, Linked Data and Drupal, Part 2: Combine linked datasets with Drupal 7 and SPARQL Views http://openspring.net/blog/2011/05/01/background-research-work-leading-to-rdf-in-drupal-7-released-as-part-of-my-masters Background research work leading to RDF in Drupal 7 released as part of my Master's thesis http://openspring.net/blog/2011/05/01/background-research-work-leading-to-rdf-in-drupal-7-released-as-part-of-my-masters Background research work leading to RDF in Drupal 7 released as part of my Master's thesis http://lin-clark.com/ “Hi, I'm Lin Clark. I support open source and linked data.” giovedì 22 marzo 12