Published
Edited
Jun 13, 2021
1 fork
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
shelfImageSlots = shelfImageCoords
.split('\n')
.map(coords => coords.split(','))
.map(coords => ({
top: `${(+Math.min(+coords[1], coords[3]) / 667) * 100}%`,
left: `${(+Math.min(+coords[0], coords[2]) / 1000) * 100}%`,
height: `${((+Math.max(+coords[1], coords[3]) -
Math.min(+coords[1], coords[3])) /
667) *
100}%`
}))
Insert cell
Insert cell
goodReadsExportText = goodReadsExport.text()
Insert cell
goodreadBooks = d3.csvParse(goodReadsExportText || '')
Insert cell
goodreadBooks
.filter(book => book['Exclusive Shelf'] == "to-read")
.map(book => +book['Number of Pages'])
.reduce((a, b) => a + b)
Insert cell
readBooks = goodreadBooks.filter(book => book['Exclusive Shelf'] == "read")
Insert cell
d3 = require('d3-array', 'd3-dsv')
Insert cell
import { file } from "@jashkenas/inputs"
Insert cell
import { Table } from "@observablehq/inputs"
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