nova_ec
  • Home
  • API Reference
  • Tutorial
  • Getting Started
  • Configuration
  1. API Reference
  2. Data Module
  3. energy_community
  • Overview
    • Overview
  • Getting Started
    • Installation and Setup
    • Configuration
  • Tutorial
    • Project Setup Tutorial
  • API Reference
    • Function reference
    • Config Module
      • config_manager
    • Data Module
      • system_data
      • energy_community
    • Geocoding Module
      • geocoder
    • Matching Module
      • ec_matcher
      • county_matcher
      • eligibility
      • export_utils
    • Retrieval Module
      • data_retriever
    • Utils Module
      • logger
      • analysis_utils
    • Main Module
      • main
      • cli

On this page

  • energy_community
    • Functions
      • format_fips
      • load_and_prepare_all_ec_data
      • load_energy_community_data
      • prepare_coal_closure_data
      • prepare_statistical_area_data
      • rename_columns

Other Formats

  • Github (GFM)
  1. API Reference
  2. Data Module
  3. energy_community

energy_community

data.energy_community

Module for loading and processing energy community data.

Functions

Name Description
format_fips Format FIPS code columns to have a standard number of digits.
load_and_prepare_all_ec_data Load and prepare all energy community data for 2023 and 2024.
load_energy_community_data Load energy community data for a specific year.
prepare_coal_closure_data Prepare coal closure data by combining shapefile with appendix data.
prepare_statistical_area_data Prepare statistical area data by combining shapefile with appendix data.
rename_columns Rename DataFrame columns according to the mapping.

format_fips

data.energy_community.format_fips(df, columns, digits)

Format FIPS code columns to have a standard number of digits.

Args: df: DataFrame containing FIPS codes columns: List of column names to format digits: Number of digits for the FIPS codes

Returns: DataFrame with formatted FIPS codes

load_and_prepare_all_ec_data

data.energy_community.load_and_prepare_all_ec_data(
    base_path,
    config=None,
    skip_missing=True,
)

Load and prepare all energy community data for 2023 and 2024.

Args: base_path: Base path for data files config: Configuration dictionary skip_missing: If True, continue with available data even if some files are missing

Returns: Tuple of (CCEC_2023, CCEC_2024, FFSAEC_2023, FFSAEC_2024)

load_energy_community_data

data.energy_community.load_energy_community_data(
    base_path,
    year,
    config=None,
    skip_missing=True,
)

Load energy community data for a specific year.

Args: base_path: Base path for data files year: Year for which to load data (2023 or 2024) config: Configuration dictionary (optional) skip_missing: If True, continue with empty data when files are missing

Returns: Tuple of (coal closure shapefile, statistical area shapefile, coal closure appendix, statistical area appendix)

prepare_coal_closure_data

data.energy_community.prepare_coal_closure_data(ccec, apdx_ccec, year)

Prepare coal closure data by combining shapefile with appendix data.

Args: ccec: Coal closure shapefile data apdx_ccec: Coal closure appendix data year: Year of the data

Returns: Combined GeoDataFrame

prepare_statistical_area_data

data.energy_community.prepare_statistical_area_data(ffsa, apdx_ffsa, year)

Prepare statistical area data by combining shapefile with appendix data.

Args: ffsa: Statistical area shapefile data apdx_ffsa: Statistical area appendix data year: Year of the data

Returns: Combined GeoDataFrame

rename_columns

data.energy_community.rename_columns(df, column_mapping)

Rename DataFrame columns according to the mapping.

Args: df: DataFrame to rename columns for column_mapping: Dictionary mapping old column names to new ones

Returns: DataFrame with renamed columns

system_data
geocoder
 
 
  • Built with [Quarto](https://quarto.org/) and [quartodoc](https://machow.github.io/quartodoc/)