Platform
Resources
Pricing
Sign in
Get started
Chris Henrick
Maps, Data, Viz, UX, Design
Workspace
Fork
Published
msm-fellowship
By
Chris Henrick
Edited
Dec 2, 2020
Importers
7 stars
msm-fellowship
Introduction to Data Visualization for the MSM / SHLI Fellowship
Health Equity Tracker Data Visualization Precedence
COVID-19 Vulnerability Index
U.S. Hexagon Map SVG with Data Joined
Viz Ideas for U.S. Chronic Disease Indicators: Diabetes
U.S. Diabetes Prevalence by County
U.S. Obesity Prevalence by County
Visualizing Racial/Ethnic Disparities in COVID-19 Deaths
HET Vis Prototype: Provisional COVID-19 Death Counts by County and Race
Compare U.S. State Demographics
Compare Chronic Diseases in U.S. States
Compare Chronic Diseases in U.S. States (V2)
Chronic Diseases, U.S. State Small Multiples
U.S. County Population Density Choropleth
ACS Race/Ethnicity Characteristics by State
Population Age Distribution by Race/Ethnicity Chart
U.S. County Population Age Distribution
U.S. Census Population Age Distributions by County by Race / Ethnicity
NY Times COVID-19 Cases by Race/Ethnicity
U.S. Coronavirus Cumulative Cases Animated Map
Hello, CARTO-VL
CARTO-VL: Update Vis Layer
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
mapColorScale
=
d3
.
scaleQuantize
(
)
.
domain
(
[
0
,
25
]
)
.
range
(
[
"#f0f9e8"
,
"#bae4bc"
,
"#7bccc4"
,
"#43a2ca"
,
"#0868ac"
]
)
Insert cell
mapHeight
=
(
width
*
2
)
/
3
Insert cell
mapPadding
=
24
Insert cell
path
=
d3
.
geoPath
(
projection
)
Insert cell
projection
=
d3
.
geoAlbersUsa
(
)
.
fitExtent
(
[
[
mapPadding
,
mapPadding
]
,
[
width
-
mapPadding
,
mapHeight
-
mapPadding
]
]
,
{
type
:
"FeatureCollection"
,
features
:
statesGeo
}
)
Insert cell
statesGeo
=
topojson
.
feature
(
us
,
us
.
objects
.
states
)
.
features
Insert cell
us
=
d3
.
json
(
"https://cdn.jsdelivr.net/npm/us-atlas@3/counties-10m.json"
)
Insert cell
Insert cell
maxValue
=
d3
.
max
(
data
,
d
=>
d
.
datavalue
)
Insert cell
groups
=
Array
.
from
(
d3
.
group
(
data
,
d
=>
d
.
stratification1
)
.
keys
(
)
)
.
sort
(
)
Insert cell
stateNames
=
Array
.
from
(
d3
.
group
(
data
,
d
=>
d
.
locationdesc
)
.
keys
(
)
)
.
sort
(
)
Insert cell
stateNameToFips
=
new
Map
(
Array
.
from
(
stateFipsToName
)
.
map
(
(
[
key
,
value
]
)
=>
[
value
,
key
]
)
)
Insert cell
stateFipsToName
=
new
Map
(
Array
.
from
(
groupedStateName
)
.
map
(
(
[
name
,
d
]
)
=>
[
d
[
0
]
.
locationid
,
name
]
)
)
Insert cell
stateFipsToAbbr
=
new
Map
(
Array
.
from
(
stateAbbrToFips
)
.
map
(
(
[
abbrv
,
fips
]
)
=>
[
fips
,
abbrv
]
)
)
Insert cell
stateAbbrToFips
=
new
Map
(
Array
.
from
(
groupedState
)
.
map
(
(
[
abbrv
,
d
]
)
=>
[
abbrv
,
d
[
0
]
.
locationid
]
)
)
Insert cell
states
=
Array
.
from
(
groupedState
.
keys
(
)
)
.
sort
(
)
Insert cell
groupedStateName
=
d3
.
group
(
data
,
d
=>
d
.
locationdesc
)
Insert cell
groupedState
=
d3
.
group
(
data
,
d
=>
d
.
locationabbr
)
Insert cell
data
=
dataRelevant
Insert cell
Insert cell
import
{
drawChoroplethMap
}
from
"@clhenrick/reusable-county-choropleth-map"
Insert cell
import
{
Tooltip
}
from
"@clhenrick/tooltip-component"
Insert cell
import
{
swatchesInput
}
from
"@clhenrick/color-swatches-input"
Insert cell
import
{
dataRelevant
,
pivotbyRaceTable
as
pivotbyRaceValue
}
from
"@clhenrick/het-data-intake-template-cdc-diabetes-state-level"
Insert cell
import
{
legend
}
from
"@d3/color-legend"
Insert cell
import
{
select
,
autoSelect
}
from
"@jashkenas/inputs"
Insert cell
topojson
=
require
(
"topojson-client@3"
)
Insert cell
d3
=
require
(
"d3@6"
)
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
dot_chart
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
maxDisparityLegend
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
dotChart
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
dotChartRaceFilter
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
raceColorScale
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
map_sel_race
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
selectedRace
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
legendMapSelectedRace
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
tooltipContents
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
mapDataSelectedRace
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
small_multiples_maps
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
legendSmallMultipleMaps
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
small_multiple_maps_all_races
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
bar_selected_state
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
selectedState
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
chart
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
selectedStateData
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
defaultState
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
bar_all_states_selected_race
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
selectedRaceAllStates
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
bar_chart_all_states_sel_race
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
dataByRaceSelected
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
dataByRace
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
grouped_bar_all_states_races
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
groupedBarStateRace
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
groupedBarData
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
mapColorScale
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
mapHeight
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
mapPadding
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
path
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
projection
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
statesGeo
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
us
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
maxValue
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
groups
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
stateNames
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
stateNameToFips
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
stateFipsToName
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
stateFipsToAbbr
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
stateAbbrToFips
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
states
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
groupedStateName
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
groupedState
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
data
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
topojson
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
d3
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML