svelte-d3-colorpleth-map-dunks-v-starbucks

Svelte D3 Colorpleth Map Dunks V Starbucks

A d3 choropleth map implemented in Svelte, visualizing the ratio of Dunkin' Donuts to Starbucks locations across the U.S. A simple and effective example of data visualization.

D3 Choropleth Map Example

This repository showcases a simple d3 choropleth map component, elegantly crafted with Svelte. It's like a visual coffee tour, mapping the ratio of Dunkin' Donuts to Starbucks locations across the states.

Components

ChoroplethMap.svelte

A delightful map rendering component that uses d3's geoPath, scaleLinear, and other d3 goodies to paint the states with colors based on the Dunkin' to Starbucks ratio. It's like a latte art, but for geography.

Legend.svelte

A straightforward legend component to guide the viewers through the color-coded world of coffee locations. It's the map's barista, if you will.

Usage

Simply clone the repository, install the dependencies, and run the project to see the choropleth map in action. It's easier than ordering a triple-shot, half-sweet, non-fat caramel macchiato.

git clone https://github.com/mj-linane/colorpleth-map-dunks-v-starbucks.git
cd colorpleth-map-dunks-v-starbucks
npm install
npm run dev

Source

This tutorial was originally from here.

Top categories

Loading Svelte Themes