Public
Edited
Apr 11, 2023
Fork of Toyota
Insert cell
Insert cell
//SummaryTable(data1)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
data
X
Model
Y
sum
TotalPopulation2010
Color
NewCause
Size
Facet X
Facet Y
Mark
Auto
Type Chart, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
data
SELECT Model, NewCause as Cause, YearReported, SUM(TotalPopulation2010) * 100 / SUM(SUM(TotalPopulation2010)) OVER(PARTITION BY YearReported, NewCause) AS percent_of_accidents
from data
GROUP BY Model, NewCause, YearReported
Insert cell
percentCauseModel
X
Model
Y
sum
percent_of_accidents
Color
Size
Facet X
Facet Y
Mark
Auto
Type Chart, then Shift-Enter. Ctrl-space for more options.

Insert cell
data
SELECT NewCause as Cause, YearReported, SUM(TotalPopulation2010) * 100 / SUM(SUM(TotalPopulation2010)) OVER(PARTITION BY YearReported) AS percent_of_accidents
from data
GROUP BY NewCause, YearReported
order by YearReported
Insert cell
Insert cell
Reckless
select Model, YearReported, sum(TotalPopulation2010) from Reckless group by Model, YearReported
Insert cell
Reckless
select YearReported, sum(TotalPopulation2010) from Reckless group by YearReported
Insert cell
Reckless
SELECT Model, YearReported, SUM(TotalPopulation2010) * 100 / SUM(SUM(TotalPopulation2010)) OVER(PARTITION BY YearReported) AS percent_of_accidents
from Reckless
GROUP BY Model, YearReported;

Insert cell
recklessAccidents
select YearReported, sum(percent_of_accidents) from recklessAccidents group by YearReported
Insert cell
recklessAccidents
X
Model
Y
sum
percent_of_accidents
Color
Model
Size
Facet X
YearReported
Facet Y
Mark
bar
Type Chart, then Shift-Enter. Ctrl-space for more options.

Insert cell
data
X*
Y*
Color
Size
Facet X
Facet Y
Mark
Auto
Type Chart, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
data
SELECT Model, NewCause as Cause, YearReported, SUM(TotalPopulation2010) * 100 / SUM(SUM(TotalPopulation2010)) OVER(PARTITION BY YearReported, Model) AS percent_of_accidents
from data
GROUP BY Model, NewCause, YearReported
order by YearReported, Model

Insert cell
data
SELECT Model, NewCause as Cause, YearReported, SUM(TotalPopulation2010) * 100 / SUM(SUM(TotalPopulation2010)) OVER(PARTITION BY YearReported, Model) AS percent_of_accidents
from data
GROUP BY Model, NewCause, YearReported
order by YearReported, Model
Insert cell
import { SummaryTable } from "@observablehq/summary-table"
Insert cell
import { files } from "@observablehq/usafacts-higher-education-data"
Insert cell
Insert cell
Insert cell
toyotaParts = FileAttachment("ToyotaParts.csv").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