README.md 1.01 KB
Newer Older
Jonas Waeber's avatar
Jonas Waeber committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
## Drupal Sync Service

Transforms json objects into RDF Resources.

### Canton Query

https://query.wikidata.org/

```sparql
SELECT ?item ?labelDE ?labelFR ?labelIT
WHERE 
{
  ?item wdt:P31 wd:Q23058.
  ?item rdfs:label ?labelDE .
  FILTER(LANG(?labelDE) = "de")
  
  ?item rdfs:label ?labelFR .
  FILTER(LANG(?labelFR) = "fr")
  
  ?item rdfs:label ?labelIT .
  FILTER(LANG(?labelIT) = "fr")
}
```

### Municipalities Query

https://query.wikidata.org/

```sparql
SELECT ?item ?postalCode ?adminUnit ?labelDE ?labelFR ?labelIT (GROUP_CONCAT(DISTINCT ?coordinates; SEPARATOR=",") as ?groupedCoordinates)
WHERE 
{
  ?item wdt:P31 wd:Q70208.
  ?item wdt:P281 ?postalCode .
  ?item wdt:P625 ?coordinates .
  ?item wdt:P131 ?adminUnit .
  ?adminUnit wdt:P31 wd:Q23058 .
  
  ?item rdfs:label ?labelDE .
  FILTER(LANG(?labelDE) = "de")
  
  ?item rdfs:label ?labelFR .
  FILTER(LANG(?labelFR) = "fr")
  
  ?item rdfs:label ?labelIT .
  FILTER(LANG(?labelIT) = "fr")
  
}
GROUP BY ?item ?postalCode ?adminUnit ?labelDE ?labelFR ?labelIT
```