Author: alice drummond

  • 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