Platform
Resources
Pricing
Sign in
Get started
CSE 412
Workspace
Fork
Public
By
Daniel Pokorny
Edited
May 29, 2023
2
Insert cell
Insert cell
seattleInfo
=
FileAttachment
(
"Tract_Data.geojson"
)
;
Insert cell
seattleData
=
seattleInfo
.
json
(
)
Insert cell
printTable
(
seattleData
)
Insert cell
vl
.
markGeoshape
(
)
.
data
(
vl
.
json
(
seattleData
)
.
property
(
'features'
)
)
.
encode
(
vl
.
color
(
)
.
fieldQ
(
'properties.Trees Per Acre'
)
.
title
(
'Tree Density'
)
)
.
project
(
vl
.
projection
(
'mercator'
)
)
.
width
(
500
)
.
height
(
700
)
.
render
(
)
Insert cell
viewof
y_metric
=
Inputs
.
select
(
[
'properties.Fatality Collision'
,
'properties.Injury Collision'
,
'properties.Property Damage Only Collision'
,
'properties.Serious Injury Collision'
]
,
{
label
:
"Select one"
}
)
Insert cell
vl
.
markPoint
(
)
.
data
(
vl
.
json
(
seattleData
)
.
property
(
"features"
)
)
.
title
(
"Trees vs. Crashes"
)
.
encode
(
vl
.
x
(
)
.
fieldQ
(
'properties.Trees Per Acre'
)
.
title
(
"Trees Per Acre"
)
,
vl
.
y
(
)
.
fieldQ
(
y_metric
)
.
title
(
y_metric
)
// add in y encoding
)
.
render
(
)
Insert cell
import
{
printTable
}
from
"@jonfroehlich/data-utilities"
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
seattleInfo
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
seattleData
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
y_metric
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML