Mapping With Labels

Regular Visitor
3438 Views
Highlighted
Regular Visitor
Posts: 28
Registered: ‎12-17-2015

Mapping With Labels

[ Edited ]

Maps.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Description

This visual uses ggplot2 mapping functionality to display state level data.  Each state is colored based on the current year sales numbers.  Grey being lower sales, with darker shades of blue representing higher sales.  Each state has a label applied.  The label relays it's anem and sales in percent change compared to the prior year.  The color of the label denotes if sales increased or decreased (red = decrease, green = increase) vs prior year.

  

Learn It

If you liked this R script you can visit PowerBI.Tips and follow along with this tutorial on Mapping with data labels in R.

 

Prerequisites (The sample .pbix files won't work without installing the following)

1. Install R Engine

Power BI does not include the R engine.  Therefore, a seperate installation is required to install R on your local computer.  You can download R from the Revolution Open download page, and through the CRAN Repository.

 

2. Install the R packages

Once R engine has been installed you can dowload the package from the Revolution Open Package Downloads Page

 

Required R Packages

ggplot2

maps

 

Tested on

MRO 3.3.1, CRAN 3.3.1

 

Attachment