Skip to main content

A Python package to execute Graphab analyses.

Project description

Graphab4py Logo

About

This package provides a Python interface to the program Graphab. The author(s) of this Python package are not developing Graphab. Rather, Graphab is an independent software which provides a graphical user interface, as well as a command line interface. Further information on Graphab can be found here.

Prerequisites

In order to install and use Graphab4py, Python >= 3.9 and Java >= 8 are both required. It is also recommended to have pip available to install the latest version of Graphab4py. Graphab is not required but can be installed through Graphab4py. Alternatively, an existing Graphab Java executable can be set up for use in Graphab4py.

Installation

Graphab4Py is available on PyPI. To install Graphab4Py, simply run the following line:

pip install graphab4py

Example

from graphab4py import project
project.set_graphab("/home/rca/opt/")
prj = project.Project()

prj.create_project(
    name = "MyProject", patches = "/home/rca/dat/pat/Patches.tif", habitat = 1, directory = "/home/rca/prj"
    )

prj.create_linkset(
    disttype = "cost",
    linkname = "L1",
    threshold = 1000,
    cost_raster = "/home/rca/dat/res/resistance_surface.tif"
    )

prj.create_graph(graphname = "G1")

License

This is free and unencumbered software released into the public domain, as declared in the LICENSE file.

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

graphab4py-1.0.1b1.tar.gz (14.8 kB view hashes)

Uploaded Source

Built Distribution

graphab4py-1.0.1b1-py3-none-any.whl (19.6 kB view hashes)

Uploaded Python 3

Supported by

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