Social Media Survey Demographics Histogram
This visualization displays histograms of demographic survey data, showing the frequency distribution of respondents by gender, race, age, and LGBT status. Users can switch between these categorical variables using a dropdown menu, with each bar’s tooltip revealing the exact response count. The chart uses D3 v7’s `scaleBand`, `scaleLinear`, and `flatGroup` for binning and axes, with data loaded from a CSV via `csvParse`. The code combines demographic fields from the survey and filters out incomplete or underage responses before rendering.
AI-generated descriptionA histogram of race, age, gender and LGBT status and demographics of my MQP dataset with simple axes, using the d3 histogram basic tutorial with tooltips from Map of top-rated restaurants in Greater Boston.