-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from OP-TED/feature/TED-1422
Feature/ted 1422
- Loading branch information
Showing
31 changed files
with
1,358 additions
and
89 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
Binary file modified
BIN
+26.1 KB
(320%)
docs/antora/modules/ROOT/images/user_manual/jupyter_notebook/image3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+37.3 KB
(820%)
docs/antora/modules/ROOT/images/user_manual/jupyter_notebook/image7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.3 KB
docs/antora/modules/ROOT/images/user_manual/jupyter_notebook/image8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-57.9 KB
(28%)
docs/antora/modules/ROOT/images/user_manual/ms_excell/image3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+39.4 KB
docs/antora/modules/ROOT/images/user_manual/sparql_queries/image1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,27 +1,19 @@ | ||
[.separated]#**TED-SWS**# | ||
|
||
* xref:index.adoc[Home] | ||
** What is TED SWS | ||
** What is sample app? | ||
** What is mapping? | ||
** How to use TED SWS | ||
** What y’ll find in this documentation | ||
** How to contribute to TED SWS | ||
* xref:mapping_suite/index.adoc[Mapping Suites] | ||
** Getting started | ||
** Who are these docs written for | ||
** Glossary | ||
** Assumptions we make about the skills of the reader | ||
*** Prerequisites | ||
** what the user can achieve through these pages | ||
* xref:mapping_suite/index.adoc[Mapping Suite Docs] | ||
** xref:mapping_suite/repository-structure.adoc[Repository structure] | ||
** xref:mapping_suite/mapping-suite-structure.adoc[Mapping suite anatomy] | ||
** xref:mapping_suite/code-list-resources.adoc[Code list mappings] | ||
** xref:mapping_suite/preparing-test-data.adoc[Data samples] | ||
** xref:mapping_suite/versioning.adoc[Versioning] | ||
** References | ||
* xref:sample_app/index.adoc[TED Data Sample application] | ||
** xref:sample_app/jupyter_notebook.adoc[Jupyter Notebook] | ||
** xref:sample_app/ms_excell.adoc[MS Excel] | ||
* xref:sample_app/index.adoc[Sample application Docs] | ||
** xref:sample_app/jupyter_notebook_python.adoc[Python Jupyter Notebook] | ||
** xref:sample_app/jupyter_notebook_r.adoc[R Jupyter Notebook] | ||
** xref:sample_app/ms_excel.adoc[MS Excel] | ||
** xref:sample_app/sparql_queries.adoc[SPARQL Queries] | ||
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,22 +1,45 @@ | ||
= TED-RDF Conversion Pipeline Documentation | ||
= TED-SWS End-User Documentation | ||
|
||
The TED-RDF Conversion Pipeline, is part of the TED Semantic Web Services (TED-SWS system) and provides tools an infrastructure to convert TED notices available in XML format into RDF. This conversion pipeline is designed to work with the https://docs.ted.europa.eu/rdf-mapping/index.html[TED-SWS Mapping Suites] - self containing packages with transformation rules and resources. | ||
TED Semantic Web Service (TED-SWS) is a pipeline system that continuously | ||
converts the public procurement notices (in XML format) available on the | ||
TED Website into RDF format based on the eProcurement Ontology, and publishes | ||
them into CELLAR repository, hance making them available to the public | ||
through CELLAR’s SPARQL endpoint. | ||
|
||
== What is TED SWS | ||
The TED Semantic Web Service (TED-SWS) is plugging together | ||
the TED infrastructure for the collection and publication of public procurement | ||
notices with the infrastructure of http://data.europa.eu/[data.europa.eu] | ||
in order to make public procurement data accessible and reusable as | ||
Linked Open Data (LOD) by users and stakeholders (see xref:motivation.adoc[the detailed motivation]). | ||
|
||
== Audience | ||
|
||
== What is sample app? | ||
This documentation is written for a wide audience, with different interests in the TED-SWS project, and different levels of expertise Semantic Web, EU e-Procurement and software infrastructure. More specifically this documentation can be of interest to: | ||
|
||
- *End-Users*, such as *Semantic Web Practitioners* or *Experts in eProcurement Domain*, who are interested in understanding how the RDF representation of the e-procurement notices look like, and how this representation conforms to the eProcurement Ontology (ePO). | ||
- *Software Engineers* interested in integrating mapping suite packages into processing pipelines; | ||
- *Semantic Engineers* interested in understanding and writing mappings from XML to RDF, in particular in the EU eProcurement domain; | ||
|
||
== What is mapping? | ||
== Contents | ||
|
||
[.tile-container] | ||
-- | ||
|
||
== How to use TED SWS | ||
[.tile] | ||
.Mapping Suites | ||
**** | ||
The TED-RDF Mappings are the transformation rules needed by the TED-RDF Conversion Pipeline (both of which are part of the TED Semantic Web Services, aka TED-SWS system) to convert TED notices available in XML format to RDF. | ||
<<ted-rdf-docs:ROOT:mapping_suite/index.adoc#, Read the docs>> | ||
**** | ||
|
||
== What y’ll find in this documentation | ||
|
||
[.tile] | ||
.Sample applications | ||
**** | ||
Sample application represents a set of examples that shows how to interact with TED RDF Data (available in CELLAR) using tools like Python, R or Excel. | ||
== How to contribute to TED SWS | ||
|
||
<<ted-rdf-docs:ROOT:sample_app/index.adoc#, Read the docs>> | ||
**** | ||
|
||
-- |
2 changes: 1 addition & 1 deletion
2
docs/antora/modules/ROOT/pages/mapping_suite/code-list-resources.adoc
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
4 changes: 2 additions & 2 deletions
4
docs/antora/modules/ROOT/pages/mapping_suite/preparing-test-data.adoc
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
2 changes: 1 addition & 1 deletion
2
docs/antora/modules/ROOT/pages/mapping_suite/repository-structure.adoc
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,62 @@ | ||
# TED-SWS motivation | ||
|
||
In its Strategic Plan for 2020-2024, the Publications Office has | ||
defined specific Ojective 1 on the "European public procurement space" | ||
as part of its general Objective 2 "A Europe fit for the digital age". | ||
|
||
In this context the Publications Office has identified the need for reliable and | ||
complete data on public procurement in the EU as being essential | ||
for transparency and accountability of public spending. The ongoing | ||
investments of the Publications Office for the transition to eForms, | ||
and the continued development of the eProcurement Ontology are | ||
identified by the Strategic Plan as being central for | ||
improved data quality and enhanced automation of data processing | ||
and interoperability. | ||
|
||
Additionally, in the context of specific objective 2 on the | ||
"European data space", the Publications Office identifies the gap that | ||
still exists between the available wealth of open data, spread across | ||
multiple outlets, and the effort required to discover, access and reuse it. | ||
|
||
To bridge this gap, the Strategic Plan for 2020-2024, commits to | ||
generate and share new knowledge as linked open data, through | ||
an ecosystem of datasets, data models, ontologies and specialised services | ||
accessible through a single entry point (http://data.europa.eu/[data.europa.eu]) | ||
following a "data-as-a-public-service" approach. | ||
|
||
Although TED notice data is already available to the general public | ||
through the search API provided by the TED website, the current offering | ||
has many limitations that impede access to and reuse of the data. One | ||
such important impediment is for example the current format of the data. | ||
|
||
Historical TED data come in various XML formats that evolved together | ||
with the standard TED XML schema. The imminent introduction of eForms | ||
will also introduce further diversity in the XML data formats available | ||
through TED's search API. This makes it practically impossible for users | ||
to consume and process data that span across several years, as | ||
their information systems must be able to process several different | ||
flavours of the available XML schemas as well as to keep up with the | ||
schema's continuous evolution. Their search capabilities are therefore | ||
confined to a very limited set of metadata. | ||
|
||
The TED Semantic Web Service removes these barriers by providing one | ||
common format for accessing and reusing all TED data. Coupled with the | ||
eProcurement Ontology, the TED data will also have semantics attached to | ||
them allowing users to directly link them with other datasets. | ||
Moreover, users will now be able to perform much more elaborate | ||
queries directly on the data source (through the SPARQL endpoint). This | ||
will reduce their need for data warehousing in order to perform complex | ||
queries. | ||
|
||
These developments, by lowering the barriers, will give rise to a vast | ||
number of new use-cases that will enable stakeholders and end-users to | ||
benefit from increased availability of analytics. The ability to perform | ||
complex queries on public procurement data will be equally open to large | ||
information systems as well as to simple desktop users with a copy of | ||
Excel and an internet connection. | ||
|
||
To summarize, the TED Semantic Web Service (TED SWS) is a pipeline | ||
system that continuously converts the public procurement notices (in XML | ||
format) available on the TED Website into RDF format, publishes them | ||
into CELLAR and makes them available to the public through CELLAR’s | ||
SPARQL endpoint. |
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,59 @@ | ||
= Sample app documentation | ||
|
||
A sample application, often referred to as a demo or prototype, is a functional representation of a software program or system that demonstrates its basic features, functionalities, and capabilities. In the context of TED-SWS (TED Semantic Web Services), a sample application would refer to a functional representation of how to access data processed by the system. | ||
|
||
== Glossary | ||
|
||
* *RDF* stands for Resource Description Framework. RDF is a standardized data model used to represent information on the web. RDF plays a crucial role in xref:ROOT:index.adoc[TED-SWS] because it provides a standardized and structured format for representing the procurement data made available through the service. This allows for efficient querying, processing, and integration of the data into various applications and systems. | ||
|
||
* *SPARQL Query* represents query language used to retrieve and manipulate data stored in RDF format. | ||
|
||
* *Jupyter Notebook* is an interactive computing environment that allows users to create and share documents containing live code, equations, visualizations, and explanatory text. It's particularly useful for working with data and performing data analysis, making it a valuable tool for xref:ROOT:mapping_suite/index.adoc[accessing and processing] data from TED-SWS. | ||
|
||
* *Python* is a widely used programming language that can be employed to retrieve data and xref:ROOT:sample_app/jupyter_notebook_python.adoc[perform operations] on the RDF data provided by TED-SWS. | ||
|
||
* *R language* refers to a popular programming language and environment specifically relevant for statistical computing, xref:ROOT:sample_app/jupyter_notebook_r.adoc[data analysis], and graphical representation that is used to retrieve and perform operations on the RDF data provided by TED-SWS. | ||
|
||
* *MS Excel* refers to Microsoft Excel, which is a widely used spreadsheet program developed by Microsoft used as a versatile tool for xref:ROOT:sample_app/ms_excel.adoc[handling and analysing] data obtained from TED-SWS. | ||
|
||
* *Code Editor* refers to a software tool or environment where users can write, edit, and execute code. It allows to easily create scripts or programs to retrieve data from TED-SWS and perform operations on the RDF data. | ||
|
||
* *Jupyter Notebook Kernel* refers to the computational engine that executes the code within a Jupyter Notebook. It determines which programming language is used to run the code in the notebook. For example, if you're working with TED-SWS in a Jupyter Notebook, you might choose to use a Python kernel, which means that you'll be writing and executing Python code. | ||
|
||
* *Business Questions* (BQ) refer to specific inquiries or information needs that pertain to business operations, procurement activities, or related aspects. These questions are typically posed by organizations, researchers, or individuals seeking to gain insights, make informed decisions, or conduct analyses based on the data provided by TED-SWS. | ||
|
||
== Prerequisites | ||
|
||
To use TED-SWS sample apps, you will need the following: | ||
|
||
Understanding of RDF and SPARQL:: Familiarity with RDF (Resource Description Framework) and SPARQL (SPARQL Protocol and RDF Query Language) is crucial. TED-SWS provides data in RDF format and utilizes SPARQL for querying. | ||
|
||
Access to a Programming Language:: You should have proficiency in a programming language capable of making HTTP requests and processing data. Common choices include Python or R. | ||
|
||
Knowledge of Semantic Web Technologies:: A basic understanding of Semantic Web concepts and technologies is beneficial. This includes knowledge of RDF triples, ontologies, and linked data principles. | ||
|
||
Development Environment:: Set up a development environment for your chosen programming language or at least ensure that you have installed MS Excel. | ||
|
||
Understanding of EU Procurement Data:: If your goal is to work with specific types of EU procurement data, such as contract notices or award notices, it's important to have a basic understanding of these concepts and the associated https://docs.ted.europa.eu/EPO/latest/index.html[ontology]. | ||
|
||
== Using Jupyter Notebook | ||
|
||
* <<ted-rdf-docs:ROOT:sample_app/jupyter_notebook_python.adoc#, Jupyter Notebook - Python>> | ||
|
||
Example of using Python language and to access data. | ||
|
||
* <<ted-rdf-docs:ROOT:sample_app/jupyter_notebook_r.adoc#, Jupyter Notebook - R>> | ||
|
||
Example of using R language and to access data. | ||
|
||
== Using MS Excel | ||
|
||
* <<ted-rdf-docs:ROOT:sample_app/ms_excel.adoc#, MS Excel Workbook>> | ||
|
||
Example of accessing data in a MS Excel workbook. | ||
|
||
== SPARQL Query examples | ||
|
||
* <<ted-rdf-docs:ROOT:sample_app/sparql_queries.adoc#, SPARQL Query examples>> | ||
|
||
Example of accessing data using SPARQL Query examples |
Empty file.
92 changes: 92 additions & 0 deletions
92
docs/antora/modules/ROOT/pages/sample_app/jupyter_notebook_python.adoc
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,92 @@ | ||
== Jupyter Notebook - Python | ||
|
||
This document 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. | ||
|
||
Example query: | ||
|
||
**Who are the contract winners for a given date?** | ||
|
||
[source,sparql] | ||
PREFIX epo: <http://data.europa.eu/a4g/ontology#> | ||
PREFIX org: <http://www.w3.org/ns/org#> | ||
PREFIX cccev: <http://data.europa.eu/m8g/> | ||
select distinct | ||
?Lot | ||
?Winner | ||
?WinnerCountryCode | ||
?LotAwardetAmountValue | ||
?LotAwardetValueCurrency | ||
where { | ||
values ?NoticePublicationDate { | ||
"20230921" | ||
} | ||
?NoticeId a epo:ResultNotice; | ||
epo:hasPublicationDate ?NoticePublicationDate; | ||
epo:refersToLot ?Lot. | ||
?Lot a epo:Lot. | ||
?LotAwardOutcome epo:describesLot ?Lot; | ||
a epo:LotAwardOutcome; | ||
epo:comprisesTenderAwardOutcome ?TenderAwardOutcome. | ||
?TenderAwardOutcome a epo:TenderAwardOutcome; | ||
epo:indicatesAwardOfLotToWinner / epo:playedBy ?Winner. | ||
?Winner a org:Organization. | ||
optional { | ||
?Winner cccev:registeredAddress / epo:hasCountryCode ?WinnerCountryCode. | ||
} | ||
?LotAwardOutcome epo:hasAwardedValue ?LotAwardetValue. | ||
?LotAwardetValue a epo:MonetaryValue; | ||
epo:hasAmountValue ?LotAwardetAmountValue; | ||
epo:hasCurrency ?LotAwardetValueCurrency. | ||
} | ||
|
||
To run the sample application using Python language follow the steps below: | ||
|
||
[arabic] | ||
. https://github.com/OP-TED/ted-rdf-docs/blob/main/notebooks/query_cellar_python.ipynb[Download Jupyter Notebook ] | ||
|
||
|
||
[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 the Jupyter Notebook file with the code editor | ||
|
||
. In the code editor, select the Python interpreter that was installed in the previous step | ||
|
||
.Interpreter selection | ||
image::user_manual/jupyter_notebook/image1.png[image,width=817,height=204] | ||
|
||
|
||
[arabic, start=5] | ||
. Install dependencies | ||
|
||
* Use OS command line and run the following command | ||
[source, python] | ||
pip3 install sparqlwrapper pandas Jinja2 matplotlib | ||
|
||
NOTE: After installation, restart kernel from Jupyter Notebook to update it with new dependencies. This can be done by clicking on the "Restart" button in your code editor. | ||
|
||
[arabic, start=6] | ||
. Run all Jupyter Notebook Cells | ||
|
||
.Button that runs all cells | ||
image::user_manual/jupyter_notebook/image2.png[image,width=501,height=84] | ||
|
||
[arabic, start=7] | ||
. After running successfully all the cells in the Jupyter Notebook, we can see the result table | ||
|
||
.Result table | ||
image::user_manual/jupyter_notebook/image3.png[image,width=987,height=420] | ||
|
Oops, something went wrong.