ankitpatira's avatar
ankitpatira
Community Champion
9 years ago

Map with connecting lines

Description

This visual uses Maps package and Geosphere package to draw a map of Australia and dots on that map finally connecting them with lines. Using sample migration statistics data from different cities within Australia to the city of Melbourne, R visual shows the trend of migration by color coding the lines and shading higher count cities on top of the lower ones.

 

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.  

  

Required R Packages

Maps

Geosphere

 

Tested on

MRO 3.3.1, CRAN 3.3.1

7 Replies

  • boefraty's avatar
    boefraty
    Microsoft Employee

    Hi Ankit,

     

    This visual is very impressive. If you consider to convert this or some of your other R-visuals to R-powered-custom visuals, out team will be happy to assist you. 

     

    The visibility of R-powered custom visuals is greater and it is not limited for R-users. 

  • To get this R visual script to work, users will need to add the following commands before the two libray function calls:

    install.packages("maps")
    install.packages("geosphere")

  • gurukpm's avatar
    gurukpm
    Frequent Visitor

    Could you please include the files used in R Get Data Script.

     

    Cities.csv, migrations.csv

  • gurukpm's avatar
    gurukpm
    Frequent Visitor

    Could you also add the Get Data R Script support files (Cities.csv, migrations.csv).