Giter Club home page Giter Club logo

gotv-dashboard's Introduction

Contributor Covenant

GOTV Dashboard

Guides

Setup for local development

  1. Install the Ruby version specified in .ruby-version by some method for your operating system - if you do not have an existing preferred method for doing this:

  2. Install Mozilla Geckodriver via some means (e.g. Brew or any Linux package manager), in order to run feature tests which use Selenium.

  3. Clone and set up the repo:

    git clone [email protected]:bobwhitelock/gotv-dashboard.git
    cd gotv-dashboard
    gem install bundler
    gem update --system
    bundle install --without production
    rake db:setup
    rails server
  4. To create a work space for development, either:

    a. visit http://localhost:3000 and click the link to generate a demo work space;

    b. or, if you have access to Contact Creator and some real data, and want to try using this, export this data and run:

    rake gotv:import_contact_creator \
       name=$name_for_your_work_space \
       polling_stations=$url_for_polling_stations_data \
       campaign_stats=$url_for_campaign_stats_data

To run tests

The dashboard has fairly complete test coverage, and this should ideally be maintained as new features are added. Most of the test coverage is via Capybara feature tests, and so will require Mozilla Geckodriver to run as described above.

To run tests, use rspec.

Once all tests have been run, coverage/index.html can be viewed in a browser to see all test coverage.

Development tips

  • The app mostly follows standard Rails conventions, so getting familiar with these will help.

  • An ERD diagram of all app models is available at docs/erd.pdf. This should be automatically regenerated as the database is migrated, but you can ensure it's up-to-date by running rake erd.

  • Running rspec and then checking coverage/index.html can help you ensure you have full test coverage of your changes.

To access admin dashboard

  1. Have GOTV_DASHBOARD_PASSWORD environment variable exported in your environment before running the app, e.g. like this:

    export GOTV_DASHBOARD_PASSWORD='verysecure123'
    bin/rails server
  2. Visit $dashboard_url/admin - where $dashboard_url is the URL you are accessing the GOTV dashboard at, e.g. http://localhost:3000 by default.

  3. Enter username as admin, password as the value exported above.

gotv-dashboard's People

Contributors

baob avatar benspencer avatar bobwhitelock avatar dependabot[bot] avatar duncanfwalker avatar rstones avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

baob

gotv-dashboard's Issues

Polling stations can appear twice in work space

E.g.:

  1. Create a workspace
  2. Select all polling stations
  3. Search for 'Kendall Hall' on dashboard, this polling station will appear twice

Possibly we should just be deduping them, on import so they only appear once. Or maybe this is a sign of a deeper issue, is displaying turnout proportion still accurate if a polling station is for multiple wards?

Ability for committee room to add wards/polling stations outside their own area

'Labour party' asked the committee room to get counts for some wards outside the committee rooms area (Hainault). This does happen some times but [no end to this sentence]

editing workspace scope - do we need to able to import from multiple councils?

  • Possibly this is already supported for all use cases that will occur in practise? If party will only ask you to collect data within your own region then this should already be possible, just need to add these extra wards on workspace creation
    • Maybe we do need to distinguish these in UI in some way though?

Improve display of polling stations on dashboard

Ordering on dashboard could be better - unless an area is particularly exceptional the ordering is always going to be with large polling districts first. Order areas with low turnout, but proportionally high Labour promises first?

Guesstimated votes is useful though not completely accurate. Could be useful to customize how likely you think labour voters are to actually turn out in each area (rather than assuming they're as likely as the average voter). Matt actually does something similar to this weeks ahead of elections to figure out where to target campaigning, particularly important for council elections as less resources and have to make sure get enough votes in each council seat area

Matt: not sure how useful putting in live Labour promises voted as get results back from door knocking, could be more effort than it's worth. Possibly more useful to just be able to shift labour vote rate used in guesstimates up or down (but maybe this should be done ahead of time to avoid you convincing yourself of things you already know).

Sorting polling stations dynamically is possibly confusing - use standard ordering, maybe flag the results visually instead that need more attention - high/low turnout etc.

Would be useful to see where volunteer groups are - via GPS?

  • Would be useful to see where volunteer groups are, GPS reporting of locations

    • So can send new volunteers to join existing group, make them easy to find +
      not risk them already be coming back
    • So organiser can track where they are
  • Originally requested by Matt in meeting

Guidance through whole day for polling agent

observation cadance - volunteers were visiting stations in batches eg visit four stations at midday, then the same for at 3pm, 6pm, and 9pm. Should we represent this cadance in the system eg 'We have counts for all your stations this between 12am and now.'

Include polling districts in the data model in some way

And make sure:

a. it is clear when making an observation which ballot box this is for;

b. when displaying things on the dashboard, we probably want to show the raw figures but use the summed figures for each polling district in calculations.

Set up using Postgres for local development too

To avoid issues between development and production due to mismatch in features between Sqlite and Postgres.

Possibly the best way to do this is to just Dockerize the app, for ease of setting up our own and new development machines (just need to install Docker in multiple environments, rather than Rails, Gems with possible binary extensions, Postgres etc.)

Add volunteer tracking

Labour party can do a lot of this stuff via their own apps but convoluted, not connected, more trouble than it's worth[a]

  • Labour party apps are too complicated - because they are based on individual voters (rather than [areas])
    • More useful: how many volunteers are there, where are they, what are they doing, how many boards out - integrate with committee room sign in form? Allow volunteer to sign out or organiser to update
    • Labour party apps don't do anything to do with volunteers atm, possibly this is where we could be uniquely beneficial

Matt thinks putting phone number in is unnecessary/possible data protection issues. But would still like to use [the GOTV dashboard] as standard sign in system at some point - maybe with password protection?

Add volunteer details (name) against each observation

Think mainly benefits the committee room - if they can identify the source of each observation it will be easier for them to make corrections and clarifications with the volunteers.

Phone number and display name could be sufficient for that.

We probably don't want to do anything that increases the friction for a volunteer sending their first observation so I'm imagining that they can send without setting any of their details and are offer the opportunity to add their details afterward.

Even if they don't share there details we probably still want an ID like a session ID against each observation so we can more easily ignore bogus ones if we get them.

Route planning for each round for a polling agent

Volunteer looked at list of for polling stations the night before and Planned out order to visit them. Worked out exact route on the day.

Plotting a route between stations (via car or foot etc) would be useful, lots of discussion of best route to take

Possibly would be useful to impose more structure on what polling stations are on your route, which are in the same polling place - we might have missed one box + weren't clear which stations we were covering

Do we want to include route planning in scope. its a problem volunteers are faced with but does it help with our goals of A) managing volunteer time on the day and B) planning volunteer allocation for future elections.

volunteers had in their head the list of stations that they should visit and after each one were saying, for example, 'right, two more to go'. Should we be giving feedback to volunteers about the progress they are making in the app.

how much structure, if any, do we want to add to the observation rounds? Structure in the station is more important

Routing between polling stations would be useful to give you best route between polling stations. Would also be useful to detect where you are so just show local boxes most prominently

Consider whether we should keep the current grouping of results by 'polling district'

  • We aren't currently handling importing 'polling district' etc. for areas apart from Redbridge test area (so this isn't currently useful for other areas)

  • How unique was the situation in EU election test, of only being given registered voters/Labour promises grouped by district? If this won't actually occur in other elections then maybe we can just revert this; if this may sometimes occur then maybe we should make this feature optional (this would require more work though as current stuff a bit hacky, would also need to update things to import polling districts and/or make things not break when no polling districts, and would need to make this toggleable in some way)

Add user account system; make workspace dashboards more secure

Matt - theoretically anyone could get to that web link briefly checked through legal doc with Matt and seems like we're not near infraction, it's fine if they can. Need to review legal document in more detail

in terms of security the observations probably aren't that sensitive- any other party have access to the same data if they both to collect it. The Labour promise data probably is quite sensitive though- can we avoid storing it?

what do we want to do about security - is an access code enough?

Location finding for campaigning rounds

people often turn up to committee room and they wait and wait to join a round (for a round to return and go out again).. if you had live location of the people doing the round (eg. The clipboard person) then you could send new arrivals to clipboard person's location))

Matt sent us a volunteer mid-round, this is a case where it would be useful to broadcast our location so he and the volunteer could easily find us, notify us they are coming

Investigate and have strategy to get data for all polling stations in all (relevant) regions in to dashboard

Possibly worth investigating following:

  • Get in touch with wheredoivote.co.uk people about where data coming from, why some things disappeared and others reappeared - see https://campaignlabhq.slack.com/archives/CHYUJMERM/p1558381647029200

  • Take a look at Labour polling finder dashboard to see if can find out how it works, if we can use the same data (possibly this is related to wheredoivote.co.uk) - see Slack for link

Improve flow of logging a single polling station count

App should guide you through process more, have next actions for polling agents visible in phone with large text held landscape - reduce header size, make send another count button more prominent, make adding your details to associate with observation immediately obvious, make selecting polling station immediately flip you to page to enter count there?

  1. Should not require scrolling when entering a count (or at least indicate you need to scroll)

    • Don't know to scroll down from selecting box!!

    • most users not comfortable with below the fold UX patterns

    • Even when phone held with large text in landscape
  2. Should provide chance to check what you're about to record and correct this if made a mistake

    • When submitting a observation - Almost made a mistake

  3. Should display current box and polling station when making observation for reference

    • Be good to show selected box number when entering count to keep it in mind - polling station reference and number

  4. Change wording shown on completion of logging a count

    • The wording of 'when you pass a polling station' was confusing because volunteer was not canvassing, was just visiting polling stations

    • journey wording less specific about how the committee room is organised - eg not 'when you're passing a polling station'

  5. Move entering submitting observation and adding a volunteer name out from below the fold, and possibly just make the latter required up-front (as it is always useful)

    • The choice between submitting another count and entering volunteer name not clear because volunteer name prompt was below the fold.

    • most users not comfortable with below the fold UX patterns

    • deal with below the fold UX issues (submit obs and enter user name)

    • Below fold issue, would be better to guide you through, but also want to allow correcting selecting wrong thing

  6. Make phone optional when adding a name (or just remove entirely?)

    • Possibly phone should be optional initially, organizer knows

    • can we avoid holding Personal Sensitive Information - volunteer phone number

    • Matt thinks putting phone number in is unnecessary/possible data protection issues. But would still like to use [the GOTV dashboard] as standard sign in system at some point - maybe with password protection?

  7. Consider if how polling station to log observation for is found could be improved

    • polling station reference number very widely used - perhaps this should be primary way of finding stations (along with address of the polling place).

  8. Improve feedback and trust in the system

    • what can we do to increase trust in the system so volunteers don't feel they need to record obs on paper too - show them their observations in confirmation page? do an onboarding submission? And verification page.

Committee room should be able to make corrections to previous observations

  1. Required: Ability to change observation numbers

  2. Optional: Have edits be tracked rather than obliterating fact that original observation was different (maybe using https://github.com/collectiveidea/audited?)

  3. Optional: Delete observations (maybe using soft deletes, and maybe they should still be shown in the dashboard table of observations), so inaccurate observations are not accounted for in calculations

  4. Optional: Possibly need some way of only allowing committee room to do this - maybe simplest is another unique URL generated for this feature? Or this can be treated as a nice-to-have and we can just go with anyone who gets to the dashboard being able to do this for now.

Suggest logging other ballot boxes in same polling place after logging observation

User not able to fully recognise real places from digi list.
On the app is a full list of polling station boxes, where there are multiple boxes per physical location
Suggestion:
Heading: glade primary school
Subheading: 2 glade primary school boxes

add visual affordance for polling place <-> polling station link.

Hard to remember which of two neighboring boxes has been submitted first when submitting two at the same location-when you submit a second count, show a summary of the previous submission floating at the top to verify which box you should be submitting

Make workspace private

Should be private but accessible by sharing a link - creates space, just used for single election

  • Later may be useful to access data from past elections for same area
  • Space can be any region you’re campaigning in with some number of polling stations
  • Should probably have a start and end time so that its only writable (at least by volunteers) on the day.

Allow updating registered voters when polling agent logs observation

Electoral Registration Officer (council) should normally tell you how many registered voters (and promises) per polling station ahead of time, this time only gave figures per polling district/place and slightly out of date. But can get exact registered voters when polling agent goes to box - could be useful to allow updating this too when log observation

Registered voters - Include (optional) ability for volunteers to confirm number of registered voters per station on submitting first observation for a polling station. Low priority, normally we know these figures ahead of polling day.

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.