Streamlit component for Let's-Plot visualization library

Overview

streamlit-letsplot

Streamlit App

This is a work-in-progress, providing a convenience function to plot charts from the Lets-Plot visualization library.

Example usage

import streamlit as st
from streamlit_letsplot import st_letsplot
import numpy as np
import lets_plot
from lets_plot import *

np.random.seed(12)
data = dict(
    cond=np.repeat(['A','B'], 200),
    rating=np.concatenate((np.random.normal(0, 1, 200), np.random.normal(1, 1.5, 200)))
)

a = ggplot(data, aes(x='rating', fill='cond')) + ggsize(500, 250) \
+ geom_density(color='dark_green', alpha=.7) + scale_fill_brewer(type='seq') \
+ theme(axis_line_y='blank')

# plots any Let's Plot visualization object
st_letsplot(a)

st_letsplot

You might also like...
a python function to plot a geopandas dataframe
a python function to plot a geopandas dataframe

Pretty GeoDataFrame A minimum python function (~60 lines) to draw pretty geodataframe. Based on matplotlib, shapely, descartes. Installation just use

Small project to recursively calculate and plot each successive order of the Hilbert Curve
Small project to recursively calculate and plot each successive order of the Hilbert Curve

hilbert-curve Small project to recursively calculate and plot each successive order of the Hilbert Curve. After watching 3Blue1Brown's video on Hilber

Getting started with Python, Dash and Plot.ly for the Data Dashboards team

data_dashboards Getting started with Python, Dash and Plot.ly for the Data Dashboards team Getting started MacOS users: # Install the pyenv version ma

Info for The Great DataTas plot-a-thon
Info for The Great DataTas plot-a-thon

The Great DataTas plot-a-thon Datatas is organising a Data Visualisation competition: The Great DataTas plot-a-thon We will be using Tidy Tuesday data

It's an application to calculate I from v and r. It can also plot a graph between V vs I.
It's an application to calculate I from v and r. It can also plot a graph between V vs I.

Ohm-s-Law-Visualizer It's an application to calculate I from v and r using Ohm's Law. It can also plot a graph between V vs I. Story I'm doing my Unde

Plot and save the ground truth  and predicted results of human 3.6 M and CMU mocap dataset.
Plot and save the ground truth and predicted results of human 3.6 M and CMU mocap dataset.

Visualization-of-Human3.6M-Dataset Plot and save the ground truth and predicted results of human 3.6 M and CMU mocap dataset. human-motion-prediction

Plot-configurations for scientific publications, purely based on matplotlib

TUEplots Plot-configurations for scientific publications, purely based on matplotlib. Usage Please have a look at the examples in the example/ directo

A tool to plot and execute Rossmos's Formula, that helps to catch serial criminals using mathematics
A tool to plot and execute Rossmos's Formula, that helps to catch serial criminals using mathematics

Rossmo Plotter A tool to plot and execute Rossmos's Formula using python, that helps to catch serial criminals using mathematics Author: Amlan Saha Ku

A custom qq-plot for two sample data comparision
A custom qq-plot for two sample data comparision

QQ-Plot 2 Sample Just a gist to include the custom code to draw a qq-plot in python when dealing with a "two sample problem". This means when u try to

Comments
  • generateStaticHtmlPage() Exception

    generateStaticHtmlPage() Exception

    Already mentioned in issue #7.

    I am still getting the following error when using st_letsplot: generateStaticHtmlPage() - Exception: Trying to access top level value not marked as @ThreadLocal or @SharedImmutable from non-main thread

    Is there a workaround? Are there several methods gnerating the html page? Or is it a bug in streamlit or lets-plot?

    opened by schakalakka 4
  • KeyError if there is no ggsize

    KeyError if there is no ggsize

    If I have a plot without ggsize like lp.ggplot(df, lp.aes(x='foo, y='bar')) + lp.geom_bar() then streamlit_letsplot throws an KeyError: 'ggsize' with a throwsback to File "C:\ProgramData\Anaconda3\envs\efleets39\lib\site-packages\streamlit_letsplot\__init__.py", line 24, in st_letsplot height=plot_dict["ggsize"]["height"]

    Solution: Adding lp.ggsize(500, 250) to the plot works.

    opened by schakalakka 4
Releases(v0.0.3)
  • v0.0.3(Nov 3, 2022)

    What's Changed

    • dealing with missing ggsize by @schakalakka in https://github.com/randyzwitch/streamlit-letsplot/pull/9

    New Contributors

    • @schakalakka made their first contribution in https://github.com/randyzwitch/streamlit-letsplot/pull/9

    Full Changelog: https://github.com/randyzwitch/streamlit-letsplot/compare/v0.0.2...v0.0.3

    Source code(tar.gz)
    Source code(zip)
  • v0.0.2(May 27, 2021)

Owner
Randy Zwitch
Head of Developer Relations at Streamlit. Julia enthusiast, R and Python developer
Randy Zwitch
Farhad Davaripour, Ph.D. 1 Jan 5, 2022
🗾 Streamlit Component for rendering kepler.gl maps

streamlit-keplergl ?? Streamlit Component for rendering kepler.gl maps in a streamlit app. ?? Live Demo ?? Installation pip install streamlit-keplergl

Christoph Rieke 39 Dec 14, 2022
This component provides a wrapper to display SHAP plots in Streamlit.

streamlit-shap This component provides a wrapper to display SHAP plots in Streamlit.

Snehan Kekre 30 Dec 10, 2022
A simple python script using Numpy and Matplotlib library to plot a Mohr's Circle when given a two-dimensional state of stress.

Mohr's Circle Calculator This is a really small personal project done for Department of Civil Engineering, Delhi Technological University (formerly, D

Agyeya Mishra 0 Jul 17, 2021
This is a super simple visualization toolbox (script) for transformer attention visualization ✌

Trans_attention_vis This is a super simple visualization toolbox (script) for transformer attention visualization ✌ 1. How to prepare your attention m

Mingyu Wang 3 Jul 9, 2022
python partial dependence plot toolbox

PDPbox python partial dependence plot toolbox Motivation This repository is inspired by ICEbox. The goal is to visualize the impact of certain feature

Li Jiangchun 723 Jan 7, 2023
python partial dependence plot toolbox

PDPbox python partial dependence plot toolbox Motivation This repository is inspired by ICEbox. The goal is to visualize the impact of certain feature

Li Jiangchun 531 Feb 16, 2021
basemap - Plot on map projections (with coastlines and political boundaries) using matplotlib.

Basemap Plot on map projections (with coastlines and political boundaries) using matplotlib. ⚠️ Warning: this package is being deprecated in favour of

Matplotlib Developers 706 Dec 28, 2022
This is a Cross-Platform Plot Manager for Chia Plotting that is simple, easy-to-use, and reliable.

Swar's Chia Plot Manager A plot manager for Chia plotting: https://www.chia.net/ Development Version: v0.0.1 This is a cross-platform Chia Plot Manage

Swar Patel 1.3k Dec 13, 2022
Plot, scatter plots and histograms in the terminal using braille dots

Plot, scatter plots and histograms in the terminal using braille dots, with (almost) no dependancies. Plot with color or make complex figures - similar to a very small sibling to matplotlib. Or use the canvas to plot dots and lines yourself.

Tammo Ippen 207 Dec 30, 2022