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 smrgeoinfo/65ea45adee65e662ccfc42d2549871e3 to your computer and use it in GitHub Desktop.
Save smrgeoinfo/65ea45adee65e662ccfc42d2549871e3 to your computer and use it in GitHub Desktop.
Earthcube Gist
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "1d341efb",
"metadata": {
"papermill": {
"duration": null,
"end_time": null,
"exception": null,
"start_time": null,
"status": "completed"
},
"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:milled:lipdverse:509e465d0793506b237cea8069c3cb2d276fe9c2\"\n",
"prepare_only = True\n",
"log_output = True\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"
},
"papermill": {
"default_parameters": {},
"duration": 0.021462,
"end_time": "2021-11-18T19:13:43.519331",
"environment_variables": {},
"exception": null,
"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",
"log_output": true,
"prepare_only": true,
"url": "http://lipdverse.org/Temp12k/1_0_2/Svartvatnet-Norway.Seppa.2009.lpd",
"urn": "urn:gleaner:milled:lipdverse:509e465d0793506b237cea8069c3cb2d276fe9c2"
},
"start_time": "2021-11-18T19:13:43.497869",
"version": "2.3.3"
},
"pycharm": {
"stem_cell": {
"cell_type": "raw",
"metadata": {
"collapsed": false
},
"source": [
"{\n",
" \"cells\": [\n",
" {\n",
" \"cell_type\": \"code\",\n",
" \"execution_count\": 1,\n",
" \"metadata\": {\n",
" \"tags\": [\n",
" \"parameters\"\n",
" ]\n",
" },\n",
" \"outputs\": [],\n",
" \"source\": [\n",
" \"#github.com/nteract/papermill'parameters'tag used to inject them into template then post a gist runable by colab\\n\",\n",
" \"url,ext,urn=None,None,None\"\n",
" ]\n",
" },\n",
" {\n",
" \"cell_type\": \"code\",\n",
" \"execution_count\": 2,\n",
" \"metadata\": {},\n",
" \"outputs\": [],\n",
" \"source\": [\n",
" \"%load_ext rpy2.ipython\\n\",\n",
" \"%load_ext google.colab.data_table\\n\",\n",
" \"import httpimport\\n\",\n",
" \"with httpimport.github_repo('earthcube', 'earthcube_utilities'):\\n\",\n",
" \" import earthcube_utilities as ec\\n\",\n",
" \"ec.wget_rdf(urn)\\n\",\n",
" \"#!ls -l or FilePaneBrowser on left, to see it\\n\",\n",
" \"df=ec.read_file(url,ext)\\n\",\n",
" \"df\"\n",
" ]\n",
" },\n",
" {\n",
" \"cell_type\": \"code\",\n",
" \"execution_count\": 3,\n",
" \"metadata\": {},\n",
" \"outputs\": [],\n",
" \"source\": [\n",
" \"!ls -l \"\n",
" ]\n",
" },\n",
" {\n",
" \"cell_type\": \"code\",\n",
" \"execution_count\": 4,\n",
" \"metadata\": {},\n",
" \"outputs\": [],\n",
" \"source\": [\n",
" \"ec.viz() #shows .nt metadata from urn, can use for (rdf)xml as well \"\n",
" ]\n",
" }\n",
" ],\n",
" \"metadata\": {\n",
" \"celltoolbar\": \"Tags\",\n",
" \"kernelspec\": {\n",
" \"display_name\": \"Python 3\",\n",
" \"language\": \"python\",\n",
" \"name\": \"python3\"\n",
" },\n",
" \"language_info\": {\n",
" \"codemirror_mode\": {\n",
" \"name\": \"ipython\",\n",
" \"version\": 3\n",
" },\n",
" \"file_extension\": \".py\",\n",
" \"mimetype\": \"text/x-python\",\n",
" \"name\": \"python\",\n",
" \"nbconvert_exporter\": \"python\",\n",
" \"pygments_lexer\": \"ipython3\",\n",
" \"version\": \"3.8.10\"\n",
" }\n",
" },\n",
" \"nbformat\": 4,\n",
" \"nbformat_minor\": 4\n",
"}\n"
]
}
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment