All Projects β†’ charlesdong1991 β†’ py-roughviz

charlesdong1991 / py-roughviz

Licence: MIT license
The Python implementation of JavaScript Library RoughViz to create interactive sketchy charts

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to py-roughviz

Gossip
An online user interface to efficiently author and delivery awesome and informative presentation. πŸš€
Stars: ✭ 315 (+343.66%)
Mutual labels:  storytelling
Storymap
A JavaScript library for digital storytelling with web maps.
Stars: ✭ 107 (+50.7%)
Mutual labels:  storytelling
Scrollstory
A jQuery plugin for building scroll-based stories
Stars: ✭ 249 (+250.7%)
Mutual labels:  storytelling
Readteractive
Tool for writing and generating interactive books.
Stars: ✭ 23 (-67.61%)
Mutual labels:  storytelling
Mural
Mural is a tool for visual storytelling. It’s a program that helps you sequence your visual story, and then generates everything needed for that story to be displayed on most modern web browsers and served from any web server.
Stars: ✭ 92 (+29.58%)
Mutual labels:  storytelling
Rolldown
R Markdown output formats for storytelling
Stars: ✭ 137 (+92.96%)
Mutual labels:  storytelling
Litvis
Literate Visualization: Theory, software and examples
Stars: ✭ 289 (+307.04%)
Mutual labels:  storytelling
FEDOT.Web
Graphic tool for the automated evolutionary design of composite models
Stars: ✭ 33 (-53.52%)
Mutual labels:  interactive-visualizations
Storymap Cascade
The Story Map Cascadeβ„  app lets you combine narrative text with maps, images, and multimedia content in an engaging, full-screen scrolling experience.
Stars: ✭ 92 (+29.58%)
Mutual labels:  storytelling
Timelinestoryteller
An expressive visual storytelling environment for presenting timelines on the web and in Power BI. Developed at Microsoft Research.
Stars: ✭ 244 (+243.66%)
Mutual labels:  storytelling
Storymap Series
The Story Map Series lets you present a series of maps via tabs, numbered bullets, or a side accordion.
Stars: ✭ 57 (-19.72%)
Mutual labels:  storytelling
Crd3
The repo containing the Critical Role Dungeons and Dragons Dataset.
Stars: ✭ 83 (+16.9%)
Mutual labels:  storytelling
Storymap Tour
The Story Map Tour is ideal when you want to present a linear, place-based narrative featuring images or videos.
Stars: ✭ 146 (+105.63%)
Mutual labels:  storytelling
Pageflow
Multimedia story telling for the web.
Stars: ✭ 624 (+778.87%)
Mutual labels:  storytelling
Glimma
Glimma R package
Stars: ✭ 48 (-32.39%)
Mutual labels:  interactive-visualizations
Gonorth
GoNorth is a story and content planning tool for RPGs and other open world games.
Stars: ✭ 289 (+307.04%)
Mutual labels:  storytelling
Narrows
Online storytelling system
Stars: ✭ 109 (+53.52%)
Mutual labels:  storytelling
arulesViz
Visualizing Association Rules and Frequent Itemsets with R
Stars: ✭ 49 (-30.99%)
Mutual labels:  interactive-visualizations
taucharts
πŸ“Š An R htmlwidget interface to the TauCharts javascript library
Stars: ✭ 66 (-7.04%)
Mutual labels:  interactive-visualizations
Forgejs
ForgeJS is a javascript framework that unleashes immersive WebVR experiences.
Stars: ✭ 207 (+191.55%)
Mutual labels:  storytelling

py-roughviz

Package Version build Contributions welcome License

This is the Python wrapper of the JaveScript Library RoughViz which you could use to visualize sketchy/hand-drawn styled charts. You could check out original JS libarary here: RoughViz

Implemented Charts

Currently, there are seven types of charts available on JS RoughViz project, and I implemented all of them:

  • Bar
  • Barh
  • Pie
  • Line
  • Scatter
  • Donut
  • StackedBar

Before Use it

  • Cloning: If you clone the repo, please install the dependencies in order to use them, and simply do below if you are using pip.
pip install -r requirements.txt
  • Downloading the pakcage: This package is also available on PyPi, so you could do below to download the package
pip install py-roughviz

How to use it

Due to design of original RoughViz, there are some restrictions on the format of input data. The detailed description can be found in the documentation.

To use the tool, you could either define all options during chart in the initialization, or to define the options later. And in order to make it easier to use, there are several options provided.

  1. You could define all options using set_options
  2. For common options shared across different charts, you could define it in a more intuitive way, e.g. set_title(title="The plot", fontsize=2), or set_xlabel("X Label", fontsize=3)

Currently available options are:

  • set_options: this can be used to set all available options for charts
  • set_title: this can be used to set title and title fontsize
  • set_xlabel: this can be used to set xlabel and its fontsize
  • set_ylabel: this can be used to set ylabel and its fontsize
  • set_figsize: this can be used to set the figsize for plots
  • set_legend: this can be used to determine if legend is presented, and if so, which position to put legend

Pandas DataFrame is accepted as input data

One of major characters of this package is you could take pandas DataFrame as data type (this is not available in original JS tool), and this feature could make people use this in a more familiar way, similar to seaborn.

Currently, plot types below are supported to take pandas DataFrame as input data:

  • Barh
  • Bar
  • Scatter
  • Pie
  • Donut

For example:

import pandas as pd
from roughviz.charts import Pie, Scatter

df = pd.DataFrame({"a": ["a", "b"], "b": [1, 2], "c": [2, 3]})

# pie plot
pie = Pie(data=df, labels="a", values="b")

# scatter plot
scatter = Scatter(data=df, x="b", y="c")

Examples

  • Example 1
from roughviz.charts import Line

line = Line(data="examples/example_datasets/vis1.csv", y1="a", y2="b", y3="c")
line.set_legend(legend_position="left")
line.set_title("Line Plot", fontsize=2)
line.set_options(colors=["tan", "orange", "coral"])

line.show()

Example 1

  • Example 2
from roughviz.charts import Bar

data = {
    "labels": ["North", "South", "East", "West"],
    "values": [10, 5, 8, 3]
}

bar = Bar(data=data, title="Regions", title_fontsize=3)
bar.set_xlabel("Region", fontsize=2)
bar.set_ylabel("Number", fontsize=2)

bar.show()

Example 2

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].