Public
Edited
May 9
Insert cell
Insert cell
Insert cell
md`### Heading 3`
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
format = d => `${d}%`
Insert cell
Insert cell
contig = FileAttachment("ProjectedNRISHP.json").json()
Insert cell
counties = topojson.feature(contig, contig.objects.ProjectedNRISHP)
Insert cell
csv_dataprecipanom7580 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, precipanomaly19751980}) => [+STCOFIPS, +precipanomaly19751980])
Insert cell
csv_dataprecipanom8085 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, precipanomaly19801985}) => [+STCOFIPS, +precipanomaly19801985])
Insert cell
csv_dataprecipanom8590 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, precipanomaly19851990}) => [+STCOFIPS, +precipanomaly19851990])
Insert cell
csv_dataprecipanom9095 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, precipanomaly19901995}) => [+STCOFIPS, +precipanomaly19901995])
Insert cell
csv_dataprecipanom9500 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, precipanomaly19952000}) => [+STCOFIPS, +precipanomaly19952000])
Insert cell
csv_dataprecipanom0005 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, precipanomaly20002005}) => [+STCOFIPS, +precipanomaly20002005])
Insert cell
csv_dataprecipanom0510 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, precipanomaly20052010}) => [+STCOFIPS, +precipanomaly20052010])
Insert cell
csv_dataprecipanom1015 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, precipanomaly20102015}) => [+STCOFIPS, +precipanomaly20102015])
Insert cell
csv_dataprecipanom1520 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, precipanomaly20152020}) => [+STCOFIPS, +precipanomaly20152020])
Insert cell
csv_dataprecipanom2024 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, precipanomaly20202024}) => [+STCOFIPS, +precipanomaly20202024])
Insert cell
csv_datavalue7580 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, tempvalue19751980}) => [+STCOFIPS, +tempvalue19751980])
Insert cell
csv_datavalue8085 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, tempvalue19801985}) => [+STCOFIPS, +tempvalue19801985])
Insert cell
csv_datavalue8590 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, tempvalue19851990}) => [+STCOFIPS, +tempvalue19851990])
Insert cell
csv_datavalue9095 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, tempvalue19901995}) => [+STCOFIPS, +tempvalue19901995])
Insert cell
csv_datavalue9500 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, tempvalue19952000}) => [+STCOFIPS, +tempvalue19952000])
Insert cell
csv_datavalue0005 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, tempvalue20002005}) => [+STCOFIPS, +tempvalue20002005])
Insert cell
csv_datavalue0510 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, tempvalue20052010}) => [+STCOFIPS, +tempvalue20052010])
Insert cell
csv_datavalue1015 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, tempvalue20102015}) => [+STCOFIPS, +tempvalue20102015])
Insert cell
csv_datavalue1520 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, tempvalue20152020}) => [+STCOFIPS, +tempvalue20152020])
Insert cell
csv_datavalue2024 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, tempvalue20202024}) => [+STCOFIPS, +tempvalue20202024])
Insert cell
csv_dataanom7580 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, tempanomaly19751980}) => [+STCOFIPS, +tempanomaly19751980])
Insert cell
csv_dataanom8085 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, tempanomaly19801985}) => [+STCOFIPS, +tempanomaly19801985])
Insert cell
csv_dataanom8590 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, tempanomaly19851990}) => [+STCOFIPS, +tempanomaly19851990])
Insert cell
csv_dataanom9095 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, tempanomaly19901995}) => [+STCOFIPS, +tempanomaly19901995])
Insert cell
csv_dataanom9500 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, tempanomaly19952000}) => [+STCOFIPS, +tempanomaly19952000])
Insert cell
csv_dataanom0005 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, tempanomaly20002005}) => [+STCOFIPS, +tempanomaly20002005])
Insert cell
csv_dataanom0510 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, tempanomaly20052010}) => [+STCOFIPS, +tempanomaly20052010])
Insert cell
csv_dataanom1015 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, tempanomaly20102015}) => [+STCOFIPS, +tempanomaly20102015])
Insert cell
csv_dataanom1520 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, tempanomaly20152020}) => [+STCOFIPS, +tempanomaly20152020])
Insert cell
csv_dataanom2024 = d3.csvParse(await FileAttachment("ultramaster@2.csv").text(),({STCOFIPS, tempanomaly20202024}) => [+STCOFIPS, +tempanomaly20202024])
Insert cell
precipdataanom7580 = Object.assign(new Map(csv_dataprecipanom7580), {title: "Precipitation Anomaly by County 1975-1980"})
Insert cell
precipdataanom8085 = Object.assign(new Map(csv_dataprecipanom8085), {title: "Precipitation Anomaly by County 1980-1985"})
Insert cell
precipdataanom8590 = Object.assign(new Map(csv_dataprecipanom8590), {title: "Precipitation Anomaly by County 1985-1990"})
Insert cell
precipdataanom9095 = Object.assign(new Map(csv_dataprecipanom9095), {title: "Precipitation Anomaly by County 1990-1995"})
Insert cell
precipdataanom9500 = Object.assign(new Map(csv_dataprecipanom9500), {title: "Precipitation Anomaly by County 1995-2000"})
Insert cell
precipdataanom0005 = Object.assign(new Map(csv_dataprecipanom0005), {title: "Precipitation Anomaly by County 2000-2005"})
Insert cell
precipdataanom0510 = Object.assign(new Map(csv_dataprecipanom0510), {title: "Precipitation Anomaly by County 2005-2010"})
Insert cell
precipdataanom1015 = Object.assign(new Map(csv_dataprecipanom1015), {title: "Precipitation Anomaly by County 2010-2015"})
Insert cell
precipdataanom1520 = Object.assign(new Map(csv_dataprecipanom1520), {title: "Precipitation Anomaly by County 2015-2020"})
Insert cell
precipdataanom2024 = Object.assign(new Map(csv_dataprecipanom2024), {title: "Precipitation Anomaly by County 2020-2024"})
Insert cell
datavalue7580 = Object.assign(new Map(csv_datavalue7580), {title: "Average Temperatures by County 1975-1980"})
Insert cell
datavalue8085 = Object.assign(new Map(csv_datavalue8085), {title: "Average Temperatures by County 1980-1985"})
Insert cell
datavalue8590 = Object.assign(new Map(csv_datavalue8590), {title: "Average Temperatures by County 1985-1990"})
Insert cell
datavalue9095 = Object.assign(new Map(csv_datavalue9095), {title: "Average Temperatures by County 1990-1995"})
Insert cell
datavalue9500 = Object.assign(new Map(csv_datavalue9500), {title: "Average Temperatures by County 1995-2000"})
Insert cell
datavalue0005 = Object.assign(new Map(csv_datavalue0005), {title: "Average Temperatures by County 2000-2005"})
Insert cell
datavalue0510 = Object.assign(new Map(csv_datavalue0510), {title: "Average Temperatures by County 2005-2010"})
Insert cell
datavalue1015 = Object.assign(new Map(csv_datavalue1015), {title: "Average Temperatures by County 2010-2015"})
Insert cell
datavalue1520 = Object.assign(new Map(csv_datavalue1520), {title: "Average Temperatures by County 2015-2020"})
Insert cell
datavalue2024 = Object.assign(new Map(csv_datavalue2024), {title: "Average Temperatures by County 2020-2024"})
Insert cell
dataanom7580 = Object.assign(new Map(csv_dataanom7580), {title: "Temperature Anomaly by County 1975-1980"})
Insert cell
dataanom8085 = Object.assign(new Map(csv_dataanom8085), {title: "Temperature Anomaly by County 1980-1985"})
Insert cell
dataanom8590 = Object.assign(new Map(csv_dataanom8590), {title: "Temperature Anomaly by County 1985-1990"})
Insert cell
dataanom9095 = Object.assign(new Map(csv_dataanom9095), {title: "Temperature Anomaly by County 1990-1995"})
Insert cell
dataanom9500 = Object.assign(new Map(csv_dataanom9500), {title: "Temperature Anomaly by County 1995-2000"})
Insert cell
dataanom0005 = Object.assign(new Map(csv_dataanom0005), {title: "Temperature Anomaly by County 2000-2005"})
Insert cell
dataanom0510 = Object.assign(new Map(csv_dataanom0510), {title: "Temperature Anomaly by County 2005-2010"})
Insert cell
dataanom1015 = Object.assign(new Map(csv_dataanom1015), {title: "Temperature Anomaly by County 2010-2015"})
Insert cell
dataanom1520 = Object.assign(new Map(csv_dataanom1520), {title: "Temperature Anomaly by County 2015-2020"})
Insert cell
dataanom2024 = Object.assign(new Map(csv_dataanom2024), {title: "Temperature Anomaly by County 2020-2024"})
Insert cell
precipanom7580 = Array.from(csv_datavalue7580.values(), d => d[1])
Insert cell
precipanom8085 = Array.from(csv_datavalue8085.values(), d => d[1])
Insert cell
precipanom8590 = Array.from(csv_datavalue8590.values(), d => d[1])
Insert cell
precipanom9095 = Array.from(csv_datavalue9095.values(), d => d[1])
Insert cell
precipanom9500 = Array.from(csv_datavalue9500.values(), d => d[1])
Insert cell
precipanom0005 = Array.from(csv_datavalue0005.values(), d => d[1])
Insert cell
precipanom0510 = Array.from(csv_datavalue0510.values(), d => d[1])
Insert cell
precipanom1015 = Array.from(csv_datavalue1015.values(), d => d[1])
Insert cell
precipanom1520 = Array.from(csv_datavalue1520.values(), d => d[1])
Insert cell
precipanom2024 = Array.from(csv_datavalue2024.values(), d => d[1])
Insert cell
value7580 = Array.from(csv_datavalue7580.values(), d => d[1])
Insert cell
value8085 = Array.from(csv_datavalue8085.values(), d => d[1])
Insert cell
value8590 = Array.from(csv_datavalue8590.values(), d => d[1])
Insert cell
value9095 = Array.from(csv_datavalue9095.values(), d => d[1])
Insert cell
value9500 = Array.from(csv_datavalue9500.values(), d => d[1])
Insert cell
value0005 = Array.from(csv_datavalue0005.values(), d => d[1])
Insert cell
value0510 = Array.from(csv_datavalue0510.values(), d => d[1])
Insert cell
value1015 = Array.from(csv_datavalue1015.values(), d => d[1])
Insert cell
value1520 = Array.from(csv_datavalue1520.values(), d => d[1])
Insert cell
value2024 = Array.from(csv_datavalue2024.values(), d => d[1])
Insert cell
anom7580 = Array.from(csv_dataanom7580.values(), d => d[1])
Insert cell
anom8085 = Array.from(csv_dataanom8085.values(), d => d[1])
Insert cell
anom8590 = Array.from(csv_dataanom8590.values(), d => d[1])
Insert cell
anom9095 = Array.from(csv_dataanom9095.values(), d => d[1])
Insert cell
anom9500 = Array.from(csv_dataanom9500.values(), d => d[1])
Insert cell
anom0005 = Array.from(csv_dataanom0005.values(), d => d[1])
Insert cell
anom0510 = Array.from(csv_dataanom0510.values(), d => d[1])
Insert cell
anom1015 = Array.from(csv_dataanom1015.values(), d => d[1])
Insert cell
anom1520 = Array.from(csv_dataanom1520.values(), d => d[1])
Insert cell
anom2024 = Array.from(csv_dataanom2024.values(), d => d[1])
Insert cell
precipanomcolor = d3.scaleThreshold()
.domain([-50, -25, -15, -10, -5, 5, 10, 20, 30, 40, 50])
.range(["#543005",
"#8c510a",
"#bf812d",
"#dfc27d",
"#f6e8c3",
"#f5f5f5",
"#ccece6",
"#99d8c9",
"#66c2a4",
"#2ca25f",
"#006d2c", "#003c30"])
Insert cell
//more information on sequential scales: https://observablehq.com/@d3/sequential-scales
// color = d3.scaleSequentialQuantile([...data.values()], d3.interpolateBlues)

