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

Split Congressional District alert with Use My Location option #78

Closed
jablair opened this issue Feb 15, 2017 · 10 comments
Closed

Split Congressional District alert with Use My Location option #78

jablair opened this issue Feb 15, 2017 · 10 comments

Comments

@jablair
Copy link

jablair commented Feb 15, 2017

I'm getting the Split Congressional District alert even when I use the Core Location option in lieu of entering my Zip code. If there's something about my location that makes the lookup unreliable, perhaps the dialog should be reworded?

I can see about collecting some additional info later for you folks.

@bengottlieb
Copy link
Contributor

Can you provide your lat/long? That might help track it down.

@jablair
Copy link
Author

jablair commented Feb 16, 2017

<+38.88163057,-77.10497088>

If I take the lat/long down to <= 3 digits of accuracy to the right of the decimal point, I get a non-split ticket back from the API and it looks like the correct info.

@bengottlieb
Copy link
Contributor

This looks like a Google Civic Information problem; putting those values into the API directly gives me different data (and less) than entering in truncated values. I think we'll get enough accuracy anywhere in the country using just 3 significant digits (I tried it in Manhattan, which I would imagine is the densest in the country). I also tried a few other lat/longs, and while I usually got my reps, I sometimes got more (state level) data when I used fewer digits.

@subdigital
Copy link
Collaborator

Chopping off significant digits changes the accuracy of the location, so I think this would yield inconsistent results. This is going to have a much different effect for someone in Texas than in Maine.

@jablair can you try entering in your address to the API directly?

http://5calls.org/issues/?address=<URL-encoded-address>

Maybe the result that comes back won't be in a split district for your address. If that's the case we can provide a 3rd option for someone to type in their address, which is supported but I wanted to avoid having someone type from the iOS app.

We'll also have to change the messaging of that alert.

@bengottlieb
Copy link
Contributor

That's what I thought, but I figured it'd have a bigger effect in a place like NY than Texas, and it doesn't seem to have an effect there. I entered @jablair's data directly into the API [https://developers.google.com/civic-information/docs/v2/representatives/representativeInfoByAddress] and definitely saw more data with fewer digits. Did the same for a lat/long in Chicago and got similar results.

@jablair
Copy link
Author

jablair commented Feb 19, 2017

@subdigital Yeah, I got back non-split district results when I entered my address. Correct combination of senators and reps, too.

I'll cop to not understanding the split district logic, but it just struck me as odd that reducing the accuracy of the location data would increase the accuracy of the lookup results. Truncating the GPS coordinates moves my location about .07 miles and neither location is close to the edge of my congressional district. It was enough to make me wonder if there was an issues dealing with the additional digits on the back end.

@nickoneill
Copy link
Member

The boundaries in google civic aren't always perfect / up-to-date either. But no, this confuses me as well.

I posted about this here: https://developers.google.com/civic-information/docs/ci_forum?place=msg%2Fgoogle-civicinfo-api%2FZ05d_EdudSU%2FxWdK75EkDQAJ

Hopefully we'll get a better answer of what's going on.

@subdigital
Copy link
Collaborator

Tracking this under #105

@subdigital
Copy link
Collaborator

@jablair can I add you to test flight so we can verify the full address change resolves the issue for you?

@jablair
Copy link
Author

jablair commented Feb 26, 2017

@subdigital Sure, happy to help.

eblair at raoli.com should work.

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

4 participants