blitzly


Nameblitzly JSON
Version 0.6.2 PyPI version JSON
download
home_pagehttps://github.com/invia-flights/blitzly
SummaryLightning-fast way to get plots with Plotly
upload_time2023-02-08 11:21:39
maintainer
docs_urlNone
authorChristopher Lemke
requires_python>=3.8,<3.12
licenseMIT
keywords python data science analytics plotly plotting
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <img src="https://github.com/invia-flights/blitzly/raw/main/docs/assets/images/icon.png" alt="blitzly logo" width="200" height="200"/><br>
# blitzly โšก๏ธ
***Lightning-fast way to get plots with Plotly***

[![DeployPackage](https://github.com/invia-flights/blitzly/actions/workflows/deploy-package.yml/badge.svg)](https://github.com/invia-flights/blitzly/actions/workflows/deploy-package.yml)
[![Testing](https://github.com/invia-flights/blitzly/actions/workflows/testing.yml/badge.svg?branch=main)](https://github.com/invia-flights/blitzly/actions/workflows/testing.yml)
[![codecov](https://codecov.io/gh/invia-flights/blitzly/branch/develop/graph/badge.svg?token=ROCDJJV8JV)](https://codecov.io/gh/invia-flights/blitzly)
[![pypi](https://img.shields.io/pypi/v/blitzly)](https://pypi.org/project/blitzly/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/blitzly)](https://pypistats.org/packages/blitzly)
[![python version](https://img.shields.io/pypi/pyversions/blitzly?logo=python&logoColor=yellow)](https://www.python.org/downloads/)
[![docs](https://img.shields.io/badge/docs-mkdoks%20material-blue)](https://invia-flights.github.io/blitzly/)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![license](https://img.shields.io/github/license/invia-flights/blitzly)](https://github.com/invia-flights/blitzly/blob/main/LICENSE)
[![isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://github.com/PyCQA/isort)
[![black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](https://github.com/python/mypy)
[![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/PyCQA/pylint)
## Introduction ๐ŸŽ‰
Plotly is great and powerful. But with great power comes great responsibility ๐Ÿ•ธ. And sometimes you just want to get a plot up and running as fast as possible. That's where blitzly โšก๏ธ comes in. It provides a set of functions that allow you to create plots with Plotly in a lightning-fast way. It's not meant to replace Plotly, but rather to complement it.

Check out some examples in the [Jupyter notebook](https://github.com/invia-flights/blitzly/blob/main/examples/playground.ipynb).<br>
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/invia-flights/blitzly/blob/main/examples/playground.ipynb)

## Install the package ๐Ÿ“ฆ
If you are using [pip](https://pip.pypa.io/en/stable/), you can install the package with the following command:
```bash
pip install blitzly
```

If you are using [Poetry](https://python-poetry.org/), you can install the package with the following command:
```bash
poetry add blitzly
```
## installing dependencies ๐Ÿง‘โ€๐Ÿ”ง
With [pip](https://pip.pypa.io/en/stable/):
```bash
pip install -r requirements.txt
```

With [Poetry](https://python-poetry.org/):
```bash
poetry install
```
## Available plots (so far ๐Ÿš€)
| Module | Method | Description |
| ------ | ------ | ----------- |
| [`bar`](https://invia-flights.github.io/blitzly/plots/bar/) | [`model_feature_importances`](https://invia-flights.github.io/blitzly/plots/bar/#blitzly.plots.bar.model_feature_importances) | Creates a bar chart with the feature importance of a model. |
| [`bar`](https://invia-flights.github.io/blitzly/plots/bar/) | [`multi_chart`](https://invia-flights.github.io/blitzly/plots/bar/#blitzly.plots.bar.multi_chart) | Creates a bar chart with multiple groups. |
| [`dumbbell`](https://invia-flights.github.io/blitzly/plots/dumbbell/) | [`simple_dumbbell`](https://invia-flights.github.io/blitzly/plots/dumbbell/#blitzly.plots.dumbbell.simple_dumbbell) | Plots a dumbbell plot. This can be used to compare two columns of data to visualize changes. |
| [`histogram`](https://invia-flights.github.io/blitzly/plots/histogram/) | [`simple_histogram`](https://invia-flights.github.io/blitzly/plots/histogram/#blitzly.plots.histogram.simple_histogram) | Plots a histogram with one ore more distributions. |
| [`matrix`](https://invia-flights.github.io/blitzly/plots/matrix/) | [`binary_confusion_matrix`](https://invia-flights.github.io/blitzly/plots/matrix/#blitzly.plots.matrix.binary_confusion_matrix) | Plots a confusion matrix for binary classification data. |
| [`matrix`](https://invia-flights.github.io/blitzly/plots/matrix/) | [`cramers_v_corr_matrix`](https://invia-flights.github.io/blitzly/plots/matrix/#blitzly.plots.matrix.cramers_v_corr_matrix) | Cramer's V correlation for categorical features. |
| [`matrix`](https://invia-flights.github.io/blitzly/plots/matrix/) | [`pearson_corr_matrix`](https://invia-flights.github.io/blitzly/plots/matrix/#blitzly.plots.matrix.pearson_corr_matrix) | Plots a Pearson product-moment correlation coefficients matrix. |
| [`scatter`](https://invia-flights.github.io/blitzly/plots/scatter/) | [`scatter_matrix`](https://invia-flights.github.io/blitzly/plots/scatter/#blitzly.plots.scatter.scatter_matrix) | Plots a scatter matrix. |
| [`scatter`](https://invia-flights.github.io/blitzly/plots/scatter/) | [`multi_scatter`](https://invia-flights.github.io/blitzly/plots/scatter/#blitzly.plots.scatter.multi_scatter) | Create a multi scatter plot. It can be used to visualize the relationship between multiple variables from the same Pandas DataFrame. |
| [`scatter`](https://invia-flights.github.io/blitzly/plots/scatter/) | [`dimensionality_reduction`](https://invia-flights.github.io/blitzly/plots/scatter/#blitzly.plots.scatter.dimensionality_reduction) | Creates a plot to visualize higher dimensionality reduced data using matrix decomposition |


### Subplots ๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ

| Module | Method | Description |
| ------ | ------ | ----------- |
| [`subplots`](https://invia-flights.github.io/blitzly/plots/subplots/) | [`make_subplots`](https://invia-flights.github.io/blitzly/plots/subplots/#blitzly.subplots.make_subplots) | Create subplots using figure objects created with any of the above available plots. |

## Usage ๐ŸคŒ
Here are some examples. You can also open the [playground notebook](https://github.com/invia-flights/blitzly/blob/main/examples/playground.ipynb) ๐Ÿ“’.

**[`dimensionality_reduction`](https://invia-flights.github.io/blitzly/plots/scatter/#blitzly.plots.scatter.dimensionality_reduction):**
```python
from blitzly.plots.scatter import dimensionality_reduction
import plotly.express as px

df = px.data.iris()
dimensionality_reduction(
  df,
  n_components=2,
  target_column="species",
  reduction_funcs=["PCA", "TNSE"],
)
```
Gives you this:
<img src="https://github.com/invia-flights/blitzly/raw/main/docs/assets/images/example_plots/dimensionality_reduction.png" alt="dimensionality reduction plot" width="1000" height="555"/>


**[`multi_bar`](https://invia-flights.github.io/blitzly/plots/bar/#blitzly.plots.bar.multi_bar):**
```python
from blitzly.plots.bar import multi_bar
import numpy as np

data = np.array([[8, 3, 6], [9, 7, 5]])
error_array = np.array([[0.1, 0.2, 0.3], [0.4, 0.5, 0.6]])

multi_bar(
    data,
    x_labels=["Vienna", "Berlin", "Lisbon"],
    group_labels=["Personal rating", "Global rating"],
    errors=error_array,
    title="City ratings ๐Ÿ™",
    mark_x_labels=["Lisbon"],
    write_html_path="see_the_blitz.html",
)
```
Gives you this:
<img src="https://github.com/invia-flights/blitzly/raw/main/docs/assets/images/example_plots/multi_bars.png" alt="multi bars plot" width="1000" height="555"/>

**[`scatter matrix`](https://invia-flights.github.io/blitzly/plots/scatter/#blitzly.plots.scatter.scatter_matrix):**
```python
    from blitzly.plots.scatter import scatter_matrix
    import numpy as np
    import pandas as pd

    foo = np.random.randn(1000)
    bar = np.random.randn(1000) + 1
    blitz = np.random.randint(2, size=1000)
    licht = np.random.randint(2, size=1000)
    data = np.array([foo, bar, blitz, licht])
    df = pd.DataFrame(data.T, columns=["foo", "bar", "blitz", "licht"])

    scatter_matrix(
        df,
        dimensions=["foo", "bar", "blitz"],
        color_dim=df["licht"],
        title="My first scatter matrix ๐Ÿ™ƒ",
        show_upper_half=True,
        diagonal_visible=False,
        marker_color_scale="Rainbow",
        marker_line_color="blue",
        size=(500, 500),
    )
```
Gives you this:
<img src="https://github.com/invia-flights/blitzly/raw/main/docs/assets/images/example_plots/scatter_matrix.png" alt="scatter-matrix plot" width="500" height="500"/>

## Contributing ๐Ÿ‘ฉโ€๐Ÿ’ป

Please check out the [guide](https://invia-flights.github.io/blitzly/CONTRIBUTING/) on how to contribute to this project.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/invia-flights/blitzly",
    "name": "blitzly",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<3.12",
    "maintainer_email": "",
    "keywords": "python,data science,analytics,plotly,plotting",
    "author": "Christopher Lemke",
    "author_email": "christopher.lemke@invia.de",
    "download_url": "https://files.pythonhosted.org/packages/de/48/cbf026966ffa3c2e3601613a1e09bee424aa0185535192b4c899b3dff231/blitzly-0.6.2.tar.gz",
    "platform": null,
    "description": "<img src=\"https://github.com/invia-flights/blitzly/raw/main/docs/assets/images/icon.png\" alt=\"blitzly logo\" width=\"200\" height=\"200\"/><br>\n# blitzly \u26a1\ufe0f\n***Lightning-fast way to get plots with Plotly***\n\n[![DeployPackage](https://github.com/invia-flights/blitzly/actions/workflows/deploy-package.yml/badge.svg)](https://github.com/invia-flights/blitzly/actions/workflows/deploy-package.yml)\n[![Testing](https://github.com/invia-flights/blitzly/actions/workflows/testing.yml/badge.svg?branch=main)](https://github.com/invia-flights/blitzly/actions/workflows/testing.yml)\n[![codecov](https://codecov.io/gh/invia-flights/blitzly/branch/develop/graph/badge.svg?token=ROCDJJV8JV)](https://codecov.io/gh/invia-flights/blitzly)\n[![pypi](https://img.shields.io/pypi/v/blitzly)](https://pypi.org/project/blitzly/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/blitzly)](https://pypistats.org/packages/blitzly)\n[![python version](https://img.shields.io/pypi/pyversions/blitzly?logo=python&logoColor=yellow)](https://www.python.org/downloads/)\n[![docs](https://img.shields.io/badge/docs-mkdoks%20material-blue)](https://invia-flights.github.io/blitzly/)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)\n[![license](https://img.shields.io/github/license/invia-flights/blitzly)](https://github.com/invia-flights/blitzly/blob/main/LICENSE)\n[![isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://github.com/PyCQA/isort)\n[![black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](https://github.com/python/mypy)\n[![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/PyCQA/pylint)\n## Introduction \ud83c\udf89\nPlotly is great and powerful. But with great power comes great responsibility \ud83d\udd78. And sometimes you just want to get a plot up and running as fast as possible. That's where blitzly \u26a1\ufe0f comes in. It provides a set of functions that allow you to create plots with Plotly in a lightning-fast way. It's not meant to replace Plotly, but rather to complement it.\n\nCheck out some examples in the [Jupyter notebook](https://github.com/invia-flights/blitzly/blob/main/examples/playground.ipynb).<br>\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/invia-flights/blitzly/blob/main/examples/playground.ipynb)\n\n## Install the package \ud83d\udce6\nIf you are using [pip](https://pip.pypa.io/en/stable/), you can install the package with the following command:\n```bash\npip install blitzly\n```\n\nIf you are using [Poetry](https://python-poetry.org/), you can install the package with the following command:\n```bash\npoetry add blitzly\n```\n## installing dependencies \ud83e\uddd1\u200d\ud83d\udd27\nWith [pip](https://pip.pypa.io/en/stable/):\n```bash\npip install -r requirements.txt\n```\n\nWith [Poetry](https://python-poetry.org/):\n```bash\npoetry install\n```\n## Available plots (so far \ud83d\ude80)\n| Module | Method | Description |\n| ------ | ------ | ----------- |\n| [`bar`](https://invia-flights.github.io/blitzly/plots/bar/) | [`model_feature_importances`](https://invia-flights.github.io/blitzly/plots/bar/#blitzly.plots.bar.model_feature_importances) | Creates a bar chart with the feature importance of a model. |\n| [`bar`](https://invia-flights.github.io/blitzly/plots/bar/) | [`multi_chart`](https://invia-flights.github.io/blitzly/plots/bar/#blitzly.plots.bar.multi_chart) | Creates a bar chart with multiple groups. |\n| [`dumbbell`](https://invia-flights.github.io/blitzly/plots/dumbbell/) | [`simple_dumbbell`](https://invia-flights.github.io/blitzly/plots/dumbbell/#blitzly.plots.dumbbell.simple_dumbbell) | Plots a dumbbell plot. This can be used to compare two columns of data to visualize changes. |\n| [`histogram`](https://invia-flights.github.io/blitzly/plots/histogram/) | [`simple_histogram`](https://invia-flights.github.io/blitzly/plots/histogram/#blitzly.plots.histogram.simple_histogram) | Plots a histogram with one ore more distributions. |\n| [`matrix`](https://invia-flights.github.io/blitzly/plots/matrix/) | [`binary_confusion_matrix`](https://invia-flights.github.io/blitzly/plots/matrix/#blitzly.plots.matrix.binary_confusion_matrix) | Plots a confusion matrix for binary classification data. |\n| [`matrix`](https://invia-flights.github.io/blitzly/plots/matrix/) | [`cramers_v_corr_matrix`](https://invia-flights.github.io/blitzly/plots/matrix/#blitzly.plots.matrix.cramers_v_corr_matrix) | Cramer's V correlation for categorical features. |\n| [`matrix`](https://invia-flights.github.io/blitzly/plots/matrix/) | [`pearson_corr_matrix`](https://invia-flights.github.io/blitzly/plots/matrix/#blitzly.plots.matrix.pearson_corr_matrix) | Plots a Pearson product-moment correlation coefficients matrix. |\n| [`scatter`](https://invia-flights.github.io/blitzly/plots/scatter/) | [`scatter_matrix`](https://invia-flights.github.io/blitzly/plots/scatter/#blitzly.plots.scatter.scatter_matrix) | Plots a scatter matrix. |\n| [`scatter`](https://invia-flights.github.io/blitzly/plots/scatter/) | [`multi_scatter`](https://invia-flights.github.io/blitzly/plots/scatter/#blitzly.plots.scatter.multi_scatter) | Create a multi scatter plot. It can be used to visualize the relationship between multiple variables from the same Pandas DataFrame. |\n| [`scatter`](https://invia-flights.github.io/blitzly/plots/scatter/) | [`dimensionality_reduction`](https://invia-flights.github.io/blitzly/plots/scatter/#blitzly.plots.scatter.dimensionality_reduction) | Creates a plot to visualize higher dimensionality reduced data using matrix decomposition |\n\n\n### Subplots \ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d\udc66\n\n| Module | Method | Description |\n| ------ | ------ | ----------- |\n| [`subplots`](https://invia-flights.github.io/blitzly/plots/subplots/) | [`make_subplots`](https://invia-flights.github.io/blitzly/plots/subplots/#blitzly.subplots.make_subplots) | Create subplots using figure objects created with any of the above available plots. |\n\n## Usage \ud83e\udd0c\nHere are some examples. You can also open the [playground notebook](https://github.com/invia-flights/blitzly/blob/main/examples/playground.ipynb) \ud83d\udcd2.\n\n**[`dimensionality_reduction`](https://invia-flights.github.io/blitzly/plots/scatter/#blitzly.plots.scatter.dimensionality_reduction):**\n```python\nfrom blitzly.plots.scatter import dimensionality_reduction\nimport plotly.express as px\n\ndf = px.data.iris()\ndimensionality_reduction(\n  df,\n  n_components=2,\n  target_column=\"species\",\n  reduction_funcs=[\"PCA\", \"TNSE\"],\n)\n```\nGives you this:\n<img src=\"https://github.com/invia-flights/blitzly/raw/main/docs/assets/images/example_plots/dimensionality_reduction.png\" alt=\"dimensionality reduction plot\" width=\"1000\" height=\"555\"/>\n\n\n**[`multi_bar`](https://invia-flights.github.io/blitzly/plots/bar/#blitzly.plots.bar.multi_bar):**\n```python\nfrom blitzly.plots.bar import multi_bar\nimport numpy as np\n\ndata = np.array([[8, 3, 6], [9, 7, 5]])\nerror_array = np.array([[0.1, 0.2, 0.3], [0.4, 0.5, 0.6]])\n\nmulti_bar(\n    data,\n    x_labels=[\"Vienna\", \"Berlin\", \"Lisbon\"],\n    group_labels=[\"Personal rating\", \"Global rating\"],\n    errors=error_array,\n    title=\"City ratings \ud83c\udfd9\",\n    mark_x_labels=[\"Lisbon\"],\n    write_html_path=\"see_the_blitz.html\",\n)\n```\nGives you this:\n<img src=\"https://github.com/invia-flights/blitzly/raw/main/docs/assets/images/example_plots/multi_bars.png\" alt=\"multi bars plot\" width=\"1000\" height=\"555\"/>\n\n**[`scatter matrix`](https://invia-flights.github.io/blitzly/plots/scatter/#blitzly.plots.scatter.scatter_matrix):**\n```python\n    from blitzly.plots.scatter import scatter_matrix\n    import numpy as np\n    import pandas as pd\n\n    foo = np.random.randn(1000)\n    bar = np.random.randn(1000) + 1\n    blitz = np.random.randint(2, size=1000)\n    licht = np.random.randint(2, size=1000)\n    data = np.array([foo, bar, blitz, licht])\n    df = pd.DataFrame(data.T, columns=[\"foo\", \"bar\", \"blitz\", \"licht\"])\n\n    scatter_matrix(\n        df,\n        dimensions=[\"foo\", \"bar\", \"blitz\"],\n        color_dim=df[\"licht\"],\n        title=\"My first scatter matrix \ud83d\ude43\",\n        show_upper_half=True,\n        diagonal_visible=False,\n        marker_color_scale=\"Rainbow\",\n        marker_line_color=\"blue\",\n        size=(500, 500),\n    )\n```\nGives you this:\n<img src=\"https://github.com/invia-flights/blitzly/raw/main/docs/assets/images/example_plots/scatter_matrix.png\" alt=\"scatter-matrix plot\" width=\"500\" height=\"500\"/>\n\n## Contributing \ud83d\udc69\u200d\ud83d\udcbb\n\nPlease check out the [guide](https://invia-flights.github.io/blitzly/CONTRIBUTING/) on how to contribute to this project.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Lightning-fast way to get plots with Plotly",
    "version": "0.6.2",
    "split_keywords": [
        "python",
        "data science",
        "analytics",
        "plotly",
        "plotting"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9e6826e42e0f9284da8823c4ec56e300e51e673fc6163458bc3689d2880c8fec",
                "md5": "4d75fd4d96af1616aaab145e501836a5",
                "sha256": "e76f0d77260b80b0d74a486d7846cb3b1d9b81a09e3585c6e3370bda1053089a"
            },
            "downloads": -1,
            "filename": "blitzly-0.6.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4d75fd4d96af1616aaab145e501836a5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<3.12",
            "size": 22767,
            "upload_time": "2023-02-08T11:21:38",
            "upload_time_iso_8601": "2023-02-08T11:21:38.410969Z",
            "url": "https://files.pythonhosted.org/packages/9e/68/26e42e0f9284da8823c4ec56e300e51e673fc6163458bc3689d2880c8fec/blitzly-0.6.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "de48cbf026966ffa3c2e3601613a1e09bee424aa0185535192b4c899b3dff231",
                "md5": "2a0a630a52eb6d578eddc8fe87a19188",
                "sha256": "ba1fba1c8f26743bfc6187a9f57cb9ca272a995e7a1f8581623b3ac270222883"
            },
            "downloads": -1,
            "filename": "blitzly-0.6.2.tar.gz",
            "has_sig": false,
            "md5_digest": "2a0a630a52eb6d578eddc8fe87a19188",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<3.12",
            "size": 20214,
            "upload_time": "2023-02-08T11:21:39",
            "upload_time_iso_8601": "2023-02-08T11:21:39.960618Z",
            "url": "https://files.pythonhosted.org/packages/de/48/cbf026966ffa3c2e3601613a1e09bee424aa0185535192b4c899b3dff231/blitzly-0.6.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-08 11:21:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "invia-flights",
    "github_project": "blitzly",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "blitzly"
}
        
Elapsed time: 0.90664s