How to create a Skyscraper Map with Azure Maps in Power BI (Bar Chart Map)

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?

I prefer to call this visualization a skyscraper map because you can picture these bars on a map as skyscrapers.

You can use a skyscraper map for displaying geodata along values. The skyscraper map is a combination of a map with locations and a bar chart. The location can represent a city, a country, or some other type of place. As with a bar chart, the height or volume of each bar is proportional to the values it represents.

How to create 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. This tutorial is based on the Retail Analysis Sample dataset.

1    Click on the Azure Map icon of the Visualization pane.

2 Extend the filled map visual by dragging the lower right corner

3  Select PostalCode from the Fields Plane.

Power BI assigned Country to the Location field.

4  Select TotalSales from the Fields Plane.

Power BI assigned Sales to the Bubble size field.

5    Click on the Format your Visual section.

6          Disable the Bubble layer switch

7          Enable the Bar chart layer switch

8 Expand the Bar chart layer pane

9 Expand the Size pane

10  Select 4 px for Height

11  Select 3 px for Width

You created a skyscraper map that shows sales by zip codes in your data set. Download the PBIX file.

How to enable Power BI’s Preview Features, such as Azure Maps

Some exciting new features in Power BI are not enabled by default. These functions are so-called preview features whose development or testing is not yet completely finished. For certain use cases, such as creating Skyscraper Maps in Power BI, it may be worthwhile to activate them.

In the following blog posts, we will check out some capabilities of the Azure Maps feature. Therefore, let’s see how you can enable Azure Maps, and other preview features, in Power BI.

1    Click on File in Power BI’s menu bar.

2    Click on Options and settings

3    Click on Options

4  Select Preview Features from the lefthand list.

5          Enable Azure map visual

6          Confirm your changes with the OK button

Power BI might ask you to restart the application in order to change the preview features settings. Now you’re good to go to create your Skyscraper Map with the Azure Maps feature!

Which preview features is Power BI offering?

While the preview features change over time, currently you can enable the following preview features in Power BI:

  • 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 Bl Desktop infrastructure update
  • Web page connector infrastructure
  • Modify visuals settings for mobile layout
  • Sparklines
  • Scorecard visual
  • Field parameters

 

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

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 a quite interesting question:How can a Tableau dashboard that displays contacts (name & company) automatically lookup 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…

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), leave a comment and share this 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:

: Missed the sessions? Watch the recording online!