Export Code
Connected
index.js
import {
select,
json,
tsv,
geoPath,
zoom,
interpolateGreens,
scaleSequential,
scaleSqrt,
max,
color,
hcl,
format,
scaleOrdinal,
} from 'd3';
import { feature } from 'topojson';
import { colorLegend } from './colorLegend';

const comma = format(',');
const svg = select('svg')
.attr('width', window.innerWidth)
.attr('height', window.innerHeight);

const pathGenerator = geoPath().projection(null);

const g = svg.append('g');
const legendG = svg.append('g');

const stateFIPS = '36';

svg.call(
zoom().on('zoom', (event) => {
g.attr('transform', event.transform);
})
);

Multivariate Choropleth Experiments

Curran Kelleher

Last edited Aug 31, 2021
Created on Jan 29, 2021

A way to visualize multidimensional racial demographic data for census tracts. This uses a square root scale instead of a linear scale, and uses 3 colors that are all the same saturation and luminance (in the HCL color space).

Data from bl.ocks.org: New York Census Tracts by Mike Bostock.

Fetching of American Community Survey data inspired by Observable: Racial distribution in NC by Mark McClure.

The variables used are documented in the ACS API Reference.

Color legend from VizHub: Color and Size Legends.

MIT Licensed