Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metrics and run inventory: domain and expectation of alias column relative to script usage #374

Open
akselx opened this issue May 1, 2024 · 1 comment
Assignees

Comments

@akselx
Copy link

akselx commented May 1, 2024

This is a question related to the data stored in the lightweight PBA50Plus_model_run_inventory.csv.

The file has an alias column containing information on the type of run, with the canonical forms being EIR, DBP, NP or more verbose forms.

On the script side, the field is used in a number of different ways depending on the specific indicator. The question is first, whether the presence of polluted literals (e.g. No Project v9 instead of No Project) is an issue, and second, if the adjustment is just to use a separate column in the run inventory to carry the additional information.

for the connected indicators in the transit_service_area_share() function, the flavor of the run type is used to match with the relevant transit service area classification (areas are different for plan and no project scenarios).

transit_scenario = transit_scenario_mapping.get(this_modelrun_alias,'fbp')

for the affordable set of indicators, a number of literal tests are done to check for No Project status - having strings like No Project v1 could potentially lead to unintended consequences, with the absence of a No Project match runs being invariably classified as DBP, which could affect metrics. Many of these are found in the at_risk_housing_preserve_share() or housing_cost_share_of_income().

value = None if modelrun_alias in ["No Project"] else 1

if modelrun_alias == "No Project":

if rtp=="RTP2021" and modelrun_alias != "No Project":

if modelrun_alias != "No Project":

In the lowinc_homeownership_share() function, a separate function is used to parse DBP or NP, to get the appropriate homeownership measure.

this_modelrun_alias = metrics_utils.classify_runid_alias(modelrun_alias)

@akselx
Copy link
Author

akselx commented May 7, 2024

@lmz : I got around this by just adding a variant row to the data inventory, so we don't need to parse the (increasingly) verbose alias name to determine whether it is a DBP or NP run.
I don't think this has any adverse consequences to other uses.

modelrun_alias = row['variant']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants