How to Create a Skyscraper Map in Power BI using Azure Maps: a Guide to Bar Chart Mapping

Skyscraper Map in Power BI, aka. bar chart map, or bar chart on a map
Skyscraper Map in Power BI, aka. bar chart map, or bar chart on a map

Have You Ever Seen a Bar Chart on a Map?

Welcome to the fascinating world of data visualization, where even maps can take the form of bar charts! I prefer to call this visualization a Skyscraper Map because you can picture these bars on a map as skyscrapers. Also known as a Bar Chart Map, this type of visualization brings your geodata to life, giving it the appearance of skyscrapers dotting a cityscape.

Why Use a Skyscraper Map?

You can use a skyscraper map to display geodata along with its corresponding values. This innovative visualization combines a map indicating various locations (be it a city, a country, or any geographical place) with a bar chart. Like a traditional bar chart, the height or volume of each bar in a skyscraper map is proportionate to the values it signifies.

Crafting a Skyscraper Map with Azure Maps in Power BI

First, you need to make sure that the Azure Maps preview feature is enabled in Power BI to create a skyscraper map. Here’s a step-by-step guide using the Retail Analysis Sample dataset:

Step 1. Click on the Azure Map icon in the Visualization pane.

Step 2. Drag the lower right corner to extend the filled map visual.

Step 3. From the Fields Plane, select PostalCode.

Power BI assigned Country to the Location field.
Power BI assigned Country to the Location field.

Step 4. Now, choose TotalSales from the Fields Plane.

Power BI assigned Sales to the Bubble size field.
Power BI assigned Sales to the Bubble size field.

Step 5. Head over to the Format your Visual section.

Step 6. Toggle off the Bubble layer switch.

Step 7. Enable the Bar chart layer switch.

Power BI with enabled Bar chart layer switch.
Power BI with enabled Bar chart layer switch.

Step 8. Expand the Bar chart layer pane.

Step 9. Expand the Size pane.

Step 10. Under the Size pane, set the Height to 4 px.

Step 11. Under the Size pane, set the Width to 3 px.

Power BI showing a skyscraper map.
Power BI showing a skyscraper map.

With these steps, you’ve created a skyscraper map showing sales by zip codes in your dataset. Want to try it out? Download the PBIX file here.

Teach Yourself VISUALLY Power BI book cover

If you’re keen on diving deeper into Power BI, don’t miss my book, Teach Yourself VISUALLY Power BI (Amazon), filled with more insightful tutorials like this one. Got any feedback, ideas, or questions about creating bar chart maps in Power BI? I’d love to hear from you:

„How to Create a Skyscraper Map in Power BI using Azure Maps: a Guide to Bar Chart Mapping“ weiterlesen

Mastering Power BI: A Step-by-step Guide to Enabling Power BI’s Preview Features Including Azure Maps

Power of Power BI's Preview Features: Power BI Desktop running on Windows 11
Power of Power BI’s Preview Features: Power BI Desktop running on Windows 11

Explore the Power of Power BI’s Preview Features

Microsoft’s Power BI is known for its data visualization capabilities, but many exciting features are not enabled by default. These under-the-radar features are known as Power BI Preview Features, and they often have the potential to significantly enhance your data analysis efforts. Some of these exciting features include Azure Maps, which is essential for creating impactful Skyscraper Maps with Power BI.

Follow this Step-by-step Guide

To leverage the power of these Preview Features, you need to enable them in your Power BI interface. Here is a quick guide to help you activate Azure Maps and other Preview Features:

Step 1: Navigate to the File tab on Power BI’s menu bar. Note: There is no need to have a data connection, the opening modal can be closed.

File tab on Power BI's menu bar.
File tab on Power BI’s menu bar.

Step 2: Choose Options and Settings from the dropdown menu.

Step 3: From the subsequent options, click on Options.

Power BI's Options and Settings menu.
Power BI’s Options and Settings menu.

Step 4: In the new dialogue box, select Preview Features from the list on the left-hand side.

Power BI's Options dialogue box.
Power BI’s Options dialogue box.

Step 5: Check the box next to Azure Map Visual to enable it.

Step 6: Confirm your changes by clicking the OK button.

Power BI's Preview Features section.
Power BI’s Preview Features section.

If you change the Preview feature settings, Power BI may require you to restart the application to implement the changes. Once done, you are ready to start creating your Skyscraper Map using the Azure Maps feature!

Current Power BI Preview Features

Power BI’s Preview Features evolve over time, with new features continuously being tested and added. As of now, the current preview features you can enable in Power BI include:

  • Shape Map Visual
  • Spanish Language Support for Q&A
  • Q&A for Live Connected Analysis Services Databases
  • Azure Map Visual
  • DirectQuery for PBI Datasets and AS
  • Modern Visual Tooltips
  • Power BI Desktop Infrastructure Update
  • Web Page Connector Infrastructure
  • Modify Visuals Settings for Mobile Layout
  • Sparklines
  • Scorecard Visual
  • Field Parameters
Teach Yourself VISUALLY Power BI book cover

For more such enlightening tutorials, check out my latest book, Teach Yourself VISUALLY Power BI (Amazon)!

The world of Power BI is a treasure trove of powerful capabilities waiting to be explored. Share your experiences, creative applications, and insights as you navigate this exciting realm:

„Mastering Power BI: A Step-by-step Guide to Enabling Power BI’s Preview Features Including Azure Maps“ weiterlesen

Visual Tracert: How to use GeoTraceroute to analyze, visualize and embed internet traffic routes

Visual traceroute from Frankfurt to Ukraine shows redirection via Russia
Visual traceroute (aka. tracert) from Frankfurt to Ukraine shows redirection via Russia

Earlier today I read the news from NetBlocks (via Reuters) that since the weekend parts of the Ukrainian internet traffic are rerouted via Russia. To be precise, it’s about Ukrainian Kherson Oblast, which is occupied by Russia since March.

Now I wanted to trace the internet route myself and ideally visualize it. Here I came across the service of GeoTraceroute, which does a great job in visualizing traceroutes (aka. tracert). For the trace, I chose Frankfurt as starting point, and skynet.ua, the local internet provider in Kherson, as the endpoint.

Of course, you can also include the URL of GeoTraceroute as a web element in your Power BI report or Tableau dashboard and parameterize it for dynamic interactions. You can see the format as in my example:

https://geotraceroute.com/?node=2021&host=skynet.ua

How to Research LinkedIn Profiles in Tableau with Python and Azure Cognitive Services in Tableau

Azure Cognitive Services in Tableau: using Python to access the Web Services API provided by Microsoft Azure Cognitive Services
Azure Cognitive Services in Tableau: using Python to access the Web Services API provided by Microsoft Azure Cognitive Services

A few weeks after the fantastic Tableau Conference in New Orleans, I received an email from a data scientist who attended my TC18 social media session, and who is using Azure+Tableau. She had quite an interesting question:

How can a Tableau dashboard that displays contacts (name & company) automatically look up LinkedIn profile URLs?

Of course, researching LinkedIn profiles for a huge list of people is a very repetitive task. So let’s find a solution to improve this workflow…

Step by Step: Integrating Azure Cognitive Services in Tableau

1. Python and TabPy

We use Python to build API requests, communicate with Azure Cognitive Services and to verify the returned search results. In order to use Python within Tableau, we need to setup TabPy. If you haven’t done this yet: checkout my TabPy tutorial.

2. Microsoft Azure Cognitive Services

One of many APIs provided by Azure Cognitive Services is the Web Search API. We use this API to search for name + company + „linkedin“. The first three results are then validated by our Python script. One of the results should contain the corresponding LinkedIn profile.

3. Calculated Field in Tableau

Let’s wrap our Python script together and create a Calculated Field in Tableau:

