Published
Edited
Apr 21, 2022
2 stars
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
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
Insert cell
data_state = d3.csv("https://gist.githubusercontent.com/lnicoletti/bca539575ee3086c0f915ae571d32c38/raw/445e03dc9e6a564de65ebee4f003317aa6f6206f/state_tpv_policies.csv")
Insert cell
Insert cell
data_raw = d3.csv("https://gist.githubusercontent.com/lnicoletti/28b382c0a6afa02e62ce30b902a0a4f5/raw/a40cc3efde15f60b3cd28bd035dffbb3d5d5f56e/tweets_protests_time.csv")
Insert cell
Insert cell
counties_raw = d3.csv("https://gist.githubusercontent.com/lnicoletti/23c2a6aa41d033e28f4461d9f3719c77/raw/02a28b90a288e7cbb34ea939dccdfb58fa0f2a92/counties_stats.csv")
Insert cell
Insert cell
state_ts_data = d3.csv("https://gist.githubusercontent.com/lnicoletti/c5a20cf96aa0052cfb70edb25884576b/raw/566e5eb524165a7d0a3c4aaf44fafc3887faebd7/state_tp_time.csv")
Insert cell
Insert cell
Insert cell
us = FileAttachment("counties-albers-10m.json").json()
Insert cell
Insert cell
Insert cell
Insert cell
tooltip = d3
.select("body")
.append("div")
.attr("class", "tooltip")
// .style("font-size", "10pt")
// .style("font-family", "Lato")
.style("position", "absolute")
.style("text-align", "left")
.style("width", "auto")
.style("height", "auto")
.style("padding", "5px")
.style("background", "#fff")
// .style("border", "black")
.style("pointer-events", "none")
.style("opacity", 0)
Insert cell
metric_p = "protest"+metric
Insert cell
metric_t = "tweet"+metric
Insert cell
width = 470
Insert cell
height = 400
Insert cell
margin = ({top: 20, right: 30, bottom: 30, left: 40})
Insert cell
Insert cell
Insert cell
Insert cell
import { data as state_codes } from "@observablehq/electoral-college-decision-tree"
Insert cell
import {select} from "@jashkenas/inputs"
Insert cell
Insert cell
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