Gallery

71 figures · Open a figure to explore its code.

layout (11)

geometry (10)

plotting (16)

maps (9)

networks (6)

text (5)

math (12)

api (2)

(us_states)

US states

us_states() supplies the bundled 1:10m state atlas. Its feature IDs are two-digit FIPS strings, so California is 06, not 6. Use these IDs in the styles dictionary to highlight states independently of the feature order, for example styles={{ '06': { fill: red } }}.

The albersUsa projection places Alaska and Hawaii in insets and clips other territories. It fits the data by default. border-mode="interior" draws only shared state boundaries; the filled shapes supply the coastlines. Interior borders require a TopoJSON source such as this atlas.

TextFigure composes a measured heading, an aspect-sized GeoMap, and a wrapping caption. The outer width and base typography set the design scale; padding, gaps, and map details use ems, and the content determines the height.

See world countries for country-level fills and GeoJSON edge cases for small sources defined directly in JSX.