Giter Site home page Giter Site logo

Comments (10)

bengottlieb avatar bengottlieb commented on July 27, 2024

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

from ios.

jablair avatar jablair commented on July 27, 2024

<+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.

from ios.

bengottlieb avatar bengottlieb commented on July 27, 2024

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.

from ios.

subdigital avatar subdigital commented on July 27, 2024

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.

from ios.

bengottlieb avatar bengottlieb commented on July 27, 2024

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.

from ios.

jablair avatar jablair commented on July 27, 2024

@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.

from ios.

nickoneill avatar nickoneill commented on July 27, 2024

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.

from ios.

subdigital avatar subdigital commented on July 27, 2024

Tracking this under #105

from ios.

subdigital avatar subdigital commented on July 27, 2024

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

from ios.

jablair avatar jablair commented on July 27, 2024

@subdigital Sure, happy to help.

eblair at raoli.com should work.

from ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.