Last active
December 22, 2022 21:54
-
-
Save MBcode/3ad15ff883cd851cd0954e54689843f0 to your computer and use it in GitHub Desktop.
http-lipdverse-orgtemp12k1_0_2svartvatnet-norway-seppa-2009-lpd.ipynb
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
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "view-in-github", | |
"colab_type": "text" | |
}, | |
"source": [ | |
"<a href=\"https://colab.research.google.com/gist/MBcode/3ad15ff883cd851cd0954e54689843f0/http-lipdverse-orgtemp12k1_0_2svartvatnet-norway-seppa-2009-lpd.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"id": "24081ffd", | |
"metadata": { | |
"papermill": {}, | |
"tags": [ | |
"parameters" | |
], | |
"id": "24081ffd" | |
}, | |
"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" | |
], | |
"id": "af4db72f" | |
}, | |
"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": null, | |
"id": "decae910", | |
"metadata": { | |
"papermill": {}, | |
"tags": [], | |
"id": "decae910" | |
}, | |
"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": null, | |
"id": "b9fecb0b", | |
"metadata": { | |
"papermill": {}, | |
"tags": [], | |
"id": "b9fecb0b" | |
}, | |
"outputs": [], | |
"source": [ | |
"!ls -l " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"id": "dc876261", | |
"metadata": { | |
"papermill": {}, | |
"tags": [], | |
"id": "dc876261" | |
}, | |
"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" | |
}, | |
"colab": { | |
"provenance": [], | |
"include_colab_link": true | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 5 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment