Public
Edited
Jan 14, 2024
Paused
2 forks
Importers
2 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
outages_by_house_district
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
outages_by_senate_district
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
consumer_energy_outage_path = consumer_energy_outage_paths.sort(
(a, b) =>
Math.abs(extractDateFromFilename(a, "ce_") - target_date) -
Math.abs(extractDateFromFilename(b, "ce_") - target_date)
)[0]
Insert cell
consumer_energy_outages = {
const response = await fetch(
`https://corsproxy.bunkum.us/corsproxy/?apiurl=https://raw.githubusercontent.com/fgregg/consumer-energy-outages/main/${consumer_energy_outage_path}`
);
const data = await response.json();
return data;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
scraped_path = outage_paths.sort(
(a, b) =>
Math.abs(extractDateFromFilename(a, "dte_") - target_date) -
Math.abs(extractDateFromFilename(b, "dte_") - target_date)
)[0]
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
kdbush = require("kdbush")
Insert cell
Insert cell
dte_house_districts = FileAttachment("dte_house_districts(1).json").json()
Insert cell
dte_senate_districts = FileAttachment("dte_senate_districts.json").json()
Insert cell
import { stormTracks } from "@fgregg/storm-tracks"
Insert cell
storm_tracks = show_storm_tracks
? stormTracks(storm_date, [-85, 41.5, -81.5, 44.5])
: []
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