USEPA / camd-eia-crosswalk

A data crosswalk to integrate U.S. power sector emission and operation data from EPA to EIA
MIT License
34 stars 11 forks source link

the code breaks at a line where camd_eia_gen_crosswalk is executed #38

Open Mihretu opened 9 months ago

Mihretu commented 9 months ago

generator_step_string <- "3_1_Generator (generators) match on plant and gen IDs Step 1"

camd_eia_gen_crosswalk <- get_manual_matches( unit_manual_matches, unit_manual_excluded, camd_unit, eia_generator, eia_by = c("EIA_PLANT_ID", "EIA_GENERATOR_ID") )

camd_eia_gen_crosswalk <- camd_eia_gen_crosswalk %>% bind_rows( match_camd_eia_units( get_camd_unmatched(camd_unit, camd_eia_gen_crosswalk), get_unmatched(eia_generator, camd_eia_gen_crosswalk, by = c("EIA_PLANT_ID", "EIA_GENERATOR_ID")), by = plant_generator_match, str_glue("{generator_step_string}a: Exact match") ) )

Mihretu commented 9 months ago

error after executing camd_eia_gen_crosswalk is " Error in missing(prev_matches) || is.na(prev_matches) : 'length = 6728' in coercion to 'logical(1)'"

and

Warning: Warning: 1 manual_matches do not match with CAMD

A tibble: 1 × 6

CAMD_PLANT_ID CAMD_UNIT_ID CAMD_GENERATOR_ID EIA_PLANT_ID EIA_BOILER_ID EIA_GENERATOR_ID

1 56032 0001 1 56032 NA 0001 Warning: Warning: 1 manual_matches do not match with EIA # A tibble: 1 × 6 CAMD_PLANT_ID CAMD_UNIT_ID CAMD_GENERATOR_ID EIA_PLANT_ID EIA_BOILER_ID EIA_GENERATOR_ID 1 56032 0001 1 56032 NA 0001