From f1e1910cff38c182406c0105b53658ff06775591 Mon Sep 17 00:00:00 2001 From: Dumitru Date: Mon, 5 Dec 2022 23:35:38 +0300 Subject: [PATCH 1/5] Create query_cellar_python.ipynb --- notebooks/query_cellar_python.ipynb | 143 ++++++++++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 notebooks/query_cellar_python.ipynb diff --git a/notebooks/query_cellar_python.ipynb b/notebooks/query_cellar_python.ipynb new file mode 100644 index 000000000..46644b338 --- /dev/null +++ b/notebooks/query_cellar_python.ipynb @@ -0,0 +1,143 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "source": [ + "## This example show how to query sparql endpoint using Python.\n", + "### To run this, press \"Run all\" button, or Ctrl+Shift+Alt+Enter" + ], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%% md\n" + } + } + }, + { + "cell_type": "code", + "execution_count": 35, + "outputs": [], + "source": [ + "# Uncomment last line of this cell (by deleting #) to install necessary dependencies.\n", + "\n", + "#!pip install sparqlwrapper pandas" + ], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + }, + { + "cell_type": "code", + "execution_count": 36, + "outputs": [], + "source": [ + "# Import dependencies\n", + "from io import StringIO\n", + "from SPARQLWrapper import SPARQLWrapper, CSV\n", + "from pandas import read_csv\n", + "\n", + "# Prepare variable with sparql endpoint\n", + "QUERY_ENDPOINT: str = 'https://publications.europa.eu/webapi/rdf/sparql'\n", + "\n", + "# Example of sparql query\n", + "SPARQL_QUERY: str = \"\"\"\n", + "prefix cdm: \n", + "select distinct ?Countries\n", + "where {\n", + "?Countries a cdm:country\n", + "}\n", + "\"\"\"" + ], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + }, + { + "cell_type": "code", + "execution_count": 37, + "outputs": [], + "source": [ + "# Prepare connection to sparql endpoint\n", + "sparql_endpoint = SPARQLWrapper(QUERY_ENDPOINT)\n", + "sparql_endpoint.setQuery(SPARQL_QUERY)\n", + "sparql_endpoint.setReturnFormat(CSV)" + ], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + }, + { + "cell_type": "code", + "execution_count": 38, + "outputs": [], + "source": [ + "# Request for query\n", + "endpoint_result = sparql_endpoint.query().convert()\n", + "# Convert endpoint result to table (dataframe)\n", + "result_data = StringIO(str(endpoint_result, 'utf-8'))\n", + "result_dataframe = read_csv(result_data)" + ], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + }, + { + "cell_type": "code", + "execution_count": 42, + "outputs": [ + { + "data": { + "text/plain": " Countries\n0 http://publications.europa.eu/resource/authori...\n1 http://publications.europa.eu/resource/authori...\n2 http://publications.europa.eu/resource/authori...\n3 http://publications.europa.eu/resource/authori...\n4 http://publications.europa.eu/resource/authori...\n.. ...\n215 http://publications.europa.eu/resource/authori...\n216 http://publications.europa.eu/resource/authori...\n217 http://publications.europa.eu/resource/authori...\n218 http://publications.europa.eu/resource/authori...\n219 http://publications.europa.eu/resource/authori...\n\n[220 rows x 1 columns]", + "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Countries
0http://publications.europa.eu/resource/authori...
1http://publications.europa.eu/resource/authori...
2http://publications.europa.eu/resource/authori...
3http://publications.europa.eu/resource/authori...
4http://publications.europa.eu/resource/authori...
......
215http://publications.europa.eu/resource/authori...
216http://publications.europa.eu/resource/authori...
217http://publications.europa.eu/resource/authori...
218http://publications.europa.eu/resource/authori...
219http://publications.europa.eu/resource/authori...
\n

220 rows × 1 columns

