Skip to content

Instantly share code, notes, and snippets.

@hrecht
hrecht / 1_README.md
Last active March 3, 2023 16:15
Better datawrapper legends

Better datawrapper legends

Choropleth maps should have legends that reflect their linear binned data, not categorical legends. This gist explains how to make them in datawrapper.

County choropleth map with binned linear legend

Default legend :( Default choropleth categorical legend with sad face

Legend HTML

@hrecht
hrecht / .gitignore
Last active November 28, 2017 16:05
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@hrecht
hrecht / README.md
Created April 3, 2016 02:48
Grouped bar chart with legend

Grouped horizontal bar chart with legend. This uses parameters for many elements, including value column names in CSV, legend item text, colors, and axis labels.

@hrecht
hrecht / README.md
Last active November 3, 2023 15:31
Simple horizontal bar chart

This is a simple labelled bar chart using conventional margins, partly inspired by Mike Bostock's vertical example.

@hrecht
hrecht / README.md
Last active February 7, 2017 11:36
Mapbox GL JS choropleth with hover and sidebar tooltips

Choropleth example using Mapbox GL JS

Choropleth using an external geojson (DC Census Tracts by Population Change - 2000), data-driven styling, and queryRenderedFeatures to show hovered polygon's features in a sidebar tooltip.