Tips to increase the likelihood of correct geo-coding

What is sent to Bing Maps?

The Power BI service and Power BI Desktop send Bing the geo data it needs to create the map visualization. This may include the data in the Location, Latitude, and Longitude buckets of the visual's field well. Exactly what is sent varies by map type.

  • For maps (bubble, scatter, and dot plot maps), if latitude and longitude are provided, then no data is sent to Bing. Otherwise, any data in the Location bucket is sent to Bing.
  • Filled maps require a field in the Location bucket; even if latitude and longitude are provided. Whatever data is in the Location, Latitude, or Longitude bucket is sent to Bing.

In the example below, the field PostalCode is being used for geo-coding, so the values in the PostalCode column are sent to Bing. Data from the Size bucket is not sent to Bing.

In this second example below, the field Territory is being used for geo-coding, so the values in the Territory column are sent to Bing. Data from the Legend bucket (and the Color saturation bucket when you use a Shape Map in Power BI Desktop) is not sent to Bing.

In the dataset: tips to improve the underlying dataset

If you have access to the dataset that is being used to create the map visualization, there are a few things you can do to increase the likelihood of correct geo-coding.

1. Categorize geographic fields in Power BI Desktop

In Power BI Desktop, you can ensure fields are correctly geo-coded by setting the Data Category on the data fields. In Data view, select the desired column. From the ribbon, select the Column tools tab and then set the Data Category to Address, City, Continent, Country, County, Postal Code, State, or Province.

2. Use more than one location column

Sometimes, even setting the data categories for mapping isn't enough for Bing to correctly guess your intent. Some designations are ambiguous because the location exists in multiple countries or regions. For example, there's a Southampton in England, Pennsylvania, and New York.

For example, if you only have a City column, Bing may have a hard time geo-coding. Add other geo columns to make the location unambiguous. Sometimes all it takes is adding one more location column to the dataset - in this case state/province. And don't forget to categorize it properly, see #1 above.

Make sure each field only has a single location category. For example, your City location field should be Southampton, not Southampton, New York. And Address location fields should be 1 Microsoft Way and not 1 Microsoft Way, Redmond, WA.

3. Use specific Latitude and Longitude

Add latitude and longitude values to your dataset. This removes any ambiguity and returns results more quickly. Latitude and Longitude fields must be in Decimal Number format, which you can set in the data model.

4. Use Place category for columns with full location information

While we encourage you to use geo-hierarchies in your maps, if you must use a single location column with full geographical information, you can set the data categorization to Place. For example, if the data in your column is full addresses, such as 1 Microsoft Way, Redmond Washington 98052, this generalized data category will work best with Bing.

Use geo-hierarchies so you can drill down to different "levels" of location

When your dataset already has different levels of location data, you and your colleagues can use Power BI to create geo-hierarchies. To do this, drag more than one field into the Location bucket. Used together in this way, the fields become a geo-hierarchy. In the example below we have added geo fields for: Country/Region, State, and City. In Power BI you and your colleagues can drill up and down using this geo-hierarchy.

This page used information from Microsoft Learn

Комментарии

Популярные сообщения из этого блога

Today's activity report #17