USEPA / flowsa

Library that attributes resource use, waste, emissions, and loss to economic sectors
MIT License
23 stars 19 forks source link

Allow the same FBA from different year as `source_names` #413

Open bl-young opened 3 months ago

bl-young commented 3 months ago

In rare cases, we may want to get the same FBA but from different years in a single FBS.

source_names:
  FBA:
    year: 2018
    activity_sets:
      ...

  FBA:
    year: 2019 # These datasets last appear in 2019
    activity_sets:
      ...

However we can't use a duplicate key under source_names

bl-young commented 3 months ago

The following can solve this:

source_names:
  FBA_1:
    source_name: FBA
    year: 2018
    activity_sets:
      ...

  FBA_2:
    source_name: FBA
    year: 2019 # These datasets last appear in 2019
    activity_sets:
      ...

With a new optional parameter source_name which when present will replace the key for obtaining the FBA.