Competitive Intelligence & Technology Assessment Competitive Intelligence & Technology Assessment / Items

ggplot2: Sales Dashboard « Learning R

Get Feed
ggplot2: Sales Dashboard « Learning R
Description

In 2005 dmreview.com conducted a Data Visualization competition for the best depiction of the data presented in each of the four prescribed scenarios. Robert Allison won Scenario 3 that involved the creation of a sales dashboard with priority given for measures indicating poor performance. He explains his approach here

http://www.math.yorku.ca/SCS/Gallery/allison/scen3b.htm

Creating a similar dashboard in ggplot2 is perfectly feasible, and I will next show how to accomplish this.

Data Import

The first step in the process is importing the input data and converting it to a format most suitable for plotting. Data is provided in an Excel file, and unfortunately as it is laid out on only one sheet the import process requires several manual manipulations. xlsReadWrite library imports all the sheet contents, which are then manually broken down into smaller dataframes. Also, as the column names don’t contain years, this information needs to be added manually with the help of as.yearmon() function from the zoo package. In addition, two longer headings are replaced with shorter ones.

library(xlsReadWrite)

library(zoo)

library(ggplot2)

library(RODBC)

# Import Data

file

Original URL

Comments

Report This

Twine is about discovering, collecting and sharing the content that interests you. Learn More

Join Twine

Stats

First Posted By

First Comment By

Tags

Community Tags

Forgot your password?