\n
" + }, + "execution_count": 42, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Print result\n", + "result_dataframe" + ], + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + } + } + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.6" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file From baddd9fa4b52445288a034002f1c45e8ab1c5e9b Mon Sep 17 00:00:00 2001 From: Dumitru Date: Mon, 5 Dec 2022 23:40:21 +0300 Subject: [PATCH 2/5] Update query_cellar_python.ipynb --- notebooks/query_cellar_python.ipynb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/notebooks/query_cellar_python.ipynb b/notebooks/query_cellar_python.ipynb index 46644b338..2bbdd440c 100644 --- a/notebooks/query_cellar_python.ipynb +++ b/notebooks/query_cellar_python.ipynb @@ -4,6 +4,8 @@ "cell_type": "markdown", "source": [ "## This example show how to query sparql endpoint using Python.\n", + "\n", + "### This example assumes that a python interpreter and jupyter notebook is already installed\n", "### To run this, press \"Run all\" button, or Ctrl+Shift+Alt+Enter" ], "metadata": { From 81c0dbd44a76455eb010676ba66abba8a0fcb167 Mon Sep 17 00:00:00 2001 From: Dumitru Date: Tue, 13 Dec 2022 10:54:09 +0300 Subject: [PATCH 3/5] add query in R --- notebooks/query_cellar_R.ipynb | 558 ++++++++++++++++ notebooks/query_cellar_python.ipynb | 978 ++++++++++++++++++++++++++-- 2 files changed, 1487 insertions(+), 49 deletions(-) create mode 100644 notebooks/query_cellar_R.ipynb diff --git a/notebooks/query_cellar_R.ipynb b/notebooks/query_cellar_R.ipynb new file mode 100644 index 000000000..766a7231e --- /dev/null +++ b/notebooks/query_cellar_R.ipynb @@ -0,0 +1,558 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + }, + "vscode": { + "languageId": "r" + } + }, + "outputs": [], + "source": [ + "# Preparing folderpath with necessary package\n", + "pkg_file_path <- 'SPARQL_1.16.tar.gz'\n", + "\n", + "# Installing necessary packages\n", + "install.packages('RCurl')\n", + "install.packages('XML')\n", + "install.packages('SPARQL_1.16.tar.gz', repos = NULL, type =\"source\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + }, + "vscode": { + "languageId": "r" + } + }, + "outputs": [], + "source": [ + "# Importing necessary libraries\n", + "library(SPARQL)\n", + "\n", + "# Preparing link to endpoint\n", + "query_endpoint <- \"https://publications.europa.eu/webapi/rdf/sparql\"\n", + "\n", + "# Preparing query\n", + "query <- '\n", + "prefix cdm: \n", + "select distinct ?Countries\n", + "where {\n", + "?Countries a cdm:country\n", + "}'" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false, + "pycharm": { + "name": "#%%\n" + }, + "vscode": { + "languageId": "r" + } + }, + "outputs": [], + "source": [ + "# Quering endpoint\n", + "query_data <- SPARQL(query_endpoint, query)\n", + "\n", + "# Access results as table (dataframe)\n", + "data_frame <- query_data$results" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "pycharm": { + "name": "#%%\n" + }, + "vscode": { + "languageId": "r" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Countries\n", + "1 \n", + " Countries.1\n", + "1 \n", + " Countries.2\n", + "1 \n", + " Countries.3\n", + "1 \n", + " Countries.4\n", + "1 \n", + " Countries.5\n", + "1 \n", + " Countries.6\n", + "1 \n", + " Countries.7\n", + "1 \n", + " Countries.8\n", + "1 \n", + " Countries.9\n", + "1 \n", + " Countries.10\n", + "1 \n", + " Countries.11\n", + "1 \n", + " Countries.12\n", + "1 \n", + " Countries.13\n", + "1 \n", + " Countries.14\n", + "1 \n", + " Countries.15\n", + "1 \n", + " Countries.16\n", + "1 \n", + " Countries.17\n", + "1 \n", + " Countries.18\n", + "1 \n", + " Countries.19\n", + "1 \n", + " Countries.20\n", + "1 \n", + " Countries.21\n", + "1 \n", + " Countries.22\n", + "1 \n", + " Countries.23\n", + "1 \n", + " Countries.24\n", + "1 \n", + " Countries.25\n", + "1 \n", + " Countries.26\n", + "1 \n", + " Countries.27\n", + "1 \n", + " Countries.28\n", + "1 \n", + " Countries.29\n", + "1 \n", + " Countries.30\n", + "1 \n", + " Countries.31\n", + "1 \n", + " Countries.32\n", + "1 \n", + " Countries.33\n", + "1 \n", + " Countries.34\n", + "1 \n", + " Countries.35\n", + "1 \n", + " Countries.36\n", + "1 \n", + " Countries.37\n", + "1 \n", + " Countries.38\n", + "1 \n", + " Countries.39\n", + "1 \n", + " Countries.40\n", + "1 \n", + " Countries.41\n", + "1 \n", + " Countries.42\n", + "1 \n", + " Countries.43\n", + "1 \n", + " Countries.44\n", + "1 \n", + " Countries.45\n", + "1 \n", + " Countries.46\n", + "1 \n", + " Countries.47\n", + "1 \n", + " Countries.48\n", + "1 \n", + " Countries.49\n", + "1 \n", + " Countries.50\n", + "1 \n", + " Countries.51\n", + "1 \n", + " Countries.52\n", + "1 \n", + " Countries.53\n", + "1 \n", + " Countries.54\n", + "1 \n", + " Countries.55\n", + "1 \n", + " Countries.56\n", + "1 \n", + " Countries.57\n", + "1 \n", + " Countries.58\n", + "1 \n", + " Countries.59\n", + "1 \n", + " Countries.60\n", + "1 \n", + " Countries.61\n", + "1 \n", + " Countries.62\n", + "1 \n", + " Countries.63\n", + "1 \n", + " Countries.64\n", + "1 \n", + " Countries.65\n", + "1 \n", + " Countries.66\n", + "1 \n", + " Countries.67\n", + "1 \n", + " Countries.68\n", + "1 \n", + " Countries.69\n", + "1 \n", + " Countries.70\n", + "1 \n", + " Countries.71\n", + "1 \n", + " Countries.72\n", + "1 \n", + " Countries.73\n", + "1 \n", + " Countries.74\n", + "1 \n", + " Countries.75\n", + "1 \n", + " Countries.76\n", + "1 \n", + " Countries.77\n", + "1 \n", + " Countries.78\n", + "1 \n", + " Countries.79\n", + "1 \n", + " Countries.80\n", + "1 \n", + " Countries.81\n", + "1 \n", + " Countries.82\n", + "1 \n", + " Countries.83\n", + "1 \n", + " Countries.84\n", + "1 \n", + " Countries.85\n", + "1 \n", + " Countries.86\n", + "1 \n", + " Countries.87\n", + "1 \n", + " Countries.88\n", + "1 \n", + " Countries.89\n", + "1 \n", + " Countries.90\n", + "1 \n", + " Countries.91\n", + "1 \n", + " Countries.92\n", + "1 \n", + " Countries.93\n", + "1 \n", + " Countries.94\n", + "1 \n", + " Countries.95\n", + "1 \n", + " Countries.96\n", + "1 \n", + " Countries.97\n", + "1 \n", + " Countries.98\n", + "1 \n", + " Countries.99\n", + "1 \n", + " Countries.100\n", + "1 \n", + " Countries.101\n", + "1 \n", + " Countries.102\n", + "1 \n", + " Countries.103\n", + "1 \n", + " Countries.104\n", + "1 \n", + " Countries.105\n", + "1 \n", + " Countries.106\n", + "1 \n", + " Countries.107\n", + "1 \n", + " Countries.108\n", + "1 \n", + " Countries.109\n", + "1 \n", + " Countries.110\n", + "1 \n", + " Countries.111\n", + "1 \n", + " Countries.112\n", + "1 \n", + " Countries.113\n", + "1 \n", + " Countries.114\n", + "1 \n", + " Countries.115\n", + "1 \n", + " Countries.116\n", + "1 \n", + " Countries.117\n", + "1 \n", + " Countries.118\n", + "1 \n", + " Countries.119\n", + "1 \n", + " Countries.120\n", + "1 \n", + " Countries.121\n", + "1 \n", + " Countries.122\n", + "1 \n", + " Countries.123\n", + "1 \n", + " Countries.124\n", + "1 \n", + " Countries.125\n", + "1 \n", + " Countries.126\n", + "1 \n", + " Countries.127\n", + "1 \n", + " Countries.128\n", + "1 \n", + " Countries.129\n", + "1 \n", + " Countries.130\n", + "1 \n", + " Countries.131\n", + "1 \n", + " Countries.132\n", + "1 \n", + " Countries.133\n", + "1 \n", + " Countries.134\n", + "1 \n", + " Countries.135\n", + "1 \n", + " Countries.136\n", + "1 \n", + " Countries.137\n", + "1 \n", + " Countries.138\n", + "1 \n", + " Countries.139\n", + "1 \n", + " Countries.140\n", + "1 \n", + " Countries.141\n", + "1 \n", + " Countries.142\n", + "1 \n", + " Countries.143\n", + "1 \n", + " Countries.144\n", + "1 \n", + " Countries.145\n", + "1 \n", + " Countries.146\n", + "1 \n", + " Countries.147\n", + "1 \n", + " Countries.148\n", + "1 \n", + " Countries.149\n", + "1 \n", + " Countries.150\n", + "1 \n", + " Countries.151\n", + "1 \n", + " Countries.152\n", + "1 \n", + " Countries.153\n", + "1 \n", + " Countries.154\n", + "1 \n", + " Countries.155\n", + "1 \n", + " Countries.156\n", + "1 \n", + " Countries.157\n", + "1 \n", + " Countries.158\n", + "1 \n", + " Countries.159\n", + "1 \n", + " Countries.160\n", + "1 \n", + " Countries.161\n", + "1 \n", + " Countries.162\n", + "1 \n", + " Countries.163\n", + "1 \n", + " Countries.164\n", + "1 \n", + " Countries.165\n", + "1 \n", + " Countries.166\n", + "1 \n", + " Countries.167\n", + "1 \n", + " Countries.168\n", + "1 \n", + " Countries.169\n", + "1 \n", + " Countries.170\n", + "1 \n", + " Countries.171\n", + "1 \n", + " Countries.172\n", + "1 \n", + " Countries.173\n", + "1 \n", + " Countries.174\n", + "1 \n", + " Countries.175\n", + "1 \n", + " Countries.176\n", + "1 \n", + " Countries.177\n", + "1 \n", + " Countries.178\n", + "1 \n", + " Countries.179\n", + "1 \n", + " Countries.180\n", + "1 \n", + " Countries.181\n", + "1 \n", + " Countries.182\n", + "1 \n", + " Countries.183\n", + "1 \n", + " Countries.184\n", + "1 \n", + " Countries.185\n", + "1 \n", + " Countries.186\n", + "1 \n", + " Countries.187\n", + "1 \n", + " Countries.188\n", + "1 \n", + " Countries.189\n", + "1 \n", + " Countries.190\n", + "1 \n", + " Countries.191\n", + "1 \n", + " Countries.192\n", + "1 \n", + " Countries.193\n", + "1 \n", + " Countries.194\n", + "1 \n", + " Countries.195\n", + "1 \n", + " Countries.196\n", + "1 \n", + " Countries.197\n", + "1 \n", + " Countries.198\n", + "1 \n", + " Countries.199\n", + "1 \n", + " Countries.200\n", + "1 \n", + " Countries.201\n", + "1 \n", + " Countries.202\n", + "1 \n", + " Countries.203\n", + "1 \n", + " Countries.204\n", + "1 \n", + " Countries.205\n", + "1 \n", + " Countries.206\n", + "1 \n", + " Countries.207\n", + "1 \n", + " Countries.208\n", + "1 \n", + " Countries.209\n", + "1 \n", + " Countries.210\n", + "1 \n", + " Countries.211\n", + "1 \n", + " Countries.212\n", + "1 \n", + " Countries.213\n", + "1 \n", + " Countries.214\n", + "1 \n", + " Countries.215\n", + "1 \n", + " Countries.216\n", + "1 \n", + " Countries.217\n", + "1 \n", + " Countries.218\n", + "1 \n", + " Countries.219\n", + "1 \n" + ] + } + ], + "source": [ + "# Print result\n", + "print(df)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "R", + "language": "R", + "name": "ir" + }, + "language_info": { + "codemirror_mode": "r", + "file_extension": ".r", + "mimetype": "text/x-r-source", + "name": "R", + "pygments_lexer": "r", + "version": "4.2.2" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/notebooks/query_cellar_python.ipynb b/notebooks/query_cellar_python.ipynb index 2bbdd440c..8bd082f4e 100644 --- a/notebooks/query_cellar_python.ipynb +++ b/notebooks/query_cellar_python.ipynb @@ -1,39 +1,30 @@ { "cells": [ { - "cell_type": "markdown", - "source": [ - "## This example show how to query sparql endpoint using Python.\n", - "\n", - "### This example assumes that a python interpreter and jupyter notebook is already installed\n", - "### To run this, press \"Run all\" button, or Ctrl+Shift+Alt+Enter" - ], + "cell_type": "code", + "execution_count": 1, "metadata": { "collapsed": false, "pycharm": { - "name": "#%% md\n" + "name": "#%%\n" } - } - }, - { - "cell_type": "code", - "execution_count": 35, + }, "outputs": [], "source": [ "# Uncomment last line of this cell (by deleting #) to install necessary dependencies.\n", "\n", "#!pip install sparqlwrapper pandas" - ], + ] + }, + { + "cell_type": "code", + "execution_count": 2, "metadata": { "collapsed": false, "pycharm": { "name": "#%%\n" } - } - }, - { - "cell_type": "code", - "execution_count": 36, + }, "outputs": [], "source": [ "# Import dependencies\n", @@ -52,34 +43,34 @@ "?Countries a cdm:country\n", "}\n", "\"\"\"" - ], + ] + }, + { + "cell_type": "code", + "execution_count": 3, "metadata": { "collapsed": false, "pycharm": { "name": "#%%\n" } - } - }, - { - "cell_type": "code", - "execution_count": 37, + }, "outputs": [], "source": [ "# Prepare connection to sparql endpoint\n", "sparql_endpoint = SPARQLWrapper(QUERY_ENDPOINT)\n", "sparql_endpoint.setQuery(SPARQL_QUERY)\n", "sparql_endpoint.setReturnFormat(CSV)" - ], + ] + }, + { + "cell_type": "code", + "execution_count": 4, "metadata": { "collapsed": false, "pycharm": { "name": "#%%\n" } - } - }, - { - "cell_type": "code", - "execution_count": 38, + }, "outputs": [], "source": [ "# Request for query\n", @@ -87,38 +78,927 @@ "# Convert endpoint result to table (dataframe)\n", "result_data = StringIO(str(endpoint_result, 'utf-8'))\n", "result_dataframe = read_csv(result_data)" - ], + ] + }, + { + "cell_type": "code", + "execution_count": 5, "metadata": { "collapsed": false, "pycharm": { "name": "#%%\n" } - } - }, - { - "cell_type": "code", - "execution_count": 42, + }, "outputs": [ { "data": { - "text/plain": " Countries\n0 http://publications.europa.eu/resource/authori...\n1 http://publications.europa.eu/resource/authori...\n2 http://publications.europa.eu/resource/authori...\n3 http://publications.europa.eu/resource/authori...\n4 http://publications.europa.eu/resource/authori...\n.. ...\n215 http://publications.europa.eu/resource/authori...\n216 http://publications.europa.eu/resource/authori...\n217 http://publications.europa.eu/resource/authori...\n218 http://publications.europa.eu/resource/authori...\n219 http://publications.europa.eu/resource/authori...\n\n[220 rows x 1 columns]", - "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Countries
0http://publications.europa.eu/resource/authori...
1http://publications.europa.eu/resource/authori...
2http://publications.europa.eu/resource/authori...
3http://publications.europa.eu/resource/authori...
4http://publications.europa.eu/resource/authori...
......
215http://publications.europa.eu/resource/authori...
216http://publications.europa.eu/resource/authori...
217http://publications.europa.eu/resource/authori...
218http://publications.europa.eu/resource/authori...
219http://publications.europa.eu/resource/authori...
\n

