Skip to content

Solar & Wind Generation

Analyzes U.S. solar and wind electricity generation, revenue, and utility/service-territory data, sourced primarily from EIA (including the EIA-861 survey) and supplementary power-plant/utility datasets. Produces a large suite of styled Plotly visualizations (trends, state comparisons, revenue estimates).

  1. load.py — extract_data pulls series from the EIA API (api.eia.gov/series/); transform_data reshapes the raw JSON series payload into a DataFrame.
  2. data_cleaning.py — loads raw files (parquet/xlsx/geojson), applies pivoting and revenue estimation via transformations.py helpers, using constants.py (unit conversions, state abbreviation maps).
  3. transformations.py — cleaning utilities: normalize_utility_name (regex-based state-abbreviation expansion and initialism collapsing), pivot_generation, generation_monthly_revenue, generation_yearly_revenue, outlier_time_series (uses scipy.stats.t and sklearn.preprocessing).
  4. visualization.py — imports cleaned_data() from data_cleaning.py and defines the project-specific plotting suite (PV/WT generation, percentages, monthly revenue).
  5. visory_viz_module.py — a generalized, reusable plotting module (apply_standard_style, generic_line_plot, etc.) providing the monorepo’s standard Plotly look-and-feel: plotly_white template, consistent margins/annotations, and a shared high-resolution export_config (PNG, 1600×1200, 2x scale) — designed to be imported by other projects, not just this one.

data/registry.yml lists ~29 DVC-tracked sources, including: operating_generator_capacity.parquet, US Electricity Revenue & Sales.xlsx, state_electricity_consumption.parquet, Electric_Retail_Service_Territories.geojson, Power_Plants.geojson, sw_generation.parquet, and the full EIA-861 form set (Operational Data, Balancing Authority, Short Form, Net Metering, Demand Response, Reliability, Sales to Ultimate Customers, Distribution Systems, Advanced Meters, etc. — all 2023 vintage).

Exploratory notebooks: cmi_data_visualization.ipynb, example_fetch.ipynb, state_consumption.ipynb.

pandas, geopandas, dash, plotly, matplotlib, scikit-learn, scipy.

The most complete pipeline of the 7 projects — covers ingestion through polished visualization — though not yet DVC/dvc.yaml-orchestrated (no pipeline stages defined; scripts are run manually).