Package: gastrodon
gastrodonToolkit to display, analyze, and visualize data and documents based onRDF graphs and the SPARQL query language using Pandas, Jupyter, andother Python ecosystem tools.Gastrodon links databases that support the SPARQL protocol (more than ten!) tohttp://pandas.pydata.org/, a popular Python library foranalysis of tabular data. Pandas, in turn, is connected to a vast numberof visualization, statistics, and machine learning tools, all of whichwork withJupyternotebooks. The result is anideal environment for telling stories that reveal the value of data,ontologies, taxonomies, and models.In addition to remote databases, Gastrodon can do SPARQL queries overin-memory RDF graphs (fromrdflib). It has facilities tocopy subgraphs from one graph to another, making it possible to assemblelocal graphs that contain facts relevant to a particular decision, workon them intimately, and then store results in a permanent triple store.Seamless Data TranslationGastrodon mediates between three data models: (1) RDF, (2) Pandas/NumPy,and (3) Native Python. Gastrodon lets you use Python variables in yourSPARQL queries simply by adding?_to the name of your variables.Unlike many RDF libraries, substitution works with both local and remoteSPARQL endpoints. Gastrodon works with the Python type system to keeptrack of details such as “is this variable a URI or a String?” so thatyou don’t have to.Query IntelligenceQuery IntelligenceGastrodon always has your back because it understands SPARQL. Gastrodonautomatically keeps track of namespaces and appendsprefixdeclarations to your queries to keep them short and sweet. Unlike manyRDF libraries, Gastrodon supports variable substitution for queries inboth local and remote stores. Gastrodon identifiesGROUP BYvariables and automatically makes them the index of the resulting PandasDataFrames so that you can make common visualizations automatically.Error messages you can understandMany software packages ignore error handling, which is a big mistake,because poor error handling gets in the way of both everyday use and thelearning process. Instead of making excuses, Gastrodon has intelligenterror handling which adds to the convenience of data analysis andvisualization with Gastrodon.Jupyter native error messagesImproved Error Messages with GastrodonGetting StartedInstallationGastrodon requires Python 3.7 and is registered in thePython Package Indexand canbe installed by typing:pip install gastrodonon 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 installbetter versions of important software packages than the ones you can get from pip.  In Anaconda,  you should type the followingto create an environment for gastrodon:conda create -n gastrodonSandbox python=3.6 anaconda

activate gastrodonSandbox

conda install jupyter IPython pandas matplotlib

pip install gastrodonDocumentationThe major documentation resources for Gastrodon itself are:Example NotebooksGastrodon Reference DocumentationThe following are reference documentation for tools you will use:PandasJupyterrdflibSPARQL