Public
Edited
Jun 16, 2023
Insert cell
Insert cell
DNRAllLakes-edited.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
dnrLakes = dnrData.reduce((acc, curr) => {
return [...acc, curr["County lake number"]];
}, [])
Insert cell
Plot.plot({
marginLeft: 125,
x: { grid: true },
color: { legend: true },
marks: [
Plot.barX(
lakeScientistData,
Plot.groupY(
{ x: "count" },
{
y: "County",
sort: { limit: 22, y: "x", reverse: "true" }
}
)
),
Plot.ruleX([0])
]
})
Insert cell
minnesotaLakesLakesBiggerThan10Acresdata.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
uniqueDNRValues = dnrLakes.reduce((acc, curr) => {
if (!lakeScientistLakes.includes(parseInt(curr))) {
return [...acc, curr];
} else {
return acc;
}
}, [])
Insert cell
lakesUniqueToDNRData = dnrData.reduce((acc, curr) => {
if (uniqueDNRValues.includes(curr["County lake number"])) {
return [...acc, curr];
} else return acc;
}, [])
Insert cell
lakesUniqueToDNRData
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
uniqueLakeScientistValues = lakeScientistLakes.reduce((acc, curr) => {
if (!dnrLakes.includes(curr)) {
return [...acc, curr];
} else {
return acc;
}
}, [])
Insert cell
uniqueLakeScientistLakes = lakeScientistData.reduce((acc, curr) => {
if (uniqueLakeScientistValues.includes(curr["County lake number"])) {
return [...acc, curr];
} else return acc;
}, [])
Insert cell
allUniques = [...uniqueLakeScientistLakes, ...lakesUniqueToDNRData]
Insert cell
allUniques
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
screenshot20230614At41326Pm = FileAttachment("Screenshot 2023-06-14 at 4.13.26 PM.png").image()
Insert cell
getBlob = (data) => {return new Blob([d3.csvFormat(data)], {type: "text/csv"})}
Insert cell
DOM.download(getBlob(allUniques), "uniqueLakeRecords.csv")
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