Published
Edited
Nov 7, 2021
Insert cell
Insert cell
Insert cell
Insert cell
import { data2 } from "@justinmatthewnewman/gasprices"
Insert cell
import { data5 } from "@justinmatthewnewman/gasprices"
Insert cell
Insert cell
Plot.plot({
marginLeft: 105,
x: {
padding: 0
},
y: {
grid: true
},
marks: [
Plot.barX(data2, { x: "gasoline", y: "name", fill: "green" }),
Plot.ruleY([0])
]
})
Insert cell
Insert cell
Personally, I would have expected Hawaii to have the highest gas price since it would be required that gas is shipped over the pacific ocean to the islands. Surprisingly, the most expensive gas prices according to the data we retrieved from the application programming interface would be in California. I was also surprised to see such a large difference in price between Texas and Nevada since they are placed so closely together on the map.
Insert cell
Insert cell
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