Advertisement
LrdArc

intip.in/sparql

Nov 29th, 2016
2,834
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SPARQL 3.39 KB | None | 0 0
  1. # Query
  2. SELECT *
  3. { ?s ?p ?o }
  4. LIMIT 10
  5.  
  6. # Ngecek ada atau tidak
  7. ASK { <http//dbpedia.org/resource/Indonesia> ?p ?o }
  8.  
  9. #
  10. SELECT *
  11. { ?si ?pi <http//dbpedia.org/resource/Indonesia> }
  12.  
  13.  
  14. #
  15. SELECT *
  16. { ?si <http//dbpedia.org/ontology/genre> <http//dbpedia.org/resource/Dangdut> .
  17.   ?si <http//www.w3.org/2000/01/rdf-schema#label> ?nama
  18. }
  19. LIMIT 100
  20.  
  21.  
  22. # list film
  23. SELECT ?name ?durasi ?sutradara
  24. WHERE {
  25.   ?ins <http//purl.org/dc/terms/subject> <http//dbpedia.org/resource/Category:Indonesian_films> .
  26.   ?ins <http//dbpedia.org/property/name> ?name .
  27.   ?ins <http//dbpedia.org/ontology/Work/runtime> ?durasi .
  28.   ?ins <http//dbpedia.org/property/director> ?sutradara .
  29. }
  30. LIMIT 10
  31.  
  32.  
  33. # list film horror
  34. SELECT ?name ?durasi ?sutradara
  35. WHERE {
  36.   ?ins <http//purl.org/dc/terms/subject> <http//dbpedia.org/resource/Category:Indonesian_horror_films> .
  37.   ?ins <http//dbpedia.org/property/name> ?name .
  38.   ?ins <http//dbpedia.org/ontology/Work/runtime> ?durasi .
  39.   ?ins <http//dbpedia.org/property/director> ?sutradara .
  40. }
  41. LIMIT 100
  42.  
  43.  
  44. # service
  45. SELECT *
  46. WHERE {
  47.   SERVICE <http//data.intip.in/sparql/> {
  48.     SELECT ?Provinsi ?Populasi_Proyeksi_BPS_2014 ?PDRB_per_kapita_2014_juta_rupiah WHERE {}
  49.   }
  50. }
  51. LIMIT 25
  52.  
  53.  
  54. # local
  55. PREFIX owl: <http//www.w3.org/2002/07/owl#>
  56. PREFIX ex: <http//example.com/filariasis.csv>
  57. PREFIX ol: <http//data.intip.in/sparql/>
  58. PREFIX eol: <http//purl.org/biodiversity/eol/>
  59.  
  60. SELECT *
  61. WHERE {
  62.   SERVICE <http//data.intip.in/sparql/> { SELECT ?Provinsi ?PDRB_per_kapita_2014_juta_rupiah WHERE {} } .
  63.   #?Provinsi owl:sameAs ex:nama_provinsi .
  64.   ?ins ex:nama_provinsi ?Provinsi .
  65.   ?ins ex:pemberian_asi_2013 ?pemberian_asi_2013 .
  66.   ?ins ex:terjangkit ?terjangkit .
  67.   ?terjangkit ex:penderita_balita_u1 ?penderita_balita_u1 .
  68.   ?terjangkit ex:penderita_balita_1to4 ?penderita_balita_1to4 .
  69. }
  70. LIMIT 100
  71.  
  72.  
  73. # local baru [done]
  74. PREFIX owl: <http//www.w3.org/2002/07/owl#>
  75. PREFIX ex: <http//example.com/filariasis.csv>
  76. PREFIX ol: <http//data.intip.in/sparql/>
  77. PREFIX eol: <http//purl.org/biodiversity/eol/>
  78. PREFIX rdf: <http//www.w3.org/1999/02/22-rdf-syntax-ns#>
  79. PREFIX rdfs: <http//www.w3.org/2000/01/rdf-schema#>
  80.  
  81. SELECT *
  82. WHERE {
  83.    
  84.   SERVICE <http//data.intip.in/sparql/> {
  85.     SELECT ?Provinsi ?Populasi_Proyeksi_BPS_2014 ?PDRB_per_kapita_2014_juta_rupiah WHERE {}
  86.   } .
  87.  
  88.   ?ins rdfs:label ?Provinsi .
  89.   ?ins ex:pemberian_asi_2013 ?pemberian_asi_2013 .
  90.   ?ins ex:terjangkit ?terjangkit .
  91.   ?terjangkit ex:penderita_balita_u1 ?penderita_balita_u1 .
  92.   ?terjangkit ex:penderita_balita_1to4 ?penderita_balita_1to4 .
  93. }
  94. LIMIT 100
  95.  
  96.  
  97. # Long lat by id.dbpedia.org
  98. SELECT DISTINCT ?provinsi ?long ?lat WHERE {
  99.     ?provinsi rdf:type dbpedia-owl:Province .
  100.     ?provinsi geo:lat ?lat .
  101.     ?provinsi geo:long ?long .
  102. }
  103.  
  104.  
  105. # Fix data.intip.in + longlat
  106. PREFIX ex: <http://example.com/filariasis.csv>
  107. PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
  108. PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
  109.  
  110. SELECT *
  111. WHERE {
  112.    
  113.   SERVICE <http//data.intip.in/sparql/> {
  114.     SELECT ?Provinsi ?Populasi_Proyeksi_BPS_2014 ?PDRB_per_kapita_2014_juta_rupiah ?Longitude ?Latitude
  115.     WHERE {}
  116.   } .
  117.  
  118.   ?ins rdfs:label ?Provinsi .
  119.   ?ins ex:pemberian_asi_2013 ?pemberian_asi_2013 .
  120.   ?ins ex:terjangkit ?terjangkit .
  121.   ?terjangkit ex:penderita_balita_u1 ?penderita_balita_u1 .
  122.   ?terjangkit ex:penderita_balita_1to4 ?penderita_balita_1to4 .
  123. }
  124.  
  125. LIMIT 100
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement