<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Scott Larson's Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/scottlarson/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/scottlarson/feed.xml</link>
    <description>Analytics in Real Life</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:43:11 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Data Visualization And the Art of Simplification</title>
      <link>https://docs.microsoft.com/archive/blogs/scottlarson/data-visualization-and-the-art-of-simplification</link>
      <pubDate>Fri, 10 Nov 2017 11:32:11 GMT</pubDate>
      <dc:creator><![CDATA[Scott_MS]]></dc:creator>
      <guid
        isPermaLink="false">http://blogs.msdn.microsoft.com/scottlarson/?p=505</guid>
      <description><![CDATA["Clutter and confusion are failures of design, not attributes of information." - Edward Tufte

I...]]></description>
      <content:encoded><![CDATA[<em>"Clutter and confusion are failures of design, not attributes of information." - Edward Tufte</em>

I recently had the opportunity to speak with two groups quite different from my usual audience of experienced analysts and business intelligence professionals.  The first was freshman journalism students at Stanford, and the second, also students, were quants beginning internships at one of my government customers.  In both cases, I had been invited to provide an introduction to the fundamentals of data visualization to these fresh audiences.

I was honored and enthusiastic about these presentations. I began to reflect on how to make the experience as beneficial for both groups of students, who would apply their knowledge of BI and data visualization in very different ways: the journalists to make their articles more impactful, the quants to influence public sector policy and decisions.

I had to boil the concepts down to their essence.   I spent several weeks thinking through solutions I've implemented, presentations I've given, and past customer conversations searching for common themes and threads.

To me…it all comes down to this:
<h3><b>Know your audience. Tell a good story.   Simplify accordingly.</b></h3>
<h4></h4>
<h4>Know your audience</h4>
A C-level executive cares about different things than a line level manager.  A line level manager cares about different things than an analyst.   Painfully obvious, I know that.  Nonetheless, I often see dashboards that look like the author forgot that the ultimate goal is to help inform the viewer...not to show off their particular tool's vast capabilities.  Also, realize that the best data visualizations are interactive, so you have to consider not only how the visualization looks when you publish it, you have to anticipate how different users will interact with it.

Take for example, a dashboard intended to give a city council member a glimpse into the state of their district.  Council members are very busy, may not be very technical, and probably won't attend training for data visualization tools.   Perhaps a simple visualization like this is in order:

<a href="https://msdnshared.blob.core.windows.net/media/2017/10/KnowYourAudience-CouncilMember.png"><img width="1024" height="585" class="alignnone wp-image-525" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/10/KnowYourAudience-CouncilMember-1024x585.png" /></a>

For those that want more detail, you could allow them to optionally drill through to detail:

<a href="https://msdnshared.blob.core.windows.net/media/2017/10/SimplifyDrillToDetail.png"><img width="1024" height="599" class="alignnone size-large wp-image-535" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/10/SimplifyDrillToDetail-1024x599.png" /></a>

This drill through could take them to a more detailed analysis of permits by zip code:

<a href="https://msdnshared.blob.core.windows.net/media/2017/10/ZipCodePermitDetail1.png"><img width="1024" height="589" class="alignnone size-large wp-image-565" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/10/ZipCodePermitDetail1-1024x589.png" /></a>

This last visualization, while informative to an interested data analyst, might be TMI for the council member who simply wanted to know basic permit and 311 request levels.  But, providing an intuitive path to this detail is a key element of modern data visualization design.

&nbsp;

&nbsp;

&nbsp;
<h4>Tell a good story</h4>
Sometimes you know what the story is...new construction permits are up and illegal dumping is down in areas targeted with a revitalization campaign.  In those cases, sometimes you just want to hit them over the head with your point...I call this "USA Today Style". (Below example is made up)

<a href="https://msdnshared.blob.core.windows.net/media/2017/10/HitThemOverTheHead2.png"><img width="347" height="422" class="alignnone wp-image-577" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/10/HitThemOverTheHead2.png" /></a>

In these cases, my advice is to take the advice of my high-school English teacher and <em>Have A Clearly-Stated Thesis.   </em>Yes, I liked math better than English, but I attribute much of my moderate career success to two really good English teachers...a blog for another day.

<span style="float: none;background-color: transparent;color: #333333;cursor: text;font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size: 16px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;line-height: 24px;text-align: left;text-decoration: none;text-indent: 0px">Sometimes you don't know what the story is, and you've been tasked with enabling </span><em>others </em><span style="float: none;background-color: transparent;color: #333333;cursor: text;font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size: 16px;font-style: normal;font-variant: normal;font-weight: 400;letter-spacing: normal;line-height: 24px;text-align: left;text-decoration: none;text-indent: 0px">to find that story.  Again, this is another blog for another day, but for inspiration, check out the way my colleague guides the viewer through a process.  The below visualization is interactive...feel free to interact.</span>

<iframe width="800" height="600" allowfullscreen="allowfullscreen" frameborder="0" src="https://msit.powerbi.com/view?r=eyJrIjoiZWVlMTk3OTMtODMyNC00MTVmLThkZjgtZTFhZDRlM2UwMWM3IiwidCI6IjcyZjk4OGJmLTg2ZjEtNDFhZi05MWFiLTJkN2NkMDExZGI0NyIsImMiOjV9"></iframe>

&nbsp;
<h4></h4>
&nbsp;

&nbsp;

&nbsp;
<h4>Simplify accordingly</h4>
I am striving to inform, not to impress.  When I create data visualizations for customers, I obsess over eliminating clutter.   Gridlines, titles, borders, data labels...often they are necessary to convey information.   Often they are redundant and simply clutter the screen.

As an example, let's take the default display for a Bar Chart in Power BI.

<a href="https://msdnshared.blob.core.windows.net/media/2017/11/DefaultBarChart.png"><img width="419" height="380" class="alignnone wp-image-586" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/11/DefaultBarChart.png" /></a>

Looks ok, right?   It's easy to accept those defaults and move on.  However, some simple changes will clean that up dramatically.    Why require the eye to move off to the left to read the # of requests...let's eliminate the Y axis and put that data values right on those bars.
<h5>1) Click on the data visualization, and in the Visualization Pane, click on the paintbrush (format) and toggle the Y-Axis to off</h5>
<a href="https://msdnshared.blob.core.windows.net/media/2017/11/ToggleYAxis.png"><img width="825" height="596" class="alignnone wp-image-605" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/11/ToggleYAxis-1024x740.png" /></a>

&nbsp;
<h5>2) Toggle Data labels to On and Increase the Font Size</h5>
<a href="https://msdnshared.blob.core.windows.net/media/2017/11/IncreaseFontSize.png"><img width="827" height="589" class="alignnone wp-image-606" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/11/IncreaseFontSize-1024x730.png" /></a>
<h5></h5>
&nbsp;
<h5>3) If the intent of this visualization is to highlight the most common request types, perhaps you limit the visualization to Top 5.</h5>
<a href="https://msdnshared.blob.core.windows.net/media/2017/11/FilterType.png"><img width="818" height="627" class="alignnone wp-image-616" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/11/FilterType-1024x784.png" /></a>

