# Map charts

{% hint style="info" %}
Available in a focused view (when you select and focus on items in a dimension) in all modes except for Search, Transaction and Market.
{% endhint %}

A Map chart is a good way to see data by location at a glance. In all of these modes, the **Total** column is mapped. &#x20;

## Types of Map charts <a href="#mapcharts-marker-circleandheat-typesofmapcharts" id="mapcharts-marker-circleandheat-typesofmapcharts"></a>

There are three types of Map charts as described in the table:

<table data-header-hidden><thead><tr><th width="142"></th><th></th><th></th></tr></thead><tbody><tr><td><strong>Map chart</strong></td><td><strong>Description</strong></td><td><strong>Example</strong></td></tr><tr><td><strong>Marker</strong></td><td><p>A red 'pin' marker is placed at the address. </p><p>In the example, the locations of three customers are marked in New York's Manhattan region.</p></td><td><img src="https://content.gitbook.com/content/itAvDF3MljQXV0rjHRP7/blobs/FUHLF7Lvko2hJ5mXxC0k/618841" alt="" data-size="original"></td></tr><tr><td><strong>Circle</strong></td><td><p>A circle or dot is placed at the address. The size of the circle represents the total. The larger the circle, the higher the number. </p><p>In the example, a customer in lower Manhattan has the highest sales.</p></td><td><img src="https://content.gitbook.com/content/itAvDF3MljQXV0rjHRP7/blobs/GEI25cU2IX8HMbzJkgxt/618871" alt="" data-size="original"></td></tr><tr><td><strong>Heat</strong></td><td><p>A heat map is created around multiple addresses. The hotter the color (heading towards red), the higher the number in that general vicinity.</p><p>There are two options:</p><ul><li>Count - based on the number of records.</li><li>Sum - based on the sum of the value of those records (for example, the total sales) </li></ul><p>In the example, there is a lot of activity on the US west coast, as well as in the south.</p></td><td><img src="https://content.gitbook.com/content/itAvDF3MljQXV0rjHRP7/blobs/PlgPxTzbPUDQdgiysRLt/618859" alt="" data-size="original"></td></tr></tbody></table>

## Example 1: Get an overview of where customers are located <a href="#mapcharts-marker-circleandheat-example1-getanoverviewofwherecustomersarelocated" id="mapcharts-marker-circleandheat-example1-getanoverviewofwherecustomersarelocated"></a>

In the Sales database, create a Marker Map chart to visualize where the customers are located throughout the US.

1. Prepare the data in the grid to display **location** information: Select the **Country** dimension, then select and focus on the **US**, select the **Customer** dimension, select **Properties** > **Full Address** and click outside the list to apply your selection.
2. Click the **Chart** button in the top right toolbar above the grid.
3. Click the **Map** chart category button on the left of the chart and select the **Marker** option.

   <div align="left"><figure><img src="https://content.gitbook.com/content/itAvDF3MljQXV0rjHRP7/blobs/XMjBO8JdycJ6h6Wo8aE0/3022848181.png" alt="" width="102"><figcaption></figcaption></figure></div>

   The map displays markers for each customer address. You can click on a marker to view the customer’s details.

   <div align="left"><figure><img src="https://content.gitbook.com/content/itAvDF3MljQXV0rjHRP7/blobs/Idnb5DIKrel9wipwRn77/3023077563.png" alt="" width="544"><figcaption></figcaption></figure></div>

## Example 2: View the top three profitable customers in New York <a href="#mapcharts-marker-circleandheat-example2-viewthetopthreeprofitablecustomersinnewyork" id="mapcharts-marker-circleandheat-example2-viewthetopthreeprofitablecustomersinnewyork"></a>

In the Sales database, create a Circle Map chart to visualize the top three customer’s in the state of New York according to profitability.

