Opus Motion ★ Star on GitHub

Maps · choropleth-fill

Choropleth fill (tile map + legend)

An abstract hex/square tile territory fills region by region with a colour ramp driven by values, with labels, count-ups, a gradient legend and a highest-region callout. Regions are generic tiles, not real borders.

A free, MIT-licensed animated map from the Opus Motion Library — 616 motions for Remotion, React and plain HTML.

Choropleth fill (tile map + legend): three frames of the animated map, start, middle and end
Choropleth fill (tile map + legend) — start, middle and end of the 6.0-second motion.

What Choropleth fill (tile map + legend) is for

Regional comparisons (sales by state, scores by team, adoption by country) when you just need the pattern, not exact geography. Name tiles with `labels`; for real borders use painted-choropleth or a map image.

  • map
  • choropleth
  • regions
  • heatmap
  • hex
  • tile map
  • legend
  • data
  • statistics
  • countries
  • states

Details

Category
Animated maps & geo graphics
Length
6.0 s (180 frames at 30 fps)
Formats
16:9, 1:1, 9:16
Weight
light
Transparent overlay
yes
Seamless loop
no
Text props
labels title subtitle prefix
Colour props
colors background empty ink accent
Mood
hud
Roles
subject

Use Choropleth fill (tile map + legend) in Remotion, React or HTML

Remotion project

terminal
# copy this motion into your Remotion project
node cli/mgl.mjs add choropleth-fill --to ../my-app/src

# render an mp4 (run in the library folder)
node cli/mgl.mjs render choropleth-fill --props '{"labels":["AL","BE","CA","DO","EL","FY","GO","HA","IR","JU","KE","LU","MO","NE","OR","PA","QU","RE","SA","TA","UL","VA","WE","XA"],"title":"By region","subtitle":"Warmer means higher","prefix":"","colors":["#1E2A4A","#2F6DB5","#4CC9F0","#FFB454"],"background":"#0B1220","empty":"#16213A","ink":"#E8EEF9","accent":"#FFFFFF"}'

# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export choropleth-fill --as webm-alpha --props '{"labels":["AL","BE","CA","DO","EL","FY","GO","HA","IR","JU","KE","LU","MO","NE","OR","PA","QU","RE","SA","TA","UL","VA","WE","XA"],"title":"By region","subtitle":"Warmer means higher","prefix":"","colors":["#1E2A4A","#2F6DB5","#4CC9F0","#FFB454"],"background":"#0B1220","empty":"#16213A","ink":"#E8EEF9","accent":"#FFFFFF"}'

React / Next.js

tsx
import {MotionPlayer} from 'opus-motion-library/web';

<MotionPlayer
  motion="choropleth-fill"
  props={{
    labels: [
      'AL',
      'BE',
      'CA',
      'DO',
      'EL',
      'FY',
      'GO',
      'HA',
      'IR',
      'JU',
      'KE',
      'LU',
      'MO',
      'NE',
      'OR',
      'PA',
      'QU',
      'RE',
      'SA',
      'TA',
      'UL',
      'VA',
      'WE',
      'XA',
    ],
    title: 'By region',
    subtitle: 'Warmer means higher',
    prefix: '',
    colors: ['#1E2A4A', '#2F6DB5', '#4CC9F0', '#FFB454'],
    background: '#0B1220',
    empty: '#16213A',
    ink: '#E8EEF9',
    accent: '#FFFFFF',
  }}
  playOnView
  loop="auto"
/>

Plain HTML / WordPress

html
<script src="opus-motion.element.js" defer></script>

<opus-motion motion="choropleth-fill"
  props='{"labels":["AL","BE","CA","DO","EL","FY","GO","HA","IR","JU","KE","LU","MO","NE","OR","PA","QU","RE","SA","TA","UL","VA","WE","XA"],"title":"By region","subtitle":"Warmer means higher","prefix":"","colors":["#1E2A4A","#2F6DB5","#4CC9F0","#FFB454"],"background":"#0B1220","empty":"#16213A","ink":"#E8EEF9","accent":"#FFFFFF"}'>
</opus-motion>

Compose spec (multi-scene video)

json
{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "scenes": [
    {
      "motion": "choropleth-fill",
      "props": {
        "labels": [
          "AL",
          "BE",
          "CA",
          "DO",
          "EL",
          "FY",
          "GO",
          "HA",
          "IR",
          "JU",
          "KE",
          "LU",
          "MO",
          "NE",
          "OR",
          "PA",
          "QU",
          "RE",
          "SA",
          "TA",
          "UL",
          "VA",
          "WE",
          "XA"
        ],
        "title": "By region",
        "subtitle": "Warmer means higher",
        "prefix": "",
        "colors": [
          "#1E2A4A",
          "#2F6DB5",
          "#4CC9F0",
          "#FFB454"
        ],
        "background": "#0B1220",
        "empty": "#16213A",
        "ink": "#E8EEF9",
        "accent": "#FFFFFF"
      }
    }
  ]
}

Choropleth fill (tile map + legend) props

21 parameters — change any of them to make the motion yours.

PropDefaultWhat it does
values[12,34,58,41,27,66,83,49,72,91,38,54,19,63,77,45,29,88,52,31,69,24,57,40]one number per region (also sets how many tiles there are)
labels["AL","BE","CA","DO","EL","FY","GO","HA","IR","JU","KE","LU","MO","NE","OR","PA","QU","…one short label per region (same order as values)
title"By region"headline
subtitle"Warmer means higher"line under the headline
legendTitle"Score"legend caption
prefix""text before legend/callout numbers, e.g. "$"
suffix""text after legend/callout numbers, e.g. "%"
decimals0digits after the decimal point
shape"hex""hex" or "square" tiles
colors["#1E2A4A","#2F6DB5","#4CC9F0","#FFB454"]colour ramp low -> high (2+ hex colours)
order"wave"fill order: "wave" (left to right), "value" (low to high), "index"
showValuestrueprint the value on every tile
highlighttrueoutline + legend marker for the highest region at the end
seed4changes the territory outline
speed1timeline speed multiplier
startAt0frame to start at
background"#0B1220"background colour or "transparent"
empty"#16213A"unfilled tile colour
ink"#E8EEF9"text colour
accent"#FFFFFF"highlight outline colour
fontFamily"stub"CSS font-family

Notes & credits

Technique sources:

  • original (round 3)