datamade / my-reps

:busts_in_silhouette: Enter your address to find your elected representatives. Powered by the Google Civic Information API
https://myreps.datamade.us
MIT License
70 stars 178 forks source link

Embeddable version #13

Open ghing opened 7 years ago

ghing commented 7 years ago

I've seen a number of different versions of representative lookup tools. IMHO, the biggest missing feature is the ability to embed a version of the search form and results within a campaign (or news organization's) website allowing users to look up their reps without leaving the page with the information about why they should contact them in the first place.

Additionally, it would be great to configure which levels of representatives should be returned by the search since most campaigns reflect issues or legislation impacted at only one level of government.

derekeder commented 7 years ago

@ghing the site has been setup to be embeddable on other sites. our prototype version does exactly that via an iframe: https://www.participatorybudgeting.org/resources-to-do-pb/myreps/

I could, like I do with my Fusion Tables Template, provide a pre-made iframe version of index.html and give some instructions on how to use it. Think that would be sufficient?

For the levels of reps, you can configure that by setting the flags in js/lookup_tool.js described in step 5. Did you try using that?

ghing commented 7 years ago

I think the use case I'm imagining is for an instance usable by multiple campaigns rather than deploying a static site for each campaign.

A pre-made iframe version of index.html and some docs would be helpful, I think.

I see that you can configure levels in js/lookup_tools.js, but it would be better to read these from URL query parameters. That way, someone could iframe in the search and just change the iframe URL to specify different levels of government.

derekeder commented 7 years ago

Ok. I'll put together an iframe version.

Good idea on adding the levels as query parameters. I'll open it up as a separate issue.

fgregg commented 7 years ago

@derekeder if we host an i-frame version, won't we run into API limits?

derekeder commented 7 years ago

We've already run into API limits with Google from people using the regular myreps.datamade.us URL and are now paying Google. I'm fine with paying a bit of money for more people to look up their reps.

fgregg commented 7 years ago

sounds great!

On Mon, Feb 13, 2017 at 11:53 AM, Derek Eder notifications@github.com wrote:

We've already run into API limits with Google from people using the regular myreps.datamade.us URL and are now paying Google. I'm fine with paying a bit of money for more people to look up their reps.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/datamade/my-reps/issues/13#issuecomment-279468756, or mute the thread https://github.com/notifications/unsubscribe-auth/AAgxbQk-L6TN8ztov2gNjeQpNASZ-wRtks5rcJiqgaJpZM4L-UM7 .

-- 773.888.2718

ghing commented 7 years ago

Let me know if you all need any help with this.

derekeder commented 7 years ago

I'd love help - pull request definitely welcome!