diff --git a/docs/antora-playbook.yml b/docs/antora-playbook.yml index e7c8f44e..75fdad7c 100644 --- a/docs/antora-playbook.yml +++ b/docs/antora-playbook.yml @@ -1,11 +1,12 @@ site: title: ted-sws-docs - start_page: ted-sws::index.adoc + start_page: rdf-conversion::index.adoc content: edit_url: false sources: - url: https://github.com/OP-TED/ted-rdf-conversion-pipeline.git -# - url: /home/dude/work/ted-rdf-conversion-pipeline + # Use local path for testing. Example: +# - url: /mnt/c/Users/user/ted-rdf-conversion-pipeline branches: - main start_path: docs/antora diff --git a/docs/antora/modules/ROOT/nav.adoc b/docs/antora/modules/ROOT/nav.adoc index 2b65a493..d86ef46c 100644 --- a/docs/antora/modules/ROOT/nav.adoc +++ b/docs/antora/modules/ROOT/nav.adoc @@ -17,10 +17,6 @@ ** link:{attachmentsdir}/aws-infra-docs/TED-SWS-Installation-manual-v2.5.0.pdf[AWS installation manual (v2.5.0)^] ** link:{attachmentsdir}/aws-infra-docs/TED-SWS-AWS-Infrastructure-architecture-overview-v0.9.pdf[AWS infrastructure architecture (v0.9)^] -* [.separated]#**For End User Developers**# -** xref:ted_data/using_procurement_data.adoc[Accessing data in Cellar] -** link:https://docs.ted.europa.eu/EPO/latest/index.html[eProcurement ontology (latest)^] - * [.separated]#**For TED-SWS Developers**# ** xref:technical/mapping_suite_cli_toolchain.adoc[Mapping suite toolchain] ** xref:technical/demo_installation.adoc[Development installation instructions] diff --git a/docs/antora/modules/ROOT/pages/ted_data/using_procurement_data.adoc b/docs/antora/modules/ROOT/pages/ted_data/using_procurement_data.adoc deleted file mode 100644 index 129f3652..00000000 --- a/docs/antora/modules/ROOT/pages/ted_data/using_procurement_data.adoc +++ /dev/null @@ -1,184 +0,0 @@ -= Using procurement data - -This page explains how to use procurement data accessed from *Cellar* with Microsoft Excel, Python and R. There are different ways to access TED notices in CELLAR -and use the data. The methods described below work with TED notice and other type of semantic assets. - -We use a sample SPARQL query which returns a list of countries. The users shall use TED specific SPARQL queries to fetch needed data. - - -*Note:* Jupyter Notebook samples are explained with assumption that a -code editor is already prepared. For example VS Code or Pycharm, or -Jupyter server. Examples are explained using -https://code.visualstudio.com/docs[[.underline]#Visual Studio Code#]. - -== Microsoft Excel - -This chapter shows an example of getting data from Cellar using Microsoft Excel. - -[arabic] -. Prepare link with necessary query: - -* Access: -https://publications.europa.eu/webapi/rdf/sparql[[.underline]#https://publications.europa.eu/webapi/rdf/sparql#] - -* Insert query - -Example query: -[source, sparql] -prefix cdm: -select distinct ?Countries -where { -?Countries a cdm:country . -} - -* Push the “Run Query” button - -image:user_manual/media/image6.png[image,width=407,height=466] - -* Copy entire link of the result - -image:user_manual/media/image47.png[image,width=601,height=281] - -[arabic, start=2] -. Access result table via Excel: - -* Click on Data -> From Web button - - -image:user_manual/media/image58.png[image,width=601,height=264] - -* In appeared window insert result link then press OK: - -image:user_manual/media/image88.png[image,width=601,height=320] - -* In result window select necessary table, press load: - -image:user_manual/media/image41.png[image,width=601,height=464] - -== Jupyter Notebook - Python - -This chapter shows an example using the Jupyter Notebook in Python. The -Jupyter Notebook is an application for creating and sharing -computational documents. Python represents a programming language for -writing computational documents. To realize the proposed scenario, it is -necessary to install the special tools and use the Python code that will -perform a query to the cellar and display the results in tabular -form (xref:references[Working with Jupyter Notebook]). - -To run Python sample: - -[arabic] -. Download Jupyter Notebook file: - -https://github.com/OP-TED/ted-rdf-conversion-pipeline/blob/main/notebooks/query_cellar_python.ipynb[[.underline]#https://github.com/OP-TED/ted-rdf-conversion-pipeline/blob/main/notebooks/query_cellar_python.ipynb#] - -[arabic, start=2] -. Download & Install Python 3.8: -[loweralpha] -.. Windows 64bit: -https://www.python.org/ftp/python/3.8.10/python-3.8.10-amd64.exe[[.underline]#download#] - -.. Windows 86bit: -https://www.python.org/ftp/python/3.8.10/python-3.8.10.exe[[.underline]#download#] - -. Open Jupyter Notebook file with code editor (VS Code): - -. In code editor, select interpreter for Python that was installed - -Example in VS Code: - -image:user_manual/media/image8.png[image,width=617,height=204] - -[arabic, start=5] -. Install dependencies: - -* Use OS command line and type: -[source,python] -pip install ipykernel sparqlwrapper pandas - -[arabic, start=6] -. Run Cells (example in VS Code): - -image:user_manual/media/image62.png[image,width=601,height=84] - -If all works good, on last output cell we can see results: - -image:user_manual/media/image2.png[image,width=387,height=420] - -== Jupyter Notebook - R - -This chapter shows an example using Jupyter Notebook in R language. R is -software environment for statistical computing and graphic -representation. In this case, R represents the programming language for -writing notebook documents. To realize the proposed scenario, it is -necessary to install the special tools (xref:references[Running R Jupyter Notebooks]) and -use the R code that will perform a query (xref:references[SPARQL with R]) to -the cellar and display the results in tabular form. - -To run R sample: - -[arabic] -. Install & install R language: - -* Windows 64bit: -https://cran.r-project.org/bin/windows/base/R-4.2.2-win.exe[[.underline]#download#] - -[arabic, start=2] -. Download Jupyter Notebook file: -https://github.com/OP-TED/ted-rdf-conversion-pipeline/blob/main/notebooks/query_cellar_R.ipynb[[.underline]#https://github.com/OP-TED/ted-rdf-conversion-pipeline/blob/main/notebooks/query_cellar_R.ipynb#] - -[arabic, start=3] -. Download SPARQL package archive and put in same folder as Notebook file: -https://cran.r-project.org/src/contrib/Archive/SPARQL/SPARQL_1.16.tar.gz[[.underline]#download SPARQL#] - -[arabic, start=4] -. Install IRKernel: - -[loweralpha] -.. Run R in OS command line and type: -[source,bash] -install.packages("IRkernel") -install.packages('RCurl') -install.packages('XML') - -[loweralpha, start=2] -. In appeared window, select first mirror and press OK: -image:user_manual/media/image45.png[image,width=240,height=309] - -[loweralpha, start=3] -. After installation is completed, type: -[source,bash] -IRkernel::installspec() - - -[arabic, start=5] -. Open Jupyter Notebook file in code editor; - -. Select R interpreter; - -image:user_manual/media/image23.png[image,width=601,height=142] - - -[arabic, start=7] -. Run all cells - -image:user_manual/media/image90.png[image,width=502,height=100] - -[arabic, start=8] -. After running, after last cell we can see results: - -image:user_manual/media/image80.png[image,width=487,height=411] - -== References [[references]] - -[arabic] -. “Working with Jupyter Notebooks in Visual Studio Code.” n.d. Visual -Studio Code. -https://code.visualstudio.com/docs/datascience/jupyter-notebooks[[.underline]#https://code.visualstudio.com/docs/datascience/jupyter-notebooks#] - -. “Running R Jupyter Notebooks in VS Code.” n.d. Practical Data Science. -https://www.practicaldatascience.org/html/jupyter_r_notebooks.html[[.underline]#https://www.practicaldatascience.org/html/jupyter_r_notebooks.html#] - -. “SPARQL with R.” 2013. R-bloggers. -https://www.r-bloggers.com/2013/01/sparql-with-r-in-less-than-5-minutes/[[.underline]#https://www.r-bloggers.com/2013/01/sparql-with-r-in-less-than-5-minutes/#] -