&nbsp;

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2017/11/Top5Filter.png"><img width="814" height="514" class="alignnone wp-image-626" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/11/Top5Filter-1024x646.png" /></a>
<h5></h5>
&nbsp;
<h5>4) Don't forget to change the title.  I like to center the title and increase the font</h5>
<a href="https://msdnshared.blob.core.windows.net/media/2017/11/Top5Title.png"><img width="1024" height="634" class="alignnone size-large wp-image-645" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/11/Top5Title-1024x634.png" /></a>

As you can see, a few simple steps can dramatically simplify a visualization.   While this isn't always the best approach, my point is to take a good look at your visualization and eliminate anything that doesn't provide additional value.
<h3>In summary</h3>
&nbsp;
<h4><b>Know your audience.</b></h4>
Imagine yourself explaining your observations to your audience.  Are they impatient?  Are they asking you to drill into the next layer of data?  Do they have natural curiosity about the data or do they just want a topline observation? Always remember, not everyone is excited about data as we are.
&nbsp;
<h4><b>Tell a good story.  </b></h4>
Why are YOU excited about the data?  Why does your data matter to your audience?  That's your thesis.  Make sure that it is clear and concise.  Make sure that any supporting data is easily accessible within your data visualization environment through user-interaction.   Default interactions and drill-through actions in Power BI are good ways to provide this interactivity.

More on interactions <a target="_blank" href="https://docs.microsoft.com/en-us/power-bi/service-reports-visual-interactions" rel="noopener">here.</a>

More on drill-through <a target="_blank" href="https://docs.microsoft.com/en-us/power-bi/desktop-drillthrough" rel="noopener">here.</a>
&nbsp;
<h4><b> Simplify accordingly.</b></h4>
Take a good look at the elements in your data visualization. Can you eliminate gridlines?  Can you eliminate axis labels or values?  Can you apply any "Top N" filters to eliminate elements that don't add value?  Can a wise use of text help inform the audience?
&nbsp;
<h3>Additional Reading</h3>
&nbsp;
If I was a college professor teaching this subject, I would put the following required readings on the syllabus.

<a href="https://www.amazon.com/Visual-Display-Quantitative-Information/dp/1930824130">The Visual Display of Quantitative Information</a> by Tufte, Edward

<a href="https://www.amazon.com/Storytelling-Data-Visualization-Business-Professionals/dp/1119002257">Story Telling With Data</a> by Cole Nussbaumer Knaffic

<a href="https://www.amazon.com/Truthful-Art-Data-Charts-Communication/dp/0321934075">The Truthful Art: Data, Charts, and Maps</a> for Communication by Alberto Cairo]]></content:encoded>
    </item>
    <item>
      <title>Power BI and the World Bank API</title>
      <link>https://docs.microsoft.com/archive/blogs/scottlarson/power-bi-and-the-world-bank-api</link>
      <pubDate>Tue, 14 Feb 2017 21:09:09 GMT</pubDate>
      <dc:creator><![CDATA[Scott_MS]]></dc:creator>
      <guid
        isPermaLink="false">http://blogs.msdn.microsoft.com/scottlarson/?p=156</guid>
      <description><![CDATA[As promised, in this blog, I will create a Power BI visualization based on Hans Rosling's Ted Talk...]]></description>
      <content:encoded><![CDATA[As promised, in this blog, I will create a Power BI visualization based on Hans Rosling's Ted Talk seen <a target="_blank" href="http://www.ted.com/talks/hans_rosling_shows_the_best_stats_you_ve_ever_seen">here</a>. While you don't need any Power BI experience to follow along and recreate this, if you want a basic tutorial I would suggest you watch these short videos <a target="_blank" href="https://powerbi.microsoft.com/en-us/guided-learning/">here</a> first. It's not that anything I do is difficult, but the nature of the source data and my desire to add additional data sources over time, led me to the decision to spend a little extra time "modeling", or organizing and relating my data to provide a foundation for current AND future analysis.

My goals in this demo are simple:
<ul>
 	<li>Mashup 3 different time-series indicators from the World Bank; <em>Total Population</em>, <em>Fertility Rate</em>, and <em>Life Expectancy At Birth</em></li>
 	<li>Create a visualization that shows how the third world has changed over the last 50 years, in ways that you may not have expected</li>
</ul>
<h2><strong>The World Bank API</strong></h2>
The World Bank has a pretty good open data site at <a href="http://data.worldbank.org">data.worldbank.org</a>.   There are some great datasets and analysis based on global development data.  However, I must admit, when I was searching for specific indicators and how I would access them programmatically, it was a little frustrating to navigate.   To save you some of that frustration, I've provided the URLs I use below.

All Countries, By Year 1960-2014

<em>Population, Total:  </em><a href="http://api.worldbank.org/countries/all/indicators/SP.POP.TOTL/?format=json&amp;date=1960:2014&amp;per_page=20000">http://api.worldbank.org/countries/all/indicators/SP.POP.TOTL/?format=json&amp;date=1960:2014&amp;per_page=20000</a>

<em>Life Expectancy At Birth:  </em><a href="http://api.worldbank.org/countries/all/indicators/SP.DYN.LE00.IN/?format=json&amp;date=1960:2014&amp;per_page=20000">http://api.worldbank.org/countries/all/indicators/SP.DYN.LE00.IN/?format=json&amp;date=1960:2014&amp;per_page=20000</a>

<em>Fertility Rate, Births Per Woman:  </em><a href="http://api.worldbank.org/countries/all/indicators/SP.DYN.TFRT.IN/?format=json&amp;date=1960:2014&amp;per_page=20000">http://api.worldbank.org/countries/all/indicators/SP.DYN.TFRT.IN/?format=json&amp;date=1960:2014&amp;per_page=20000</a>

<em>World Bank Country Classifications</em>:  This will allow me to slice by various classifications:  <a href="http://api.worldbank.org/countries/?format=json&amp;per_page=400">http://api.worldbank.org/countries/?format=json&amp;per_page=400</a>
<h3><strong>Step 1:  Getting the Data Into Power BI</strong></h3>
People often think of Power BI as a data visualization tool.  But it also has really powerful features for getting data, cleansing and transforming data,  and mashing up data from multiple sources.  Our first step is to get data into Power BI from a REST API.  Here we will use 3 separate API calls to get Population, Fertility, and Life Expectancy data from 1960 through 2014.  In this case, the data is returned in JSON format, which we will parse using the query editor.   As you follow the steps below, note the Applied Steps section on the right.  Power BI is keeping track of each transformation/change as you make it, so the next time you refresh this data it will reapply these changes.
<ol>
 	<li>On the top ribbon, navigate to <strong><em>Get Data=&gt;Web</em></strong><strong><em></em></strong><strong><em></em></strong><strong><em></em></strong></li>
</ol>
<p style="padding-left: 30px"><strong><em><a href="https://msdnshared.blob.core.windows.net/media/2017/02/GetDataFromWeb1.png"><img width="600" height="600" class="alignnone wp-image-185" alt="getdatafromweb" src="https://msdnshared.blob.core.windows.net/media/2017/02/GetDataFromWeb1.png" /></a></em></strong></p>
<p style="padding-left: 30px">2. In the <strong>From Web</strong> dialog box, paste in the url <a href="http://api.worldbank.org/countries/all/indicators/SP.POP.TOTL/?format=json&amp;date=1960:2014&amp;per_page=20000">http://api.worldbank.org/countries/all/indicators/SP.POP.TOTL/?format=json&amp;date=1960:2014&amp;per_page=20000</a></p>
<p style="padding-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2017/02/Web-URL.png"><img width="866" height="275" class="alignnone wp-image-205 " alt="web-url" src="https://msdnshared.blob.core.windows.net/media/2017/02/Web-URL-1024x325.png" /></a></p>
<p style="padding-left: 30px">3. Click On <strong>List</strong></p>
<p style="padding-left: 30px"> <a href="https://msdnshared.blob.core.windows.net/media/2017/02/SelectListFromJSON.png"><img width="483" height="346" class="alignnone wp-image-215 " alt="selectlistfromjson" src="https://msdnshared.blob.core.windows.net/media/2017/02/SelectListFromJSON-1024x733.png" /></a></p>
<p style="padding-left: 30px">4. Click on <strong>To Table</strong></p>
<p style="padding-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2017/02/JSONRecordsToTable.png"><img width="539" height="507" class="alignnone wp-image-225" alt="jsonrecordstotable" src="https://msdnshared.blob.core.windows.net/media/2017/02/JSONRecordsToTable-1024x963.png" /></a></p>
<p style="padding-left: 30px">5. Expand Arrows, uncheck "use original column name", click OK</p>
<p style="padding-left: 60px"><a href="https://msdnshared.blob.core.windows.net/media/2017/02/ExpandColumns1.png"><img width="507" height="422" class="alignnone wp-image-235" alt="expandcolumns" src="https://msdnshared.blob.core.windows.net/media/2017/02/ExpandColumns1-1024x852.png" /></a></p>
<p style="padding-left: 60px">6. Expand the country column, uncheck Use original column name as prefix</p>
<p style="padding-left: 60px"> <a href="https://msdnshared.blob.core.windows.net/media/2017/02/ExpandCountry.png"><img width="505" height="325" class="alignnone wp-image-295" alt="expandcountry" src="https://msdnshared.blob.core.windows.net/media/2017/02/ExpandCountry-1024x659.png" /></a></p>
<p style="padding-left: 60px">7. Rename columns</p>
<p style="padding-left: 90px"><em>id = Country ID</em>
<em>value.1 = Country</em>
<em>value = Population</em></p>
<p style="padding-left: 60px"><a href="https://msdnshared.blob.core.windows.net/media/2017/02/RenameCountryColumn.png"><img width="462" height="322" class="alignnone wp-image-305" alt="renamecountrycolumn" src="https://msdnshared.blob.core.windows.net/media/2017/02/RenameCountryColumn-1024x713.png" /></a></p>
<p style="padding-left: 60px">8. Select your Population column, select Data Type=&gt;Whole Number</p>
<p style="padding-left: 60px"><a href="https://msdnshared.blob.core.windows.net/media/2017/02/PopulationDataType.png"><img width="506" height="293" class="alignnone wp-image-275" alt="populationdatatype" src="https://msdnshared.blob.core.windows.net/media/2017/02/PopulationDataType-1024x593.png" /></a></p>
<p style="padding-left: 60px">9.  Select the Date column, select Data Type=&gt;Date</p>
<p style="padding-left: 60px">10. Right click on the decimal field and remove it.  Also remove the indicator ID field</p>
<p style="padding-left: 60px">11. Rename the query to Population, and click <strong>Close &amp; Apply</strong></p>
<p style="padding-left: 60px"><a href="https://msdnshared.blob.core.windows.net/media/2017/02/RenameToPopulation1.png"><img width="780" height="351" class="alignnone wp-image-315" alt="renametopopulation" src="https://msdnshared.blob.core.windows.net/media/2017/02/RenameToPopulation1-1024x461.png" /></a></p>
<p style="padding-left: 60px">12. Repeat this process for <a href="http://api.worldbank.org/countries/all/indicators/SP.DYN.LE00.IN/?format=json&amp;date=1960:2014&amp;per_page=20000">http://api.worldbank.org/countries/all/indicators/SP.DYN.LE00.IN/?format=json&amp;date=1960:2014&amp;per_page=20000</a></p>
<p style="padding-left: 90px">a)  When you rename the columns, rename them as follows</p>
<p style="padding-left: 120px"><em>id= Country Code</em></p>
<p style="padding-left: 120px"><em>value.1 = Country</em>
<em>value = Life Expectancy</em></p>
<p style="padding-left: 90px">b) Change the <em>Life Expectancy</em> Data Type to Decimal</p>
<p style="padding-left: 90px">c) Name the query <em>Life Expectancy </em>and click <strong>Close and Apply</strong></p>
<p style="padding-left: 60px">12. Repeat this process for  <a href="http://api.worldbank.org/countries/all/indicators/SP.DYN.TFRT.IN/?format=json&amp;date=1960:2014&amp;per_page=20000">http://api.worldbank.org/countries/all/indicators/SP.DYN.TFRT.IN/?format=json&amp;date=1960:2014&amp;per_page=20000</a></p>
<p style="padding-left: 90px">a)  When you rename the columns, rename them as follows</p>
<p style="padding-left: 120px"><em>id = Country Code</em>
<em>value.1 = Country</em>
<em>value = Fertility Rate</em></p>
<p style="padding-left: 90px">b) Change the <em>Fertility Rate</em> Data Type to Decimal</p>
<p style="padding-left: 90px">c) Name the query <em>Fertility Rate </em>and click <strong>Close and Apply</strong></p>

<h3>Step 2:  Merge the Data Sets</h3>
We now have three tables; <em>population</em>, <em>life expectancy</em>, and <em>fertility rate</em>.  But logically, each table represents a single "attribute" of a country for a given year, so I thought it would make sense to merge them into a single table.  This will make it easier for end users to understand.
<ol>
 	<li>On the top ribbon select <strong>Edit Queries</strong></li>
 	<li>On the top ribbon of the Edit Query screen select Merge Queries=&gt;Merge Queries As New</li>
</ol>
<p style="padding-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2017/02/MergeQueriesAsNew.png"><img width="703" height="298" class="alignnone wp-image-325" alt="mergequeriesasnew" src="https://msdnshared.blob.core.windows.net/media/2017/02/MergeQueriesAsNew-1024x434.png" /></a></p>
<p style="padding-left: 30px">3. Each of these tables has <em>Country Code</em>, <em>Country Name</em>, and <em>date</em> in common.  Merge them into one by selecting the Population table from the first dropdown and the Fertility Rate on the second drop down.  Then in each table, while holding Ctrl down, select <em>Country Code</em>, <em>Country Name</em>, and <em>date</em> in each table.  You should see that it has matched 14520 out of 14520 records.</p>
<p style="padding-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2017/02/MergePopandLE.png"><img width="685" height="583" class="alignnone wp-image-335" alt="mergepopandle" src="https://msdnshared.blob.core.windows.net/media/2017/02/MergePopandLE-1024x872.png" /></a></p>
<p style="padding-left: 30px">You can see 14520 out of 14520 fields are matched.</p>
<p style="padding-left: 30px">4. Click OK</p>
<p style="padding-left: 30px">5. The Fertility Rate table can now be expanded out.  Click on the arrows by <em>New Column</em>, uncheck <em>use original column name as prefix</em> and select the <em>Fertility Rate</em> column</p>
<p style="padding-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2017/02/MergeandSelectFertilityRate.png"><img width="681" height="440" class="alignnone wp-image-355" alt="mergeandselectfertilityrate" src="https://msdnshared.blob.core.windows.net/media/2017/02/MergeandSelectFertilityRate-1024x662.png" /></a></p>
<p style="padding-left: 30px">6. Click on the Merge1 Query on the left Query Pane. Select <strong>Merge Queries</strong> again.  This time, instead of selecting <strong>Merge Queries as New</strong>, Select <strong>Merge Queries</strong></p>
<p style="padding-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2017/02/MergeQueries.1PNG.png"><img width="701" height="354" class="alignnone wp-image-365" alt="mergequeries-1png" src="https://msdnshared.blob.core.windows.net/media/2017/02/MergeQueries.1PNG-1024x517.png" /></a></p>
<p style="padding-left: 30px">7. The first table will already be set to Merge1.  Choose the Life Expectancy table for the second drop down. On each table, select <em>County Code</em>, <em>Country Name</em>, and <em>date.</em></p>
<p style="padding-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2017/02/Merge1andFertility.png"><img width="694" height="598" class="alignnone wp-image-375" alt="merge1andfertility" src="https://msdnshared.blob.core.windows.net/media/2017/02/Merge1andFertility-1024x883.png" /></a></p>
<p style="padding-left: 30px">8. Click OK and Expand the new column like you did in step 5 of this section.  Uncheck <em>use original column name as prefix </em>and select<em> Life Expectancy</em></p>
<p style="padding-left: 30px">9. Name the new merged table <em>World Development Indicators</em></p>
<p style="padding-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2017/02/NameAsWorldDevelopmentIndicators.png"><img width="610" height="524" class="alignnone wp-image-385" alt="nameasworlddevelopmentindicators" src="https://msdnshared.blob.core.windows.net/media/2017/02/NameAsWorldDevelopmentIndicators-1024x879.png" /></a></p>
<p style="padding-left: 30px">10. Select <strong>Close and Apply</strong></p>
<p style="padding-left: 30px">11.  Since we've merged the information from the three other tables into one table, we can hide those three tables.  In the field pane, select <em>Fertility</em>, right click and select <strong>Hide.  </strong>Repeat for <em>Population</em> and <em>Life Expectancy</em><strong>.</strong></p>
<p style="padding-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2017/02/HideTables.png"><img width="627" height="571" class="alignnone wp-image-395" alt="hidetables" src="https://msdnshared.blob.core.windows.net/media/2017/02/HideTables-1024x933.png" /></a></p>
<p style="padding-left: 30px">We now can see one table, <em>World Development Indicators</em>, containing all the information we need.</p>

<h3 style="padding-left: 30px">Step 3: Create Scatter Plot Visualization</h3>
<ol>
 	<li>Select the Scatter Chart from the Visualizations Pane</li>
</ol>
<p style="padding-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2017/02/SelectScatterPlot.png"><img width="670" height="463" class="alignnone wp-image-405" alt="selectscatterplot" src="https://msdnshared.blob.core.windows.net/media/2017/02/SelectScatterPlot-1024x707.png" /></a></p>
<p style="padding-left: 30px">2. In the visualizations pane details, drag <em>Country Name</em> to the <strong>Legend</strong>, <em>Fertility Rate</em> to the <strong>X-Axis</strong>, <em>Life Expectancy</em> to the <strong>Y-Axis</strong>, and <em>date</em> to the <strong>Play Axis</strong>.</p>
<p style="padding-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2017/02/AddFieldsToScatterChart.png"><img width="699" height="482" class="alignnone wp-image-415" alt="addfieldstoscatterchart" src="https://msdnshared.blob.core.windows.net/media/2017/02/AddFieldsToScatterChart-1024x706.png" /></a></p>
<p style="padding-left: 30px">3. Press the Play button to watch the neat animation.</p>

<h3>Step 4: Add World Bank Classifications table to allow grouping and filtering by country characteristics</h3>
The world bank categorizes countries based on region, lending type, and income level.  We want to expand our visualization to let users filter by these additional attributes.  While we could use merge the data set like we did in step 2, I wanted to keep the classification table as a completely separate table...for those of your familiar with dimensional modeling, it is essentially serving as a "dimension" table related to our indicator "fact" table.  For those of you not familiar with dimensional modeling, forget I said that.
<p style="padding-left: 30px">1. In the Power BI Ribbon, click Get Data=&gt;Web and paste this URL:   <a href="http://api.worldbank.org/countries/?format=json&amp;per_page=400">http://api.worldbank.org/countries/?format=json&amp;per_page=400</a></p>
<p style="padding-left: 30px">2. Follow the steps listed in <strong>Step 1.   </strong>(Click on List, To Table<strong>, </strong>Expand the columns, uncheck <em>Use original column name as prefix)</em></p>
<p style="padding-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2017/02/ClassificationExpandColumns.png"><img width="694" height="564" class="alignnone wp-image-417" alt="classificationexpandcolumns" src="https://msdnshared.blob.core.windows.net/media/2017/02/ClassificationExpandColumns-1024x831.png" /></a></p>
<p style="padding-left: 30px">3. Expand <em>region, </em>only select<em> value</em></p>
<p style="padding-left: 30px"><em><a href="https://msdnshared.blob.core.windows.net/media/2017/02/ExpandRegion.png"><img width="686" height="493" class="alignnone wp-image-425" alt="expandregion" src="https://msdnshared.blob.core.windows.net/media/2017/02/ExpandRegion-1024x737.png" /></a></em></p>
<p style="padding-left: 30px">4. Right click on the expanded column and rename column to <em>Region</em></p>
<p style="padding-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2017/02/RenametoRegion.png"><img width="681" height="526" class="alignnone wp-image-435" alt="renametoregion" src="https://msdnshared.blob.core.windows.net/media/2017/02/RenametoRegion-1024x792.png" /></a></p>
<p style="padding-left: 30px">5. Expand <em>adminregion</em>, select <em>value</em>, rename column to <em>Admin Region</em></p>
<p style="padding-left: 30px">6. Expand <em>incomeLevel</em>, select <em>value</em>, rename column to <em>Income Level</em></p>
<p style="padding-left: 30px">7. Expand <em>lendingType</em>, select <em>value</em>, rename column to <em>Lending Type</em></p>
<p style="padding-left: 30px">8. Rename query to <em>Country Classification, </em>click <strong>Close and Apply</strong></p>

<h3>Step 5: Create a relationship between the tables</h3>
One the most powerful features of Power BI is the ability to relate two or more tables together.  Many of you may have done this in Access, or perhaps you are using V-lookups in excel to do something similar.  Stop.  Use Power BI instead. Seriously.
<p style="padding-left: 30px">1. On the left hand side, click on the <strong>Relationships</strong> icon.  You'll see all the tables we've created in this exercise, but the ones we've hidden will be grayed out.</p>
<p style="padding-left: 30px"><a href="https://msdnshared.blob.core.windows.net/media/2017/02/Relationships.png"><img width="582" height="536" class="alignnone wp-image-445" alt="relationships" src="https://msdnshared.blob.core.windows.net/media/2017/02/Relationships-1024x943.png" /></a></p>
<p style="padding-left: 30px">2. The two tables are related by the <em>Country Code</em> column in the <em>World Development Indicators</em> table and the <em>iso2Code</em> in the <em>Country Classification</em> table.  Drag <em>Country Code</em> from the <em>World Development Indicators</em> table to the <em>iso2Code</em> in the <em>Country Classification</em> table.  This allows us to "lookup" additional attributes of a country, like region, income level, and lending type.</p>
<p style="padding-left: 30px"> <a href="https://msdnshared.blob.core.windows.net/media/2017/02/CreateRelationship.png"><img width="583" height="528" class="alignnone wp-image-455" alt="createrelationship" src="https://msdnshared.blob.core.windows.net/media/2017/02/CreateRelationship-1024x928.png" /></a></p>

