hrbrmstr / Streamgraph
Licence: other
〰️ htmlwidget for creating streamgraph visualizations in R
Stars: ✭ 137
Programming Languages
r
7636 projects
Projects that are alternatives of or similar to Streamgraph
Waffle
🍁 Make waffle (square pie) charts in R
Stars: ✭ 614 (+348.18%)
Mutual labels: rstats, data-visualization, data-visualisation
F2
📱📈An elegant, interactive and flexible charting library for mobile.
Stars: ✭ 7,619 (+5461.31%)
Mutual labels: data-visualization, data-visualisation
Gganimate
A Grammar of Animated Graphics
Stars: ✭ 1,744 (+1172.99%)
Mutual labels: rstats, data-visualization
Tuicalendr
📆 R htmlwidget for tui-calendar
Stars: ✭ 53 (-61.31%)
Mutual labels: data-visualization, htmlwidgets
Football Data
football (soccer) datasets
Stars: ✭ 18 (-86.86%)
Mutual labels: rstats, data-visualization
Soccergraphr
Soccer Analytics in R using OPTA data
Stars: ✭ 42 (-69.34%)
Mutual labels: rstats, data-visualization
Moderndive book
Statistical Inference via Data Science: A ModernDive into R and the Tidyverse
Stars: ✭ 527 (+284.67%)
Mutual labels: rstats, data-visualization
R Raster Vector Geospatial
Introduction to Geospatial Raster and Vector Data with R
Stars: ✭ 76 (-44.53%)
Mutual labels: data-visualization, data-visualisation
Transformr
Smooth Polygon Transformations
Stars: ✭ 87 (-36.5%)
Mutual labels: rstats, data-visualization
Python Novice Gapminder
Plotting and Programming in Python
Stars: ✭ 109 (-20.44%)
Mutual labels: data-visualization, data-visualisation
Engsoccerdata
English and European soccer results 1871-2020
Stars: ✭ 615 (+348.91%)
Mutual labels: rstats, data-visualization
Osmplotr
Data visualisation using OpenStreetMap objects
Stars: ✭ 122 (-10.95%)
Mutual labels: rstats, data-visualisation
Hrbrthemes
🔏 Opinionated, typographic-centric ggplot2 themes and theme components
Stars: ✭ 899 (+556.2%)
Mutual labels: rstats, data-visualization
Leaflet.extras2
Extra functionality for leaflet R package.
Stars: ✭ 37 (-72.99%)
Mutual labels: rstats, data-visualization
Ggpage
Creates Page Layout Visualizations in R 📄📄📄
Stars: ✭ 306 (+123.36%)
Mutual labels: rstats, data-visualization
Python Ecology Lesson
Data Analysis and Visualization in Python for Ecologists
Stars: ✭ 116 (-15.33%)
Mutual labels: data-visualization, data-visualisation
streamgraph
streamgraph is an htmlwidget for making, well, streamgraphs.
A streamgraph (or "stream graph") is a type of stacked area graph which is displaced around a central axis, resulting in a flowing, organic shape. Streamgraphs were developed by Lee Byron and popularized by their use in a February 2008 New York Times article on movie box office revenues. (Wikipedia)
The x axis values can be continous or dates.
TODO
- Support is planned for
xts
objects, but not for a bit. - Support for categorical/discrete x axis
The following functions are implemented:
-
streamgraph
: Create a new streamgraph -
sg_axis_x
: Modify streamgraph x axis formatting -
sg_axis_y
: Modify streamgraph y axis formatting -
sg_colors
: Modify streamgraph axis text, legend popup label text and tooltip text colors (NOTE: no longer modifies fill colors, usesg_fill_*
for fill colors) -
sg_legend
: Add select menu "legend" to interactive streamgraphs -
sg_fill_brewer
: Specify a ColorBrewer palette to use for the stream fills -
sg_fill_manual
: Specify a manual color palette to use for the stream fills -
sg_fill_tableau
: Specify a Tableau color palette to use for the stream flls -
sg_add_marker
: Annotate streamgraph with vertical line and label -
sg_annotate
: Annotate streamgraph with a label
News
- Version
0.8.1
released - ggplot2 movies fix; corrected numerous notes from CRAN check - Version
0.8
released - support for negative Y axis numbers and upgrade to latest D3 - Version
0.7.5
released -key
,value
anddate
can be either bare or quoted - Version
0.7
released - Newsg_add_marker
andsg_annotation
to enable annotation of streamgraphs - Version
0.6
released - Newscale
parameter tostreamgraph
lets you choose between continuous or date scales. - Version
0.5.1
released -sg_colors
now has nothing to do with the stream fills but does set the axis text, legend popup label text and tooltip text. - Version
0.5
released - deprecated use ofsg_colors
. Its functionality will change soon and is replaced by threesg_fill_*
functions (brewer
,manual
andtableau
) which makes more sense, is aligned to theggplot2
way of specifying fill aesthetics and now makes it easier to highly customize the streamgraph appearance. - Versioin
0.4.2
released - fixed bug (thanks to teammate @bhaskarvk) that causes inconsistent color rendering for each area component (noticeable on resize of flexible width/height graphs) - Version
0.4.1
released - removed warning message when supplyingPOSIXct
values (remember,POSIXct
still only works for granularities >= 1 day) - Version
0.4
released - select menu "legend" (interactive only) - Version
0.3.1
released - bug fix to fix error withd3.stack
;streamgraph
will now see if the date input is a year and automatically convert it to the necessary format (no need to useas.Date
) - Version
0.3
released - folks can have some fun with newoffset
andinterpolate
parameters tostreamgraph
- Version
0.2.2
relased - rly rly rly fixed tooltips now, also assed ability to format y axis text - Version
0.2.1
released - ok, working tool tips for realz now - Version
0.2
released - working SVG tooltips; general code cleanup - Version
0.1
released
Installation
devtools::install_github("hrbrmstr/streamgraph")
Usage
library(streamgraph)
# current verison
packageVersion("streamgraph")
library(dplyr)
ggplot2movies::movies %>%
select(year, Action, Animation, Comedy, Drama, Documentary, Romance, Short) %>%
tidyr::gather(genre, value, -year) %>%
group_by(year, genre) %>%
tally(wt=value) -> dat
streamgraph(dat, "genre", "n", "year", interactive=TRUE) %>%
sg_axis_x(20, "year", "%Y") %>%
sg_fill_brewer("PuOr")
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
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].