Maps
If your dataset includes geospatial data, you can represent it on a map. Plotly Studio supports the following map types:
- scatter map: Displays each row of data as a marker point at coordinates given by latitude and longitude columns
- density heatmap: Represents each point smoothed with a radius of influence to show concentration patterns
- choropleth map: Colors geographic regions (countries, states, counties) based on data values
You can customize map styles, zoom levels, and other visual properties.
Writing prompts for Plotly Studio
You can create charts in Plotly Studio using natural language in different ways:
Ask a question - great for exploring your data:
Which factory produces the heaviest products?
Use a quick one-line prompt - concise and conversational:
Compare average weight by factory
Write structured detailed prompts - precise control and consistency:
Average Weight by Factory
Chart:
- Type: bar
- X: Factory location
- Y: Average weight
Data:
- Aggregation: average of weight by Factory location
Structured detailed prompts give you more control over chart type, data mappings, aggregations, and styling. Most examples on this page use this format.
Scatter map
Display each row of data as a marker point at coordinates given by latitude and longitude columns.
The prompt specifies the chart type and the latitude and longitude variables for positioning markers:
<Chart Title>
Chart:
- Type: scatter map
- Latitude: <latitude_variable>
- Longitude: <longitude_variable>
- Color: <variable> (optional)
The following example uses this prompt structure with bicycle traffic counter data from the Montreal Open Data Portal:
Bicycle Counter Locations
Chart:
- Type: scatter map
- Latitude: Latitude
- Longitude: Longitude

Density heatmap
Visualize point concentration patterns across geographic areas with density heatmaps, where each point is smoothed with a radius of influence.
<Chart Title>
Chart:
- Type: density heatmap
- Latitude: <latitude_variable>
- Longitude: <longitude_variable>
- Z: <variable> (optional - controls intensity/color)
The following example uses this prompt structure with earthquake data from Plotly's public datasets repository to show areas of seismic activity:
Global Earthquake Activity
Chart:
- Type: density heatmap
- Latitude: Latitude
- Longitude: Longitude
- Z: Magnitude

Choropleth map
Color geographic regions like countries, states, or counties based on data values. Choropleth maps require location identifiers (like state names, country codes, or FIPS codes) that match predefined geographic boundaries.
<Chart Title>
Chart:
- Type: choropleth
- Locations: <location_identifier_variable>
- Color: <value_variable>
The following example uses this prompt structure with US county unemployment data from Plotly's public datasets repository. FIPS codes uniquely identify each US county, allowing the map to color counties based on their unemployment rates. The scope is set to USA to focus on the United States, the Viridis color scale provides clear visual distinction, and the color range is set from 0 to 12:
US County Unemployment Rates
Chart:
- Type: choropleth
- Locations: County FIPS code
- Color: Unemployment rate
Chart styles:
- Scope: USA
- Use Viridis color scale
- Set color range from 0 to 12

Map style customization
All three map types (scatter, density heatmap, and choropleth) support map style customization. Change the map style to suit your visualization needs, from basic to satellite imagery.
<Chart Title>
Chart:
- Type: scatter map
- Latitude: <latitude_variable>
- Longitude: <longitude_variable>
Chart styles:
- Use <map_style> map style
Here are prompts for the available map styles:
Bicycle Counter Locations
Chart:
- Type: scatter map
- Latitude: Latitude
- Longitude: Longitude
Chart styles:
- Use basic map style
Bicycle Counter Locations
Chart:
- Type: scatter map
- Latitude: Latitude
- Longitude: Longitude
Chart styles:
- Use dark map style
Bicycle Counter Locations
Chart:
- Type: scatter map
- Latitude: Latitude
- Longitude: Longitude
Chart styles:
- Use light map style
Bicycle Counter Locations
Chart:
- Type: scatter map
- Latitude: Latitude
- Longitude: Longitude
Chart styles:
- Use open-street-map map style
Bicycle Counter Locations
Chart:
- Type: scatter map
- Latitude: Latitude
- Longitude: Longitude
Chart styles:
- Use satellite map style
Bicycle Counter Locations
Chart:
- Type: scatter map
- Latitude: Latitude
- Longitude: Longitude
Chart styles:
- Use satellite-streets map style
Bicycle Counter Locations
Chart:
- Type: scatter map
- Latitude: Latitude
- Longitude: Longitude
Chart styles:
- Use carto-voyager map style
Interactive controls
Add dropdowns, sliders, and other controls to make your scatter maps interactive. Controls let users filter and explore the data dynamically.
<Chart Title>
Chart:
- Type: scatter map
- Latitude: <latitude_variable>
- Longitude: <longitude_variable>
Options:
- <Control type> to <description> - Default <value>
The following example uses this prompt structure with bicycle traffic counter data from the Montreal Open Data Portal:
Bicycle Traffic Analysis
Chart:
- Type: scatter map
- Latitude: Latitude
- Longitude: Longitude
- Size: Total passages
Data:
- Aggregation: sum of passages by location and date
Options:
- Date range picker to filter by date range - Default last 30 days

Prompt keywords reference
Use these keywords and phrases in your prompts to customize your map.
Chart
Use a Chart: section in your prompt to define the basic structure of your map, including the chart type and how variables map to visual properties.
Chart:
- Type: scatter map
- Latitude: Latitude
- Longitude: Longitude
- Color: Day of week
Here are some keyword suggestions to use in this section:
| Keyword/Phrase | Description | Example |
|---|---|---|
| Type | Specify map type | Type: scatter map |
| Latitude | The variable containing latitude coordinates | Latitude: Latitude |
| Longitude | The variable containing longitude coordinates | Longitude: Longitude |
| Color | Color markers by different groups or values | Color: Day of week |
| Size | Make markers larger or smaller based on a value | Size: Total passages |
| Keyword/Phrase | Description | Example |
|---|---|---|
| Type | Specify map type | Type: density heatmap |
| Latitude | The variable containing latitude coordinates | Latitude: Latitude |
| Longitude | The variable containing longitude coordinates | Longitude: Longitude |
| Z | Control the intensity/color of the heatmap | Z: Magnitude |
| Keyword/Phrase | Description | Example |
|---|---|---|
| Type | Specify map type | Type: choropleth |
| Locations | Geographic identifiers (state names, country codes, FIPS codes) | Locations: County FIPS code |
| Color | Color regions by different groups or values | Color: Unemployment rate |
Data
Use a Data: section in your prompt to specify how to transform, filter, or aggregate your data before visualization.
Data:
- Aggregation: sum of passages by location and date
- Filter to dates after 2024-01-01
Here are some keyword suggestions to use in this section:
| Keyword/Phrase | Description | Example |
|---|---|---|
| Aggregation | Specify how to aggregate data | Aggregation: sum of passages by location |
| Computed field | Create new calculated fields from existing data | Computed field: Weekday based on date |
| Filter | Filter data based on conditions | Filter to dates after 2024-01-01 |
Options
Use an Options: section in your prompt to add interactive controls that allow users to dynamically filter, transform, and visualize data without regenerating the chart.
Options:
- Dropdown to select location type (All, Major, Minor) - Default All
- Date range picker to filter by date range - Default last 30 days
Here are some keyword suggestions to use with this section. See Chart Controls for a complete list of control types and additional examples.
| Keyword/Phrase | Description | Example |
|---|---|---|
| Dropdown | Add a dropdown menu to filter by categories | Dropdown to select location type (All, Major, Minor) - Default All |
| Date range picker | Add a date range selector | Date range picker to filter by date range - Default last 30 days |
| Slider | Add a slider to adjust numeric values | Slider to adjust marker size - Default medium |
Chart styles
Use a Chart styles: section in your prompt to control the visual appearance and formatting of your map.
Chart styles:
- Use dark map style
- Set zoom level to 12
- Set marker opacity to 0.7
Here are some keyword suggestions to use in this section:
| Keyword/Phrase | Description | Example |
|---|---|---|
| Map style | Choose from map tile styles: basic, dark, light, open-street-map, satellite, satellite-streets, carto-voyager | Use satellite-streets map style |
| Zoom level | Set the initial zoom level (1-20) | Set zoom level to 12 |
| Center map | Set the center point of the map | Center map on Montreal |
| Marker size | Set fixed marker size for all points | Set marker size to 10 |
| Maximum marker size | Set maximum marker size when using Size mapping (default 20) | Set maximum marker size to 50 |
| Marker opacity | Control marker transparency | Set marker opacity to 0.7 |
| Show labels | Display text labels on markers from a data field | Show labels from Counter name |
| Custom colors | Specify exact colors for categories or gradients | Use custom colors: #FF5733, #33FF57, #3357FF |
| Color scale | Specify color scale for continuous color mapping. See built-in color scales | Use Viridis color scale |
| Hover text | What to show when hovering over markers | Show Counter name on hover |
Chart styles:
- Use dark map style
- Set radius to 10 pixels
- Set opacity to 0.5
Here are some keyword suggestions to use in this section:
| Keyword/Phrase | Description | Example |
|---|---|---|
| Map style | Choose from map tile styles: basic, dark, light, open-street-map, satellite, satellite-streets, carto-voyager | Use dark map style |
| Zoom level | Set the initial zoom level (1-20) | Set zoom level to 2 |
| Center map | Set the center point of the map | Center map on Pacific Ocean |
| Radius | Set the smoothing radius in pixels | Set radius to 10 pixels |
| Opacity | Set the transparency of the heatmap layer (0-1) | Set opacity to 0.5 |
| Custom colors | Specify exact colors for gradients | Use custom colors: #FF5733, #33FF57, #3357FF |
| Color scale | Specify color scale for continuous color mapping. See built-in color scales | Use Hot color scale |
| Color range | Set the min and max values for color scaling | Set color range from 0 to 8 |
| Hover text | What to show when hovering over the heatmap | Show location name on hover |
Chart styles:
- Use light map style
- Use Viridis color scale
- Set color range from 0 to 12
Here are some keyword suggestions to use in this section:
| Keyword/Phrase | Description | Example |
|---|---|---|
| Map style | Choose from map tile styles: basic, dark, light, open-street-map, satellite, satellite-streets, carto-voyager | Use light map style |
| Zoom level | Set the initial zoom level (1-20) | Set zoom level to 4 |
| Center map | Set the center point of the map | Center map on USA |
| Custom colors | Specify exact colors for categories or gradients | Use custom colors: #FF5733, #33FF57, #3357FF |
| Color scale | Specify color scale for continuous color mapping. See built-in color scales | Use Viridis color scale |
| Color range | Set the min and max values for color scaling | Set color range from 0 to 12 |
| Hover text | What to show when hovering over regions | Show county name on hover |