<h3><strong>Step 6: Add Classification Filters to your page</strong></h3>
<p style="padding-left: 30px">1. On the left pane, click back to your visualization.</p>
<p style="padding-left: 30px">2. Click anywhere on your page (except on the existing scatter chart visualization), and select <em>Region</em> from the <em>Country Classification</em> table in the fields pane</p>
<p style="padding-left: 30px">3. Select the Slicer visualization</p>
<p style="padding-left: 60px"><a href="https://msdnshared.blob.core.windows.net/media/2017/02/ClassificationFilters.png"><img width="619" height="428" class="alignnone wp-image-465" alt="classificationfilters" src="https://msdnshared.blob.core.windows.net/media/2017/02/ClassificationFilters-1024x708.png" /></a></p>
<p style="padding-left: 30px">4. On the slicer you just created, click on <strong>List</strong>, and select <strong>Dropdown.  </strong>Resize the filter so it takes up less space.</p>
<p style="padding-left: 60px"><a href="https://msdnshared.blob.core.windows.net/media/2017/02/ChangetoDropDown.png"><img width="633" height="546" class="alignnone wp-image-475" alt="changetodropdown" src="https://msdnshared.blob.core.windows.net/media/2017/02/ChangetoDropDown-1024x883.png" /></a></p>
<p style="padding-left: 30px">5.  Repeat steps 2,3, and 4 but this time select the <em>Income Level</em> column</p>
<p style="padding-left: 30px">6. Repeat steps 2, 3, and 4 but this time select the <em>Lending Type</em> column</p>
<p style="padding-left: 30px">7.  Arrange the filters and resize the scatter chart to taste.</p>
<p style="padding-left: 60px"><a href="https://msdnshared.blob.core.windows.net/media/2017/02/ArrangeFilters.png"><img width="647" height="577" class="alignnone wp-image-485" alt="arrangefilters" src="https://msdnshared.blob.core.windows.net/media/2017/02/ArrangeFilters-1024x913.png" /></a></p>
<p style="padding-left: 60px">So that's it.  You can now impress your friends and family with your Power BI Story Telling abilities.   There are many more World Development Indicators you can get from the World Bank open data site using the same process I showed in this blog.  You can get a list of them <a href="http://data.worldbank.org/data-catalog/world-development-indicators">here</a>.   Also, just for fun, I made a little Power BI visualization that lets you choose indicators on the left and see the REST APIs on the right.  Enjoy.</p>
<iframe width="800" height="600" src="https://msit.powerbi.com/view?r=eyJrIjoiYTkwMGExOGUtMzBhZi00YzE4LWEzZTQtNDI5YTgzMzJjMDNhIiwidCI6IjcyZjk4OGJmLTg2ZjEtNDFhZi05MWFiLTJkN2NkMDExZGI0NyIsImMiOjV9" frameborder="0" allowfullscreen="allowfullscreen"></iframe>]]></content:encoded>
    </item>
    <item>
      <title>Data Visualization Heroes</title>
      <link>https://docs.microsoft.com/archive/blogs/scottlarson/data-visualization-heroes</link>
      <pubDate>Sat, 21 Jan 2017 10:26:53 GMT</pubDate>
      <dc:creator><![CDATA[Scott_MS]]></dc:creator>
      <guid
        isPermaLink="false">http://blogs.msdn.microsoft.com/scottlarson/?p=135</guid>
      <description><![CDATA[Everybody has a hero. Your hero might be a professional athlete that you admire for their physical...]]></description>
      <content:encoded><![CDATA[Everybody has a hero. Your hero might be a professional athlete that you admire for their physical prowess. Your hero could be a musician that you admire for their songwriting and musical talent. To some, heroes are historical figures that discovered new lands or scientific truths, or built new machines to benefit humankind. Less often however, heroes are Swedish medical doctors, statisticians, or data visualization thought-leaders.

So perhaps I am unique (or not?), that I place Hans Rosling, Edward Tufte, and Nate Silver on the same list as Nolan Ryan, Brett Favre, Peter Gabriel, and Benjamin Franklin. Sure, they didn't throw a baseball 100 miles an hour, or throw over 500 touchdowns...no platinum albums or kites in thunderstorms. But these individuals all have one belief in common, that's near and dear to my heart:

<em>The ability to tell simple, memorable, and insightful stories about your data is of paramount importance, and thoughtful data visualizations are the most powerful tool you can use to tell your story.</em>

Intuitively, I've understood this principle during my 15 year business intelligence career, but it really crystalized about 5 years ago when I saw this 20 minute Ted Talk from Hans Rosling. If you're short on time, start at 4:00. If you're not short on time, watch the whole thing.

<iframe width="560" height="315" src="https://www.youtube.com/embed/hVimVzgtD6w" frameborder="0" allowfullscreen="allowfullscreen"></iframe>

I retained more from that short presentation about social change in the world, the aids crisis in Africa, and the distribution of wealth in the world than I would have from an entire college course...all due to professor Rosling's ability to tell a story, with a clearly-stated thesis, and clear, concise visualizations reinforcing that story.

I want my customers to Be Like Hans. As a Microsoft employee, when I am demonstrating some of the features of Microsoft's flagship data visualization product, Power BI, I often do a similar visualization using data from the <a target="_blank" href="http://data.worldbank.org/">World Bank open data site.</a> I created this in Power BI Desktop, published to my powerbi.com account, then "published to web" so I could embed it in an iframe below.

<iframe width="800" height="600" src="https://msit.powerbi.com/view?r=eyJrIjoiNTFlNmZlNTgtZGNkYy00ZWZhLTgyMjktNTY2ZTRkNGFhZjNmIiwidCI6IjcyZjk4OGJmLTg2ZjEtNDFhZi05MWFiLTJkN2NkMDExZGI0NyIsImMiOjV9" frameborder="0" allowfullscreen="allowfullscreen"></iframe>

In my next blog, I'll step through how to use Power BI Desktop create this visualization using the World Bank API.]]></content:encoded>
    </item>
  </channel>
</rss>