Tag: Maps

  • Create Custom Mapbox Styles

    Create Custom Mapbox Styles

    If you’ve played around with MapBox in Power BI – you’ll know that it has loads of great features to create really rich and beautiful maps, including some great ‘out of the box’ map styles (i.e. base maps).   However, you might not be aware that it also gives you the ability to design custom Mapbox styles with your own spatial layers. I discovered this feature on a recent project where my client wanted to include Victoria’s Catchment Management Authority (or CMA) boundaries on their base-map to provide greater context to help interpret their data. Up until this point, the only option I knew of was to purchase an expensive ArcGIS Online licence to create custom map styles. So, you can imagine just how excited I was when I discovered that I could also do this in MapBox – for FREE!!!

    Reasons to Design Your Own Style

    There are plenty of reasons to design your own map styles, including:  

    1. Provide Context: I touched on this above, but the ability to add your own layers to the backgrounds on your maps goes a long way to providing additional context to help your report users understand and interpret their data.  
    2. Simplify: Sometimes you need to peel back the complexity to help your data stand out. Customizing base maps allows you to remove unnecessary elements which may distract your users from the data, and dynamically add back complexity at different zoom intervals (watch Step 4 of the Video to see how this works!) 
    3. Consistency, Branding, and Themes:  Customizing the style allows you to design your maps with a similar ‘look and feel’ to other visuals in your report, as well as corporate branding and color themes. For the passionate Power BI designers out there – you’ll LOVE this feature (we’re always on the hunt for new formatting options in Power BI!) 

    I’m not going to lie, there are a couple of steps involved in designing your own custom styles for MapBox in Power BI, but believe me – it’s totally worth it! I walk through the key steps in this short video, which include:

    1. Create a MapBox map in Power BI (check out the video on MapBox 101 if you’re new to MapBox, or need a refresher).  
    2. Upload your custom tilesets into MapBox Studio
    3. Duplicate an existing MapBox style from gallery
    4. Customise your own map style
    5. Add your custom style into your MapBox visual in Power BI!

    First, you can leverage the base choropleth map you created in the Mapbox 101 tutorial to get a starting point. The following steps describe how to enhance the style of the map to make it pop even more!

    In this tutorial we want to add a boundry onto the base map. This will help us outline the specific areas around the rivers that we added as a layer in our Drill Down tutorial. A shape file was created and the zip loaded into Mapbox as a new tileset.

    The next step is to duplicate an existing map style.
    1) Select New style
    2) Choose a template
    3) Click Customize Basic

    Rename your Mapbox style (upper left side of page)

    Create your own custom layers and features to the map. Here are the changes made to this example.

    Click Add new layer

    Search for tileset. (Our example uses the new boundry layer we created.)
    1) Search for the tileset (ex. “CMA”)
    2) Select tileset
    This will add the tileset to the base style we selected.
    3) Click Type
    4) Select Line to change the setting

    1. Select Style
    2. Choose Color
    3. Adjust width by clicking on the Width field
    4. Style the color based on a zoom range. Select Style across zoom range to adjust the slider.
    1. Add new Zoom Range by Clicking on the Zoom Range bar
    2. Select second zoom range field (Zoom 22)
    3. Adjust zoom range to different value (10)
    4. Change the color (Blue)
    5. Scroll down and Click Done

    Great! Now as you zoom in and out of the map you can see the boundaries change color from pink to a blue. You can imagine how powerful this visual change can be in directing the attention in different map visuals.

    The final step is to take our new style and apply it to the Mapbox visual!

    1. Select the ellipses of our style
    2. Copy the Style URL
    3. Jump back into the Power BI Desktop. Under Viz Setting and the Map Style Property, Select Custom.
    4. Paste the copied URL from step 2 into the Style URL

    Final Custom Mapbox Style

    The case study I present is a Power BI report with three maps to help design our future cities to account for population growth, while also considering our environmental and social values (created using ‘synthetic’ datasets for demonstration purposes only). I modify the default ‘Outdoor’ MapBox style to include my own custom tileset, and show how to create dynamic color gradients based on different zoom intervals.

    If you’re keen to learn how to create really cool customized maps for your Power BI reports, then make sure to check out the other blogs in this 4-part MapBox series, where we provide an introductory MapBox 101, explore how to create 3D maps, and how to design drill down maps!

    And if you want to learn how you can create really beautiful and engaging Power BI reports, get in touch with one of the DiscoverEI team to register for our brand-new online training courses:

    • Power BI Designer Masterclass
    • Power BI for the Environmental Industry
    • Power BI for the Water Industry

    Take a look here for more details (https://www.discoverei.com/training)

    If you like the content from PowerBI.Tips please follow us on all the social outlets. Stay up to date on all the latest features and free tutorials.  Subscribe to our YouTube Channel.  Or follow us on the social channels, Twitter and LinkedIn where we will post all the announcements for new tutorials and content.

    Introducing our PowerBI.tips SWAG store. Check out all the fun PowerBI.tips clothing and products:

    Check out the new Merch!

    Hasta La Vista Data
    Go Ahead Make My Data
    PBIX Hat


  • Drill Down Maps in Power BI with MapBox

    Drill Down Maps in Power BI with MapBox

    If you’ve played around with MapBox in Power BI – you’ll know that it has loads of great features to create really rich and beautiful maps! One feature I love is the ability to ‘drill down’ to dynamically uncover different layers of your spatial data hierarchy, just in the same way that you can drill down on a standard column chart or matrix in Power BI.

    Why Drill Down on a Map?

    1. See the big picture: Using drill down, we can visualize the data set at the ‘big picture’ scale, and then explore finer details for areas of interest (just think of the classic spatial hierarchy of Country -> State -> City -> Suburb)
    2. Save on real estate: We can also display multiple datasets at different levels in the same map – which goes a long way to conserving your precious report page real estate by reducing the number of visuals in your report!  
    3. Performance: Following on from above, less visuals almost always equates to better report performance! And this is especially true when using MapBox, which is at the slower end of the Power BI performance scale at the best of times – so using drill down to reduce the number of maps combined with filtering your datasets goes a long way to speeding up your reports!

    Create a Drill Down Map in MapBox

    Setting up a drill down map in MapBox is pretty simple once you get the hang of configuring Choropleth maps, and in this video blog I walk through the key steps:

    1. Create a MapBox ‘Choropleth’ map (check out the video on MapBox 101 if you’re new to MapBox, or need a refresher on creating Choropleth maps).
    2. Add hierarchy layers to the  ‘location’ MapBox field well
    3. Enter the vector layer properties from the MapBox Studio for the additional map levels

    In my example, I create a drill down map of priority Catchments and Rivers across Victoria using ‘synthetic’ data, which I created to visualize the nutrient concentration over time (for demonstration purposes only!).

    Instructions

    ps://powerbi.tips/2020/04/mapbox-101-for-power-bi/

    Locate the RIVERNAME field and Drag & Drop it into the second position in the Location field well under BASIN_NO.

    Now navigate to the Format area and select the Choropleth section again. Increase the Number of levels to 2, and Select the Custom Tileset in the Data Level 2 section.

    After you set the above you need to jump out of the Power BI Desktop and head over to the mapbox studio. Here you would take the second layer of the map that you created by choosing another tileset. (For details on how to do that watch the Mapbox 101 tutorial.)

    1. Copy the Tileset ID from Mapbox and insert that value into the PBI Desktop Vector Tile Url Level 2 property still under the Choropleth section.
    2. Copy the layer name from Mapbox and Paste into the Source Layer Name Level 2 property.
    3. Copy the field you want from the attribute list in Mapbox and Paste into the Vector Property Level 2.

    Mapbox Drill Down Results

    We now have the ability to select our map area and drill down into the second layer. In our example, the rivers are now shown under each catchment.

    If you’re keen to learn how to create really cool customized maps for your Power BI reports, then make sure to check out the other blogs in this 4-part MapBox series, where we provide an introductory MapBox 101, explore how to create 3D maps, and how to design your own styles!

    And if you want to learn how you can create really beautiful and engaging Power BI reports, get in touch with one of the DiscoverEI team to register for our brand-new online training courses:

    • Power BI Designer Masterclass
    • Power BI for the Environmental Industry
    • Power BI for the Water Industry

    Take a look here for more details (https://www.discoverei.com/training)

    If you like the content from PowerBI.Tips please follow us on all the social outlets. Stay up to date on all the latest features and free tutorials.  Subscribe to our YouTube Channel.  Or follow us on the social channels, Twitter and LinkedIn where we will post all the announcements for new tutorials and content.

    Introducing our PowerBI.tips SWAG store. Check out all the fun PowerBI.tips clothing and products:

    Check out the new Merch!

    Hasta La Vista Data
    Go Ahead Make My Data
    PBIX Hat


  • Create 3D Maps in Power BI with MapBox

    Create 3D Maps in Power BI with MapBox

    If you’ve played around with MapBox in Power BI – you’ll know that it has loads of great features to create really rich and beautiful maps! And one of my favorite ways to get a new client excited about Power BI is to create an awesome 3D map of their city. Now, I know that 3D features get a bit of a bad wrap in traditional data viz circles (don’t even think about creating a 3D pie chart!!!), so why then are 3D maps different?

    Why use 3D maps?

    1. Greater context: We see our world in 3D, so when we transform a flat 2D map of our cities or mountains into a 3D map, it immediately creates greater connection and a sense of perspective.
    2. Another dimension: 3D maps don’t just have to be based on ‘relative’ heights, you can use the 3D effect to add a new dimension to your visualisation, such as population per town, to communicate key insights at a glance.  
    3. They just look really fancy: Sometimes half our battle as data analysts revolves around getting people within our (or our clients) organisations engaged and connected to their data. Creating 3D maps can go a long way to get that ‘wow’ factor which gets people excited and interested in the data!  

    Get started with MapBox

    There are a couple of tricks to getting the 3D features working in MapBox, so in this video blog I walk through the key steps to help you create your own 3D maps using MapBox:

    1. Create a MapBox ‘Choropleth’ map (check out the video on MapBox 101 if you’re new to MapBox, or need a refresher on creating Choropleth maps).
    2. Add height in the MapBox field pane
    3. Adjust Extrusion Height, Pitch and Properties

    In my example, I create a 3D map of buildings across Melbourne as part of a ‘Green Roof’ assessment tool to help optimize the benefits of blue-green infrastructure across Melbourne. Note that I have anonymized this  data and the calculations so that I can share it with the Power BI community (for demonstration purposes only!).

    Instructions

    ps://powerbi.tips/2020/04/mapbox-101-for-power-bi/

    Create a data set that includes the height of the objects, in this case the height of buildings.

    Drag the Height column from your data set into the Size field well.

    Click on the Format section of the visual and select the Choropleth toggle.

    Scroll till you find the Extrusion Height. You will likely need to Adjust the value to a lower value. In our case, we take it from 500 to 5. The Extrusion Height is a multiplier of the Height value from our data set.

    Now, we can look one option below and we see Extrusion Pitch. We are going to Adjust this from 0 to 30. This will provide an angled view of the map which provides a clearer picture of the dimensions.

    Adjust MapBox Properties

    Under the Viz Settings we want to Select the Map Style and change it to Satellite

    Add Color to the different suburbs. Select the Data Colors header and Click to open up the options. Now you can Set the colors of the different areas to visually separate them.

    If you’re keen to learn how to create really cool customized maps for your Power BI reports, then make sure to check out the other blogs in this 4-part MapBox series, where we provide an introductory MapBox 101, explore how to create multi-layer drill down maps, and how to design your own styles!

    And if you want to learn how you can create really beautiful and engaging Power BI reports, get in touch with one of the DiscoverEI team to register for our brand-new online training courses:

    • Power BI Designer Masterclass
    • Power BI for the Environmental Industry
    • Power BI for the Water Industry

    Take a look here for more details (https://www.discoverei.com/training)

    If you like the content from PowerBI.Tips please follow us on all the social outlets. Stay up to date on all the latest features and free tutorials.  Subscribe to our YouTube Channel.  Or follow us on the social channels, Twitter and LinkedIn where we will post all the announcements for new tutorials and content.

    Introducing our PowerBI.tips SWAG store. Check out all the fun PowerBI.tips clothing and products:

    Check out the new Merch!

    Hasta La Vista Data
    Go Ahead Make My Data
    PBIX Hat


  • MapBox 101 for Power BI

    MapBox 101 for Power BI

    Maps are a fantastic way to communicate spatial data – and lucky for us Power BI has loads of awesome mapping visuals to choose from. However, the MapBox Custom Visual is definitely my favorite!

    This Tutorial will walk you through the basics of getting started with MapBox.

    Why do I love MapBox?

    1. It’s versatile: You can create pretty much any type of map you’d like, whether it be Circle, Heatmaps, Clusters, Chloropleths, Rasters…there’s plenty of options to chose from all in the one visual.
    2. Ability to customise: Using the MapBox Studio, you can design and host your own spatial datasets, create custom base maps, and visualise them in Power BI.
    3. But best of all… It’s free: Unlike the ArcGIS custom visual, where to unlock most of the cool features you need a paid ArcGIS online licence, you have access to all of MapBox’s amazing features with their free account.

    MapBox is Feature Rich

    With so many features available in MapBox, I know that I was pretty overwhelmed when I was first getting started. So, in this video blog I walk through the key steps to help you get started on your MapBox journey, including how to:

    1. Add the MapBox custom visual into Power BI
    2. Create a MapBox account and access token
    3. Create a simple circle map
    4. Upload custom ‘tilesets’ to the MapBox Studio
    5. Create a custom ‘Chloropleth’ map (just a fancy name for an area map…)

    In my example, I create both a circle and chloropleth map using ‘synthetic data’ which I created to visualise community satisfaction scores for priority waterways across Melbourne (my hometown!).

    Instructions

    Click on the ellipsis in the Visualizations window and Select the option Import from AppSource in the drop down menu.

    Enter in the search window the words mapbox. Click on the Search Glass icon. Then Click on the Add button next to the Mapbox Visual.

    Visit the website mapbox.com and Sign In. If you don’t already have an account you will need to create one. An account can be created here.

    Once you login you can see the public access token on the main login screen. To copy the token to your clip board, Click on the Clipboard in the Default public token window toward the bottom of the screen.

    Take the copied token and place it in the mapbox visual inside the Properties pane, under the Viz Settings for the field labeled Access Token.

    Now, add fields from your data model into the map visual to create a map.

    Return to your account within mapbox.com. Click on your account icon, then Click on the Studio option in the drop down menu.

    Click on the option on the main header bar labeled Tilesets.

    Click on the button labeled New Tileset.

    Next, upload your shape file into mapbox by clicking Select a file.

    You will need three pieces of data to add the Chloropleth map.

    • You need the Vector Tile Url Level 1 or the Tileset ID from mapbox.com. Obtain this by clicking on one of the tilesets in mapbox.com and copying the Tileset ID by clicking on the clipboard icon in the Tileset ID window. Paste this value into the field labeled Vector Tile Url Level 1. Note: The final URL needs to contain the mapbox:// beginning URL. Thus, your final URL should look similar to the following mapbox://mapbox.mapbox-terrain-v2
    • You will need the layer you will be visualizing. This is found under the Tileset Layer Details. Copy the name of the Layer you will use in your mapbox visual. Paste this property into the Source Layer Name Level 1 input box.
    • Finally, add the data layer of the Tileset into the Vector Property Level 1. This must be a column of data that resides inside your Power BI data model. In the video example our column name was POSTCODE. This column was also added to the Location field settings of the mapbox visual.

    With these settings in place we can now see a Cloropleth map of our data. Continue styling the visual to suit your needs.

    If you’re keen to learn how to create really cool customized maps for your Power BI reports, then make sure to check out the other video blogs in this 4-part MapBox series. Additional videos will cover how to create 3-D maps, multi-layer drill downs, and design your own styles!

    And if you want to learn how you can create really beautiful and engaging Power BI reports, get in touch with one of the DiscoverEI team to register for our brand-new online training courses:

    Take a look here for more details (https://www.discoverei.com/training)

    If you like the content from PowerBI.Tips please follow us on all the social outlets. Stay up to date on all the latest features and free tutorials.  Subscribe to our YouTube Channel.  Or follow us on the social channels, Twitter and LinkedIn where we will post all the announcements for new tutorials and content.

    Introducing our PowerBI.tips SWAG store. Check out all the fun PowerBI.tips clothing and products:

    Check out the new Merch!

    Hasta La Vista Data
    Go Ahead Make My Data
    PBIX Hat


  • Improved Matrix Headers

    Improved Matrix Headers

    Power BI has been an continually evolving tool over the last year.  The Matrix visual is powerful and mimics much of the functionality of a Pivot Table within Excel.  I will admit, the Matrix visual has some features that are left to be desired.  One such feature, the ability to word wrap row headers, has been resolved in the February 2017 update of PowerBI.  See the official release notes for details.  In my company we have traditionally been an excel driven business.  All you other heavy analytics people you know what I’m talking about.  Emails upon emails about an excel analysis, then power point presentations of those excel documents.  Inevitably a pivot table or table will end up on a power point slide.  Icky, if you ask me, especially when you have to “refresh” the data… I digress, Power BI fills a great gap in this area where the Analytics leaders within your company can make reports that easily refresh, and look dang sexy.

    The Matrix is one of those visuals that I would say is a comfortable way for non-analytical people to review data.  The Pivot Table aka Matrix in Power BI, is how people have been used to looking at data for years.  This has been quite a sticking point for many business leaders when reviewing Power BI dashboards.  I’ll present some data using a map or bar chart and I’ll usually get the, “Where’s the table of data?”  This will prompt an additional tab inside the Power BI document with a large data table.  Presenting headers in that large table or matrix has always been a challenge because the headers don’t word wrap.  Seeing Microsoft listening to people’s feedback and implementing header word wrap and other features is refreshing.

    For this tutorial we will be working with a dataset that I found from the FBI titled Crime in the United States.  I chose this data set based on the flurry of media talking about the current President’s comments about crime.  Before we move on, let me assure you this will not have any politics in this tutorial.  Therefore, it will be safe to read on.

    Open up PowerBI Desktop, Click the Get Data button on the Home ribbon and select Blank Query.  Click Connect to open the Query Editor.  On the View ribbon click the Advanced Editor button.  While in the Advanced Editor paste the following code into the editor window, click Done to complete the data load.

    Note: If you need some more help loading the data follow this tutorial about loading data using the Advanced Query Editor.  This tutorial teaches you how to copy and paste M code into the Advanced Editor.

    let
        Source = Excel.Workbook(Web.Contents("https://powerbitips03.blob.core.windows.net/blobpowerbitips03/wp-content/uploads/2017/02/US-Crime-Data.xlsx"), null, true),
        #"US Crime Data_Sheet" = Source{[Item="US Crime Data",Kind="Sheet"]}[Data],
        #"Promoted Headers" = Table.PromoteHeaders(#"US Crime Data_Sheet", [PromoteAllScalars=true]),
        #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"State", type text}, {"Area", type text}, {"Violent Crime", Int64.Type}, {"Murder and Non-negligent Manslaughter", Int64.Type}, {"Robbery", Int64.Type}, {"Aggravated Assault", Int64.Type}, {"Property Crime", Int64.Type}, {"Burglary", Int64.Type}, {"Larceny Theft", Int64.Type}, {"Motor Vehicle Theft", Int64.Type}}),
        #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"State", "Area"}, "Attribute", "Value")
    in
       #"Unpivoted Other Columns"

    Before you exit the query editor Rename the query to US Crime. It should look similar to the following:

    US Crimes Data Load
    US Crimes Data Load

    On the Home ribbon click Close & Apply to load the data into the data model.

    Lets add a little color to the Page in the form of a map.  Inside the Visualizations pane click on the Shape Map visual.  Add the appropriate fields as shown in the image below.

    Shape Map Visual
    Shape Map Visual

    We added this map as to make our page look pretty as well as, we can now click on each state and use this as a filtering mechanism.

    Next, add the Matrix visualization which is found on the Visualizations pane.  Add the fields shown in the image below.

    Add Matrix Visualization

    To illustrate the wrapped row headers as described in the Power BI blog simply hover your mouse over the header until a double arrow appears.  Then left click on the mouse to select the edge of the Area column.

    Cursor Hovering Over Area Column
    Cursor Hovering Over Area Column

    Drag the edge of the Area column left until it covers some of the text of the row labels, see below for example.

    Shortened Area Column
    Shortened Area Column

    Next, in the Visualizations pane click on the Paint Roller and expand the section labeled Row headers.  In the Row headers section toggle the Word wrap switch to On.

    Word Wrap On
    Word Wrap On

    After turning the Word wrap on you’ll notice that row headers did not word wrap.  This is because the row headers have a caveat.  The word wrap in rows will only work if row grouping is long enough to accommodate the word wrap.  To illustrate this, add the State field underneath the Area field in the Rows section in the Visualizations pane.

    Add State to Rows
    Add State to Rows

    We can now see by adding the States after the Area field that the Area Cities Outside Metropolitan Areas now has enough room to word wrap.  An important observation with the row headers word wrap is that the word wrap will be affected by other filtering selections on the visual page.  For example if I only select the state of Texas the row header for Area does not have enough room and therefore it is shortened and the “…” appears.

    Texas Selected
    Texas Selected

    When I was first exploring the Matrix row Headers Wrap I was quite confused on how I was able to actually make the headers wrap.  After playing around with the feature a while I was able to figure out the functionality.  Thanks for following along, see that wasn’t so political.  Now you can take this wonderful knowledge back to your workplace and make promises you can keep (OK, there it was, insert political jab).

    If you liked this tutorial please be sure to share.  Also if you want to know more about me you can visit my About page and follow me on twitter or Linkedin for updates.

  • Using Advanced Mapping in ArcGIS Preview

    Using Advanced Mapping in ArcGIS Preview

    In the September 2016 release of PowerBI, Microsoft introduced a new visual called the ArcGIS Maps preview.  For more information on the maps integration you can read the following post from Microsoft.  This tutorial will review how to load data using Latitude and Longitude data and map those points on the ArcGIS map.

    First, we need to open PowerBI Desktop and then we will load some data.  The version of PowerBI Desktop for this tutorial is 2.39.4526.362 64-bit (September, 2016).  You can download the latest version of the software here.

    On the Home ribbon click on the Get Data button and from the Get Data window select Blank Query.  Click Connect to proceed.

    Now you will be in the Query Editor, click on the View ribbon and select the Advanced Editor button.  The Advanced Editor will now open.

    Enter the following code into the Advanced Editor: (you can copy and paste the code directly from this site)  Click Done to load the data.

    let
     Source = Excel.Workbook(Web.Contents("https://powerbitips03.blob.core.windows.net/blobpowerbitips03/wp-content/uploads/2016/09/Locations.xlsx"), null, true),
     Locations_Table = Source{[Item="Locations",Kind="Table"]}[Data],
     #"Changed Type" = Table.TransformColumnTypes(Locations_Table,{{"Event", type text}, {"Attenders", Int64.Type}, {"Zip", Int64.Type}, {"Latitude", type number}, {"Longitude", type number}})
    in
     #"Changed Type"

    Note: this will load an excel file that is hosted on PowerBI.Tips, so make sure you have an internet connection.

    Load Map Data
    Load Query

    Re-name your query to Map Data and then on the Home ribbon click Close & Apply.

    Load Map Data In PBI
    Load Map Data In PBI

    Before working on this tutorial, you will want to make sure you have enabled the ArcGIS map which is in preview.

    Click the Menu button to open up the menu options.

    PBI Menu Button
    PBI Menu Button

    This will expose the menu.  With the menu open click on Options and Settings and then click on Options.

    Selecting Options
    Selecting Options

    Once the Options menu is open, click on Preview Features and then make sure the ArcGIS Maps for PowerBI preview feature is check.  Then click OK to close the options menu.

    Options Menu
    Options Menu

    You should now see a new bright blue icon listed in the Visualizations window.

    ArcGIS Maps Icon
    ArcGIS Maps Icon

    Click on the ArcGIS visualization and then add the following following columns of data from the Fields window into the visual.

    Fields for ArcGIS Map
    Fields for ArcGIS Map

    OK, Wow, seems like a normal map.  So, why all the hype?  Well, unlike other mapping visualizations, this map enhances the selection methods for points on a map.

    By clicking on the square with the black mouse arrow (highlighted with a green box here because the selection tool for the visual uses a red box)  You can then click drag a red box across the map to select multiple geographical points on the map.

    Highlighting Points on Map
    Highlighting Points on Map

    Selecting points on the map will filter other visuals on the page.

    Add a Table visual with the following fields:

    Table Visual Fields
    Table Visual Fields

    Now click the Multi-Select button and highlight some points on the map.

    Multi-Select Button
    Multi-Select Button

    Notice how only the selected points are highlighted on the map and the table filters to only those points.

    To enhance the map further click the In-Focus Edit Mode button.

    In-Focus Edit Mode
    In-Focus Edit Mode

    Now, the map editor opens.  This allows you to change the basemap view, the theme of the map, symbols on the map and adds other data to enhance the coloring of the map.

    Click on the Basemap button and then select the Dark Gray Canvas.  We have turned the map in to a sort of night mode.

    Basemap Change
    Basemap Change

    Have fun here and explore a couple of the other map types.

    Next Click on the Map Theme then click on the Heat Map.  Alright, this is getting pretty cool.

    Heat Map Selection
    Heat Map Selection

    In the next section Symbol Style you can change the properties of the points on the map.  For the heat map you can change the Transparency and the Area of Influence of the points.  Each map theme, Location, Heat Map, Size, and Clustering have different Symbol Style properties.  So you might want to select a couple different Map Themes and try adjusting the Symbol Styles to see how they change.

    Now finally, the best part of the ArcGIS mapping, the Reference Layer.  This will blow your mind!

    Click the Reference layer button then select a layer to add from the Demographics tab.  For this example, I chose the USA Average Household Income.

    Household Income Layer
    Household Income Layer

    To return to the Report click the Back to Report button in the upper left hand corner of the page view.

    Back to Report
    Back to Report

    The layer feature is by far the most helpful part of this tool.  Imagine the time required to collect all that regional demographics data, model it and then to apply it to the mapping visual.  The ArcGIS mapping tool is quite impressive.

    One other note before we leave.  Now that you are back on the report level view.  Use your mouse scrolling wheel and zoom in and out on the map visual.  Notice the closer you zoom into the data points the more detailed the regional views become. See comparison below:

    Zoomed Views
    Zoomed Views

    Thanks for following along.  Remember to share if you liked this tutorial.  See you next week.

  • Map it, Map it Real Good

    Map it, Map it Real Good

    This tutorial is a real simple mapping exercise.  I was talking with a colleague today about Power BI and I was challenged to map something using latitude and longitude.  I had played with mapping before but not using latitude or longitude.

    I’d have to say if you want to impress someone with your PowerBI skills adding a map is a good way to do so.  Typically this a functionality that you can’t add into excel, well at least not with out some serious effort.

    Alright, here we go..

    Resources for this project are:

    • Power BI Desktop (I’m using the March 2016 version, 2.33.4337.281) download the latest version from Microsoft Here.
    • Excel file with a table in it with our location information that can be downloaded here: Locations Data Set

    After downloading the Locations Data Set, Open up PowerBI and load the Excel file into Power BI.  If you need to learn how to load Excel files you can follow the loading excel tutorial.

    Click the Get Data on the Home ribbon.  Select the first option Excel and click Connect at the bottom of the Get Data window.

    Navigate to the downloaded file called Locations.xlsx and open the file by clicking Open in the bottom right hand corner.

    Next, the navigator window will open.  Select the table (denoted with the grid with a blue top header) called Locations.  Then Click Load to load the data into the data model.

    Navigator Window
    Navigator Window Selection

    Note: there are two different icons in the Navigator window. One is called Locations which is a Table within the Excel document.  While the other is called Sheet1, which is simply the first sheet in the excel workbook.  For Future references it is much easier to make tables in excel and use them to load data in to PowerBI than using just a worksheet.  So whenever possible try to form your data in Excel into Tables.  When loading a table the headers of the table automatically load into the column names in the PowerBI data models.

    We now have loaded the data into a new Table in PowerBI called Locations.

    To make the map check the boxes for Latitude and Longitude.  Power BI intelligently understands that latitude and Longitude are mapping functions and we are now presented with a map with tiny blue dots.

    Map from our Data
    Map from our Data

    Lets add some more data to enhance the map.  We can change the size of the circles at each location by dragging the column called Attenders over to the Values field for this visual.

    Change Bubble Size
    Change Bubble Size

    We have now changed the size of the circles relative to each other to show the number of people that we saw at each location.  To add color to the map drag the column called Event to the Legend option of the visual.  This yields a map that now has each circle with a different color according to the event name.

    Colored Bubble Map
    Colored Bubbles on a Map

    To enhance our visual further we will add a bar chart with the total count of attenders per event.  To do this click any where on the visual page (this will de-select the map visual on the page).  Now click the Event column and then the Attenders column.  This will present you with a table list of events and the corresponding attendees.  Leaving the table visual highlighted click the Stacked Bar Chart which is in the upper left hand corner of the Visualizations window.

    Adding a Bar Chart
    Adding a Bar Chart

    I circled the triple dots on the bar chart.  Click the triple dots and a menu will appear. First click Sort By, then click Attenders.  This will sort the attenders in descending order from the largest amount at Kohl’s Corp. down to Harley Davidson.  Drag the column labeled Event to the visualization option called Legend.  This colors the bar chart.

    Colored Bar Chart
    Colored Bar Chart

    Note: The colors in the bar chart match the colors in the map we made earlier.  This build uniformity in your reports and when your filtering items colors across visuals make sense.

    Take some time to click on each of the bars on the bar chart.  Notice how the map re-draws with only the data for that selected item.  To select multiple bars on the bar chart hold the CTRL button and click on the multiple bars.

    Nice job.  We have finished the mapping tutorial.  Share if you liked it below.