1. Prepare the data in the grid to display **location** information: Select the **Territory** dimension, then select and focus on the **NY** (New York). Select the **Customer** dimension. Only those customers in New York display in the grid. Select **Measures** and double-click the **Profit** option, then sort by **Profit** in descending order. Select and focus on the top three customers. Select **Properties** > **Zip/Post Code** and click outside the list to apply your selection.
2. Click the **Chart** button in the top right toolbar above the grid.
3. Click the **Map** chart category button on the left of the chart and select the **Circle** option.

   <div align="left"><figure><img src="https://content.gitbook.com/content/itAvDF3MljQXV0rjHRP7/blobs/UoM8djrbXbBkZCDL3Vqc/3022815478.png" alt="" width="40"><figcaption></figcaption></figure></div>

   The map displays circles where the top three New York customers are located. The larger the circle, the higher value of that customer. You can click on a circle to view the customer’s details.

   <div align="left"><figure><img src="https://content.gitbook.com/content/itAvDF3MljQXV0rjHRP7/blobs/L4o7fiJb1zzWicdjuVDr/3022717269.png" alt="" width="510"><figcaption></figcaption></figure></div>

## Tips and troubleshooting <a href="#mapcharts-marker-circleandheat-tipsandtroubleshooting" id="mapcharts-marker-circleandheat-tipsandtroubleshooting"></a>

### **Properties**

Map charts recognize streets, zip codes, cities, states, regions and countries, so the more location details you select (via the **Properties** menu) the more accurate your map will be. See [change the properties](https://docs.phocassoftware.com/analytics/customize-your-view-analytics/change-the-properties-analytics) to learn more.

Mappable properties need to be entered in a certain order when a database is built. If your Map chart is not displaying as expected, the property names might have been entered incorrectly or in the wrong order. Your administrator might be able to resolve this issue in Designer.

### Information for administrators

<details>

<summary>When designing your database, you should consider the following points related to Map charts:</summary>

Map properties in the following order: Address, suburb, zip, state and then country (in other words, from fine to coarse levels of data).&#x20;

For best results, concatenate into a single property named 'full address', as shown:&#x20;

<img src="https://content.gitbook.com/content/itAvDF3MljQXV0rjHRP7/blobs/f5zjyA3znjBRO4GrLnCA/618521.jpg" alt="" data-size="original">

If using individual properties, map charts recognize properties with the following names:

* anything beginning with 'add', e.g.,  'Address 1', 'Addr 2', 'Add Del 1'.
* 'city'
* 'suburb'
* 'postcode'
* 'post code'
* 'zip'
* 'zip code'
* 'zipcode'
* 'state'
* 'country' \* *(see administration note below)*
* 'latitude'
* 'longitude'

It is important to have clean address data for best results.

If the data all belongs to a single country, it is recommended that the 'DefaultCountry' system setting is used instead of the country being supplied by a mapped property.

The country 'AUS' does not map. Use 'AU' or 'Australia'.

See [Design a database](https://docs.phocassoftware.com/analytics/visualize-your-data-in-a-chart/broken-reference) and applicable internal documentation.

</details>

### Geocoding <a href="#mapcharts-marker-circleandheat-geocoding" id="mapcharts-marker-circleandheat-geocoding"></a>

Geocoding turns a regular street address into latitude and longitude fields, which is what allows a marker to be placed on a map. Phocas uses Google Maps for geocoding, and the results display using OpenStreetMap.&#x20;

You will notice a delay the first time you map a particular address, because the geocoding process is occurring in the background, and the number of 'new' addresses you can map at a time is limited to 100. Once an address has been mapped once (by any user), automatic caching makes the results display much faster. There is no limit on mapping of these addresses.

***

{% hint style="success" %}
**Related pages**

You can take the following actions with your chart:&#x20;

[Configure the chart options](https://docs.phocassoftware.com/analytics/visualize-your-data-in-a-chart/configure-the-chart-options) | [Select and focus on a chart segment](https://docs.phocassoftware.com/analytics/visualize-your-data-in-a-chart/select-and-focus-on-a-chart-segment) | [Use the chart legend](https://docs.phocassoftware.com/analytics/visualize-your-data-in-a-chart/use-the-chart-legend) | Save the chart as a favorite | Add the chart to a dashboard | [Export a chart as an image](https://docs.phocassoftware.com/analytics/visualize-your-data-in-a-chart/export-a-chart-as-an-image)

See also the main page: [Visualize your data in a chart](https://docs.phocassoftware.com/analytics/visualize-your-data-in-a-chart)
{% endhint %}
