Competitive Intelligence & Technology Assessment / Items
ggplot2: Sales Dashboard « Learning R
Get Feed
- 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 ThisTwine is about discovering, collecting and sharing the content that interests you. Learn More
Join TwineStats
- 7 Twines
- 1 Comment
dekaysion
Public Comments
-
dekaysion
6 months ago
- Some HTML is allowed.
- Cancel
- Submit
Add a Comment