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

Take first line of address via web form and geocode to lat/lng to send to sunlight. #15

Open
sinak opened this issue Oct 29, 2013 · 5 comments

Comments

@sinak
Copy link
Member

sinak commented Oct 29, 2013

No description provided.

@beaugunderson
Copy link
Member

@sinak Is this necessary or useful for tdwfb?

@sinak
Copy link
Member Author

sinak commented Feb 9, 2014

So the problem here is that 40% of zip codes are split between 2 house reps, which makes zip code not sufficient to identify their rep.

The way phone2action deals with this is that when it comes to connecting to a user it asks,"there are more than 2 reps in your area, is your rep pelosi or boehner? Press 1 if pelosi, press 2 if boehner, press 3 if you don't know". If user presses 3, it picks randomly.

Other option is to present a form asking for first line of address, which then gets geocoded to an address and sent to the server.

My plan for this campaign was to just ignore and "spray and pray". If we can do the first option that'd be bomb, but if it's out of scope lets just leave it.

@sinak
Copy link
Member Author

sinak commented Feb 9, 2014

(I'm guessing it's out of scope)

@sinak
Copy link
Member Author

sinak commented Jun 25, 2014

Okay, so I wanted to write up a longer description of possibilities for how this could possibly work for the various modalities in which we use the call tool.

The problem: Users are complaining that they are connected to the wrong House reps when they use the call tool. This only happens when a campaign includes the House, and not the Senate alone.

Why it's happening: About 40% of zip codes are split between multiple congressional districts. Some are split between up to 5 reps. Sunlight's Congress API simply returns all the reps within that particular zip code in a randomized order, even if a big majority of people in that zip code are served by just one of the reps. At the moment, the call tool just picks the first one that Sunlight returns, and hopes that's the right rep.

Possible solutions:

  • Ask user for the first line of their address.
    How it'd work: If we get their first line of the address (via webform, or otherwise), we can look up their address using a 3rd party API (e.g. SmartyStreets), return a lat/lng, and query Sunlight with that instead of using the zip code.
    Potential problems: With a phone-initiated call (e.g. user dials (xxx) xxx-xxxx), there's no easy way of having users input the first line of their address.
  • Sometimes ask the user for the first line of their address.
    How it'd work:We could first ask for a user's zipcode, and if there are multiple reps, we could ask the for the first line of their address.
    Potential problems: An extra step might reduce our overall conversion rate.
  • Try to guess which rep is right
    How it'd work: We could also use either KML files describing the boundaries of zip codes and congressional districts to figure out which rep is most likely to be correct, and even come up with an approximate confidence level.
    Potential problems: Population density isn't uniform, making this a bit tricky. We could also use zip+4s (which mark delivery locations), but not every delivery location is a residence.
  • Ask the user
    How it'd work: When a call is connected, if there are multiple reps for their zip code, we could list each of them, and ask the user to "Press 1 for Rep X, 2 for Rep. Y, or Press 3 if you don't know".
    Potential problems: A lot of people probably don't know who their Rep. is. I didn't know mine for at least 6 months after I moved to SF.

How we can implement:

I think the ideal solution is probably to do a mix of all three:

Web-initiated calls: Ask for users zip, if we are >95% sure of their rep or the campaign doesn't target reps, place the call, and if not, ask for the first line of their address.
Phone-initiated calls: Ask users to type in 1, 2 or 3 if there are multiple reps.

But since doing all that is quite complicated, I think we should do the following for now:

  1. Web-initiated calls: Accept a "first line of address" parameter. If its provided, check with SmartyStreets, and return an error to the client if there is no address match. If there is a match, use that to figure out House reps. If there is no first line of address provided, do the same as with phone-initiated calls.
  2. Phone-initiated calls: Ask users to type in 1, 2 or 3 if there are multiple reps.

Often campaigns will target Senate and won't need the first line of the address, so it definitely needs to be an optional field.

@sinak
Copy link
Member Author

sinak commented Jun 27, 2014

@beaugunderson First off: ✨ 🐴 ✨

Secondly, are you still up for giving this a shot?

catachresis pushed a commit to 18mr/call-congress that referenced this issue Nov 16, 2016
New locate_by type: LOCATION_DISTRICT
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

2 participants