American Sheriffs Data Summary
This example summarizes the Reflective Democracy Campaign dataset of elected sheriffs by displaying basic file metrics. It shows the CSV file's size in kilobytes, the number of data rows, and the number of columns. The visualization loads the data from a remote Gist URL using `d3.csv` and then displays the computed statistics as large text in a pre element. The code also includes commented-out alternatives using `fetch` with async/await and a nested promise approach.
AI-generated descriptionA program that loads and parses some CSV data from the Reflective Democracy American Sheriffs database.
Reflective Democracy Campaign dataset of elected sheriffs in the 46 states that have them. The dataset includes race, gender, and policital party affiliation.
The original dataset can be downloaded here
Additional information is located at The Reflective Democracy website
The raw data has been extracted from the first sheet of the linked .XLSX file and saved as a .CSV file on this Gist.
Some questions to explore:
- How closely do the demographics of elected sheriffs match their constituents? Are racial or gender groups significantly underrepresented?
- Is there a pattern to the geographical distribution of sherriffs by race, gender, or political party affiliation?
- What states have the largest discrepancies between the population demographics and the demographics of the sheriffs?
- Are mismatches between the population and it's representative more likely in large areas, small areas, rural areas, or urban areas?
Categorical data of interest:
- state
- electoral district
- urban/rural
- party rollup
- race
- gender
Quantitative data of interest:
- Native %
- White %
- Black %
- Hispanic %
- Asian %
- Multi %
- Other %
- Census 2010 population