Parse electricAccountsData.csv
This example parses a CSV file containing household electric consumption data, showing the file size in kilobytes, row count, and column count. Using D3 v5, the code loads the dataset via the `d3.csv` method and formats it with `d3.csvFormat`. It also demonstrates alternative loading approaches commented out, including `fetch` with `async`/`await` and a nested promise chain. The data source is a remote GitHub Gist containing three electric accounts with attributes like total kilowatt-hours, utility charges, and net meter credits.
AI-generated descriptionHow does seasonal electric consumption and cost compare? How much solar energy is being applied via net metering credits by month and by year?
This data is my home electric energy consumption from the web site of the team I manage at my day job. We currently have a bar graph visualization on the web site that shows energy consumption and cost and I would like to use what I am learning in this class to create more effective visualizations. I've seen a graph of a circular stacked bar chart for more effective seasonal comparisons which I think would be a more effective visualization.
The data set is about 25 records short of 100 rows. National Grid only renders data for two year back, and these three accounts are all my personal accounts; however, we have clients on the web site that have thousands of accounts. I can make up realistic data to complete 100 rows if needed.
Attributes that are interesting are:
- accountNumber is categorical and the account number for the data in the rows
- totalKwh is quantitative and the amount of electricity consumed for the month
- utilityCharges is quantitative and the amount of the bill for the month in USD
- readFromDate and readToDate are ordinal and identify the billing period
- netMeterCredits are quantitative and the USD credit amount from solar generated electricity by the community solar project that we belong to.
Socioeconomic data extract from US Census 2019-2010 American Community Survey