Skip to main content

Generate the URIs needed for the BONSAI knowledge graph

Project description

Copyright (c) 2019, BONSAI team
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Description: # Arborist

Generate the URIs needed for the BONSAI knowledge graph. Designed to work with the BONSAI [rdf repository](https://rdf.bonsai.uno/) and [rdf website](https://rdf.bonsai.uno/).

Currently generates the following:

* Activity types, flow objects, and custom locations for EXIOBASE 3.3.17.
* Custom activity types and flow objects for electricity modelling
* URIs for the complete years 2010-2019.

## Installation

Installable via `pip` or `conda` (channel `cmutel`). See [requirements](https://github.com/BONSAMURAIS/arborist/blob/master/requirements.txt), though these should be installed automatically.

## Usage

### Generation of URIs

This library has a number of generation functions; you can call them all with:

from arborist import generate_all
generate_all("filepath/to/rdf/repository/base/")

`arborist` will write out the [turtle](https://en.wikipedia.org/wiki/Turtle_(syntax)) files in the correct directory structure to commit changes to the [rdf repository](https://rdf.bonsai.uno/).

The RDF output directory has the following structure:

activitytype
lcia
flowobject
lcia
us_epa
exiobase3_3_17
unit
location
foaf

The convention now is that each subdirectory has a `.ttl` file *and* and `.jsonld` file with the **same name** as the directory.

### Retrieval of URIs

## Contributing

All contributions should be via pull request, do not edit this package directly! We actually use it for stuff.

Platform: UNKNOWN
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Scientific/Engineering :: Visualization

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arborist-0.3.tar.gz (546.2 kB view details)

Uploaded Source

Built Distribution

arborist-0.3-py3-none-any.whl (547.9 kB view details)

Uploaded Python 3

File details

Details for the file arborist-0.3.tar.gz.

File metadata

  • Download URL: arborist-0.3.tar.gz
  • Upload date:
  • Size: 546.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for arborist-0.3.tar.gz
Algorithm Hash digest
SHA256 dcc48833183cb6688c0d6c46e8170e3e92ec7e5f07119cf7895184386463c052
MD5 b63d4d65345b459a6d4fada873104d77
BLAKE2b-256 43aa8260b3d856511f25e79c6112c9b0e110dd9d0d6c251dc0ead0fafd382452

See more details on using hashes here.

File details

Details for the file arborist-0.3-py3-none-any.whl.

File metadata

  • Download URL: arborist-0.3-py3-none-any.whl
  • Upload date:
  • Size: 547.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for arborist-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 dc26f47c640e690436dabaef565494db4f3b8220f58fd021afb23a431ccef94b
MD5 69b1bebba6796a747c1b539b7a439e2b
BLAKE2b-256 9a2e703f1cef660acc24eb791903b5da46d1d19744e5a5298513fb7254a8e654

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page