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

# Style circles categorically

![Add point data to a style from a vector tileset and use the match and get expressions to assign the color of each point in a CircleLayer based on a data property.](https://docs.mapbox.com/android/ja/assets/ideal-img/maps-examples-style-circles-categorically.24a7f00.480.png)

This example demonstrates adding point data to a **Maps SDK for Android** style from a [vector tileset](https://docs.mapbox.com/data/tilesets/guides/vector-tiles-introduction/). It utilizes the [`match`](https://docs.mapbox.com/style-spec/reference/expressions/#match) and [`get`](https://docs.mapbox.com/style-spec/reference/expressions/#get) expressions to assign colors to each point in a [`CircleLayer`](https://docs.mapbox.com/android/maps/api/latest/mapbox-maps-android/com.mapbox.maps.extension.style.layers.generated/-circle-layer/) based on a specific data property. The implementation includes setting up a [`vectorSource`](https://docs.mapbox.com/android/maps/api/latest/mapbox-maps-android/com.mapbox.maps.extension.style.sources.generated/-vector-source/) with a URL to the tileset data, defining a `CircleLayer` with population data and specifying the circle's radius using an exponential interpolator. The colors of the circles are determined by a `match` expression that maps different ethnicity values to corresponding RGB color values, with a fallback color provided. The map is centered on a specific location and zoomed in to a certain level using [`CameraOptions`](https://docs.mapbox.com/android/maps/api/latest/mapbox-maps-android/com.mapbox.maps/-camera-options/).

There are several ways to add markers, annotations, and other shapes to the map using the Maps SDK. To choose the appropriate approach for your application, read the [Markers and annotations](https://docs.mapbox.com/android/ja/maps/guides/annotations/) guide.

> **Note: Android Examples App Available**
> 
> This example code is part of the **Maps SDK for Android Examples App**, a working Android project [available on GitHub](https://github.com/mapbox/mapbox-maps-android/tree/v11.29.0/). Android developers are encouraged to run the examples app locally to interact with this example in an emulator and explore other features of the Maps SDK.
> 
> See our [Run the Maps SDK for Android Examples App](https://docs.mapbox.com/help/tutorials/maps-sdk-android-examples-app/) tutorial for step-by-step instructions.

**Kotlin**

Title: `StyleCirclesCategoricallyActivity.kt`

[View on GitHub](https://github.com/mapbox/mapbox-maps-android/blob/v11.29.0/app/src/main/java/com/mapbox/maps/testapp/examples/StyleCirclesCategoricallyActivity.kt)

```kt
package com.mapbox.maps.testapp.examples

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.mapbox.bindgen.Value
import com.mapbox.common.MapboxOptions
import com.mapbox.geojson.Point
import com.mapbox.maps.CameraOptions
import com.mapbox.maps.MapView
import com.mapbox.maps.MapboxMap
import com.mapbox.maps.Style
import com.mapbox.maps.extension.style.expressions.generated.Expression
import com.mapbox.maps.extension.style.expressions.generated.Expression.Companion.exponentialInterpolator
import com.mapbox.maps.extension.style.expressions.generated.Expression.Companion.literal
import com.mapbox.maps.extension.style.expressions.generated.Expression.Companion.match
import com.mapbox.maps.extension.style.expressions.generated.Expression.Companion.rgb
import com.mapbox.maps.extension.style.expressions.generated.Expression.Companion.zoom
import com.mapbox.maps.extension.style.layers.generated.circleLayer
import com.mapbox.maps.extension.style.sources.generated.vectorSource
import com.mapbox.maps.extension.style.style

/**
 * Add point data to a style from a vector tileset and use the match and
 * get expressions to assign the color of each point in a CircleLayer
 * based on a data property.
 */
class StyleCirclesCategoricallyActivity : AppCompatActivity() {

  private lateinit var mapboxMap: MapboxMap

  override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    val mapView = MapView(this)
    setContentView(mapView)
    mapboxMap = mapView.mapboxMap
    mapboxMap.loadStyle(
      style(Style.STANDARD) {

        +vectorSource("ethnicity-source") {
          url("http://api.mapbox.com/v4/examples.8fgz4egr.json?access_token=" + MapboxOptions.accessToken)
        }

        +circleLayer("population", "ethnicity-source") {
          sourceLayer("sf2010")
          circleRadius(
            exponentialInterpolator(
              base = 1.75,
              input = zoom(),
              stops = arrayOf(
                literal(12) to literal(2),
                literal(22) to literal(180)
              )
            )
          )
          circleColor(
            match(
              input = Expression.get("ethnicity"),
              stops = arrayOf(
                literal("white") to rgb(251.0, 176.0, 59.0),
                literal("Black") to rgb(34.0, 59.0, 83.0),
                literal("Hispanic") to rgb(229.0, 94.0, 94.0),
                literal("Asian") to rgb(59.0, 178.0, 208.0),
                literal("Other") to rgb(204.0, 204.0, 204.0),
              ),
              fallback = rgb(0.0, 0.0, 0.0)
            )
          )
        }
      }
    ) {
      mapboxMap.setStyleImportConfigProperty("basemap", "theme", Value.valueOf("monochrome"))
    }

    mapboxMap.setCamera(
      CameraOptions.Builder()
        .center(Point.fromLngLat(-122.447303, 37.753574))
        .zoom(12.0)
        .build()
    )
  }
}
```