-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
31d0100
commit ba554f9
Showing
5 changed files
with
224 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Deploy book with Python, SPARQL, and R | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
# This job installs dependencies, builds the book, and deploys it to GitHub Pages | ||
jobs: | ||
deploy-book: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pages: write | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11 | ||
cache: pip | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install -r requirements.txt | ||
- name: Set up R | ||
uses: r-lib/actions/setup-r@v2 | ||
|
||
- name: Cache R packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.R_LIBS_USER }} | ||
key: ${{ runner.os }}-r-${{ hashFiles('**/renv.lock') }} | ||
restore-keys: ${{ runner.os }}-r- | ||
|
||
- name: Install R packages | ||
run: | | ||
# Use binary packages and RSPM for faster installation | ||
Rscript -e 'options(repos = c(RSPM = "https://packagemanager.rstudio.com/all/__linux__/focal/latest", CRAN = "https://cloud.r-project.org"))' | ||
Rscript -e 'options(install.packages.check.source = "no")' # Prefer binaries | ||
Rscript -e 'install.packages("IRkernel", dependencies=TRUE)' | ||
Rscript -e 'IRkernel::installspec(name="ir", displayname="R")' | ||
# - name: Install R_requirements | ||
# run: | | ||
# Rscript install_dependencies.R | ||
|
||
- name: Install SPARQL kernel | ||
run: | | ||
jupyter sparqlkernel install --user | ||
- name: Log all available kernels | ||
run: | | ||
jupyter kernelspec list | ||
# (optional) Cache your executed notebooks between runs | ||
# if you have config: | ||
# execute: | ||
# execute_notebooks: cache | ||
- name: cache executed notebooks | ||
uses: actions/cache@v3 | ||
with: | ||
path: _build/.jupyter_cache | ||
key: jupyter-book-cache-${{ hashFiles('requirements.txt') }} | ||
|
||
- name: Build the book | ||
run: | | ||
jupyter-book build . | ||
- name: Upload book artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: "_build/html" | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Grundlagen" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Basierend auf der OER https://quadriga-dk.github.io/Tabelle-Fallstudie-2/SPARQL_Grundlagen.html als minimaler Test der SPARQL-Einbindung." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"<div class=\"krn-spql\"><table><tr class=hdr><th>uri</th>\n", | ||
"<th>title</th>\n", | ||
"<th>contributorid</th>\n", | ||
"<th>stateKey</th></tr><tr class=odd><td class=val><a href=\"http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3\" target=\"_other\">http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3</a></td>\n", | ||
"<td class=val>Digitale Topographische Karte 1 : 10 000 - 3952-NO Friedland - Groß Muckrow</td>\n", | ||
"<td class=val><a href=\"http://dcat-ap.de/def/contributors/openDataBrandenburg\" target=\"_other\">http://dcat-ap.de/def/contributors/openDataBrandenburg</a></td>\n", | ||
"<td class=val></td></tr><tr class=even><td class=val><a href=\"http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3\" target=\"_other\">http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3</a></td>\n", | ||
"<td class=val>Léarscáil thopagrafach dhigiteach 1 : 10 000 - 3952-NO Friedland - Groß Muckrow</td>\n", | ||
"<td class=val><a href=\"http://dcat-ap.de/def/contributors/openDataBrandenburg\" target=\"_other\">http://dcat-ap.de/def/contributors/openDataBrandenburg</a></td>\n", | ||
"<td class=val></td></tr><tr class=odd><td class=val><a href=\"http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3\" target=\"_other\">http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3</a></td>\n", | ||
"<td class=val>Ψηφιακός τοπογραφικός χάρτης 1: 10000 — 3952-NO Friedland — Groß Muckrow</td>\n", | ||
"<td class=val><a href=\"http://dcat-ap.de/def/contributors/openDataBrandenburg\" target=\"_other\">http://dcat-ap.de/def/contributors/openDataBrandenburg</a></td>\n", | ||
"<td class=val></td></tr><tr class=even><td class=val><a href=\"http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3\" target=\"_other\">http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3</a></td>\n", | ||
"<td class=val>Digitalna topografska karta 1.: 10 000 - 3952-NO Friedland - Groß Muckrow</td>\n", | ||
"<td class=val><a href=\"http://dcat-ap.de/def/contributors/openDataBrandenburg\" target=\"_other\">http://dcat-ap.de/def/contributors/openDataBrandenburg</a></td>\n", | ||
"<td class=val></td></tr><tr class=odd><td class=val><a href=\"http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3\" target=\"_other\">http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3</a></td>\n", | ||
"<td class=val>Digitālā topogrāfiskā karte Nr. 1 : 10 000 - 3952-NO Friedland - Groß Muckrow</td>\n", | ||
"<td class=val><a href=\"http://dcat-ap.de/def/contributors/openDataBrandenburg\" target=\"_other\">http://dcat-ap.de/def/contributors/openDataBrandenburg</a></td>\n", | ||
"<td class=val></td></tr><tr class=even><td class=val><a href=\"http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3\" target=\"_other\">http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3</a></td>\n", | ||
"<td class=val>Digitaalinen topografinen kartta 1 : 10 000 - 3952-NO Friedland - Groß Muckrow</td>\n", | ||
"<td class=val><a href=\"http://dcat-ap.de/def/contributors/openDataBrandenburg\" target=\"_other\">http://dcat-ap.de/def/contributors/openDataBrandenburg</a></td>\n", | ||
"<td class=val></td></tr><tr class=odd><td class=val><a href=\"http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3\" target=\"_other\">http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3</a></td>\n", | ||
"<td class=val>Mapa topográfico digital 1 : 10 000 - 3952-NO Frísia - Groß Muckrow</td>\n", | ||
"<td class=val><a href=\"http://dcat-ap.de/def/contributors/openDataBrandenburg\" target=\"_other\">http://dcat-ap.de/def/contributors/openDataBrandenburg</a></td>\n", | ||
"<td class=val></td></tr><tr class=even><td class=val><a href=\"http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3\" target=\"_other\">http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3</a></td>\n", | ||
"<td class=val>Carta topografica digitale 1 : 10 000 - 3952-NO Friedland - Groß Muckrow</td>\n", | ||
"<td class=val><a href=\"http://dcat-ap.de/def/contributors/openDataBrandenburg\" target=\"_other\">http://dcat-ap.de/def/contributors/openDataBrandenburg</a></td>\n", | ||
"<td class=val></td></tr><tr class=odd><td class=val><a href=\"http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3\" target=\"_other\">http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3</a></td>\n", | ||
"<td class=val>Digitálna topografická mapa 1 : 10 000 - 3952-NO Friedland - Groß Muckrow</td>\n", | ||
"<td class=val><a href=\"http://dcat-ap.de/def/contributors/openDataBrandenburg\" target=\"_other\">http://dcat-ap.de/def/contributors/openDataBrandenburg</a></td>\n", | ||
"<td class=val></td></tr><tr class=even><td class=val><a href=\"http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3\" target=\"_other\">http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3</a></td>\n", | ||
"<td class=val>Digitale topografische kaart 1 : 10 000 - 3952-NO Friedland - Groß Muckrow</td>\n", | ||
"<td class=val><a href=\"http://dcat-ap.de/def/contributors/openDataBrandenburg\" target=\"_other\">http://dcat-ap.de/def/contributors/openDataBrandenburg</a></td>\n", | ||
"<td class=val></td></tr><tr class=odd><td class=val><a href=\"http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3\" target=\"_other\">http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3</a></td>\n", | ||
"<td class=val>Harta topografică digitală 1 : 10 000 - 3952-NO Friedland - Groß Muckrow</td>\n", | ||
"<td class=val><a href=\"http://dcat-ap.de/def/contributors/openDataBrandenburg\" target=\"_other\">http://dcat-ap.de/def/contributors/openDataBrandenburg</a></td>\n", | ||
"<td class=val></td></tr><tr class=even><td class=val><a href=\"http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3\" target=\"_other\">http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3</a></td>\n", | ||
"<td class=val>Цифрова топографска карта 1: 10000—3952-NO Friedland — Groß Muckrow</td>\n", | ||
"<td class=val><a href=\"http://dcat-ap.de/def/contributors/openDataBrandenburg\" target=\"_other\">http://dcat-ap.de/def/contributors/openDataBrandenburg</a></td>\n", | ||
"<td class=val></td></tr><tr class=odd><td class=val><a href=\"http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3\" target=\"_other\">http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3</a></td>\n", | ||
"<td class=val>Цифрова топографічна карта 1: 10000 — 3952-NO Фрідленд — Groß Muckrow</td>\n", | ||
"<td class=val><a href=\"http://dcat-ap.de/def/contributors/openDataBrandenburg\" target=\"_other\">http://dcat-ap.de/def/contributors/openDataBrandenburg</a></td>\n", | ||
"<td class=val></td></tr><tr class=even><td class=val><a href=\"http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3\" target=\"_other\">http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3</a></td>\n", | ||
"<td class=val>Digital topografisk karta 1 : 10 000 – 3952-NO Friedland – Groß Muckrow</td>\n", | ||
"<td class=val><a href=\"http://dcat-ap.de/def/contributors/openDataBrandenburg\" target=\"_other\">http://dcat-ap.de/def/contributors/openDataBrandenburg</a></td>\n", | ||
"<td class=val></td></tr><tr class=odd><td class=val><a href=\"http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3\" target=\"_other\">http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3</a></td>\n", | ||
"<td class=val>Digitalt topografisk kort 1 : 10 000 - 3952-NO Friedland - Groß Muckrow</td>\n", | ||
"<td class=val><a href=\"http://dcat-ap.de/def/contributors/openDataBrandenburg\" target=\"_other\">http://dcat-ap.de/def/contributors/openDataBrandenburg</a></td>\n", | ||
"<td class=val></td></tr><tr class=even><td class=val><a href=\"http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3\" target=\"_other\">http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3</a></td>\n", | ||
"<td class=val>Digitalna topografska karta 1 : Besedilo pesmi Groß Muckrow - 10 000 - 3952-NO Friedland</td>\n", | ||
"<td class=val><a href=\"http://dcat-ap.de/def/contributors/openDataBrandenburg\" target=\"_other\">http://dcat-ap.de/def/contributors/openDataBrandenburg</a></td>\n", | ||
"<td class=val></td></tr><tr class=odd><td class=val><a href=\"http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3\" target=\"_other\">http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3</a></td>\n", | ||
"<td class=val>Carte topographique numérique 1 : 10 000 - 3952-NO Friedland - Grand Muckrow</td>\n", | ||
"<td class=val><a href=\"http://dcat-ap.de/def/contributors/openDataBrandenburg\" target=\"_other\">http://dcat-ap.de/def/contributors/openDataBrandenburg</a></td>\n", | ||
"<td class=val></td></tr><tr class=even><td class=val><a href=\"http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3\" target=\"_other\">http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3</a></td>\n", | ||
"<td class=val>Mappa topografika diġitali 1 : 10 000 - 3952-NO Friedland - Groß Muckrow</td>\n", | ||
"<td class=val><a href=\"http://dcat-ap.de/def/contributors/openDataBrandenburg\" target=\"_other\">http://dcat-ap.de/def/contributors/openDataBrandenburg</a></td>\n", | ||
"<td class=val></td></tr><tr class=odd><td class=val><a href=\"http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3\" target=\"_other\">http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3</a></td>\n", | ||
"<td class=val>Digitální topografická mapa 1 : 10 000 - 3952-NO Friedland - Velká Muckrow</td>\n", | ||
"<td class=val><a href=\"http://dcat-ap.de/def/contributors/openDataBrandenburg\" target=\"_other\">http://dcat-ap.de/def/contributors/openDataBrandenburg</a></td>\n", | ||
"<td class=val></td></tr><tr class=even><td class=val><a href=\"http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3\" target=\"_other\">http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3</a></td>\n", | ||
"<td class=val>Digitaalne topograafiline kaart 1 : 10 000 - 3952-NO Friedland - Groß Muckrow</td>\n", | ||
"<td class=val><a href=\"http://dcat-ap.de/def/contributors/openDataBrandenburg\" target=\"_other\">http://dcat-ap.de/def/contributors/openDataBrandenburg</a></td>\n", | ||
"<td class=val></td></tr></table><div class=\"tinfo\">Total: 100000, Shown: 20</div></div>" | ||
] | ||
}, | ||
"metadata": {}, | ||
"output_type": "display_data" | ||
} | ||
], | ||
"source": [ | ||
"%endpoint https://data.europa.eu/sparql\n", | ||
"PREFIX dct: <http://purl.org/dc/terms/>\n", | ||
"PREFIX dcatde: <http://dcat-ap.de/def/dcatde/>\n", | ||
"PREFIX pg: <https://www.dcat-ap.de/def/politicalGeocoding/>\n", | ||
"\n", | ||
"SELECT ?uri ?title ?contributorid ?stateKey\n", | ||
"WHERE {\n", | ||
" ?uri dct:title ?title .\n", | ||
" ?uri dcatde:contributorID ?contributorid .\n", | ||
" OPTIONAL {?uri pg:stateKey ?stateKey} .\n", | ||
"}" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"vscode": { | ||
"languageId": "plaintext" | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "SPARQL", | ||
"language": "sparql", | ||
"name": "sparql" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "sparql" | ||
}, | ||
"mimetype": "application/sparql-query", | ||
"name": "sparql", | ||
"pygments_lexer": "sparql-nb" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
jupyter sparqlkernel install --user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,102 +1,5 @@ | ||
accessible-pygments==0.0.5 | ||
alabaster==0.7.16 | ||
appnope==0.1.4 | ||
asttokens==3.0.0 | ||
attrs==25.1.0 | ||
babel==2.17.0 | ||
beautifulsoup4==4.13.3 | ||
certifi==2025.1.31 | ||
charset-normalizer==3.4.1 | ||
click==8.1.8 | ||
comm==0.2.2 | ||
contourpy==1.3.1 | ||
cycler==0.12.1 | ||
debugpy==1.8.12 | ||
decorator==5.2.1 | ||
docutils==0.20.1 | ||
executing==2.2.0 | ||
fastjsonschema==2.21.1 | ||
fonttools==4.56.0 | ||
idna==3.10 | ||
imagesize==1.4.1 | ||
importlib_metadata==8.6.1 | ||
iniconfig==2.0.0 | ||
ipykernel==6.29.5 | ||
ipython==8.32.0 | ||
jedi==0.19.2 | ||
Jinja2==3.1.5 | ||
jsonschema==4.23.0 | ||
jsonschema-specifications==2024.10.1 | ||
jupyter-book==1.0.3 | ||
jupyter-cache==1.0.1 | ||
jupyter_client==8.6.3 | ||
jupyter_core==5.7.2 | ||
JupyterQuiz==2.8.1 | ||
kiwisolver==1.4.8 | ||
latexcodec==3.0.0 | ||
linkify-it-py==2.0.3 | ||
markdown-it-py==3.0.0 | ||
MarkupSafe==3.0.2 | ||
matplotlib==3.10.0 | ||
matplotlib-inline==0.1.7 | ||
mdit-py-plugins==0.4.2 | ||
mdurl==0.1.2 | ||
myst-nb==1.2.0 | ||
myst-parser==2.0.0 | ||
nbclient==0.10.2 | ||
nbformat==5.10.4 | ||
nest-asyncio==1.6.0 | ||
numpy==2.2.3 | ||
packaging==24.2 | ||
parso==0.8.4 | ||
pexpect==4.9.0 | ||
pillow==11.1.0 | ||
platformdirs==4.3.6 | ||
pluggy==1.5.0 | ||
prompt_toolkit==3.0.50 | ||
psutil==7.0.0 | ||
ptyprocess==0.7.0 | ||
pure_eval==0.2.3 | ||
pybtex==0.24.0 | ||
pybtex-docutils==1.0.3 | ||
pydata-sphinx-theme==0.15.4 | ||
Pygments==2.19.1 | ||
pyparsing==3.2.1 | ||
python-dateutil==2.9.0.post0 | ||
PyYAML==6.0.2 | ||
pyzmq==26.2.1 | ||
referencing==0.36.2 | ||
requests==2.32.3 | ||
rpds-py==0.23.1 | ||
setuptools==75.8.0 | ||
six==1.17.0 | ||
snowballstemmer==2.2.0 | ||
soupsieve==2.6 | ||
Sphinx==7.4.7 | ||
sphinx-book-theme==1.1.4 | ||
sphinx-comments==0.0.3 | ||
sphinx-copybutton==0.5.2 | ||
sphinx-jupyterbook-latex==1.0.0 | ||
sphinx-multitoc-numbering==0.1.3 | ||
sphinx-thebe==0.3.1 | ||
sphinx-togglebutton==0.3.2 | ||
sphinx_design==0.6.1 | ||
sphinx_external_toc==1.0.1 | ||
sphinxcontrib-applehelp==2.0.0 | ||
sphinxcontrib-bibtex==2.6.3 | ||
sphinxcontrib-devhelp==2.0.0 | ||
sphinxcontrib-htmlhelp==2.1.0 | ||
sphinxcontrib-jsmath==1.0.1 | ||
sphinxcontrib-qthelp==2.0.0 | ||
sphinxcontrib-serializinghtml==2.0.0 | ||
SQLAlchemy==2.0.38 | ||
stack-data==0.6.3 | ||
tabulate==0.9.0 | ||
tornado==6.4.2 | ||
traitlets==5.14.3 | ||
typing_extensions==4.12.2 | ||
uc-micro-py==1.0.3 | ||
urllib3==2.3.0 | ||
wcwidth==0.2.13 | ||
wheel==0.45.1 | ||
zipp==3.21.0 | ||
jupyter-book==1.0.4 | ||
JupyterQuiz==2.8.* | ||
matplotlib | ||
numpy | ||
sparqlkernel |