SCRIPT_STR("
import http.client, urllib, base64, json
YOUR_API_KEY = 'xxx'
name = _arg1[0]
company = _arg2[0]
try:
headers = {'Ocp-Apim-Subscription-Key': YOUR_API_KEY }
params = urllib.urlencode({'q': name + ' ' + company + ' linkedin','count': '3'})
connection = http.client.HTTPSConnection('api.cognitive.microsoft.com')
connection.request('GET', '/bing/v7.0/search?%s' % params, '{body}', headers)
json_response = json.loads(connection.getresponse().read().decode('utf-8'))
connection.close()
for result in json_response['webPages']['value']:
if name.lower() in result['name'].lower():
if 'linkedin.com/in/' in result['displayUrl']:
return result['displayUrl']
break
except Exception as e:
return ''
return ''
", ATTR([Name]), ATTR([Company]))

4. Tableau dashboard with URL action

Adding a URL action with our new Calculated Field will do the trick. Now you can click on the LinkedIn icon and a new browser tab (or the LinkedIn app if installed) opens.

LinkedIn demo on Tableau Public

Is this useful for you? Feel free to download the Tableau workbook – don’t forget to add your API key!

Get More Insights

This tutorial is just the tip of the iceberg. If you want to dive deeper into the world of data visualization and analytics, don’t forget to order your copy of my new book, Visual Analytics with Tableau (Amazon).  This comprehensive guide offers an in-depth exploration of data visualization techniques and best practices.

I’d love to hear your thoughts. Feel free to leave a comment, share this tweet, and follow me on Twitter and LinkedIn for more tips, tricks, and tutorials on Azure Cognitive Services in Tableau and other data analytics topics.

Also, feel free to comment and share my Azure Cognitive Services in Tableau tweet:

#TC18 Sessions: Rock your Social Media Data with Tableau

My TC18 sessions in New Orleans: "Rock your Social Media Data with Tableau"
My TC18 sessions in New Orleans: „Rock your Social Media Data with Tableau“

Anyone can analyze basic social media data in a few steps. But once you’ve started diving into social analytics, how do you bring it to the next level? This session will cover strategies for scaling a social data program. You’ll learn skills such as how to directly connect to your social media data with a Web Data Connector, considerations for building scalable data sources, and tips for using metadata and calculations for more sophisticated analysis.

First session: Tues, 23 Oct,  12:30-1:30 (Location: MCCNO – L3 – 333)

Second session: Wed, 24 Oct, 10:15-11:15 (Location: MCCNO – L3 – 346)

Twitter Analysis #TC18 Dashboard featured as Tableau Public Viz of the Day
Twitter Analysis #TC18 Dashboard featured as Tableau Public Viz of the Day

Here are some key takeaways and links (i.e. additional resources) featured during my TC18 sessions to help you formulate your social media data program in order to build a stronger presence and retrieve powerful insights:

Prolog: Introducing data artist Noah

Step 1: Understand How to Succeed with Social Media

Apple has officially joined Instagram on 7th August 2017. This isn’t your average corporate account as the company doesn’t want to showcase its own products. Instead, Apple is going to share photos shot with an iPhone:

The Customer-Centric Data Strategy

Apple’s Instagram account is more an extension of the “Shot on iPhone” billboard ad campaign.

And there are plenty takeaways for every business:

  • Wrap your data around your customers, in order to create business value
  • Interact with your customer in a natural way
  • Understand your customer and customer behaviour better by analyzing social media data

Step 2: Define Your Social Objectives and KPIs

A previous record-holding tweet: In 2014, actor and talk show host Ellen DeGeneres took a selfie with a gaggle of celebrities while hosting the Oscars. That photo has 3.44 million retweets at the time of writing:

Social Objectives:

  • Define specific KPIs for social media platforms
  • KPI objectives need to be measurable
  • Metrics should be in line with the business goals

Step 3: Assemble Your KPIs

Brand Awareness and Reputation

Step 4: Connect Your Social Media with Tableau

Option 1 – Directly from the platform: Get data directly from Facebook, Twitter, YouTube, and more

Option 2 – Via web automation: Use a service like IFTTT to store data on Google Sheets

Option 3 – Via web data connector: Use Tableau’s web data connector, e.g. the Twitter Web Data Connector by Alex Ross (a.k.a. Tableau Junkie) -> http://bit.ly/tc18_twitter

Option 4 – Code your own solution: Use an API provided by the platform -> http://bit.ly/tc17_r_fetch

Option 5 – Via a third party platform: Get data from an integrated social media platform, such as Talkwalker -> http://bit.ly/tc17_talkwalker

Talkwalker - Via a Third Party Platform

Step 5: Apply some Tips to Level Up

Gather Historic Data

Step 6: Explore Social Media Listening

Social listening means that you look beyond your own content. E.g. Talkwalker offers AI for image recognition and ggregation for online/offline media: http://bit.ly/tc17_talkwalker

Step 7: Leverage Your Analytics Tool Chain

Use Your R and Python Skills

Demo/Tutorial: Let’s See this in Tableau!

How to analyse Social Media traffic with Google Analytics in Tableau (YouTube):

How to analyse Social Media data from Twitter in Tableau (YouTube):

Slide Set

The slides presented at Tableau Conference are also available on SlideShare.

Are you on Social Media?

Feel free to retweet/share:

[Update 25 Oct 2018]: Missed the sessions? Watch the recording online!