Public
Edited
Mar 8, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
missingFolders = [
...new Set(tifFileCount.filter((d) => !d.tifCount).map((d) => d.identifier))
].sort()
Insert cell
tifFileCount = {
let tifCountsByIdentifier = await FileAttachment("tif_files@1.json").json();
const tifCounts = await FileAttachment("cdm_metadata_cleaned.csv")
.csv()
.then((data) =>
data.map((d) =>
d["Place name"].split(";").map((place) => ({
identifier: d["Identifier"],
place,
tifCount: tifCountsByIdentifier[d["Identifier"]]
}))
)
);

return _.flatten(tifCounts);

// let _data = await FileAttachment("cdm_metadata_cleaned.csv").csv();
}
Insert cell
Insert cell
publicationYears = FileAttachment("cdm_metadata_cleaned.csv")
.csv()
.then((data) =>
Object.fromEntries(
data.map((d) => [d["Identifier"], +d["Date of publication "]])
)
)
Insert cell
years = await FileAttachment("cdm_metadata_cleaned.csv")
.csv()
.then((data) =>
d3.range(...d3.extent(data, (d) => +d["Date of publication "]))
)
Insert cell
places = await FileAttachment("cdm_metadata_cleaned.csv")
.csv()
.then((data) =>
_.uniq(_.flatten(data.map((d) => d["Place name"].split(";")))).sort()
)
Insert cell
_publicationYears = _.flatten(
await FileAttachment("cdm_metadata_cleaned.csv")
.csv()
.then((data) =>
data.map((d) =>
d["Place name"]
.split(";")
.map((place) => ({
identifier: d["Identifier"],
publicationYear: +d["Date of publication "],
publisher: d["Publisher"],
place
}))
.filter((d) =>
onlyExistingFiles2 ? !missingFolders.includes(d.identifier) : d
)
.filter((d) =>
onlyKelly ? d.publisher.toLowerCase().includes("kelly") : d
)
)
)
).sort((a, b) => a.publicationYear - b.publicationYear)
Insert cell
import { interval } from "@mootari/range-slider"
Insert cell
import { addTooltips } from "@mkfreeman/plot-tooltip"
Insert cell
await FileAttachment("cdm_metadata_cleaned.csv")
.csv()
.then((data) =>
_.uniq(_.flatten(data.map((d) => d["Publisher"].split(";")))).sort()
)
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