Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fityannugroho/idn-area-lod
Linked version of idn-area-data
https://github.com/fityannugroho/idn-area-lod
idn-area linked-data linked-open-data lod open-data
Last synced: 15 days ago
JSON representation
Linked version of idn-area-data
- Host: GitHub
- URL: https://github.com/fityannugroho/idn-area-lod
- Owner: fityannugroho
- Created: 2023-11-02T06:27:20.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-19T09:23:40.000Z (about 1 year ago)
- Last Synced: 2024-10-31T07:07:47.965Z (2 months ago)
- Topics: idn-area, linked-data, linked-open-data, lod, open-data
- Language: Shell
- Homepage:
- Size: 2.26 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Linked Indonesian Area Data
The [linked](https://en.wikipedia.org/wiki/Linked_data) version of [idn-area-data](https://github.com/fityannugroho/idn-area-data).
## Data
The linked data is available in [`src/res`](/src/res) directory. It is generated from CSV data in [`idn-area-data`](https://github.com/fityannugroho/idn-area-data) using [CSV2RDF converter](https://github.com/atomgraph/csv2rdf).
## Ontology
We have defined the custom ontology for this dataset which is available in [`src/definition.ttl` file](/src/definitions.ttl).
## Usage
You can use the linked data by creating a [SPARQL query](https://en.wikipedia.org/wiki/SPARQL) to retrieve the data you want.
For example, the SPARQL below will retrieve all provinces data with the number of regencies of each provinces.
```rq
PREFIX idnarea:SELECT ?code ?name (COUNT(?regency) AS ?regencyCount)
FROM
FROM
WHERE {
?province a idnarea:Province ;
idnarea:code ?code ;
idnarea:name ?name .
?regency a idnarea:Regency ;
idnarea:isPartOf ?province .
}
GROUP BY ?code ?name
ORDER BY ASC(?code)
```> See another query examples in [`examples`](/examples) directory.
Then, you can **execute that SPARQL query with general SPARQL processor / editor**, like https://sparql.org/sparql.html.
And this is the result if you choose the output in CSV:
```csv
code,name,regencyCount
11,ACEH,23
12,SUMATERA UTARA,33
13,SUMATERA BARAT,19
14,RIAU,12
15,JAMBI,11
16,SUMATERA SELATAN,17
17,BENGKULU,10
18,LAMPUNG,15
19,KEPULAUAN BANGKA BELITUNG,7
21,KEPULAUAN RIAU,7
31,DKI JAKARTA,6
32,JAWA BARAT,27
33,JAWA TENGAH,35
34,DAERAH ISTIMEWA YOGYAKARTA,5
35,JAWA TIMUR,38
36,BANTEN,8
51,BALI,9
52,NUSA TENGGARA BARAT,10
53,NUSA TENGGARA TIMUR,22
61,KALIMANTAN BARAT,14
62,KALIMANTAN TENGAH,14
63,KALIMANTAN SELATAN,13
64,KALIMANTAN TIMUR,10
65,KALIMANTAN UTARA,5
71,SULAWESI UTARA,15
72,SULAWESI TENGAH,13
73,SULAWESI SELATAN,24
74,SULAWESI TENGGARA,17
75,GORONTALO,6
76,SULAWESI BARAT,6
81,MALUKU,11
82,MALUKU UTARA,10
91,PAPUA,9
92,PAPUA BARAT,13
93,PAPUA SELATAN,4
94,PAPUA TENGAH,8
95,PAPUA PEGUNUNGAN,8
```