{"id":22302590,"url":"https://github.com/dataoneorg/dataone_examples","last_synced_at":"2025-07-29T03:33:15.545Z","repository":{"id":71253793,"uuid":"82856342","full_name":"DataONEorg/dataone_examples","owner":"DataONEorg","description":"A collection of examples demonstrating interaction with DataONE","archived":false,"fork":false,"pushed_at":"2024-11-19T15:57:18.000Z","size":164,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":25,"default_branch":"master","last_synced_at":"2024-11-19T16:52:34.782Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DataONEorg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-02-22T21:53:20.000Z","updated_at":"2024-11-19T15:57:36.000Z","dependencies_parsed_at":"2024-01-24T20:27:30.565Z","dependency_job_id":"de790f84-5bda-45e1-bcd5-0cf9021672a2","html_url":"https://github.com/DataONEorg/dataone_examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataONEorg%2Fdataone_examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataONEorg%2Fdataone_examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataONEorg%2Fdataone_examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DataONEorg%2Fdataone_examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DataONEorg","download_url":"https://codeload.github.com/DataONEorg/dataone_examples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227977907,"owners_count":17850475,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-03T18:39:57.922Z","updated_at":"2024-12-03T18:39:58.616Z","avatar_url":"https://github.com/DataONEorg.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Example Notebooks\n\nA collection of Jupyter notebooks providing examples of interaction with the DataONE service interfaces.\n\nOpen in [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/DataONEorg/dataone_examples/master)\n\n## Examples\n\nThe example notebooks are broadly grouped by programming language. `R` examples are under `R_examples`, examples in `python` are under `python_examples`.\n\n## Local Installation and Operation\n\nIt is recommended to install using a Python virtual environment. These instructions assume installation using [Anaconda on OS X](https://docs.anaconda.com/anaconda/install/mac-os/). Note that the `redland` library is needed for the R kernel, and this is [installed using Homebrew](https://cran.r-project.org/web/packages/redland/readme/README.html).\n\n```\nbrew install redland\ngit clone https://github.com/DataONEorg/dataone_examples.git\ncd dataone_examples\nconda create -f environment.yml\nconda activate dataone_examples\npip install -r requirements.txt\nconda install -c conda-forge R r-essentials\nR\n\u003e install.packages(\"redland\")\n\u003e install.packages(\"XML\", repos = \"http://www.omegahat.net/R\")\n\u003e install.packages(\"dataone\")\n```\n\nTo start Jupyter Lab:\n```\ncd path/to/dataone_examples\nconda activate dataone\njupyter lab\n```\n\nWhen done:\n```\nconda deactivate\n```\n\n## Running on Google Colab\n\nThe python notebooks can be run on Google Colab, which also enables saving the notebooks to your google drive. To do so it is necessary to install the dependencies. Add the following block to the start of a notebook to install all the dependencies:\n\n```\n! pip install -e git+git://github.com/datadavev/rdflib.git@develop#egg=rdflib\n! pip install -e git+git://github.com/RDFLib/rdflib-jsonld.git#egg=rdflib_jsonld\n! pip install -e git+git://github.com/datadavev/pyld.git@issue_128#egg=pyld\n! pip install dateparser\n! pip install dataone-common dataone-libclient dataone-scimeta dataone-util\n\nfrom google.colab import drive\ndrive.mount('/content/gdrive')\n%cd /content/gdrive/My\\ Drive\n! git clone \"https://github.com/DataONEorg/dataone_examples.git\"\nimport sys, os\ncdir=!pwd\ncdir = os.path.join(cdir[0], \"dataone_examples/python_examples\")\nif cdir not in sys.path:\n  sys.path.append(cdir)\n```\n\nThe `pip installs` can of course be tweaked to include only those items necessary for the notebook.\n\nAfter the first successful run, the `! git clone` operation will fail since the directory already exist. Replace it with `! cd dataone_examples \u0026\u0026 git pull \u0026\u0026 cd ..`, or comment it out with `#` at the start of the line.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdataoneorg%2Fdataone_examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdataoneorg%2Fdataone_examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdataoneorg%2Fdataone_examples/lists"}