Skip to content

Commit

Permalink
add chart for num installations over time #7
Browse files Browse the repository at this point in the history
  • Loading branch information
pdurbin committed Jun 5, 2022
1 parent e0faaa6 commit e257912
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions js/year.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ fetch(url).then(function(response) {
}
div.innerHTML += `${key} ` + stars + ` ${value.length}` + '\n';
}
div.innerHTML += '\n';
div.innerHTML += 'Dataverse Installations by Over Time\n';
let runningTotal = 0;
for (const [year, installations] of Object.entries(byYear)) {
runningTotal += installations.length;
let stars = '';
for (let i = 0; i < runningTotal; i++) {
stars += '*';
}
div.innerHTML += `${year} ${stars} ${runningTotal}\n`;
}
if (byYear['????'].length > 0) {
div.innerHTML += '\nInstallations with Unknown Launch Year\n';
for (const unknown of byYear['????']) {
Expand Down

0 comments on commit e257912

Please sign in to comment.