-
Notifications
You must be signed in to change notification settings - Fork 3
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
Data doesn't load when tracts or NTAs with 0 population are selected. #288
Comments
when you select 2 or more tracts or NTAs (works ok for blocks) with 0 population (+additional park tracts/NTAs, doesn't have to be 0 pop), data explorer doesn't load. If you selected 2 or more tracts or NTAs with 0 population + residential tract, then it loads. If you select 1 tract/NTA with 0 population, it loads. No idea what the issue is because there's nothing to distinguish park tracts in the database. |
@jpiacentinidcp Yeah this one is very odd but we can definitely investigate For anyone looking to play around with reproducing in a non-local environment, I suggest using staging - it has the DB performance improvements so it will be much more performant. This may already be covered in one scenarios described above but I noticed the data fails to load if you select one park tract with 0 pop and one with > 0 pop (screenshot from staging): But it does work if you select one 0 pop tract and one > 0 pop residential tract: In any case, this will take some digging. As we get into debugging this, it's probably best not to get too hung up on the park vs non-park thing as it could be a red herring. Not to say it's definitely not part of the issue, but I'm struggling to think of anywhere the code makes the distinction between park/non-park tracts and NTAs |
Transferred to the PFF backend repo but the fix here could be in either the front end or back end, or a combination of the two. |
@horatiorosa I'm adding @bmarchena to this as well since it sounds like you haven't had a chance to pick this up yet. |
@TylerMatteo I've been able to trace the issue to this function we're using, "executeWithData". Specifically, this function is failing when it tries to parse either our sum or sum_ratio formulas. These formulas are attempting to divide by 0 when a tract is selected without a population. The problem is that we currently don't have a way of validating the values before the formula is parsed and executed. These values are simply strings of variable names until the parser uses a custom get function to get the appropriate values, and by that point the parser will execute the formula and error out. |
@jpiacentinidcp @bmarchena Based on Bryan's findings, I'm recommending we backlog this because of the effort it would take to fix. I'll leave it open but set it to have no Iteration so it will still show up in the backlog. |
ADO ticket: https://dev.azure.com/NYCPlanning/ITD/_workitems/edit/5407
The text was updated successfully, but these errors were encountered: