

# ec_matcher

`matching.ec_matcher`

Module for matching solar systems to energy communities.

## Functions

| Name | Description |
|----|----|
| [determine_ec_definition_eligibility](#nova_ec.matching.ec_matcher.determine_ec_definition_eligibility) | Determine eligibility for different energy community definitions. |
| [match_systems_to_communities](#nova_ec.matching.ec_matcher.match_systems_to_communities) | Match solar systems to energy communities. |
| [prepare_energy_communities](#nova_ec.matching.ec_matcher.prepare_energy_communities) | Prepare energy community geodataframe by adding type and year columns. |

### determine_ec_definition_eligibility

``` python
matching.ec_matcher.determine_ec_definition_eligibility(df)
```

Determine eligibility for different energy community definitions. This is a wrapper around the centralized eligibility function.

Args: df: DataFrame containing solar system data

Returns: DataFrame with eligibility flags

### match_systems_to_communities

``` python
matching.ec_matcher.match_systems_to_communities(
    solar_systems_df,
    CCEC_2023=None,
    CCEC_2024=None,
    FFSAEC_2023=None,
    FFSAEC_2024=None,
)
```

Match solar systems to energy communities.

Args: solar_systems_df: DataFrame containing solar system data CCEC_2023: Coal Closure Energy Communities for 2023 CCEC_2024: Coal Closure Energy Communities for 2024 FFSAEC_2023: Fossil Fuel Statistical Areas for 2023 FFSAEC_2024: Fossil Fuel Statistical Areas for 2024

Returns: DataFrame with matching results

### prepare_energy_communities

``` python
matching.ec_matcher.prepare_energy_communities(ec_gdf, ec_type, year)
```

Prepare energy community geodataframe by adding type and year columns.

Args: ec_gdf: Energy community GeoDataFrame ec_type: Type of energy community (CCEC or FFSAEC) year: Year of the data

Returns: Prepared GeoDataFrame
