Public
Edited
May 9
Insert cell
Insert cell
Plot.plot({
width: 960,
height: 600,
projection: "transverse-mercator",
color: {
scheme: "blues"
},
marks: [
Plot.density(csv_data, {
x: "longitude",
y: "latitude",
bandwidth: 0.1,
fill: "density"
}),
Plot.dot(csv_data, {
x: "longitude",
y: "latitude",
r: 1,
fill: "currentColor"
}),
Plot.geo(Counties, { strokeOpacity: 0.3 }),
Plot.geo(Counties)
]
})
Insert cell
threshold = 10
Insert cell
height = 550
Insert cell
margin = 20
Insert cell
width = 950
Insert cell
path_Well_Quality_Points = d3.geoPath().projection(projection)
Insert cell
path_Counties = d3.geoPath().projection(projection)
Insert cell
projection = d3.geoTransverseMercator().rotate([94,0]).fitExtent([[0, 0], [width, height]], topojson.feature(Counties, Counties.objects.Iowa_Count_Project));
Insert cell
format = d3.format(".2s")
Insert cell
radius(350)
Insert cell
d3.max([...data.values()])
Insert cell
radius(17)
Insert cell
//proportional symbols
radius = d3.scaleSqrt([0, d3.max([...data.values()])], [0, 40])
Insert cell
data.get(6)
Insert cell
data = Object.assign(new Map(csv_data))
Insert cell
csv_data = d3.csvParse(await FileAttachment("output.tsv").text(),({GEOSAMID, NOx_mgL, Arsenic_ug}) => [+GEOSAMID, +NOx_mgL])
Insert cell
//import the point data (geojson)
Well_Quality_Points = FileAttachment("Well_Water_Quality_prj.json").json()
Insert cell
//import the polygon base map data
Counties = FileAttachment("Iowa_Count_Project.json").json()
Insert cell
simple = require("simple-statistics@7.0.7/dist/simple-statistics.min.js")
Insert cell
topojson = require("topojson-client@3")
Insert cell
d3 = require("d3@5")
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