Public
Edited
Jul 12, 2022
2 forks
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
anonymous_vote_share_continuous = d3.scaleSequential(d3.interpolateMagma).domain([0, 50])
Insert cell
head_to_head_sequential = d3.scaleSequential(d3.interpolateRdYlBu).domain([-50,50])
Insert cell
candidate_ordinal = d3.scaleOrdinal(d3.schemeSet2).domain(candidates_in_race)
Insert cell
projection = d3.geoMercator().rotate([118,0,0]).fitExtent([[0,0], [width, height]], data)
Insert cell
path = d3.geoPath(projection)
Insert cell
width = 1000
Insert cell
height = 500
Insert cell
candidates_in_race = Object.keys(data.features[0].properties.results_total)
Insert cell
Insert cell
data = await race.value
Insert cell
Insert cell
import {Choropleth} from "@d3/choropleth"
Insert cell
import {Swatches} from "@d3/color-legend"
Insert cell
import {Legend} from "@d3/color-legend"
Insert cell
import { Tooltip } from "@clhenrick/tooltip-component"
Insert cell
import { Correlation } from "@harrystevens/correlation"
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more