ORKG content, of individual contributions or contribution comparisons, can be used in downstream data science. Since ORKG data is highly structured, with the ORKG API and the ORKG Python library you can easily access and reuse ORKG content in data science and for your own purposes. Here we give you a quick intro and some examples to get you started.
$ pip install orkg.With the following code you can access ORKG contribution comparison data and automatically load data into a pandas DataFrame after which you can manipulate the data as you normally do with data frames.
from orkg import ORKG
orkg = ORKG(host='https://orkg.org', simcomp_host='https://orkg.org/simcomp')
df = orkg.contributions.compare_dataframe(comparison_id='[ORKG_COMPARISON_ID]')
For this to work, you need to substitute the [ORKG_COMPARISON_ID] accordingly.
We have created examples for numerous domains, which we briefly overview here. In general, we link the relevant Jupyter notebooks as related resources and computation outputs such as visualizations as related images in ORKG contribution comparisons. These resources are shown below the comparison table. We organize the Jupyter notebooks in a GitLab repository. Jupyter notebooks directly execute with mybinder so that you do not need to install anything on your local machine if you just want to take a quick look at these examples. Please understand that mybinder sets up dedicated VMs upon request of execution of these examples, which requires some time. While you wait, you can see the progress by looking at the mybinder log. You can of course clone the GitLab repository and, assuming you satify the requirements listed above, execute the examples on your local machine.