Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

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.

Files for arborist, version 0.3
Filename, size File type Python version Upload date Hashes
Filename, size arborist-0.3-py3-none-any.whl (547.9 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size arborist-0.3.tar.gz (546.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page