openaustralia / theyvoteforyou

Making parliamentary voting information accessible, understandable, and easy to use so that you can hold your elected representatives to account.
https://theyvoteforyou.org.au/
Other
136 stars 30 forks source link

Need easy way to search for senators #1198

Open mackaymackay opened 5 years ago

mackaymackay commented 5 years ago

There is currently no easy way to search for senators.

If you search by state/territory, both past and present senators appear, though only if a particular search term is used. Since we describe senators as "Senator for Queensland", you need to search by "Queensland" rather than "QLD". But since we use "Senator for NSW", you need to search by "NSW" rather than "New South Wales".

When a user searches by postcode, only their MP's record will show up.

A solution: When a user searches by postcode, both their MP and their senators should be listed.

We should also make sure senators can be searched by their state/territory's long- and short-form names (i.e. "Northern Territory" + "NT"; "Tasmania" + "Tas")

mackaymackay commented 4 years ago

This issue has been raised again via an email to the contact address (dated 27 Aug). In respect to how to solve it, the writer suggested that:

The search for the applicable senators for each state/territory, should be able to easily be done, using the first digit of the postcode used as the search parameter (assuming that the NT and ACT, each, have unique first digits of their postcodes).

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because there has been no activity on it for about six months. If you want to keep it open please make a comment and explain why this issue is still relevant. Otherwise it will be automatically closed in a week. Thank you!

mlandauer commented 2 years ago

This is something we should address

bobsbarrels commented 2 years ago

In routes that "/people/:house/:mpc" => redirect("/people/%{house}")
https://github.com/openaustralia/publicwhip/blob/master/config/routes.rb#L32

If instead this was broken out in to own controller/view this allows a list of senators per state (for example).

Code is here: https://github.com/bobsbarrels/publicwhip/commit/5baf2043545cba6b4625aa9d91075b401eca0c7d

Screenshot from 2021-12-15 10-11-30

This also would provide a place for "history" of electorates, though still a problem with how to manage redistribution.

But actually creating this view was only incidental to trying to insert a map (using leaflet, D3js and openstreetmaps). It'd be nice to discuss the map work further as there's also a version of this for electorates (based on data provided by AEC) which is pretty cool and alleviates a bunch of other issues.

map_senators_rails

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because there has been no activity on it for about six months. If you want to keep it open please make a comment and explain why this issue is still relevant. Otherwise it will be automatically closed in a week. Thank you!

katska commented 2 years ago

hmm sounds like "current" senators could be defined somewhere in that mix, either in the search terms, so only current senators are returned if that term is used, or that the search results distinguish separate current and past senators clearly.

katska commented 2 years ago

Also seems like #1329 (awaiting conflicts to be resolved before merge) only solves a part of this issue

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because there has been no activity on it for about six months. If you want to keep it open please make a comment and explain why this issue is still relevant. Otherwise it will be automatically closed in a week. Thank you!

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because there has been no activity on it for about six months. If you want to keep it open please make a comment and explain why this issue is still relevant. Otherwise it will be automatically closed in a week. Thank you!

stale[bot] commented 7 months ago

This issue has been automatically marked as stale because there has been no activity on it for about six months. If you want to keep it open please make a comment and explain why this issue is still relevant. Otherwise it will be automatically closed in a week. Thank you!

stale[bot] commented 1 month ago

This issue has been automatically marked as stale because there has been no activity on it for about six months. If you want to keep it open please make a comment and explain why this issue is still relevant. Otherwise it will be automatically closed in a week. Thank you!