// color = d3.scaleQuantile()
// .domain(med_age)
// .range()

valuecolor = d3.scaleThreshold()
.domain(30, 35, 40, 45, 50, 55, 60, 65, 70)
.range(["#fff7ec", "#fee8c8", "#fdd49e", "#fdbb84", "#fc8d59", "#ef6548", "#d7301f", "#b30000", "#7f0000"])
Insert cell
anomcolor = d3.scaleThreshold()
.domain([-1, -0.5, 0, 0.5, 1, 2.5])
.range(["#fef0d9", "#fdd49e", "#fdbb84", "#fc8d59", "#e34a33", "#b30000"])
Insert cell
width = 975
Insert cell
height = 610
Insert cell
margin = 50
Insert cell
//Rotate the map sets the longitude of origin for our UTM Zone 15N projection.
//projection = d3.geoTransverseMercator().rotate([94,0]).fitExtent([[margin, margin], [width, height]], counties);
//d3 reference for projections: https://d3js.org/d3-geo

//use the following url for specific projection settings: https://github.com/veltman/d3-stateplane
//Use this code to set up the map projection (if different than geographic projection)

projection = d3.geoAlbersUsa().fitExtent([[margin, margin], [width - margin, height - margin]], counties)

//projection = d3.geoMercator().fitExtent([[margin, margin], [width - margin, height - margin]], counties)
Insert cell
//Using a path generator to project geometry onto the map
path = d3.geoPath().projection(projection);
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

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