đź“Ł Attention Salesforce Certified Trailblazers! Link your Trailhead and Webassessor accounts and maintain your credentials by December 14th. Learn more.
close
trailhead

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 Analytics 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 Einstein Analytics Platform license.

Begin by signing up for an Analytics-enabled developer org.

  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:

 "Zipcode","ZipCodeType","City","State","LocationType","Lat","Long","Location","Decommisioned",
"TaxReturnsFiled","EstimatedPopulation","TotalWages"
"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
                       

Let’s 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.
    Tip

    Tip

    The first time you open Analytics Studio, the Welcome screen appears, offering resources to help you get started. You can dismiss it now, and open it again anytime from the Help menu. Click the question mark at upper right to open the menu. Click the question mark to open the Analytics Studio Help menuThen select Welcome to Analytics.

    Note

    Note

    If Analytics Studio doesn’t open, check to see if your pop-up blocker is on. If so, change the setting to allow pop-ups from your org.

    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 File 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.
  7. Click Open (or the correct button in your operating system to upload the file), and then click Next.
  8. In the Dataset Name field, name the dataset la_zip_codes and click Next.
  9. In the Edit Field Attributes screen, click the Zipcode column heading, then change its field type to Dimension. data preview screen setting zipcode to dimension type
  10. Click Upload File.

After a minute or so, check the Datasets tab to see your dataset.

los angeles zipcodes dataset ready

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

retargeting