220 rows × 1 columns

\n
" + "text/html": [ + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
 Countries
0http://publications.europa.eu/resource/authority/country/GRL
1http://publications.europa.eu/resource/authority/country/BDI
2http://publications.europa.eu/resource/authority/country/BEN
3http://publications.europa.eu/resource/authority/country/CAF
4http://publications.europa.eu/resource/authority/country/ZR0
5http://publications.europa.eu/resource/authority/country/BHR
6http://publications.europa.eu/resource/authority/country/KWT
7http://publications.europa.eu/resource/authority/country/OMN
8http://publications.europa.eu/resource/authority/country/QAT
9http://publications.europa.eu/resource/authority/country/AFG
10http://publications.europa.eu/resource/authority/country/TUV
11http://publications.europa.eu/resource/authority/country/1A0
12http://publications.europa.eu/resource/authority/country/WSM
13http://publications.europa.eu/resource/authority/country/COD
14http://publications.europa.eu/resource/authority/country/SLB
15http://publications.europa.eu/resource/authority/country/BEL
16http://publications.europa.eu/resource/authority/country/DEU
17http://publications.europa.eu/resource/authority/country/DNK
18http://publications.europa.eu/resource/authority/country/FRA
19http://publications.europa.eu/resource/authority/country/GBR
20http://publications.europa.eu/resource/authority/country/GRC
21http://publications.europa.eu/resource/authority/country/HRV
22http://publications.europa.eu/resource/authority/country/HUN
23http://publications.europa.eu/resource/authority/country/ITA
24http://publications.europa.eu/resource/authority/country/LTU
25http://publications.europa.eu/resource/authority/country/MEX
26http://publications.europa.eu/resource/authority/country/NLD
27http://publications.europa.eu/resource/authority/country/OP_DATPRO
28http://publications.europa.eu/resource/authority/country/POL
29http://publications.europa.eu/resource/authority/country/PRT
30http://publications.europa.eu/resource/authority/country/SWE
31http://publications.europa.eu/resource/authority/country/AUT
32http://publications.europa.eu/resource/authority/country/BGR
33http://publications.europa.eu/resource/authority/country/CYP
34http://publications.europa.eu/resource/authority/country/ESP
35http://publications.europa.eu/resource/authority/country/IRL
36http://publications.europa.eu/resource/authority/country/MAR
37http://publications.europa.eu/resource/authority/country/MLT
38http://publications.europa.eu/resource/authority/country/MYS
39http://publications.europa.eu/resource/authority/country/CZE
40http://publications.europa.eu/resource/authority/country/EST
41http://publications.europa.eu/resource/authority/country/FIN
42http://publications.europa.eu/resource/authority/country/LVA
43http://publications.europa.eu/resource/authority/country/SVK
44http://publications.europa.eu/resource/authority/country/SVN
45http://publications.europa.eu/resource/authority/country/CHE
46http://publications.europa.eu/resource/authority/country/LUX
47http://publications.europa.eu/resource/authority/country/ROU
48http://publications.europa.eu/resource/authority/country/VNM
49http://publications.europa.eu/resource/authority/country/SEN
50http://publications.europa.eu/resource/authority/country/SYC
51http://publications.europa.eu/resource/authority/country/ZAF
52http://publications.europa.eu/resource/authority/country/KOR
53http://publications.europa.eu/resource/authority/country/LBN
54http://publications.europa.eu/resource/authority/country/SAU
55http://publications.europa.eu/resource/authority/country/JOR
56http://publications.europa.eu/resource/authority/country/COM
57http://publications.europa.eu/resource/authority/country/PAK
58http://publications.europa.eu/resource/authority/country/TUN
59http://publications.europa.eu/resource/authority/country/MKD
60http://publications.europa.eu/resource/authority/country/GNQ
61http://publications.europa.eu/resource/authority/country/AUS
62http://publications.europa.eu/resource/authority/country/GIN
63http://publications.europa.eu/resource/authority/country/DZA
64http://publications.europa.eu/resource/authority/country/CYM
65http://publications.europa.eu/resource/authority/country/TKM
66http://publications.europa.eu/resource/authority/country/IRN
67http://publications.europa.eu/resource/authority/country/ARG
68http://publications.europa.eu/resource/authority/country/EGY
69http://publications.europa.eu/resource/authority/country/IDN
70http://publications.europa.eu/resource/authority/country/CHL
71http://publications.europa.eu/resource/authority/country/BGD
72http://publications.europa.eu/resource/authority/country/URY
73http://publications.europa.eu/resource/authority/country/BMU
74http://publications.europa.eu/resource/authority/country/MUS
75http://publications.europa.eu/resource/authority/country/BLZ
76http://publications.europa.eu/resource/authority/country/BRB
77http://publications.europa.eu/resource/authority/country/CIV
78http://publications.europa.eu/resource/authority/country/COG
79http://publications.europa.eu/resource/authority/country/GUY
80http://publications.europa.eu/resource/authority/country/JAM
81http://publications.europa.eu/resource/authority/country/KEN
82http://publications.europa.eu/resource/authority/country/MDG
83http://publications.europa.eu/resource/authority/country/MWI
84http://publications.europa.eu/resource/authority/country/SUR
85http://publications.europa.eu/resource/authority/country/SWZ
86http://publications.europa.eu/resource/authority/country/TTO
87http://publications.europa.eu/resource/authority/country/TZA
88http://publications.europa.eu/resource/authority/country/UGA
89http://publications.europa.eu/resource/authority/country/ZMB
90http://publications.europa.eu/resource/authority/country/ZWE
91http://publications.europa.eu/resource/authority/country/KGZ
92http://publications.europa.eu/resource/authority/country/MRT
93http://publications.europa.eu/resource/authority/country/SLE
94http://publications.europa.eu/resource/authority/country/GMB
95http://publications.europa.eu/resource/authority/country/LBY
96http://publications.europa.eu/resource/authority/country/PAN
97http://publications.europa.eu/resource/authority/country/AND
98http://publications.europa.eu/resource/authority/country/LIE
99http://publications.europa.eu/resource/authority/country/NOR
100http://publications.europa.eu/resource/authority/country/RUS
101http://publications.europa.eu/resource/authority/country/SMR
102http://publications.europa.eu/resource/authority/country/STP
103http://publications.europa.eu/resource/authority/country/TUR
104http://publications.europa.eu/resource/authority/country/ISL
105http://publications.europa.eu/resource/authority/country/GNB
106http://publications.europa.eu/resource/authority/country/CHN
107http://publications.europa.eu/resource/authority/country/NPL
108http://publications.europa.eu/resource/authority/country/USA
109http://publications.europa.eu/resource/authority/country/ISR
110http://publications.europa.eu/resource/authority/country/JPN
111http://publications.europa.eu/resource/authority/country/CAN
112http://publications.europa.eu/resource/authority/country/YUG
113http://publications.europa.eu/resource/authority/country/IND
114http://publications.europa.eu/resource/authority/country/MDA
115http://publications.europa.eu/resource/authority/country/KNA
116http://publications.europa.eu/resource/authority/country/MCO
117http://publications.europa.eu/resource/authority/country/TCD
118http://publications.europa.eu/resource/authority/country/VUT
119http://publications.europa.eu/resource/authority/country/LAO
120http://publications.europa.eu/resource/authority/country/MLI
121http://publications.europa.eu/resource/authority/country/TGO
122http://publications.europa.eu/resource/authority/country/BRN
123http://publications.europa.eu/resource/authority/country/COL
124http://publications.europa.eu/resource/authority/country/PNG
125http://publications.europa.eu/resource/authority/country/SUN
126http://publications.europa.eu/resource/authority/country/THA
127http://publications.europa.eu/resource/authority/country/BRA
128http://publications.europa.eu/resource/authority/country/NZL
129http://publications.europa.eu/resource/authority/country/CPV
130http://publications.europa.eu/resource/authority/country/NER
131http://publications.europa.eu/resource/authority/country/ABW
132http://publications.europa.eu/resource/authority/country/UZB
133http://publications.europa.eu/resource/authority/country/MOZ
134http://publications.europa.eu/resource/authority/country/TWN
135http://publications.europa.eu/resource/authority/country/GTM
136http://publications.europa.eu/resource/authority/country/BLR
137http://publications.europa.eu/resource/authority/country/BIH
138http://publications.europa.eu/resource/authority/country/LKA
139http://publications.europa.eu/resource/authority/country/FSM
140http://publications.europa.eu/resource/authority/country/CSK
141http://publications.europa.eu/resource/authority/country/BHS
142http://publications.europa.eu/resource/authority/country/ARM
143http://publications.europa.eu/resource/authority/country/DMA
144http://publications.europa.eu/resource/authority/country/EUR
145http://publications.europa.eu/resource/authority/country/ALB
146http://publications.europa.eu/resource/authority/country/BFA
147http://publications.europa.eu/resource/authority/country/KAZ
148http://publications.europa.eu/resource/authority/country/UKR
149http://publications.europa.eu/resource/authority/country/SGP
150http://publications.europa.eu/resource/authority/country/CMR
151http://publications.europa.eu/resource/authority/country/AGO
152http://publications.europa.eu/resource/authority/country/ARE
153http://publications.europa.eu/resource/authority/country/GEO
154http://publications.europa.eu/resource/authority/country/DOM
155http://publications.europa.eu/resource/authority/country/ATG
156http://publications.europa.eu/resource/authority/country/BOL
157http://publications.europa.eu/resource/authority/country/CRI
158http://publications.europa.eu/resource/authority/country/CUB
159http://publications.europa.eu/resource/authority/country/ECU
160http://publications.europa.eu/resource/authority/country/GRD
161http://publications.europa.eu/resource/authority/country/HTI
162http://publications.europa.eu/resource/authority/country/LCA
163http://publications.europa.eu/resource/authority/country/NIC
164http://publications.europa.eu/resource/authority/country/PER
165http://publications.europa.eu/resource/authority/country/PRY
166http://publications.europa.eu/resource/authority/country/SLV
167http://publications.europa.eu/resource/authority/country/VCT
168http://publications.europa.eu/resource/authority/country/VEN
169http://publications.europa.eu/resource/authority/country/DDR
170http://publications.europa.eu/resource/authority/country/SOM
171http://publications.europa.eu/resource/authority/country/FJI
172http://publications.europa.eu/resource/authority/country/HKG
173http://publications.europa.eu/resource/authority/country/PLW
174http://publications.europa.eu/resource/authority/country/MNG
175http://publications.europa.eu/resource/authority/country/SRB
176http://publications.europa.eu/resource/authority/country/MNE
177http://publications.europa.eu/resource/authority/country/SYR
178http://publications.europa.eu/resource/authority/country/GAB
179http://publications.europa.eu/resource/authority/country/HND
180http://publications.europa.eu/resource/authority/country/LBR
181http://publications.europa.eu/resource/authority/country/PHL
182http://publications.europa.eu/resource/authority/country/TJK
183http://publications.europa.eu/resource/authority/country/MDV
184http://publications.europa.eu/resource/authority/country/MAC
185http://publications.europa.eu/resource/authority/country/RWA
186http://publications.europa.eu/resource/authority/country/AZE
187http://publications.europa.eu/resource/authority/country/KIR
188http://publications.europa.eu/resource/authority/country/SDN
189http://publications.europa.eu/resource/authority/country/GHA
190http://publications.europa.eu/resource/authority/country/YMD
191http://publications.europa.eu/resource/authority/country/BWA
192http://publications.europa.eu/resource/authority/country/LSO
193http://publications.europa.eu/resource/authority/country/NAM
194http://publications.europa.eu/resource/authority/country/VAT
195http://publications.europa.eu/resource/authority/country/IRQ
196http://publications.europa.eu/resource/authority/country/NGA
197http://publications.europa.eu/resource/authority/country/FRO
198http://publications.europa.eu/resource/authority/country/DJI
199http://publications.europa.eu/resource/authority/country/COK
200http://publications.europa.eu/resource/authority/country/YEM
201http://publications.europa.eu/resource/authority/country/KHM
202http://publications.europa.eu/resource/authority/country/TLS
203http://publications.europa.eu/resource/authority/country/TON
204http://publications.europa.eu/resource/authority/country/PSE
205http://publications.europa.eu/resource/authority/country/SCG
206http://publications.europa.eu/resource/authority/country/MHL
207http://publications.europa.eu/resource/authority/country/BES
208http://publications.europa.eu/resource/authority/country/BTN
209http://publications.europa.eu/resource/authority/country/ERI
210http://publications.europa.eu/resource/authority/country/ETH
211http://publications.europa.eu/resource/authority/country/GGY
212http://publications.europa.eu/resource/authority/country/HVO
213http://publications.europa.eu/resource/authority/country/IMN
214http://publications.europa.eu/resource/authority/country/JEY
215http://publications.europa.eu/resource/authority/country/MMR
216http://publications.europa.eu/resource/authority/country/NIU
217http://publications.europa.eu/resource/authority/country/NRU
218http://publications.europa.eu/resource/authority/country/PRK
219http://publications.europa.eu/resource/authority/country/VGB
\n" + ], + "text/plain": [ + "" + ] }, - "execution_count": 42, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Print result\n", - "result_dataframe" - ], - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - } + "result_dataframe.style" + ] } ], "metadata": { @@ -142,4 +1022,4 @@ }, "nbformat": 4, "nbformat_minor": 0 -} \ No newline at end of file +} From 65ec1695e12653385109a1c2835955eae4ebf553 Mon Sep 17 00:00:00 2001 From: Dumitru Date: Tue, 13 Dec 2022 12:02:57 +0300 Subject: [PATCH 4/5] Update query_cellar_R.ipynb --- notebooks/query_cellar_R.ipynb | 462 +-------------------------------- 1 file changed, 6 insertions(+), 456 deletions(-) diff --git a/notebooks/query_cellar_R.ipynb b/notebooks/query_cellar_R.ipynb index 766a7231e..4c1c29518 100644 --- a/notebooks/query_cellar_R.ipynb +++ b/notebooks/query_cellar_R.ipynb @@ -14,13 +14,10 @@ }, "outputs": [], "source": [ - "# Preparing folderpath with necessary package\n", - "pkg_file_path <- 'SPARQL_1.16.tar.gz'\n", - "\n", "# Installing necessary packages\n", - "install.packages('RCurl')\n", - "install.packages('XML')\n", - "install.packages('SPARQL_1.16.tar.gz', repos = NULL, type =\"source\")" + "# install.packages('RCurl')\n", + "# install.packages('XML')\n", + "# install.packages('SPARQL_1.16.tar.gz', repos = NULL, type =\"source\")" ] }, { @@ -75,7 +72,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": null, "metadata": { "pycharm": { "name": "#%%\n" @@ -84,457 +81,10 @@ "languageId": "r" } }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " Countries\n", - "1 \n", - " Countries.1\n", - "1 \n", - " Countries.2\n", - "1 \n", - " Countries.3\n", - "1 \n", - " Countries.4\n", - "1 \n", - " Countries.5\n", - "1 \n", - " Countries.6\n", - "1 \n", - " Countries.7\n", - "1 \n", - " Countries.8\n", - "1 \n", - " Countries.9\n", - "1 \n", - " Countries.10\n", - "1 \n", - " Countries.11\n", - "1 \n", - " Countries.12\n", - "1 \n", - " Countries.13\n", - "1 \n", - " Countries.14\n", - "1 \n", - " Countries.15\n", - "1 \n", - " Countries.16\n", - "1 \n", - " Countries.17\n", - "1 \n", - " Countries.18\n", - "1 \n", - " Countries.19\n", - "1 \n", - " Countries.20\n", - "1 \n", - " Countries.21\n", - "1 \n", - " Countries.22\n", - "1 \n", - " Countries.23\n", - "1 \n", - " Countries.24\n", - "1 \n", - " Countries.25\n", - "1 \n", - " Countries.26\n", - "1 \n", - " Countries.27\n", - "1 \n", - " Countries.28\n", - "1 \n", - " Countries.29\n", - "1 \n", - " Countries.30\n", - "1 \n", - " Countries.31\n", - "1 \n", - " Countries.32\n", - "1 \n", - " Countries.33\n", - "1 \n", - " Countries.34\n", - "1 \n", - " Countries.35\n", - "1 \n", - " Countries.36\n", - "1 \n", - " Countries.37\n", - "1 \n", - " Countries.38\n", - "1 \n", - " Countries.39\n", - "1 \n", - " Countries.40\n", - "1 \n", - " Countries.41\n", - "1 \n", - " Countries.42\n", - "1 \n", - " Countries.43\n", - "1 \n", - " Countries.44\n", - "1 \n", - " Countries.45\n", - "1 \n", - " Countries.46\n", - "1 \n", - " Countries.47\n", - "1 \n", - " Countries.48\n", - "1 \n", - " Countries.49\n", - "1 \n", - " Countries.50\n", - "1 \n", - " Countries.51\n", - "1 \n", - " Countries.52\n", - "1 \n", - " Countries.53\n", - "1 \n", - " Countries.54\n", - "1 \n", - " Countries.55\n", - "1 \n", - " Countries.56\n", - "1 \n", - " Countries.57\n", - "1 \n", - " Countries.58\n", - "1 \n", - " Countries.59\n", - "1 \n", - " Countries.60\n", - "1 \n", - " Countries.61\n", - "1 \n", - " Countries.62\n", - "1 \n", - " Countries.63\n", - "1 \n", - " Countries.64\n", - "1 \n", - " Countries.65\n", - "1 \n", - " Countries.66\n", - "1 \n", - " Countries.67\n", - "1 \n", - " Countries.68\n", - "1 \n", - " Countries.69\n", - "1 \n", - " Countries.70\n", - "1 \n", - " Countries.71\n", - "1 \n", - " Countries.72\n", - "1 \n", - " Countries.73\n", - "1 \n", - " Countries.74\n", - "1 \n", - " Countries.75\n", - "1 \n", - " Countries.76\n", - "1 \n", - " Countries.77\n", - "1 \n", - " Countries.78\n", - "1 \n", - " Countries.79\n", - "1 \n", - " Countries.80\n", - "1 \n", - " Countries.81\n", - "1 \n", - " Countries.82\n", - "1 \n", - " Countries.83\n", - "1 \n", - " Countries.84\n", - "1 \n", - " Countries.85\n", - "1 \n", - " Countries.86\n", - "1 \n", - " Countries.87\n", - "1 \n", - " Countries.88\n", - "1 \n", - " Countries.89\n", - "1 \n", - " Countries.90\n", - "1 \n", - " Countries.91\n", - "1 \n", - " Countries.92\n", - "1 \n", - " Countries.93\n", - "1 \n", - " Countries.94\n", - "1 \n", - " Countries.95\n", - "1 \n", - " Countries.96\n", - "1 \n", - " Countries.97\n", - "1 \n", - " Countries.98\n", - "1 \n", - " Countries.99\n", - "1 \n", - " Countries.100\n", - "1 \n", - " Countries.101\n", - "1 \n", - " Countries.102\n", - "1 \n", - " Countries.103\n", - "1 \n", - " Countries.104\n", - "1 \n", - " Countries.105\n", - "1 \n", - " Countries.106\n", - "1 \n", - " Countries.107\n", - "1 \n", - " Countries.108\n", - "1 \n", - " Countries.109\n", - "1 \n", - " Countries.110\n", - "1 \n", - " Countries.111\n", - "1 \n", - " Countries.112\n", - "1 \n", - " Countries.113\n", - "1 \n", - " Countries.114\n", - "1 \n", - " Countries.115\n", - "1 \n", - " Countries.116\n", - "1 \n", - " Countries.117\n", - "1 \n", - " Countries.118\n", - "1 \n", - " Countries.119\n", - "1 \n", - " Countries.120\n", - "1 \n", - " Countries.121\n", - "1 \n", - " Countries.122\n", - "1 \n", - " Countries.123\n", - "1 \n", - " Countries.124\n", - "1 \n", - " Countries.125\n", - "1 \n", - " Countries.126\n", - "1 \n", - " Countries.127\n", - "1 \n", - " Countries.128\n", - "1 \n", - " Countries.129\n", - "1 \n", - " Countries.130\n", - "1 \n", - " Countries.131\n", - "1 \n", - " Countries.132\n", - "1 \n", - " Countries.133\n", - "1 \n", - " Countries.134\n", - "1 \n", - " Countries.135\n", - "1 \n", - " Countries.136\n", - "1 \n", - " Countries.137\n", - "1 \n", - " Countries.138\n", - "1 \n", - " Countries.139\n", - "1 \n", - " Countries.140\n", - "1 \n", - " Countries.141\n", - "1 \n", - " Countries.142\n", - "1 \n", - " Countries.143\n", - "1 \n", - " Countries.144\n", - "1 \n", - " Countries.145\n", - "1 \n", - " Countries.146\n", - "1 \n", - " Countries.147\n", - "1 \n", - " Countries.148\n", - "1 \n", - " Countries.149\n", - "1 \n", - " Countries.150\n", - "1 \n", - " Countries.151\n", - "1 \n", - " Countries.152\n", - "1 \n", - " Countries.153\n", - "1 \n", - " Countries.154\n", - "1 \n", - " Countries.155\n", - "1 \n", - " Countries.156\n", - "1 \n", - " Countries.157\n", - "1 \n", - " Countries.158\n", - "1 \n", - " Countries.159\n", - "1 \n", - " Countries.160\n", - "1 \n", - " Countries.161\n", - "1 \n", - " Countries.162\n", - "1 \n", - " Countries.163\n", - "1 \n", - " Countries.164\n", - "1 \n", - " Countries.165\n", - "1 \n", - " Countries.166\n", - "1 \n", - " Countries.167\n", - "1 \n", - " Countries.168\n", - "1 \n", - " Countries.169\n", - "1 \n", - " Countries.170\n", - "1 \n", - " Countries.171\n", - "1 \n", - " Countries.172\n", - "1 \n", - " Countries.173\n", - "1 \n", - " Countries.174\n", - "1 \n", - " Countries.175\n", - "1 \n", - " Countries.176\n", - "1 \n", - " Countries.177\n", - "1 \n", - " Countries.178\n", - "1 \n", - " Countries.179\n", - "1 \n", - " Countries.180\n", - "1 \n", - " Countries.181\n", - "1 \n", - " Countries.182\n", - "1 \n", - " Countries.183\n", - "1 \n", - " Countries.184\n", - "1 \n", - " Countries.185\n", - "1 \n", - " Countries.186\n", - "1 \n", - " Countries.187\n", - "1 \n", - " Countries.188\n", - "1 \n", - " Countries.189\n", - "1 \n", - " Countries.190\n", - "1 \n", - " Countries.191\n", - "1 \n", - " Countries.192\n", - "1 \n", - " Countries.193\n", - "1 \n", - " Countries.194\n", - "1 \n", - " Countries.195\n", - "1 \n", - " Countries.196\n", - "1 \n", - " Countries.197\n", - "1 \n", - " Countries.198\n", - "1 \n", - " Countries.199\n", - "1 \n", - " Countries.200\n", - "1 \n", - " Countries.201\n", - "1 \n", - " Countries.202\n", - "1 \n", - " Countries.203\n", - "1 \n", - " Countries.204\n", - "1 \n", - " Countries.205\n", - "1 \n", - " Countries.206\n", - "1 \n", - " Countries.207\n", - "1 \n", - " Countries.208\n", - "1 \n", - " Countries.209\n", - "1 \n", - " Countries.210\n", - "1 \n", - " Countries.211\n", - "1 \n", - " Countries.212\n", - "1 \n", - " Countries.213\n", - "1 \n", - " Countries.214\n", - "1 \n", - " Countries.215\n", - "1 \n", - " Countries.216\n", - "1 \n", - " Countries.217\n", - "1 \n", - " Countries.218\n", - "1 \n", - " Countries.219\n", - "1 \n" - ] - } - ], + "outputs": [], "source": [ "# Print result\n", - "print(df)" + "print(data_frame)" ] } ], From 88fb716df48e5ef3a2c677748e12bd2e01665bf3 Mon Sep 17 00:00:00 2001 From: Dumitru Date: Tue, 13 Dec 2022 12:04:45 +0300 Subject: [PATCH 5/5] Update query_cellar_R.ipynb --- notebooks/query_cellar_R.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/query_cellar_R.ipynb b/notebooks/query_cellar_R.ipynb index 4c1c29518..665f0aefb 100644 --- a/notebooks/query_cellar_R.ipynb +++ b/notebooks/query_cellar_R.ipynb @@ -17,7 +17,7 @@ "# Installing necessary packages\n", "# install.packages('RCurl')\n", "# install.packages('XML')\n", - "# install.packages('SPARQL_1.16.tar.gz', repos = NULL, type =\"source\")" + "install.packages('SPARQL_1.16.tar.gz', repos = NULL, type =\"source\")" ] }, {