Platform
Resources
Pricing
Sign in
Get started
Dakota Sexton
Designer, writer, and developer exploring how to tell more engaging stories with interactive, data-driven experiences.
Workspace
Fork
Public
By
Dakota Sexton
Edited
Jun 16, 2023
5
Insert cell
Insert cell
DNRAllLakes-edited.csv
Filter
Columns
Sort
Slice
Save
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
Filter
Columns
11
Sort
Slice
Save
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
Filter
Columns
Sort
Slice
Save
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
Filter
1
Columns
Sort
Slice
Save
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.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
dnrData
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
File attachments
DNRAllLakes-edited.csv
CSV
minnesotaLakesLakesBiggerThan10Acresdata.csv
CSV
DNRAllLakesNOTCA.csv
CSV
Databases
Filter
Column
Operator
Columns
Sort
Column
Direction
Descending
Ascending
Slice
From
Start
To
End
dnrLakes
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
lakeScientistData
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
File attachments
DNRAllLakes-edited.csv
CSV
minnesotaLakesLakesBiggerThan10Acresdata.csv
CSV
DNRAllLakesNOTCA.csv
CSV
Databases
Filter
Column
Operator
Columns
Sort
Column
Direction
Descending
Ascending
Slice
From
Start
To
End
lakeScientistLakes
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
uniqueDNRValues
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
lakesUniqueToDNRData
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
Cells
lakesUniqueToDNRData
File attachments
DNRAllLakes-edited.csv
CSV
minnesotaLakesLakesBiggerThan10Acresdata.csv
CSV
DNRAllLakesNOTCA.csv
CSV
Databases
Filter
Column
Operator
Columns
Sort
Column
Direction
Descending
Ascending
Slice
From
Start
To
End
uniqueLakeScientistValues
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
uniqueLakeScientistLakes
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
allUniques
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
Cells
allUniques
File attachments
DNRAllLakes-edited.csv
CSV
minnesotaLakesLakesBiggerThan10Acresdata.csv
CSV
DNRAllLakesNOTCA.csv
CSV
Databases
Filter
outside_mn
Operator
Column
Operator
Columns
Sort
Column
Direction
Descending
Ascending
Slice
From
Start
To
End
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
screenshot20230614At41326Pm
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
getBlob
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML