mezerotm / cmv

CMV is a citySDK based map visualizatoin tool
5 stars 5 forks source link

Unemployment, Commute Time, and other Variables shows NaN in Legend #44

Closed hardnett closed 7 years ago

hardnett commented 7 years ago

We are getting a Not A Number (NaN) response on the legend when the Unemployment is selected.

screen shot 2017-03-08 at 12 05 50 pm

Not sure what is causing this, but it seems to be consistently happening. We probably need to check the raw data on the census site.

I was testing zip code 30013 and 30032. It looks like it's intermittent. So it may be that data is just not always being brought down. If so, then we need to check for this and reissue the request or something.

NJTuley commented 7 years ago

This is the same bug (as far as I can tell) as with issue #35 and right now as far as I can tell this is an issue caused by citysdk sending us back a bad response (in which the datapoint values are empty. We get all the valid geojson data, but no datapoint values for whatever variable (i.e. population, etc.) we sent in the request. My way of fixing this is having the program check (inside the geocallback function) if the datapoints have values, and if they do not, go back and cancel this data request and the ensuing processing, and resend a new request to the citysdk, with the hope being that the second consecutive request will not also give a broken response

NJTuley commented 7 years ago

I have this fix implemented in my local files, but I want to test it at home (right now I am on campus and the internet won't let me consistently load maps). I should be able to close this within the week if we are ok with this kind of "patch-job" fix. I am ok with it because everything I am seeing says that this is caused by an error in the citysdk's request processing, and there isn't anything we can do to prevent it

hardnett commented 7 years ago

okay. that sounds good. What we should probably do then is check the citySDK issues and see if there is an issue for this and if so then put our solution in there because it may help them. If not, then lets create an issue with the citySDK repository and put our sample code in the issue as well as what we are seeing on the debugging side of things so they have a clear picture of the problem.