Skip to content

Commit

Permalink
Update the notebooks and benchamrk results.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheeba Samuel committed Sep 27, 2024
1 parent c184c96 commit d43fb08
Show file tree
Hide file tree
Showing 27 changed files with 5,402 additions and 196 deletions.
203 changes: 196 additions & 7 deletions notebooks/FAIRJupyter_SPARQL.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"id": "0fbe88f1-2838-4ebb-8152-6b433c3b0650",
"metadata": {},
"source": [
"# FAIR Jupyter\n",
"FAIR Jupyter is a knowledge graph for semantic sharing and granular exploration of a computational notebook reproducibility dataset. This notebook provides some SPARQL queries to query the FAIR Jupyter SPARQL Endpoint.\n",
"# FAIR Jupyter: SPARQL Queries\n",
"FAIR Jupyter is a knowledge graph for semantic sharing and granular exploration of a computational notebook reproducibility dataset. This notebook provides some SPARQL queries to query the FAIR Jupyter SPARQL Endpoint. These SPARQL queries include queries that reproduce the original results, as well as additional queries that were not included in the [publication](https://doi.org/10.1093/gigascience/giad113). It also supports federated queries to external resources such as [Wikidata](https://query.wikidata.org/) and [MaRDI](https://www.mardi4nfdi.de).\n",
"\n",
"More Information on FAIR Jupyter Ontology and Knowledge Graph: https://w3id.org/fairjupyter\n",
"More Information on FAIR Jupyter Ontology and Knowledge Graph: [https://w3id.org/fairjupyter](https://w3id.org/fairjupyter).\n",
"\n",
"## Prerequisites\n",
"The notebook is written in Python and besides Jupyter and Wikidata, it has the following direct dependencies:\n",
Expand Down Expand Up @@ -3965,13 +3965,202 @@
"results"
]
},
{
"cell_type": "markdown",
"id": "394e55cb-bc73-4982-a80c-ec140c9b6e6a",
"metadata": {},
"source": [
"# Match articles between FAIR Jupyter and MaRDI via DOI and get co-used software"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "3e52189b-5fa8-4708-8e65-c72f39e4edb6",
"execution_count": 27,
"id": "567161d1-c9f6-41d5-81c4-6d97d94ce9ca",
"metadata": {},
"outputs": [],
"source": []
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Results written to results/fairjupyter_mardi_match_articles_doi_software.csv\n"
]
},
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>title</th>\n",
" <th>doi</th>\n",
" <th>method</th>\n",
" <th>methodLabel</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>Phase Portraits of Bi-dimensional Zeta Values</td>\n",
" <td>10.1007/978-3-030-52200-1_39</td>\n",
" <td>https://portal.mardi4nfdi.de/entity/Q17941</td>\n",
" <td>mpmath</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>Phase Portraits of Bi-dimensional Zeta Values</td>\n",
" <td>10.1007/978-3-030-52200-1_39</td>\n",
" <td>https://portal.mardi4nfdi.de/entity/Q33077</td>\n",
" <td>Jupyter</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>Phase Portraits of Bi-dimensional Zeta Values</td>\n",
" <td>10.1007/978-3-030-52200-1_39</td>\n",
" <td>https://portal.mardi4nfdi.de/entity/Q34954</td>\n",
" <td>GitHub</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>Phase Portraits of Bi-dimensional Zeta Values</td>\n",
" <td>10.1007/978-3-030-52200-1_39</td>\n",
" <td>https://portal.mardi4nfdi.de/entity/Q54519</td>\n",
" <td>ipywidgets</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>Seminator 2 can complement generalized Büchi a...</td>\n",
" <td>10.1007/978-3-030-53291-8_2</td>\n",
" <td>https://portal.mardi4nfdi.de/entity/Q21456</td>\n",
" <td>SPOT</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>Polymake.jl: A New Interface to polymake</td>\n",
" <td>10.1007/978-3-030-52200-1_37</td>\n",
" <td>https://portal.mardi4nfdi.de/entity/Q13478</td>\n",
" <td>polymake</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>Polymake.jl: A New Interface to polymake</td>\n",
" <td>10.1007/978-3-030-52200-1_37</td>\n",
" <td>https://portal.mardi4nfdi.de/entity/Q19386</td>\n",
" <td>alphaCertified</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>Polymake.jl: A New Interface to polymake</td>\n",
" <td>10.1007/978-3-030-52200-1_37</td>\n",
" <td>https://portal.mardi4nfdi.de/entity/Q25895</td>\n",
" <td>Julia</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>Polymake.jl: A New Interface to polymake</td>\n",
" <td>10.1007/978-3-030-52200-1_37</td>\n",
" <td>https://portal.mardi4nfdi.de/entity/Q33896</td>\n",
" <td>HomotopyContinuation</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>FunGrim: A Symbolic Library for Special Functions</td>\n",
" <td>10.1007/978-3-030-52200-1_31</td>\n",
" <td>https://portal.mardi4nfdi.de/entity/Q13684</td>\n",
" <td>SymPy</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" title \\\n",
"0 Phase Portraits of Bi-dimensional Zeta Values \n",
"1 Phase Portraits of Bi-dimensional Zeta Values \n",
"2 Phase Portraits of Bi-dimensional Zeta Values \n",
"3 Phase Portraits of Bi-dimensional Zeta Values \n",
"4 Seminator 2 can complement generalized Büchi a... \n",
"5 Polymake.jl: A New Interface to polymake \n",
"6 Polymake.jl: A New Interface to polymake \n",
"7 Polymake.jl: A New Interface to polymake \n",
"8 Polymake.jl: A New Interface to polymake \n",
"9 FunGrim: A Symbolic Library for Special Functions \n",
"\n",
" doi method \\\n",
"0 10.1007/978-3-030-52200-1_39 https://portal.mardi4nfdi.de/entity/Q17941 \n",
"1 10.1007/978-3-030-52200-1_39 https://portal.mardi4nfdi.de/entity/Q33077 \n",
"2 10.1007/978-3-030-52200-1_39 https://portal.mardi4nfdi.de/entity/Q34954 \n",
"3 10.1007/978-3-030-52200-1_39 https://portal.mardi4nfdi.de/entity/Q54519 \n",
"4 10.1007/978-3-030-53291-8_2 https://portal.mardi4nfdi.de/entity/Q21456 \n",
"5 10.1007/978-3-030-52200-1_37 https://portal.mardi4nfdi.de/entity/Q13478 \n",
"6 10.1007/978-3-030-52200-1_37 https://portal.mardi4nfdi.de/entity/Q19386 \n",
"7 10.1007/978-3-030-52200-1_37 https://portal.mardi4nfdi.de/entity/Q25895 \n",
"8 10.1007/978-3-030-52200-1_37 https://portal.mardi4nfdi.de/entity/Q33896 \n",
"9 10.1007/978-3-030-52200-1_31 https://portal.mardi4nfdi.de/entity/Q13684 \n",
"\n",
" methodLabel \n",
"0 mpmath \n",
"1 Jupyter \n",
"2 GitHub \n",
"3 ipywidgets \n",
"4 SPOT \n",
"5 polymake \n",
"6 alphaCertified \n",
"7 Julia \n",
"8 HomotopyContinuation \n",
"9 SymPy "
]
},
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"query_string = \"\"\"\n",
"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n",
"PREFIX wikibase: <http://wikiba.se/ontology#>\n",
"PREFIX mardi_wd: <https://portal.mardi4nfdi.de/entity/>\n",
"PREFIX mardi_wdt: <https://portal.mardi4nfdi.de/prop/direct/>\n",
"\n",
"PREFIX bd: <http://www.bigdata.com/rdf#>\n",
"PREFIX wikibase: <http://wikiba.se/ontology#>\n",
"\n",
"SELECT DISTINCT ?title ?doi ?method ?methodLabel\n",
"\n",
"WHERE {\n",
" ?fj_article <https://w3id.org/reproduceme/doi> ?doi .\n",
"\n",
" service <http://query.portal.mardi4nfdi.de/proxy/wdqs/bigdata/namespace/wdq/sparql> {\n",
" ?mardi_paper mardi_wdt:P27 ?doi .\n",
" ?mardi_paper mardi_wdt:P159 ?title .\n",
" \n",
" ?mardi_paper mardi_wdt:P1463 ?method .\n",
" ?method rdfs:label ?methodLabel .\n",
" }\n",
"\n",
"}\n",
"LIMIT 10\n",
"\"\"\"\n",
"csv_filename = 'fairjupyter_mardi_match_articles_doi_software'\n",
"results = query_and_display_results(query_string, csv_filename)\n",
"results"
]
}
],
"metadata": {
Expand Down
Loading

0 comments on commit d43fb08

Please sign in to comment.