codeforgso / govote Goto Github PK
View Code? Open in Web Editor NEWLocal voter registration and election candidate application.
Home Page: http://govotegso.org/
License: GNU General Public License v3.0
Local voter registration and election candidate application.
Home Page: http://govotegso.org/
License: GNU General Public License v3.0
While restructuring the project and implementing react-router, the map was removed from the app.
The map may be removed or relocated later, but for now it needs to be added back to the home page.
Look at previous commits that used the map for implementation ideas. If possible/necessary move the state into the map component/MapContainer and keep it out of the home page.
Contributors should not have to run npm install
in their dev environments on their host machines. This is handled by the GoVote docker image.
If a contributor does not run npm install
the node_modules directory does not get created and no packages are installed.
Change Dockerfile to fix issue.
rm -rf node_modules
npm run docker:build && npm run docker:createTables
- The createTables command will throw an errornpm install
on host machinenpm run docker:build && npm run docker:createTables
- The error is no longer thrownMoving the project to Docker will help normalize contributors' dev environments so no matter what type of machine the contributor is using there environment will be the same as everyone else. It will also help lock down npm/node version issues and it will allow contributors to run the project without installing postgres.
Collect dates for upcoming elections in Greensboro/Guilford county. Include Election Day and Early Voting for each election
Early Voting: Thursday, October 18 - Saturday, November 3
Election Day: Tuesday, November 6, 2018
As of 6/26/18, the exact early voting schedule isn't available.
Use the City Council Election Candidate spreadsheet here to create a json file that can be queried to show residents' Council Member Information. Json file must meet the following criteria:
We need to be able to query by council district.
Create a json object for City Council that has an array of objects for: Mayor, At Large, and ... an array of objects for Council Districts.
Inside Council District array, create an array of candidates for each district.
Sites are currently served without SSL. Investigate use of LE or ACM (AWS-provided) certificates for the domain:
govotegso.org
The GoVote project should include a Continuous Integration pipeline that at the bare minimum will:
master
branch occurs.The two CI platforms I am familiar with are Travis and CircleCI, both of which are free. I would probably lean more towards Travis as a starting point, as it is extremely straightforward and easy to understand.
One of the menu options on the landing page leads to this page. Users enter their name, which runs a query of the voter registration database. As shown in the sketch below, this returns links based on one of two cases (voter is registered OR not).
Use the VoterInfoForm component to lookup the user's registration status.
If the user is registered, display links to /where-and-when
and /candidates
If the user is not registered display a link to https://www.ncsbe.gov/Voter-Information/VR-Form
Implement Webpack Development Environment with Hot Module Reloading.
There is an issue in our VoterLookup Modal that causes errors / info alerts to persist after the modal has been closed. This leads to an unwanted UX, as closing the modal should refresh the form.
After following the above steps:
There is an issue that goes in hand with this:
After triggering "No Voter Registration Info Found" feedback by entering a voter name that is not found. I.E. First Name: "Leslie", Last Name: "Knope", and then closing the Modal as mentioned above, the "No Voter Registration Info Found" warning will persist:
A button reading "Where & When (to vote)" will be one of the menu options at the initial screen of the app. This takes the users into other sections of the app.
The app starts on a front page with a menu and copy as outlined a separate issue. "Where and When" is one of the menu options, which takes the user into the areas associated with information about the logistics of their experience when they go to vote.
This starts with a space where users can enter their name, which queries the voter registration database and returns either their status or a screen on which they can confirm their address. From there, we need to provide information about their polling place, the hours it will be open, early voting options, and link into other sections of the app to look up a sample ballot.
Each of the pages on the site are going to need the user's name and address in order to find relevant information to them. Encapsulating this functionality into a single component will help prevent duplication of work.
Look at the VoterInfoForm and VerifyVoterInfo components and extract the name lookup and address verification functionality into a single component.
Ensure the data returned from the API to the new component, can be passed up to other components.
The project has outgrown its current modal design. We need to move to react router to make growth easier and so we can link visitors to specific pages/functionality.
Set up Node Server to query Voter Registration Info from postgres database.
Need to map out (and up) the relationship between the user's address, their precinct, and the other geographical regions that collections of precincts make up.
These regions depend on the specific elections, e.g. county commissioner is an election at the County-level which is a group of certain precincts.
More info here:
https://ballotpedia.org/North_Carolina_elections,_2018
Very basic menu on the landing page that contains our four MVP buttons:
Can I Vote?
Where & When Can I Vote?
Its Election Day, What Do I Do?
Who are the Candidates?
For the time being, these can link to blank pages as placeholders. As team members address issues, they can fill these with the functional code.
Implement working Leaflet Map centered on Greensboro. Use React-Leaflet.
Create a thin header via a React Component. Adjust the map height to account for the header.
Include the app name 'GoVoteGSO', and the GfGLogo.png in the /src/static directory.
Beef up error handling surrounding the way EsriSearchControl
and MapContainer
interact when receiving results from the search.
searchControl.on('results', (data) => {
this.props.results(data.results[0]);
});
is returning 'undefined' and is the root of this error.
There are a number of ways to handle this, one of which would be to refactor the way data is passed up from SearchControl and stored in MapContainer state.
Feel free to take this however you would like, and hit me up on slack if you want someone to bounce ideas off of.
We need to identify a source for the geojson layers listed below. Ideally we will need to access the data via an API. Locate a source for the GIS data listed below:
implement the react-scripts package to handle the configuration of this project.
should include:
-MVP design and some proposed features
-build instructions
-Resources (PMs, Contributors, Community Stakeholders)
-Community Requirements
When a long list of addresses is displayed in Voter Lookup and an address is selected the user's information should immediately be made visible to them.
When a user searches for their information and verifies their address, if there are a lot of addresses listed the user must scroll down to see their voter registration status.
John Smith
I think it would be wise to lockdown our workflow to improve contributor experience, as well as automate our release cycles.
I suggest breaking out the project into two main environments: develop
and master
. Which would be represented by git branches. This also means defaulting our GitHub branch to be develop
, so anyone that opens a pull request will be opening it against develop
.
develop
develop
branch to give us the ability to QA any new features that are being introduced, as well as confirm our production build is behaving as intended.master
master
branch should be representative of the public facing url.Feel free to add any thoughts on this.
We need information about the voter registration process in North Carolina and a "how to" guide for non-registered voters (or those who need to update their voter registration address).
Addresses that say "REMOVED" should not be displayed to the users.
Voters whose info has been removed by the state board of elections is being returned by the API and is displayed to the users.
voter_status_desc
is REMOVED
.John Smith
Map should be loaded over https so there are no ssl warnings or errors
Map is loaded over http
Change http to https
Configure Redux for voter registration data.
Dependencies should install without error.
If you try installing dependencies without postgressql/libpq installed on the machine the installation fails because pg-native complies from those binaries.
Remove pg-native from module dependencies.
npm install
/ yarn install
I've tested this on a Windows 10 and Ubuntu Desktop 16.04.
By removing pg-native contributors do not have to install postgres/libpq on their machines, making it easier for new contributors to get up and running.
Additionally, since this project only uses a hosted postgres instance, it is not really necessary to use pg-native.
Create some informational text for the home page that includes information about the project and our mission statement.
Here is our current mission statement:
The goal of GoVoteGSO project is to create a web application that the local public can use to easily view their voter registration information and election candidate information.
Use this as a reference for the homepage copy. Try to keep jargon and technical terms out of the final result.
This is needed to make this open source project more welcoming to new contributors.
It only needs to be a short paragraph or two with links to the code of conduct, and the issue and pull request template for aspiring contributors to refer to.
The voter registration modal prompts the user for first name and last name. After submitting, the node API returns a json object of voter registration data. If the name only matches one Guilford County resident, the json object contains one set of voter info. If the name matches more than one Guilford County resident, the json object returned contains multiple sets of voter info. Regardless of one voter or multiple voter info, we need to have the user verify their address. Use the 'resident_address' key for address validation. Make the user experience user friendly.
Once the user has verified their address, display the resident's voter registration status found in the 'voter_status_desc' key from the json object returned from the API request.
Implement an address search text input for the leaflet map restricted to Guilford County. Have the Leaflet map zoom to the entered address and place a marker at the address. Remove the marker when the search is cleared, or another action is performed on the map ie: click for a popup. Talk with @marshallj prior to beginning development to ensure the direction will be merged if a PR is submitted.
The Registration Info Modal appears when a resident's address does not appear in the verify address list. the modal is meant to provide relevant links to information on the North Carolina Elections Board website on how to register to vote, and other relevant info. Research and design the layout of information on the modal to get unregistered or inactive residents the info, or contact info they need to register.
The project is starting to grow and tests need to be implemented to ensure maintainability. Especially as the project expands to other brigades/organizations.
Jest or other testing framework
Integrate tests with TravisCI
The city council information is outdated and the city council election is over. The information pertaining to the city council candidates needs to be removed
Remove city council data because it is outdated and creates confusion.
We need to collect information on candidates running in the upcoming elections.
We need candidate info for the following elections:
There are several eslint errors being thrown within the latest App build. Many of them include unnecessary console.log()
s or missing semi colons.
Running yarn start
and opening your terminal should not return these errors and warnings:
In the case that a console.log
or console.error
(printing an error in the console can sometimes be helpful) is useful to the functionality of the app, use the following comment above the line in question:
// eslint-disable-next-line no-console
Implement data validation on the first name and last name text inputs in the voter modal. Enforce a value in both text inputs. Take a look at the React-Bootstrap validation tools. Reach out to @marshallj with questions, and to verify direction.
Create an 'About Code for Greensboro' Bootstrap modal that is opened by an 'About' button. Place the button anywhere on the app for now. We can move it once we get to the UI/UX refinements.
See an example of an About Modal from one of our previous projects below:
<Modal show={this.state.showModal} onHide={() => this.setState({showModal:false})}>
<Modal.Header closeButton>
<Modal.Title>About Greensboro Finda Facility</Modal.Title>
</Modal.Header>
<Modal.Body>
<p>Finda is a generic "find-a" app for geographic datasets.</p>
<p><strong>Please send feedback, ideas, and bug reports to our <a href="https://github.com/codeforgreensboro/finda/issues">Github page</a>.</strong></p>
<hr />
<h4>About Code for Greensboro</h4>
<p>We're developers, designers, data nerds, politically-minded people with ideas for making things better, citizens, users of software—in other words, we are this community. We want to use these talents to make Greensboro's government work with the web in new and better ways.</p>
<p>Feel free to stop by one of our <a href="https://www.bit.ly/cfgrsvp">Bi-weekly Hack Nights</a>, <a href="https://www.github.com/codeforgso">check us out on Github</a>, or <a href="mailto:[email protected]">simply drop us a line</a>!</p>
<hr />
<h4>Credit Where Due</h4>
<p>Finda was originally built by <a href="https://github.com/codeforboston">Code for Boston</a>. We stand on the shoulders of giants!</p>
</Modal.Body>
<Modal.Footer>
<a href="http://www.gsobuilt.co" target="_blank">
<img alt="Built in GSO logo" className="pull-left" src={BuiltInLogo} style={{height:'2.5em'}} />
</a>
<Button onClick={() => this.setState({showModal:false})}>Close</Button>
</Modal.Footer>
</Modal>
ESLint errors and warnings should output to the console/development environment.
Since the project is currently running inside Docker the errors and warnings only show if you view the container logs.
This bug may be happening because the node_modules folder is being ignored between the host and container.
Implement Webpack production build with files optimized for performance.
Develop an ETL script that can be automated to pull the Guilford County voter registration dataset from the NC Election Board's FTP site, transform it, and load it to our Postgres database on AWS.
The basic steps are here:
-- 1) Copy file from http://dl.ncsbe.gov/data/ncvoter41.zip
-- 2) Convert to utf-8 with iconv at the cli
iconv -f utf-8 -t utf-8 -c '/Users/jason/Documents/Code for Greensboro/GoVoteGSO/ncvoter41.txt' > '/Users/jason/Documents/Code for Greensboro/GoVoteGSO/ncvoter41utf8.txt'
-- 3.) Truncate voter registration table in Postgres
-- 4.) Remove custom column resident_address from table
-- 5.) Load new data into Postgres table
-- 6.) ALTER TABLE to add resident_address column
-- 7.) UPDATE table to populate resident_address column
-- 8.) TEST
Coordinate with @marshallj for more details.
We need to automate our .etl script to run on a cron job that matches the update timer of this data. This can be done via our current EB process, or as a separate process (Lambda function).
I can take charge of this when provided with information surrounding the ncvoter data release cycle.
Placeholder issue for mockup discussion / sharing.
The Voter Lookup Modal should provide a visual indicator that the form has been submitted and the request is processing. Currently, upon clicking the "Search" button from within VoterInfoForm, there is no indication that the request is processing, thus leading to a poor user experience. We should implement a "Loading" state of some sort to give the user feedback that their request for lookup has been made.
There is a decent amount of time that passes while our API is looking up a proper response, so we need to let our users know.
The way this is implemented is up to the author, but suggestions would be to Disable the state of the button while the form is process or to look into animating a Glyphicon.
When providing invalid data to the VoterModal, the API returns an empty array when no users are found. This is a cause for confusion, and there needs to be some sort of feedback in the VoterModal letting the user know that "No results were found".
There should be text alerting the user that the request was made successfully (no error was thrown), but the response contained no results.
The modal does not alter state at all, and without inspected the network request, a user might think that the request is still processing.
Check the length of this.state.VoterInfo
within App.jsx
or withinVerifyVoterInfo
after the form has been submitted to make sure a valid result is being passed down.
Network
tab to see that an empty array is being returned and no feedback is being provided to the frontend.We need an audit on all project dependencies to ensure compatibility across package versions. This includes:
Help on this is welcome, feel free to DM me on slack if you have any strong opinions or suggestions for this issue.
We should investigate an appropriate CSS Preprocessor to bring into the GoVote project, and implement it.
From a strict preprocessor standpoint, the two most well supported options are Sass and Less. I am open to either of these.
While non-conventional, the subject of CSS in JS is gaining traction lately, so we could also potentially invest this project into something like Styled Components, which I love!
Regardless of the library chosen, the implementation should:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.