Metadata-Version: 2.0
Name: pybloqs
Version: 1.1.2
Summary: Data Visualization and Report Building
Home-page: https://github.com/manahl/pybloqs
Author: Man AHL Technology
Author-email: ManAHLTech@ahl.com
License: UNKNOWN
Keywords: ahl,pdf,html,visualization,report
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python
Classifier: Topic :: Scientific/Engineering
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 2 :: Only
Requires-Dist: beautifulsoup4
Requires-Dist: docutils
Requires-Dist: html5lib
Requires-Dist: ipython[notebook]
Requires-Dist: jinja2
Requires-Dist: lxml
Requires-Dist: markdown
Requires-Dist: matplotlib
Requires-Dist: nbsphinx
Requires-Dist: pandas
Requires-Dist: pyyaml
Requires-Dist: sphinx

|pybloqs|
=========

|CircleCI| |PyPI| |ReadTheDocs| |Coverage Status|

PyBloqs is a flexible framework for visualizing data and automated
creation of reports.

.. figure:: pybloqs_in_notebook.png
   :alt: pybloqs in use in ipython notebook

   pybloqs in use in ipython notebook
 

It works with `Pandas <http://pandas.pydata.org>`__,
`matplotlib <http://matplotlib.org>`__ and
`highcharts <http://www.highcharts.com>`__. PyBloqs creates atomic
blocks containing text, tables (from Pandas DataFrame), plots
(matplotlib or highcharts) or images. All blocks can be styled with CSS.
Each block can be created and displayed separately for fast development
turnover. Lists of blocks can be stacked together to form reports.
Reports can be displayed as HTML in the browser or exported in a variety
of formats (including HTML, PDF, SVG, PNG).

Quickstart
----------

Install PyBloqs
~~~~~~~~~~~~~~~

For a minimal install without HighCharts support run:

::

    pip install pybloqs

or when installing in development mode:

::

    python setup.py develop

This will allow you to run the example code below.

External dependencies
~~~~~~~~~~~~~~~~~~~~~

For full functionality, PyBloqs requires the following 3rd party
programs and libraries. For some, the file location must be specified at
install time:

::

    pip install --install-option="INSTALL OPTIONS" git+https://github.com/manahl/pybloqs.git

e.g.

::

    pip install --install-option="--highcharts=~/node_modules/highcharts/,~/node_modules/highcharts-heatmap/" git+https://github.com/manahl/pybloqs.git

