Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MBcode/3ad15ff883cd851cd0954e54689843f0 to your computer and use it in GitHub Desktop.
Save MBcode/3ad15ff883cd851cd0954e54689843f0 to your computer and use it in GitHub Desktop.
http-lipdverse-orgtemp12k1_0_2svartvatnet-norway-seppa-2009-lpd.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "24081ffd",
"metadata": {
"papermill": {},
"tags": [
"parameters"
]
},
"outputs": [],
"source": [
"#github.com/nteract/papermill'parameters'tag used to inject them into template then post a gist runable by colab\n",
"url,ext,urn=None,None,None\n",
"%load_ext rpy2.ipython\n",
"%load_ext google.colab.data_table\n",
"import httpimport\n",
"with httpimport.github_repo('earthcube', 'earthcube_utilities'):\n",
" import earthcube_utilities as ec\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "af4db72f",
"metadata": {
"tags": [
"injected-parameters"
]
},
"outputs": [],
"source": [
"# Parameters\n",
"url = \"http://lipdverse.org/Temp12k/1_0_2/Svartvatnet-Norway.Seppa.2009.lpd\"\n",
"ext = \"application/zip ; http://linked.earth/ontology/core/1.2.0/index-en.html<hash>Dataset\"\n",
"urn = \"urn:gleaner:summoned:lipdverse:509e465d0793506b237cea8069c3cb2d276fe9c2\"\n",
"q = None\n"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "decae910",
"metadata": {
"papermill": {},
"tags": []
},
"outputs": [],
"source": [
"ec.wget_rdf(urn)\n",
"#!ls -l or FilePaneBrowser on left, to see it\n",
"df=ec.read_file(url,ext)\n",
"df"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "b9fecb0b",
"metadata": {
"papermill": {},
"tags": []
},
"outputs": [],
"source": [
"!ls -l "
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "dc876261",
"metadata": {
"papermill": {},
"tags": []
},
"outputs": [],
"source": [
"ec.viz() #shows .nt metadata from urn, can use for (rdf)xml as well "
]
}
],
"metadata": {
"celltoolbar": "Tags",
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
},
"papermill": {
"default_parameters": {},
"environment_variables": {},
"input_path": "/app/templates/template.ipynb",
"output_path": "/tmp/http:lipdverse.orgTemp12k1_0_2Svartvatnet-Norway.Seppa.2009.lpd.ipynb",
"parameters": {
"ext": "application/zip ; http://linked.earth/ontology/core/1.2.0/index-en.html<hash>Dataset",
"q": null,
"url": "http://lipdverse.org/Temp12k/1_0_2/Svartvatnet-Norway.Seppa.2009.lpd",
"urn": "urn:gleaner:summoned:lipdverse:509e465d0793506b237cea8069c3cb2d276fe9c2"
},
"version": "2.4.0"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment