Letter Count Bar Chart
This interactive bar chart displays the frequency of each letter in a text file loaded asynchronously via `d3.text`. The visualization updates in real time as users type into a textarea, triggering a redraw of the SVG bars through a `keyup` event. Letter counts are computed client-side with a `d3.map`, while vertical spacing uses `d3.scaleLinear` and horizontal categories use `d3.scaleBand`. The chart renders its axes with `d3.axisBottom` and `d3.axisRight`, and includes SVG animation for enter/update transitions.
AI-generated descriptionLetter Count Bar Chart
In this demo, we asynchronously load a text file, use JavaScript to count the number of times each letter appears in that file, and generate a bar chart showing the letter count in D3.js v4.
This is meant to be an introductory demo to expose students to HTML, CSS, JavaScript, D3.js, bl.ocks.org, and blockbuilder.org for the first time.
References
This is based off the following example:
http://bl.ocks.org/sjengle/e8c0d6abc0a8d52d4b11
It has been updated for D3.js v4 based on the following updated bar chart example:
https://bl.ocks.org/mbostock/3885304
Please see the original examples for videos and additional references.
forked from <a href='http://bl.ocks.org/sjengle/'>sjengle</a>'s block: <a href='http://bl.ocks.org/sjengle/1e23258249638a508426470a48ff2924'>Letter Count Bar Chart (d3v4)</a>
forked from <a href='http://bl.ocks.org/alark/'>alark</a>'s block: <a href='http://bl.ocks.org/alark/51a1e33da99f0c0457b8baf587c04860'>Letter Count Bar Chart (d3v4)</a>