Published
Edited
Feb 10, 2022
3 stars
Insert cell
# Demers Cartogram + World Map Layer
Insert cell
Exercise to better understand how to build the Demers Cartogram. Inspired by https://observablehq.com/@neocartocnrs/dorling-vs-demers
Insert cell
Insert cell
## Settings
Insert cell
padding = 0.2
Insert cell
innerWidth = width - margin.left - margin.right
Insert cell
innerHeight = height - margin.top - margin.bottom
Insert cell
width = 900
Insert cell
height = 500
Insert cell
margin = ({ top: 10, left: 10, right: 10, bottom: 10 })
Insert cell
## Data
Insert cell
WB_TOPOJSON = FileAttachment("countries-v3-topo.json").json()
Insert cell
COUNTRY_NAMES = FileAttachment("country.csv").csv()
Insert cell
WORLD_POPULATION = FileAttachment("SP.POP.TOTL.csv").csv()
Insert cell
topojson = require("topojson")
Insert cell
import { forceCollide } from "@neocartocnrs/dorling-vs-demers";

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.
Learn more