> For the complete documentation index, see [llms.txt](https://docs.mapbox.com/help/ja/llms.txt)

# Make a heatmap with Mapbox Studio

A heatmap is a way of representing data that allows you to visualize both data point density as well as the relative differences between points based on data properties. They are a visually engaging way to encourage your audience to explore the data displayed on your map.

In this tutorial, you will use Mapbox Studio to create a heatmap that displays the location of meteorite strikes around the world, based on data collected by NASA. You will also use the weight of each meteorite in grams to display the relative size of each meteorite.

## Prerequisites

To complete this tutorial, you will need:

-   **Mapbox account**: [Sign up](https://account.mapbox.com/auth/signup/) for free or [log in](https://console.mapbox.com/) if you already have an account.

## Upload your data

To add the meteorite strike information to a style in Mapbox Studio, you need to download the data and upload it to your account:

1.  Download the `meteorites.csv` which contains information about meteorite strikes from [NASA's open data portal](https://data.nasa.gov/dataset/meteorite-landings/resource/cca1a1f1-0039-44b1-a59b-9e2a9a5ca0c7).

[Download CSV](https://docs.mapbox.com/help/ja/help/data/meteorites.csv)

2.  Go to your [**Tilesets** page](https://console.mapbox.com/studio/tilesets/).
3.  Click the **New tileset** button.
4.  Import `meteorites.csv`. To do so, you can either:

-   Click **Select a file** and select the file.
-   Drag the file into the uploader.

5.  Click **Confirm** to upload the file to your account.

When the upload is complete, there will be a notification icon in the lower right corner of the screen.

![Screenshot showing a successful file upload in Mapbox Studio](https://docs.mapbox.com/help/ja/assets/ideal-img/tutorials--studio-heatmap-tutorial--upload-successful.480.png)

## Create a new style

Now that you have uploaded the meteorite strike information as a tileset, you can add it to a new map style.

1.  Go to your [Styles page](https://console.mapbox.com/studio/) in Mapbox Studio.
2.  Click the **New style** button. Find the *Basic Template* style and click **Customize Basic Template**.
3.  Now in the Mapbox Studio style editor, you will create your map style. Rename your new style so that you can find it later! Click into the title field in the upper left side of the screen and change the title to *Meteorites*.

## Add a heatmap layer

To add and style the meteorite strike data as a heatmap layer, you will need to add a new layer to the style you created.

1.  When the style editor opens, you will see the **Components** panel on the left side. Click over to the **Layers** tab.
2.  At the top of the layer panel, click **+** to add a layer.
3.  In the list of *Data sources*, search for "meteorites" and select the meteorite strike tileset.
4.  Click the **Type** option, and select the **Heatmap** option.

Your browser doesn't support HTML5 video. Open [link to the video](https://docs.mapbox.com/help/ja/help/ja/assets/medias/tutorials--studio-heatmap-tutorial--layer-type-1b432432217810622855e45bc38575b5.mp4).

5.  Click the **Style** tab at the top of the panel.
6.  The meteorite strike tileset is now a heatmap Mapbox layer in your style. Click on the layer name and change it to "meteorite strikes".

![Screenshot showing how to change a layer name in Mapbox Studio](https://docs.mapbox.com/help/ja/assets/ideal-img/tutorials--studio-heatmap-tutorial--layer-name.2128a4f.480.png)

## Configure layer properties

A heatmap layer in Mapbox Studio has several different layer property options. Understanding what these properties mean is key to creating a heatmap that accurately represents your data and strikes the right balance between showing too much detail and being a large colorful blob!

-   **Color**: Defines the heatmap's color gradient, from a minimum value to a maximum value. You can adjust the density and color of each stop individually, as well as add and delete stops.
-   **Opacity**: Controls the global opacity of the heatmap layer.
-   **Radius**: Sets the radius for each point in pixels. As the radius number increases, the heatmap will get smoother and less detailed.
-   **Weight**: Measures how much each individual point contributes to the appearance of your heatmap. Heatmap layers have a weight of one by default, which means that all points are weighted equally. Increasing the weight property to five has the same effect as placing five points in the same location. You can use the *Style across data range* and *Style with data conditions* options to set the weight of your points based on specified properties.
-   **Intensity**: A multiplier on top of the weight property. Intensity is primarily used as a convenient way to adjust the appearance of the heatmap based on zoom level.

### Radius

In a heatmap, the radius of the points should increase as the zoom level increases to preserve the smoothness of the heatmap as the points become more spread out. For this tutorial, you will change the default (a radius of `30 px` at all zoom levels) so that the radius increases as the map is zoomed in.

1.  Select the **Radius** tab in the heatmap layer.
2.  Choose **Style across zoom range**.
3.  For the first stop, change the radius at zoom level `0` (zoomed out to the maximum extent) to `5 px`.
4.  Click **Done**.
5.  The next stop is already set at zoom level `22` (zoomed in to the maximum extent) with a radius of `30 px`. Leave this stop with these settings.

![Screenshot showing how to adjust heatmap data point radius in Mapbox Studio](https://docs.mapbox.com/help/ja/assets/ideal-img/tutorials--studio-heatmap-tutorial--radius.deed335.480.png)

### Weight

In the tileset you uploaded, the `mass(g)` property ranges from 1-60000000 grams. That's a wide range of meteorite sizes! Give more weight in your heatmap to the larger meteorites by setting stops that increase the weight of a point as the mass increases.

1.  Select the **Weight** tab.
2.  Click on **Style across data range**.
3.  You will be prompted to choose a numeric data field on which to base the property's styling. Choose `mass(g)`.  
      
    

![Screenshot showing how to choose a data field in the style across data range option](https://docs.mapbox.com/help/ja/assets/ideal-img/tutorials--studio-heatmap-tutorial--data-range.d8a02a9.480.png)

4.  The first stop is at a mass of `0` and a weight of `1`. Leave this stop at these settings.
5.  The next stop is already set to the maximum mass in the dataset. Change the weight to `25`.
6.  Click `Done`.

![Screenshot showing how to adjust heatmap weight in Mapbox Studio](https://docs.mapbox.com/help/ja/assets/ideal-img/tutorials--studio-heatmap-tutorial--weight.b41b0be.480.png)

### Intensity

The intensity of the heatmap layer can be increased as the map zooms in, to preserve a similar appearance throughout the zoom range.

1.  Select the layer's **Intensity** tab.
2.  Click on **Style across zoom range**.
3.  The first stop is at zoom level `0` and an intensity of `1`. Leave this as it is.
4.  Change the second stop to zoom level `22` and an intensity of `10`.

![Screenshot showing how to adjust heatmap intensity in Mapbox Studio](https://docs.mapbox.com/help/ja/assets/ideal-img/tutorials--studio-heatmap-tutorial--intensity.e98e404.480.png)

These images show the impact of intensity on your style's appearance. The image on the right shows intensity that uses the default of `1`, while the image on the left shows intensity that increases with zoom level.

![Screenshot showing the difference between default and custom heatmap intensity in Mapbox Studio](https://docs.mapbox.com/help/ja/assets/ideal-img/tutorials--studio-heatmap-tutorial--intensity-comparison.1ca4f33.480.png)

### Color

Heatmap layers in Mapbox Studio come with a vibrant set of preset colors with which to represent the density of the data points. For this tutorial, though, we will change the color scheme. We've taken these colors from a color recommendation site that's specifically for cartography, [Color Brewer](http://colorbrewer2.org/#type=sequential&scheme=BuGn&n=3).

1.  Select the **Color** tab in the heatmap layer.
2.  The first stop has a density of `0` and an opacity of `0`. Without these settings, the meteorite layer would be opaque, obscuring the rest of the map. Leave this stop at these settings.
3.  Click on the second stop, which has a density of `0.1`. Change the color to `#ffffb2`.
4.  Click **Done**.
5.  Adjust the remaining density stops with the following colors:

-   `0.3`: `#feb24c`
-   `0.5`: `#fd8d3c`
-   `0.7`: `#fc4e2a`
-   `1.0`: `#e31a1c`

![Screenshot showing how to change heatmap stop colors in Mapbox Studio](https://docs.mapbox.com/help/ja/assets/ideal-img/tutorials--studio-heatmap-tutorial--color.855215d.480.png)

### Opacity

Your heatmap is looking good, but it's difficult to read location labels since the meteorite strike points obscure them. Adjust the heatmap layer's opacity so that you can read the labels:

1.  Select the **Opacity** layer.
2.  Change the opacity to `0.7`, either by using the slider bar or by typing the number in directly.

![Screenshot showing how to change heatmap layer opacity in Mapbox Studio](https://docs.mapbox.com/help/ja/assets/ideal-img/tutorials--studio-heatmap-tutorial--opacity.9ed4901.480.png)

## Publish

When you finish editing your map style, publish your changes by clicking **Publish** in the upper right side of the screen. When you click the publish button, a window will display the difference between the previous and current version of this style. If you're happy with the changes, click **Publish**. Your style will now be available to share from a variety of tools and applications.

![Screenshot showing how to change heatmap stop colors in Mapbox Studio](https://docs.mapbox.com/help/ja/assets/ideal-img/tutorials--studio-heatmap-tutorial--publish.e51dac2.480.png)

If you go back to your Styles page, you will see your new style at the top of the list.

## Finished product

You have created a style that displays meteorite strike data from around the world, in a way that also allows you to show the relative mass of each meteorite.

## Next steps

Congratulations on completing this tutorial! You have created a heatmap layer in a Mapbox map style that displays meteorite strike data from around the world.

### What we covered

-   How to upload data to Mapbox Studio.
-   How to create a new map style in Mapbox Studio.
-   How to add a heatmap layer to a map style.
-   How to configure the properties of a heatmap layer in Mapbox Studio.

### Learn more

-   Take a look at the [Publish style section](https://docs.mapbox.com/studio-manual/overview/publish-your-style/) of the Mapbox Studio Manual to learn about the different ways you can use your style.
-   Understand the different layer types available in Mapbox map styles in the [Mapbox Style Specification](https://docs.mapbox.com/mapbox-gl-js/style-spec/layers/).