Skip to main content

A web-based dashboard to analyzing your data with Python

Project description

A web-based dashboard to analyzing your data with Python

image0 PyPI Requires

Screenshot

Screenshot

Installation

pip3 install boardify

Usage

from boardify import *


# Class for the dashboard
class FruitDashboard(BasicDashboard):
    def config(self):
        self.name = "Fruit Company"

        # Add Blocks to the dashboard
        self.add_block(Products())
        self.add_block(NicestFruit())


# Block contains HTML Code
class Products(BasicBlock):
    def config(self):
        self.name = "Products"
        self.description = "A list of our products"

    def data(self):
        return """<ul>
<li>Apple</li>
<li>Orange</li>
<li>Banana</li>
<li>Kiwifruit</li>
<li>Blueberry</li>
<li>Grapes</li>
</ul>"""


# Block renders a bar chart
class NicestFruit(BasicBlock):
    def config(self):
        self.name = "Nicest Fruit"
        self.description = "A survey of 145 people asked them "                 ""Which is the nicest fruit?""

    def data(self):
        # Define the data for the chart
        data = {
            "datasets": {
                "Survey One": [35, 20, 45, 10, 30, 5],
                "Survey Two": [30, 25, 60, 5, 35, 0],
            },
            "labels": ["Apple",
                       "Orange",
                       "Banana",
                       "Kiwifruit",
                       "Blueberry",
                       "Grapes"],
            "background_color": ["rgb(128, 18, 2)",
                                 "rgb(244, 132, 0)",
                                 "rgb(246, 221, 0)",
                                 "rgba(83, 65, 25, 0.97)",
                                 "rgb(35, 123, 214)",
                                 "rgb(99, 74, 161)"]
        }

        # Generate the bar chart
        return BarChart(data).generate()


# Run the server
dashboard = FruitDashboard()
dashboard.run()

Open the dashboard at http://localhost:7000

Made with

Meta

This project is licensed under the MIT License - see the LICENSE file for details

Project details


Release history Release notifications

This version
History Node

0.4.0

History Node

0.3.0

History Node

0.2.1

History Node

0.2.0

History Node

0.1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
boardify-0.4.0.tar.gz (3.7 kB) Copy SHA256 hash SHA256 Source None Mar 30, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page