skip to main content
Power BI
    • What is Power BI
    • Why Power BI
    • Customer stories
    • Data visuals
    • Security
    • Power BI Desktop
    • Power BI Pro
    • Power BI Premium
    • Power BI Mobile
    • Power BI Embedded
    • Power BI Report Server
  • Pricing
    • Azure + Power BI
    • Office 365 + Power BI
      • Energy
      • Healthcare
      • Manufacturing
      • Media
      • Retail
    • For analysts
    • For IT
      • Overview
      • Embedded analytics
      • Power BI visuals
      • Automation
      • Documentation
      • Community
    • Overview
    • Find consulting services
    • Partner showcase
    • Find a partner
    • Become a partner
    • Instructor-led training
    • Getting started
      • Overview
      • Online workshops
      • Self-guided learning
      • Webinars
      • Documentation
      • Roadmap
      • Overview
      • Issues
      • Give feedback
    • Blog
    • Business intelligence topics
    • Overview
    • Forums
    • Galleries
    • Submit ideas
    • Events
    • User groups
    • Community blog
    • Register
    • ·
    • Sign in
    • ·
    • Help
    Go To
    • Galleries
    • Community Connections & How-To Videos
    • COVID-19 Data Stories Gallery
    • Themes Gallery
    • Data Stories Gallery
    • R Script Showcase
    • Webinars and Video Gallery
    • Quick Measures Gallery
    • 2021 MSBizAppsSummit Gallery
    • 2020 MSBizAppsSummit Gallery
    • 2019 MSBizAppsSummit Gallery
    cancel
    Turn on suggestions
    Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
    Showing results for 
    Search instead for 
    Did you mean: 
    • Microsoft Power BI Community
    • Galleries
    • R Script Showcase
    • Map with connecting lines

    Map with connecting lines

    10-20-2016 01:26 AM

    ankitpatira
    Community Champion
    46533 Views
    LinkedIn LinkedIn Facebook Facebook Twitter Twitter
    ankitpatira
    ankitpatira Community Champion
    Community Champion
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Email to a Friend
    • Report Inappropriate Content

    Map with connecting lines

    ‎10-20-2016 01:26 AM

    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

    Preview file
    239 KB
    R.pbix
    Labels:
    • Labels:
    • General R Visualizations
    • Get Data with R
    Message 1 of 8
    46,533 Views
    9
    Reply
    • All forum topics
    • Previous Topic
    • Next Topic
    gurukpm
    gurukpm
    Frequent Visitor
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Email to a Friend
    • Report Inappropriate Content

    ‎01-24-2018 08:39 PM

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

     

    Message 8 of 8
    38,161 Views
    0
    Reply
    gurukpm
    gurukpm
    Frequent Visitor
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Email to a Friend
    • Report Inappropriate Content

    ‎01-24-2018 08:23 PM

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

     

    Cities.csv, migrations.csv

    Message 7 of 8
    38,161 Views
    0
    Reply
    paul_turley
    paul_turley
    MVP
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Email to a Friend
    • Report Inappropriate Content

    ‎05-21-2017 12:00 AM

    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")

    Message 4 of 8
    43,710 Views
    0
    Reply
    JoseMiguelPR
    JoseMiguelPR
    Regular Visitor
    In response to paul_turley
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Email to a Friend
    • Report Inappropriate Content

    ‎05-31-2017 01:46 AM

    Hi Ankitpatira,

     

    thanks for the visual. Really great one.

     

     

    Hi Paul,

    Can we install these packages before even having R installed? and sorry for the question but... how do we install packages?

     

     

    thanks for your help

    /Jose Miguel

    Message 5 of 8
    43,548 Views
    0
    Reply
    boefraty
    Microsoft boefraty
    Microsoft
    In response to JoseMiguelPR
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Email to a Friend
    • Report Inappropriate Content

    ‎07-17-2017 07:25 AM

    Hi @JoseMiguelPR, 

    You need R engine installed to run R in Power BI. You can use any R IDE (like RStudio) to install packages 

    See more here: 
    https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-r-scripts/

     

    Message 6 of 8
    42,966 Views
    0
    Reply
    boefraty
    Microsoft boefraty
    Microsoft
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Email to a Friend
    • Report Inappropriate Content

    ‎11-22-2016 02:53 AM

    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. 

    Message 3 of 8
    46,005 Views
    3
    Reply
    Sharon
    Microsoft Sharon
    Microsoft
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Email to a Friend
    • Report Inappropriate Content

    ‎10-21-2016 02:19 PM

    this is so cool Ankit!

    Message 2 of 8
    46,458 Views
    1
    Reply

    Power Platform

    • Overview
    • Power BI
    • Power Apps
    • Power Automate
    • Power Virtual Agents

    • Sign in
    • Sign up

    Browse

    • Solutions
    • Partners
    • Consulting Services

    Downloads

    • Power BI Desktop
    • Power BI Mobile
    • Power BI Report Server
    • See all downloads

    Learn

    • Guided learning
    • Documentation
    • Support
    • Community
    • Give feedback
    • Webinars
    • Developers
    • Blog
    • Newsletter

    © 2022 Microsoft

    Follow Power BI

    • Privacy & cookies
    • Manage cookies
    • Terms of use
    • Trademarks