Skip to main content

Interactive visualization tool

Project description

![pive Logo](/artwork/pive_logo_optimized_100x100.png)


Python Interactive Visualization Environment
=====

python-ive
[ˈpaiθən-ˈaivi]

(alternative titles: *p-ive* or preferably **pive**)

current version: 0.3.3

What is pive?

Pive is a template based visualization tool utilizing D3.js to create interactive visualizations on the fly. It is aimed
at users who want to enhance their web applications with dynamic D3.js visualizations without diving deep into the
coding of D3.js.

Install pive:

Clone this repository:
```
git clone https://github.com/daboth/pive.git
```
and install manually:
```
python setup.py install
```
or install with pip:
```
pip install pive
```

You may need to add ```sudo``` before executing each command.
Now write a simple script to render a chart:

```python

#!/usr/bin/env python
import pive.environment as environment
import pive.inputmanager as inputmanager

# Assuming you have a testdata.json file with some datapoints
# in the same directory. Try to create JSON-Objekts as Key/Value
# pairs or use a JSON formatted String Object. CSV is also
# supported.
input_path = 'samples/numerical.json'

###########################
### Basic usage of pive ###
###########################
# 1)Set up the environment by creating the input manager and
# passing it to an environment. Optionally, you can omit
# an output path. Default is 'output/'.
manager = inputmanager.InputManager(mergedata=False)
env = environment.Environment(inputmanager=manager)

# 2) Load your dataset into the environment to get a
# list of supported visualizations.
supported = env.load(input_path)

# 3) Check if your desired chart is in the list and choose
# it as your visualization object. Alternatively you can
# print out the list of the supported charts and choose directly
# from it. The accessors, e.g. CHART_LINE, are environment
# constants and represent the charts included in pive.
if environment.CHART_LINE in supported:
chart = env.choose(CHART_LINE)

#You can now edit the charts properties.
chart.set_width(900)
chart.set_height(500)

# 4.1) Let the environment render the chart.
# The visualizuation files will be generated
# in the output path defined in the environment.
env.render(chart)

# 4.2) Optionally you can receive the
# javascript code and its dataset as json.
code = env.render_code(chart)
```

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

pive-0.3.3.tar.gz (28.7 kB view details)

Uploaded Source

File details

Details for the file pive-0.3.3.tar.gz.

File metadata

  • Download URL: pive-0.3.3.tar.gz
  • Upload date:
  • Size: 28.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pive-0.3.3.tar.gz
Algorithm Hash digest
SHA256 55f92bf30e60adefb8fbfee2ae456ccd436dea1a49c021d65cd67abebdfc67cb
MD5 11427c7c1487c00271e15de92f954322
BLAKE2b-256 33a00132de2dbd9e6281b48da42d7c93f1c56ed1ce668484be24a3d4b56f8528

See more details on using hashes here.

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