Skip to content

Commit

Permalink
2021 update
Browse files Browse the repository at this point in the history
  • Loading branch information
codestance committed Apr 4, 2022
1 parent e0152be commit 6cc7fee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Babies given names in Poland the last 20 years.
Babies given names in Poland the last 21 years.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ <h2>O danych</h2>
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.8/js/select2.min.js"></script>
<script>
var chart,data;
const years = []; for(let i=2000; i<=2020; i++) years.push(i)
const years = []; for(let i=2000; i<=2021; i++) years.push(i)
const yearsColumn = ['x']; for(let y of years) yearsColumn.push(y)
function addOption(name){
const opt = `<option id="${name}" value="${name}" >${name}</option>`;
Expand All @@ -134,7 +134,7 @@ <h2>O danych</h2>
}
function addName(name){chart.load({columns:[yearsColumn, getNameData(name)]})}
function delName(name){chart.unload({ids: name})}
d3.csv('https://gist.githubusercontent.com/codestance/f9a514f4dcad8ab1e981aa322deb885f/raw/7e8b4d14df60fa493081a5155edbaa5061dbf8dd/names-given-in-poland-till-2020').then(function(dat){
d3.csv('https://gist.githubusercontent.com/codestance/0ae1d47de69530a8c38d50dd785a4a6c/raw/256683201d597826d39fb1cd0f0b900fd69d818a/names-given-in-poland-till-2021.csv').then(function(dat){
data=dat;
dat.map(d=>addOption(d.name))
chart=c3.generate({
Expand Down

0 comments on commit 6cc7fee

Please sign in to comment.