Visualizing CSV Data using Tableau Public

This support article will guide you through visualizing the CSV data from an Atmotube PRO device using Tableau Public.

As a prerequisite, you’ll need to download and install Tableau Public

In this guide, we will create a map visualization of the location coordinates recorded by an Atmotube PRO, displaying color coded PM2.5 (Particulate Matter) data points on the map.

  1. Import Your Data into Tableau
  • Open Tableau and select "Connect to Data"
  • Choose "Text File" and navigate to your CSV file extracted from the Atmotube PRO (Atmotube App>Settings>Export Data to File). Select the file and open it. Tableau will automatically load the data.
  • Your CSV data should contain the following columns:
  • In the Data Source tab, check to ensure that Tableau has correctly identified the data types of each column. Pay particular attention to the latitude and longitude fields, ensuring they are recognized as geographical data.
  1. Opening a New Worksheet
  • Click the “Sheet” button at the bottom left hand corner of the status bar to open a new worksheet.
  • This will open a new worksheet with the column names visible on the left-hand side of the workspace.
  1. Creating a Map Visualization

Step 3.1: Set Up the Map

  • Drag Latitude and Longitude to the Rows and Columns shelves, respectively.
  • In some cases, Tableau might  aggregate geographic data based on its default settings, causing it to display a single point for multiple records, as the Latitude and Longitude columns may be classified as averaged measures. In this case, click on the drop-down arrow next to each field on the shelf and select "Dimension". This ensures they are used as discrete values.
  • Tableau should automatically create a map view; in case this does not happen, select the “symbol maps” visualization from the “Show Me” menu on the right-hand side of the workspace.

Step 3.2:  Create a Calculated Field for PM Data Presence

This is useful if you want to ensure each location coordinate displayed on the map is associated with a corresponding PM data value in case the PM mode was set to an interval such as 5, 10, or 15 minutes and there are null values for PM data present in the dataset.

  • Navigate to the "Analysis" menu, then select "Create Calculated Field" to open the calculation editor.
  • Name your calculated field something descriptive, like "PM Data Present".
  • Enter the formula below that checks for the presence of PM data. Since we have three PM metrics, we want to display data points that have at least one PM measurement. 

NOT ISNULL([PM1, ug/m³]) OR NOT ISNULL([PM2.5, ug/m³]) OR NOT ISNULL([PM10, ug/m³])

  • This formula returns True for records where any PM measurement is present and False otherwise.
  • Click "OK" to create the calculated field.
  • Drag your newly created "PM Data Present" calculated field to the Filters shelf.
  • In the Filter dialog, select "True" and click "OK". This action will filter your data to only include records where PM values are present.

Optional: Quick Filtering Directly

Alternatively, if you prefer not to create a calculated field, you could directly apply filters to the PM columns:

  • Drag any of the PM fields ([PM1, ug/m³], [PM2.5, ug/m³], [PM10, ug/m³]) to the Filters shelf.
  • For each, select the option to exclude nulls.

This approach also works but can be a bit less flexible than using a calculated field, especially if you later decide to adjust your criteria for what constitutes sufficient data for display.

Step 3.2: Create a Calculated Field to categorize PM2.5 data (for example) into different air quality levels:

  • Navigate to the "Analysis" menu, then select "Create Calculated Field" to open the calculation editor.
  • Name the field (e.g., "PM2.5 Category").
  • Enter the formula below to categorize the PM2.5 values:

IF [PM2.5, ug/m³] <= 20 THEN "Good"
ELSEIF [PM2.5, ug/m³] <= 50 THEN "Moderate"
ELSEIF [PM2.5, ug/m³] <= 90 THEN "Polluted"
ELSEIF [PM2.5, ug/m³] <= 140 THEN "Very Polluted"
ELSE "Severely Polluted"

These values are taken from the AQS bins for PM2.5: What is Air Quality Score (AQS)?

  • Click "OK" to create the calculated field.

Step 3.2: Color Code the PM Data based on Categories

Adjust Colors:

  • Drag the newly created "PM2.5 Category" calculated field to the “Color” mark.
  • Tableau will assign default colors to each category.
  • To customize the colors, click on the “Color” mark.
  • Select "Edit Colors" to customize the color scheme. Choose a gradient that represents the PM levels effectively, for example, green to red, where green represents lower PM levels and red represents higher PM levels.
  • Click “OK” to assign the color scale.
  • Each coordinate will now be color coded accordingly:

Optional: Customize the tool-tip:

  • Click on the “Tooltip” mark.
  • Add the following line to the Edit Tooltip dialog box that opens:

PM Category : <PM2.5 Category>

  • Click OK; the PM category will now be displayed in the tooltip in addition to the location coordinates.
  • Likewise, to add the PM2.5 values to the tooltip, drag the “PM2.5, ug/m³” field onto the “Tooltip” mark.
  • Open the Tooltip dialog-box again by clicking the Tooltip mark and the following line:

PM2.5 Value (µg/m³): <SUM(PM2.5, ug/m³)>

  • Click OK: The PM2.5 values will now be displayed in the tooltips.

Step 4.3: Final Touches

Format the Chart:

Customize the colors, labels, and tooltips as needed for better clarity and presentation. You may also choose a different parameter (PM1, VOC, AQS). To create line charts, check out this tutorial -  Building Line Charts

  1.  Save and Publish

Save Your Workbook:

Click on "File" and select "Save to Tableau Public As" to save your workbook online.

Publish the visualization:

Follow the prompts to publish your visualization to Tableau Public.

You have now created an informative, color-coded map displaying the data captured by your Atmotube PRO device.