Platform
Resources
Pricing
Sign in
Get started
Christian MilNeil
Workspace
Fork
Public
By
Christian MilNeil
Edited
May 22, 2024
Fork of
Bike/ped fatalities and race in Massachusetts
5
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
L
=
require
(
'leaflet@1.2.0'
)
Insert cell
html
`<link href='${
resolve
(
'leaflet@1.2.0/dist/leaflet.css'
)
}' rel='stylesheet' />`
Insert cell
topojson
=
require
(
"topojson-client@3"
)
Insert cell
Insert cell
Insert cell
Insert cell
ridesByDate
=
{
const
data
=
await
FileAttachment
(
"BluebikeRidesByDateAndBikeType@1.csv"
)
.
csv
(
{
typed
:
true
}
)
;
;
return
data
.
columns
.
slice
(
1
)
.
flatMap
(
(
type
)
=>
data
.
map
(
(
{
date
,
[
type
]
:
rides
}
)
=>
(
{
date
,
type
,
rides
}
)
)
)
;
}
Insert cell
ridesByMonth
=
{
const
data
=
await
FileAttachment
(
"monthlyWinterBluebikesData2022-2024"
)
.
csv
(
{
typed
:
true
}
)
;
;
return
data
.
columns
.
slice
(
2
)
.
flatMap
(
(
type
)
=>
data
.
map
(
(
{
month
,
year
,
[
type
]
:
rides
}
)
=>
(
{
month
,
year
,
type
,
rides
}
)
)
)
;
}
Insert cell
stations
=
FileAttachment
(
"BluebikeWinter2024RidesByStationAndBikeType@1.csv"
)
.
csv
(
)
Insert cell
import
{
legend
}
from
"@d3/color-legend"
Insert cell
Insert cell
Insert cell
d3
=
require
(
'd3@5.0'
)
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
Compare fork
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
timescale
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
barchart
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
map
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
L
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
topojson
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
tipText
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
stationGeo
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
stationArray
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
ridesByDate
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
ridesByMonth
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
stations
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
colorRamp
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
l
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
d3
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML