Demo: World Eathquake Map (Yahoo Pipes)

From Data-gov Wiki

Jump to: navigation, search

Infobox (stable demo) edit with form
  • name: Demo: World Eathquake Map (Yahoo Pipes)

  • description: This demo shows a map of the world depicting the locations of all earthquakes of magnitude greater than 3.0, dph of less than 50 miles, over the previous seven days. Clicking on a location shows additional details.
  • creator(s): Li Ding
  • created: Oct 19,2009
  • modified: 2011-3-13

live demo here

Facts about this Demonstration

Live Demo(s)
Video Demo(s)
Data.gov Data source(s)
Other Data source(s)
Technology Used
Related SPARQL
Related Demo(s)


Technical Highlights

In this demo, we show how RDF can be used to consumed by yahoo! pipes which is a popular web based tool for building Mashups. Following is a step-by-step instruction showing

  • how conventional Web data publishing and consumption can be connected with RDF
  • how RDF + SPARQL can be used to support data manipulation in mashups.


Step 1 locate earthquake data on data.gov
The earthquake dataset published at Data.gov


Step 2 convert earthquake data from CSV to RDF
Web interface of CSV2RDF that was used to convert earthquake data from CSV to RDF
* CSV data: http://www.data.gov/download/34/csv
* xmlbase: http://data-gov.tw.rpi.edu/raw/34
* property namespace: http://data-gov.tw.rpi.edu/vocab/p/32  

note: we reused property namespace from a similar dataset Dataset 32 (Worldwide M1+ Earthquakes, Past Hour, Department of the Interior)


Step 3 query RDF data and get the results back into a CSV file
  • we use the following query to filter earthquake data by magnitude and depth. Note that some proposed SPARQL 1.1 features were used here including datatype casting (e.g. "xsd:floaf").
PREFIX dgp32:  <http://data-gov.tw.rpi.edu/vocab/p/32/>
PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#> 
SELECT ?id ?label ?datetime  ?lat ?lon (xsd:float(?mag) as ?magnitude) (xsd:float(?dep) as ?depth)  ?region ?src ?uri
FROM <http://data-gov.tw.rpi.edu/raw/34/data-34.rdf>
WHERE { 
         ?uri dgp32:eqid ?id. 
         ?uri dgp32:eqid ?label. 
         ?uri dgp32:region ?region.
         ?uri dgp32:datetime ?datetime. 
	 ?uri dgp32:magnitude ?mag .
         ?uri dgp32:depth ?dep. 
         ?uri dgp32:lat ?lat.
         ?uri dgp32:lon ?lon. 
         ?uri dgp32:src ?src.
         filter ( xsd:float(?mag) >= 3 && xsd:float(?dep) <= 50 )  }
Web interface of SparqlProxy that was used to query earthquake data in RDF and return the results back in CSV
* type of past the above SPARQL query in "SPARQL query" field
* check "CSV"  as output format
* click "query" button
Step 4 build a Yahoo Pipes! demo
  • you need a yahoo ID to access Yahoo Pipes!
  • build a yahoo pipe that consume the filtered CSV and plot the data on a map
    • use "Sources">"Fetch CSV" to retrieve SPARQL query result
    • use "Operations">"rename" to rename column names
    • use "Operations">"Loop" together with "String">"String Builder" to compose a text "description" for each earthquake
    • use "Operations">"Loop" together with "String">"String Builder" to compose a USGS "url" for each earthquake
    • use "Locaiton">"Location Extraction" to put data on map.
Web interface of SparqlProxy display filtered earthquake data (query results in CSV)
Facts about Demo: World Eathquake Map (Yahoo Pipes)RDF feed
Data sourceDataset 34  +
Dcterms:created19 October 2009  +
Dcterms:creatorLi Ding  +
Dcterms:descriptionThis demo shows a map of the world depicting the locations of all earthquakes of magnitude greater than 3.0, dph of less than 50 miles, over the previous seven days. Clicking on a location shows additional details.
Dcterms:modified2011-3-13
Foaf:depictionhttps://data-gov.tw.rpi.edu/w/images/e/e9/Quake_pipes.png  +
Foaf:nameDemo: World Eathquake Map (Yahoo Pipes)
ImageQuake pipes.png  +
Live demohttp://pipes.yahoo.com/pipes/pipe.info?_id=5f54b30d36a9eacff1a88669ca03aaa8  +
Skos:altLabelDemo: World Eathquake Map (Yahoo Pipes)  +, demo: world eathquake map (yahoo pipes)  +, and DEMO: WORLD EATHQUAKE MAP (YAHOO PIPES)  +
Sparqlhttp://data-gov.tw.rpi.edu/sparql/demo-34-exhibit.sparql  +
Technology usedYahoo! Pipes  +, and SparqlProxy  +
Personal tools
internal pages