Skip to main content

gastrodon


Toolkit to display, analyze, and visualize data and documents based on

RDF graphs and the SPARQL query language using Pandas, Jupyter, and

other Python ecosystem tools.

Gastrodon links databases that support the SPARQL protocol (more than ten!) to

http://pandas.pydata.org/, a popular Python library for

analysis of tabular data. Pandas, in turn, is connected to a vast number

of visualization, statistics, and machine learning tools, all of which

work with Jupyter notebooks. The result is an

ideal environment for telling stories that reveal the value of data,

ontologies, taxonomies, and models.

In addition to remote databases, Gastrodon can do SPARQL queries over

in-memory RDF graphs (from

rdflib). It has facilities to

copy subgraphs from one graph to another, making it possible to assemble

local graphs that contain facts relevant to a particular decision, work

on them intimately, and then store results in a permanent triple store.

Seamless Data Translation


Gastrodon mediates between three data models: (1) RDF, (2) Pandas/NumPy,

and (3) Native Python. Gastrodon lets you use Python variables in your

SPARQL queries simply by adding ?_ to the name of your variables.

Unlike many RDF libraries, substitution works with both local and remote

SPARQL endpoints. Gastrodon works with the Python type system to keep

track of details such as “is this variable a URI or a String?” so that

you don’t have to.

Query Intelligence


Query Intelligence

Gastrodon always has your back because it understands SPARQL. Gastrodon

automatically keeps track of namespaces and appends prefix

declarations to your queries to keep them short and sweet. Unlike many

RDF libraries, Gastrodon supports variable substitution for queries in

both local and remote stores. Gastrodon identifies GROUP BY

variables and automatically makes them the index of the resulting Pandas

DataFrames so that you can make common visualizations automatically.

Error messages you can understand


Many software packages ignore error handling, which is a big mistake,

because poor error handling gets in the way of both everyday use and the

learning process. Instead of making excuses, Gastrodon has intelligent

error handling which adds to the convenience of data analysis and

visualization with Gastrodon.

Jupyter native error messages


Improved Error Messages with Gastrodon


Getting Started


Installation


Gastrodon requires Python 3.7 and is registered in the Python Package Index and can

be installed by typing:

pip install gastrodon

on the command line. Note: Gastrodon downloads packages it requires via pip. If you are running Anancoda

(which works great with Gastrodon) you have a second package manager, running parallel with pip, which can install

better versions of important software packages than the ones you can get from pip. In Anaconda, you should type the following

to create an environment for gastrodon:

conda create -n gastrodonSandbox python=3.6 anaconda

activate gastrodonSandbox

conda install jupyter IPython pandas matplotlib

pip install gastrodon

Documentation


The major documentation resources for Gastrodon itself are:

The following are reference documentation for tools you will use:

Release files for gastrodon 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gastrodon 1.0.0
File Size Uploaded
gastrodon-1.0.0.tar.gz 886.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gastrodon 1.0.0
File Interpreter ABI Platform
gastrodon-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 901.2 kB

Release files / gastrodon-1.0.0.tar.gz

Download URL gastrodon-1.0.0.tar.gz
Size 886.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f1bd6ea12eca66eb82f567b01d9188fd9766ae4e1564951920a8e1534305f6c9
BLAKE2b-256 checksum
How to use checksums
c8a595a667d17a8ad6ec482a505d60e5cb363a1c8b690cebec1e291aacd0ee59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.0

Release files / gastrodon-1.0.0-py3-none-any.whl

Download URL gastrodon-1.0.0-py3-none-any.whl
Size 15.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
137f6c932a80620def81c78e69ae5a9fb3764617e3931c9e816e8fb8f214fa2c
BLAKE2b-256 checksum
How to use checksums
a17b5b898644b32bff3b530a5c6fa434f42a4d6285e2669f1cbc6896df134a25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.0

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.9.3

3 release files

0.9.2

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page