I’m going to see how far I can get in this years Advent of Code. My solutions are here.
Category: Data Analysis (Page 1 of 2)
My previous post showing the definitions of different generations was in service of creating the chart below. This chart illustrates the “rise and fall” of generations across their lifecycle. As a new generation is born, it’s share of the population increases. Once a generations births have ended, there is a very long tail as people in that generation slowly die and new generations are born.
The data from the chart below comes from the U.S. Census bureau. I was able to use yearly population estimates from 1980 onward, but prior to 1980 the data comes from decennial Census PUMs data (hence why, for example, Gen X looks it starts in 1970–instead of 1965–and why the baby boomers have such an odd slope between 1960 and 1970). The Census Bureau does not publish birth year, so I estimated birth year (and thus generation) from age and year of estimate. There will thus ‘slop’ in my estimates but they should be close for my purpose here.
Generations is a very… imprecise… sociological concept. People just sorta look at a rough cohort of ages and say “yeah, you all are a generation.” Start and end points (as well as labels) just sorta coalesce out of the ether.
Nevertheless, they have their use and certainly are cemented in the popular imagination. I’ve been doing some reading on generations and really appreciated this diagram and article by Pew Research. But I wish it went a little earlier and a little later. So I made my owner version, *heavily* influenced by the Pew version.
I’ve started playing around with D3. If I’m going to be locked inside for months, I might as well learn something, right? (And it might just take months of being locked inside for me to actually understand D3.). Thought I’d post my first simple bar chart here. It shows the songs Fugazi played most frequently during their live shows. To do this in WordPress, I’m currently embedding another html file, change it to pre-formatted, and then changing it again to paragraph (no idea why this last step is necessary). But is seems to work.
Here’s the same chart as a direct link https://martinbarron.org/wp-content/uploads/2020/04/t1_simplebar.html
I’ve been playing with a R package called gganimate and created a simple animation showing the spread of Covid-19 through April 19th.