bpptkg / komapy

Python library for creating customizable BPPTKG Monitoring APIs charts

Home Page:https://pypi.org/project/komapy/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KomaPy

KomaPy is Python library for creating customizable BPPTKG Monitoring APIs chart.

Use Cases

KomaPy is suitable for the following applications:

  • Building automated static chart figures
  • Embedding into a web application for generating predefined chart configurations
  • Quick data analysis and visualization
  • Data correlation and processing
  • Generating high quality chart for publications
  • Many more

Installation

Install the latest version from PyPI by typing this command:

pip install -U komapy

Quick Start

Here it is a quick start example:

from komapy import Chart
from komapy.client import set_api_key

set_api_key('YOUR_API_KEY')

chart = Chart({
    'title': 'RB2',
    'theme': 'seaborn',
    'layout': {
        'data': [
            {
                'series': {
                    'name': 'edm',
                    'query_params': {
                        'benchmark': 'BAB0',
                        'reflector': 'RB2',
                        'start_at': '2019-04-01',
                        'end_at': '2019-08-01',
                        'ci': True
                    },
                    'fields': ['timestamp', 'slope_distance'],
                    'xaxis_date': True
                }
            }
        ]
    }
})

chart.render()
chart.save('RB2.png')

Documentation

Full documentation and tutorials are available at docs/ directory. You can build the documentation by running these commands:

cd /path/to/komapy/
pip install -r requirements.txt
sphinx-build -b html docs/ /path/to/build/

Contributing

See CONTRIBUTING.md to learn how to contribute to this project.

License

By contributing to the project, you agree that your contributions will be licensed under its MIT license. See LICENSE for details.

About

Python library for creating customizable BPPTKG Monitoring APIs charts

https://pypi.org/project/komapy/

License:MIT License


Languages

Language:Python 100.0%