Time Estimate


Create the Dataset

What You’ll Learn

This project introduces you to creating custom maps and tuning those maps to enhance your visualization. In it, you’ll learn:

  • How to reformat GeoJSON so that it can be used in Analytics.
  • How to upload GeoJSON to Analytics to create a custom map.
  • How to use a bounding box to zoom in on an area in the map.

What’s a Custom Map?

Analytics has built-in map charts of various geographical areas. You can use them like any other chart to display a visualization of your data. But what if you can’t find the map you need for the data you have? That’s where custom maps enter the scene!

Custom maps are based on a standard GeoJSON definition file that contains metadata and coordinates for drawing the map. Analytics can read the GeoJSON file and display the encoded map as just another map chart.

First, set up your Developer Edition org.

Sign Up for an Analytics-Enabled Developer Edition Org

For this project, you can’t use an existing Developer Edition org. You must sign up for a special new one that comes with a limited Analytics Cloud Platform license. If you already have an Analytics-enabled developer org, you can use that one and skip this section.

Begin by signing up for a Salesforce Analytics-enabled developer org using this URL:

  1. Go to developer.salesforce.com/promotions/orgs/wave-de.
  2. Fill out the form using an active email address.
    Your username must also look like an email address and be unique, but it doesn’t have to be a valid email account. For example, your username can be yourname@waverocks.de, or yourname@yourcompany.de.
  3. After you fill out the form, click Sign me up.
    A confirmation message appears, telling you to check your email.
  4. When you receive the activation email, open it, and click the link.
  5. Complete your registration, and set your password and challenge question.
  6. Click Save.
    You are now logged in to your Developer Edition org and redirected to the Setup page.

To log in to the Analytics-enabled developer org when you take the challenge at the end of this page, select Log into a Developer Edition from the connection menu. To log in and play any time, go to login.salesforce.com.

Get the Data

To build our custom map, we start with some interesting data. We’ve got public IRS filing statistics for various zip codes in the Los Angeles area, which you can download from here. This information has been aggregated, so no, you can’t view the tax returns of the rich and famous.

The data is in a CSV file with the following format:

"90001","STANDARD","LOS ANGELES","CA","PRIMARY",33.97,-118.24,"NA-US-CA-LOS ANGELES","false",18561,36200,421709138
"90002","STANDARD","LOS ANGELES","CA","PRIMARY",33.94,-118.24,"NA-US-CA-LOS ANGELES","false",16133,30920,352278879
"90003","STANDARD","LOS ANGELES","CA","PRIMARY",33.96,-118.27,"NA-US-CA-LOS ANGELES","false",21982,41878,463744071
"90004","STANDARD","LOS ANGELES","CA","PRIMARY",34.07,-118.31,"NA-US-CA-LOS ANGELES","false",25057,41632,891085777
"90005","STANDARD","LOS ANGELES","CA","PRIMARY",34.05,-118.31,"NA-US-CA-LOS ANGELES","false",13294,22281,369162475
"90006","STANDARD","LOS ANGELES","CA","PRIMARY",34.04,-118.29,"NA-US-CA-LOS ANGELES","false",19691,34995,398768368
"90007","STANDARD","LOS ANGELES","CA","PRIMARY",34.02,-118.28,"NA-US-CA-LOS ANGELES","false",12367,20179,262370773
"90008","STANDARD","LOS ANGELES","CA","PRIMARY",34.00,-118.34,"NA-US-CA-LOS ANGELES","false",13333,21174,426689767
"90009","PO BOX","LOS ANGELES","CA","PRIMARY",33.94,-118.38,"NA-US-CA-LOS ANGELES","false",1137,1715,49947779
"90010","STANDARD","LOS ANGELES","CA","PRIMARY",34.06,-118.31,"NA-US-CA-LOS ANGELES","false",2055,3294,122651252

Next upload the file to create a dataset.

  1. Log in to your Developer Edition org.
  2. In Lightning Experience, click lightning experience app launcher, then click the Analytics Studio tile.
    In Salesforce Classic, select Analytics Studio from the app menu at the upper right.
  3. In Analytics Studio, click Create in the upper right of the home screen and select Dataset from the menu.
  4. Click CSV as the source of the data.
  5. In the new dataset screen, click Select file or drag file here....
  6. In the file-selection window that opens, select the CSV file you downloaded—look for the file named la_zip_codes.csv—and click Open (or the correct button in your operating system to upload the file).
  7. To view the CSV data in the data preview screen, click Preview Data. data preview screen with csv data
  8. Click the column heading Zipcode, then change its data type to DIMENSION. data preview screen setting zipcode to dimension type
  9. Click Submit, then click OK.
  10. In the Dataset Name field, name the dataset la_zip_codes.
  11. Click Create Dataset, then Continue to complete the upload and create the new Analytics dataset.

After a minute or so, check the datasets page to see your dataset.

los angeles zipcodes dataset ready

Great work! The data is ready for you to explore it in Analytics. Next you’ll get the GeoJSON and create a custom map.