Published
Edited
Jul 9, 2021
8 stars
Insert cell
Insert cell
dataByCounty
Insert cell
masterData
Insert cell
Insert cell
viewof t = Inputs.table(data, {columns:["State", "County"]})
Insert cell
SummaryTable(data)
Insert cell
Inputs.table(dataByCounty, {
format: {
types: d => _.map(d, 'type').join(","),
issues: d => _.map(d, 'type').join(",")
}
})
Insert cell
viewof selectedYear = Inputs.range([2012, 2018], {label:"Pick a year", step:1, value:2018})
Insert cell
selectedYear
Insert cell
dataByCounty[0].eavsData
Insert cell
// "very straightforward" data wrangling- promote the eaves data up into the object
dataWithEAVS = dataByCounty.flatMap(d => {
_.each(d.eavsData, (val, key) => {
if (_.isObject(val)) Object.assign(d, {[val.label]: val[selectedYear]})
})
return d
})
Insert cell
<div style="max-height:300px; overflow:scroll;">${SummaryTable(dataWithEAVS)}</div>
Insert cell
Insert cell
aq.from(dataWithEAVS)
.select('delay', 'time')
.view()
Insert cell
search
Insert cell
column_names = Object.keys(dataWithEAVS[0])
Insert cell
dataWithEAVS
Insert cell
Insert cell
addTooltips(Plot.plot({
facet: {
data: dataWithEAVS,
y: 'state',
label:'',
marginLeft: 100
},
fy: {
label:""
},
marks: [
Plot.dot(dataWithEAVS, {
x: 'time',
r: 'delay',
title: d => `State: ${d.state}\nTime: ${d.time}\n delay:${d.delay} hours`,
fill: 'state'
})
]
})
)
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell
Insert cell
## Questions

- Does length of delay vary by type of problem?
- Geographic comparisons?
- % of issues for a certain category across counties
- delays across counties or states
- correlation between rejected ballots and voter intimidation

Long lines
- Correlation between long lines/delays and population number?
- Were there less polling stations per person / per population (where delays)?
- Were long lines associated with certain times of day?

Tech problems
- What is the average internet access of counties?
- in relation to delays?
- rural vs urban?
-

Voter intimidation
- ...

Disregard for COVID-19
- ...

Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import {groupedByFIPS as dataByCounty} from 'fe3067837db50860'
Insert cell
import {masterData} from '@sxywu/all-project-data-cached'
Insert cell
import {SummaryTable} from "@observablehq/summary-table"
Insert cell
import {aq, op} from "@uwdata/arquero"
Insert cell
import {addTooltips} from "@mkfreeman/plot-tooltip"
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