All Projects → liamgilbey → ggwaffle

liamgilbey / ggwaffle

Licence: GPL-2.0, MIT licenses found Licenses found GPL-2.0 LICENSE MIT LICENSE.md
Creating waffle charts in a ggplot friendly way

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to ggwaffle

CHCharts-wechat
📈A charts component for WeChat mini-app development(一款用于微信小程序开发中的图表组件,使用者可以快速添加并集成到微信小程序开发中).
Stars: ✭ 71 (+57.78%)
Mutual labels:  charts
gokube
gokube is a tool that makes it easy developing day-to-day with Kubernetes on your laptop.
Stars: ✭ 22 (-51.11%)
Mutual labels:  charts
decent-visualizer
A visualizer for .shot files
Stars: ✭ 46 (+2.22%)
Mutual labels:  charts
Reports.JS
Stimulsoft Reports.JS is a reporting tool for Node.js and JavaScript applications.
Stars: ✭ 33 (-26.67%)
Mutual labels:  charts
helm-pgadmin
Helm Chart for pgAdmin
Stars: ✭ 17 (-62.22%)
Mutual labels:  charts
online-retail-dashboard
Online Retail Dashboard
Stars: ✭ 59 (+31.11%)
Mutual labels:  charts
dash-lollapalooza-brasil-2018
🎟Using Plotly to visualize data from Lollapalooza
Stars: ✭ 23 (-48.89%)
Mutual labels:  charts
trakttvstats
A chrome extension adding various improvements to trakt.tv
Stars: ✭ 23 (-48.89%)
Mutual labels:  charts
react-financial-charts
Charts dedicated to finance.
Stars: ✭ 819 (+1720%)
Mutual labels:  charts
git-space
A web application to view Github's user profile.
Stars: ✭ 14 (-68.89%)
Mutual labels:  charts
Twitter-Sentiment-Analyzer
Twitter Sentiment Analyzer
Stars: ✭ 13 (-71.11%)
Mutual labels:  charts
FunnelPlotR
Funnel plots for comparing institutional performance, with overdispersion adjustment
Stars: ✭ 39 (-13.33%)
Mutual labels:  ggplot2
TidyTuesday
📊 Collection of #TidyTuesday Visualisations! 📈
Stars: ✭ 59 (+31.11%)
Mutual labels:  ggplot2
ggHoriPlot
A user-friendly, highly customizable R package for building horizon plots in ggplot2
Stars: ✭ 115 (+155.56%)
Mutual labels:  ggplot2
asciichart
ASCII line charts in terminal ╭┈╯ Haskell port of kroitor/asciichart
Stars: ✭ 23 (-48.89%)
Mutual labels:  charts
vscode-coding-tracker-server
🐔 VSCode Coding Tracker extension server side program
Stars: ✭ 107 (+137.78%)
Mutual labels:  charts
flutter heatmap calendar
A Heatmap Calendar based on Github's contributions chart
Stars: ✭ 47 (+4.44%)
Mutual labels:  charts
ipychart
The power of Chart.js with Python
Stars: ✭ 48 (+6.67%)
Mutual labels:  charts
beapi-bench
Tool for benchmarking apis. Uses ApacheBench(ab) to generate data and gnuplot for graphing. Adding new features almost daily
Stars: ✭ 16 (-64.44%)
Mutual labels:  charts
django-admin-charts
Create beautiful configurable charts from your models and display them on the django-admin index page or on django-admin-tools dashboard. The charts are based on models and criterias defined through admin interface and some chart parameters are configurable in live view.
Stars: ✭ 78 (+73.33%)
Mutual labels:  charts

ggwaffle

Travis Build Status Codecov test coverage

Create waffle charts in R in a ggplot2-friendly way.

Acknowledgements

Really all credit to Bob Rudis for the work done on the original waffle package.

Description

ggwaffle is designed to work in a very similar way to the original waffle package, while being slightly closer to the workflow of a standard ggplot graphic. Consequently, it is a little more verbose.

Installation

Currently only available through github:

# install.packages("devtools")
devtools::install_github("liamgilbey/ggwaffle")

Usage

ggwaffle heavily relies on the usage of ggplot2. Much like standard ggplot graphs, waffle charts are created by adding layers to a base graphic. Because of the inner mechanisms of ggplot2, some of the necessary data transformations have to be completed outside of a standard plot creation. The function waffle_iron has been added to help with issue.

ggwaffle also introduces a column mapping function, aes_d. At this stage I have no idea of how useful this is outside the context of the package, but it seemed a nice way to specify dynamic column renaming. aes_d is obviously coined from ggplot’s aes function and has a very similar idea. Here we are mapping column names to feed into a function so they can be renamed for used appropriately.

library(ggwaffle)
#> Loading required package: ggplot2
waffle_data <- waffle_iron(mpg, aes_d(group = class))

ggplot(waffle_data, aes(x, y, fill = group)) + 
  geom_waffle()

Functions have also been included to make the default graphics more waffle-like. theme_waffle is a ggplot theme that strips back a lot of the elements of the waffle to create a cleaner look. scale_fill_waffle returns a discrete scale to make your charts look a lot like waffles. Using coord_equal is recommended to make the size of the blocks even in all dimensions.

waffle_data <- waffle_iron(iris, aes_d(group = Species))

ggplot(waffle_data, aes(x, y, fill = group)) + 
  geom_waffle() + 
  coord_equal() + 
  scale_fill_waffle() + 
  theme_waffle()

The shape of the waffle tile can also be controlled, choosing from either a regular square, or a circle tile shape.

waffle_data <- waffle_iron(iris, aes_d(group = Species))

ggplot(waffle_data, aes(x, y, colour = group)) + 
  geom_waffle(tile_shape = 'circle', size = 12) + 
  coord_equal() + 
  scale_colour_waffle() + 
  theme_waffle()

Icons

The best way to implement icons into waffle charts is to use Guangchuang YU’s emojifont package.

library(emojifont)  

waffle_data <- waffle_iron(iris, aes_d(group = Species)) 
waffle_data$label = fontawesome('fa-twitter')

ggplot(waffle_data, aes(x, y, colour = group)) + 
  geom_text(aes(label=label), family='fontawesome-webfont', size=12) +
  coord_equal() + 
  scale_colour_waffle() + 
  theme_waffle()  

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].