Git Product home page Git Product logo

rbulletgraph's Introduction

Rbulletgraph

Standalone (non-package) example of how to make bullet graphs (http://www.perceptualedge.com/articles/misc/Bullet_Graph_Design_Spec.pdf) in R

You can learn more about using bullet graphs in your IT & information security dashboards by grabbing our (mine & @jayjacobs') book: http://amzn.to/sudabook

Provided you have a data frame with the following columns:

measure|high|mean|low|target|value

the bullet.graph() function will make one more (depending on the number of rows) bullet graphs based on the scale of the max value of "high".

If your data set doesn't "play nice" in that range, you'll either need to make multiple bullet graphs (which should be able to be aligned nicely with a grid since the functions returns a ggplot object) or normalize the data (i.e. convert to percentages).

Sample usage:

incidents <- data.frame(
  measure=c("Total Events (K)", "Security Events (K)"),
  high=c(3200,2000),
  mean=c(2170,1500),
  low=c(1500,500), 
  target=c(2500,1750),
  value=c(2726,1600)
)
     
incidents.bg <- bullet.graph(incidents) 
ggsave("incident-total-events.pdf", incidents.bg, width=5, height=2)

example bullet graph

rbulletgraph's People

Contributors

hrbrmstr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.