Inspiration

We felt that we did not have access to resources that allowed us to vote in local elections in an informed manner. Thus, we determined that producing a website that connects voters with their local candidates and allows voters to reach out easily to them about important social and political topics would be helpful, since voting is such an important aspect of citizenship. Further, voters might not always be able to come up with questions to ask their local candidates, so we wanted to provide sample questions that allow voters to gain a holistic understanding of their candidates' policies.

What it does

Our website takes a citizen's address as an input and finds the candidates running for office in their local election. Then, it provides the citizen with basic information about the candidate (such as their party affiliation, website, and photo). Finally, it provides the citizen with the option to generate an email template which asks the candidate about their stances on important social and political issues (from which the voter can select the most important ones to them) such that the voter can vote confidently. If these general issues do not resolve all the questions a voter might have, it provides voters with the option to enter a specific issue they would like to ask about. Questions about the specific issue will be integrated into the email template.

How we built it

We developed the code in JavaScript, HTML, and CSS. It makes API calls to Google's Civic Information API to determine the relevant candidates based on a voter's address. In order to generate a custom question about a specific issue, it makes an API call to OpenAI's ChatGPT 4-o mini model. The functions of the site are coded in JavaScript, and the UI in HTML and CSS.

Challenges we ran into

One challenge we ran into was that Google's Civic Information API does not have all of the information we want it to have (i.e. it does not have candidate information for the state of North Carolina). For the majority of states, it does have candidate information, so we decided that given the time constraints of HackNC to stick with the API. However, given more time, we might attempt to find a more optimal API which has information on every election throughout the country.

Another challenge we ran into was that all of us are new to styling with CSS and HTML for UI design. Coding the functions and API calls already consumed much time, so not knowing how to style well only slowed our project down even more.

Finally, we all lacked experience collaborating on a project in GitHub. Learning to push, pull, and commit effectively was initially a challenge, but we quickly got the hang of it and learned a useful skill.

Accomplishments that we're proud of

Despite the aforementioned difficulties we encountered, our website is highly functional and accomplishes our primary goal: making voting in local elections more accessible. We are proud of successfully integrating API calls with displaying useful information to voters and ultimately compiling a comprehensive email that can easily be sent to candidates.

What we learned

We developed collaborative skills including specialization and GitHub-specific collaborative skills. We also developed a basic understanding of styling in CSS. Finally, we became adept at parsing and compiling information from API calls in a focused, useful way.

What's next for LocalVoice

With more time to work on LocalVoice, we would love to make our UI cleaner, find a more comprehensive API that has candidate information, and fine-tune our prompts for OpenAI's API to make our template email even better.

Share this project:

Updates