This D3 block was inspired by a video I saw on Reddit showing an animated chart of StackOverflow tag popularity. I thought it woudl be fun to recreate it with D3 and D3FC.
I obtained the data from the StackOverflow Data Explorer, using the following query:
select
'##TAG##' as tag, yr, mo, COUNT(*) as total
from (
select
MONTH(p.CreationDate) AS mo,
YEAR(p.CreationDate) AS yr
from Posts p
join PostTags pt on (p.id = pt.PostId)
join Tags t on (pt.TagId = t.id)
where t.TagName = '##TAG##'
) src
group by yr, mo
order by yr, mo
The chart is rendered using various D3FC components, making good use of the built-in transition support. The code has various comments if you're interested in how it was constructed.
Built with blockbuilder.org
https://unpkg.com/babel-polyfill@6.26.0/dist/polyfill.js
https://unpkg.com/custom-event-polyfill@0.3.0/custom-event-polyfill.js
https://unpkg.com/babel-standalone@6/babel.min.js
https://unpkg.com/d3@5.5.0
https://unpkg.com/d3fc@14.0.41