-  Libraries bundled with PyBloqs:
-  jsinflate.js (https://github.com/augustl/js-inflate; MIT License)
-  jquery.js (https://jquery.com; MIT License)
-  jquery-DataTables.js (https://datatables.net; MIT License)

-  wkhtmltopdf/wkhtmltoimage (http://wkhtmltopdf.org/; LGPLv3):

wkhtmltopdf is not bundled with PyBloqs. You need to install it from
your distribution's repository (Linux) or download it from the project
page (https://wkhtmltopdf.org) . The binaries wkhtmltopdf and
wkhtmltoimage are used for file output other than HTML. PyBloqs will
search for the binaries on the system path. If you would like to use a
local copy of the binaries, install with following option:

::

    --wkhtmltopdf=/path/to/binary

When installing in development mode you can load highcharts explicitly:

::

    python setup.py load_wkhtmltopdf --wkhtmltopdf=/path/to/binary

-  HighCharts (optional; proprietery license, see
   https://shop.highsoft.com/highcharts-t2):

Highcharts is not bundled with PyBloqs. To create blocks with Highcharts
plots, you need to download Highcharts separately (e.g. with
``npm install highcharts``, ``npm install highcharts-heatmap`` etc.),
and provide the path to your highcharts installation. Please make sure
you have the right license for Highcharts. For full functionality you
will need the following highcharts packages: highcharts,
highcharts-heatmap, highcharts-funnel, highcharts-exporting,
highcharts-export-csv (this example assumes, npm installed files into
directory ~/node\_modules).

::

    --highcharts=~/node_modules/highcharts/,
    ~/node_modules/highcharts-heatmap/,~/node_modules/highcharts-funnel,~/node_modules/highcharts-exporting,
    ~/node_modules/highcharts-export-csv

When installing in development mode you can load highcharts explicitly
(this example assumes, npm installed files into directory
~/node\_modules)

::

    python setup.py load_highcharts --highcharts=~/node_modules/highcharts/,~/node_modules/highcharts-heatmap/,\
    ~/node_modules/highcharts-funnel,~/node_modules/highcharts-exporting,~/node_modules/highcharts-export-csv

Using PyBloqs
~~~~~~~~~~~~~

::

    from pybloqs import Block, HStack, VStack
    import pandas as pd
    from matplotlib import pyplot as plt

    text_block = Block('This is a text block', styles={'text-align':'center', 'color':'blue'})
    text_block.show()

    df = pd.DataFrame([[1., 2.],[3.,4.]], columns =['a', 'b'])
    table_block = Block(df)
    table_block.show()

    plot_block = Block(plt.plot(df['a'], df['b']))
    plot_block.show()

    plot_and_table = HStack([plot_block, table_block])
    report = VStack([text_block, plot_and_table])
    report.show()
    report.save('report.pdf')

Configuration
-------------

You can specify per-user default parameters in a yaml-formatted file
~/.pybloqs.cfg:

::

    user_email_address: some@email.com  # Default: user name 
    public_dir: /some/dir               # Default: /tmp
    tmp_html_dir: /some/dir             # Default: /tmp
    smtp_server: url.for.email.server   # Default: ''

Documentation
-------------

Have a look at the `detailed
documentation <https://pybloqs.readthedocs.io>`__.

Requirements
------------

PyBloqs works with:

-  matplotlib
-  Pandas
-  html5lib
-  lxml
-  jinja2
-  markdown
-  beautifulsoup4
-  docutils

Acknowledgements
----------------

PyBloqs has been under active development at `Man
AHL <http://www.ahl.com/>`__ since 2013.

Original concept and implementation: `Tom
Farnbauer <https://github.com/SleepingPills>`__

Contributors from AHL Tech team:

-  `Dominik Christ <https://github.com/DominikMChrist>`__
-  `Barry Fitzgerald <https://github.com/pablojim>`__
-  `Wilfred Hughes <https://github.com/wilfred>`__
-  `James Munro <https://github.com/jamesmunro>`__
-  `Bogdan Cozmaciuc <https://github.com/cozmacib>`__
-  ... and many others ...

Contributions welcome!

License
-------

PyBloqs is licensed under the GNU LGPL v2.1. A copy of which is included
in `LICENSE <LICENSE>`__

.. |pybloqs| image:: logo/logo50.png
   :target: https://github.com/manahl/pybloqs
.. |CircleCI| image:: https://circleci.com/gh/manahl/PyBloqs.svg?style=shield
   :target: https://circleci.com/gh/manahl/PyBloqs
.. |PyPI| image:: https://img.shields.io/pypi/pyversions/pybloqs.svg
   :target: https://pypi.python.org/pypi/pybloqs/
.. |ReadTheDocs| image:: https://readthedocs.org/projects/pybloqs/badge
   :target: https://pybloqs.readthedocs.io
.. |Coverage Status| image:: https://coveralls.io/repos/github/manahl/PyBloqs/badge.svg?branch=master
   :target: https://coveralls.io/github/manahl/PyBloqs?branch=master

Changelog

1.0.0 (2017-04-07)
~~~~~~~~~~~~~~~~~~

-  Initial public release

1.0.1 (2017-04-13)
~~~~~~~~~~~~~~~~~~

-  Integration with pypi and ReadTheDocs.
-  Installation on Mac and Windows.

1.0.2 (2017-04-26)
~~~~~~~~~~~~~~~~~~

-  Metadata and badge for Python version.
-  Python 3 compatibility changes, part 1.
-  Installation with Coveralls.

1.0.3 (2017-04-26)
~~~~~~~~~~~~~~~~~~

-  Bugfix: Import of urlparse corrected, fixes Block.show() .

1.1.0 (2017-05-10)
~~~~~~~~~~~~~~~~~~

-  jQuery DataTables support.
-  HTML anchors.
-  Bugfix: Width of HTML-body no longer hard-coded.

1.1.1 (2017-05-10)
~~~~~~~~~~~~~~~~~~

-  Bugfix: Static data including DataTables CSS.

1.1.2 (2017-06-2)
~~~~~~~~~~~~~~~~~

-  Bugfix: Image size for Matplotlib figure no longer truncated to whole
   number.
-  Updated download path for wkhtmltopdf in CI setup.



