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

Development projects & geography summary error #104

Open
theocharides opened this issue Aug 13, 2019 · 0 comments
Open

Development projects & geography summary error #104

theocharides opened this issue Aug 13, 2019 · 0 comments

Comments

@theocharides
Copy link

theocharides commented Aug 13, 2019

@conorhenley recently implemented a new policy geography system (for trich/conn/hra geographies), which later generated a runtime error.

Running step 'geographic_summary'
Traceback (most recent call last):
  File "baus.py", line 390, in <module>
    run_models(MODE, SCENARIO)
  File "baus.py", line 319, in run_models
    orca.run(models, iter_vars=years_to_run)
  File "c:\users\etheocharides\documents\scenarios\bayarea_urbansim\src\orca\orca\orca.py", line 1945, in run
    step()
  File "c:\users\etheocharides\documents\scenarios\bayarea_urbansim\src\orca\orca\orca.py", line 791, in __call__
    return self._func(**kwargs)
  File "C:\Users\etheocharides\Documents\scenarios\bayarea_urbansim\baus\summaries.py", line 670, in geographic_summary
    parcel_output.groupby(geography).\
  File "C:\anaconda2\envs\numpytest\lib\site-packages\pandas\core\generic.py", line 6663, in groupby
    observed=observed, **kwargs)
  File "C:\anaconda2\envs\numpytest\lib\site-packages\pandas\core\groupby\groupby.py", line 2152, in groupby
    return klass(obj, by, **kwds)
  File "C:\anaconda2\envs\numpytest\lib\site-packages\pandas\core\groupby\groupby.py", line 599, in __init__
    mutated=self.mutated)
  File "C:\anaconda2\envs\numpytest\lib\site-packages\pandas\core\groupby\groupby.py", line 3291, in _get_grouper
    raise KeyError(gpr)
KeyError: 'juris_trich'
None
Traceback (most recent call last):
  File "baus.py", line 400, in <module>
    raise e
KeyError: 'juris_trich

Conor fixed the error in 2162f34. He mentioned that the error had to do with the new "juris_trich" tag not being defined on summary.parcel_output. He also mentioned that the summary.parcel_output is defined in the scheduled development events model. This left us wondering why the error wasn't triggered previously during SDEM.

In a separate line of work, it was realized that most of the development projects (used in the scheduled developments model) were not being read in, because their geom_ids were not valid. It was previously thought that x,y columns were being used in place of geom_ids. The fix for this was made here 1c44d4a. Although most of the projects were not being activated, a handful should have been which should have triggered the error.

Recently, it has also appeared that the columns used to specify particular development projects for particular scenarios do not have an effect on the projects that are built. In addition, development projects prior to 2015 were not being modeled, because scheduled development events is not included in the base year model sequence.

So, this is a two-in-one issue, acknowledging some inconsistencies in the development projects process, but that also may be related to the initial error on summary.parcel_output. We'll need to sort out whether we ever did make the switch to using x,y for the development projects, and if the transition process could be related to the error that showed up, or if it could be related to something else in the development projects.

@theocharides theocharides changed the title Development projects & Development projects & geography summary error Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant