Published
Edited
May 3, 2021
Importers
1 star
Insert cell
Insert cell
Insert cell
Insert cell
combined = FileAttachment("combined.001.csv").csv()
Insert cell
FileAttachment("combined.001.csv").csv()
Insert cell
commit_data = combined
.map((x) => {
return {
date: timeParser(x.date),
repo: x.repo,
author: x.author,
files_changed: x.body.split("|")[1].trim().split(" ")[0]++
};
})
.sort(({ left: a }, { left: b }) => a - b)
// filter the top ten (five ?) repos
.filter((word) => Object.keys(repos).slice(0, 5).includes(word.repo))
Insert cell
Insert cell
Insert cell
Insert cell
top_10 = tidy(top_10_contributors,
arrange('date'),
groupBy('author', [
summarize({
total_files: sum('files_changed'),
last_date: last('date'),
total_repos: nDistinct('repo')
})
]),
arrange([desc('total_files')]),
filter(d => d.author !== 'dependabot[bot]'),
sliceHead(17)
)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
timeFormat = d3.timeFormat("%Y-%m-%d")
Insert cell
Insert cell
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