Join California Code Rush 5 in the cloud
A fifth challenge to hacks, hackers and newbies of all ages
The California Civic Data Coalition is asking you to join the open-source quest to master CAL-ACCESS, the jumbled, dirty and difficult government database tracking our state’s campaign cash.
Today we are opening our fifth California Code Rush. That’s what we call our occasional campaigns to improve the Coalition’s open-source software. Four previous events (in Denver, Los Angeles, Buenos Aires and Atlanta) have yielded hundreds of improvements.
This is the first code rush conducted entirely online.
We’re opening it to celebrate the conclusion of our massive open online course “Python for Data Journalists.” Over the past two months our free “First Python Notebook” lesson plan has served as the foundation for the MOOC, instructing more than 2,800 students around the world on data analysis with the Python programming language.
As in the past, if make a patch to our code you win a custom sticker designed for the event by Thomas Suh Lauder. All you have to do is complete the challenge below. Don’t worry if you’re new to open-source software. The task is designed for newbies.
As part of processing the California secretary of state’s jumbled campaign-finance database, the Coalition discovered hundreds of candidates for office logged without a political party. Lacking this information, it is impossible to accurately calculate and compare how much each party’s candidates have raised.
Your job is to pick one of those candidates, research their political party and record it within the Coalition’s software system. It should only take a complete minutes to complete.
Step 1: Login to GitHub
Start off by heading to github.com, the social network for code collaboration where the Coalition’s work is stored. If you don’t have an account, make one now. If you do, login.
Step 2: Pick a candidate without a party from the Coalition’s list
Click this link to jump into the list of candidates without a party in the Coalition’s “processed-data” repository. You will find a comma-delimited file (that’s nerdspeak for a spreadsheet).
At the top you can see some parties have already been already filled in by others. All the rows with an empty party column need our attention. Pick one. You’ll want to note the candidate’s name plus the year and type of the election they competed in.
Step 3: Review official election results to determine that candidate’s party
Visit the “Prior Elections” page of past results maintained by California’s secretary of state.
Navigate down to the page for the election linked to the candidate you’re working on. Find the “statement of vote” PDF file that contains the official results.
Search the document for your candidate. Note the party they represented.
If you can’t find your candidate there, try digging into other PDFs on the secretary of state’s website. We can cite anything official from their materials. Do not turn to Wikipedia or other unofficial sources. We do not rely on them.
Step 4: Add the candidate’s party and a link to your source to the list
Now that you know the answer, return to the Coalition’s list of candidates on GitHub. This time click the small pencil button to the upper right of the data to begin editing the file.
Click into the line for your candidate. Carefully add the party you found between the two commas at the end of the line.
You should type out the full name of the party as the Coalition’s system expects it. Democrats should go in as “DEMOCRATIC” and Republicans as “REPUBLICAN”. Other valid party inputs include “AMERICAN INDEPENDENT PARTY”, “AMERICANS ELECT”, “GREEN PARTY”, “LIBERTARIAN”, “NATURAL LAW”, “PEACE AND FREEDOM” and “REFORM PARTY”. If the candidate does not have a party, enter “NO PARTY PREFERENCE”.
After the final comma, paste in the URL of the official PDF where you found this information. Only links to the secretary of state’s site will be accepted.
Next scroll to the bottom of the page and register you change as a “commit” with GitHub. This requires you leave a message describing your work.
Step 5: Make a pull request proposing your change
Congratulations, you’ve made your first commit to an open-source project. But don’t celebrate yet.
So far, your work is only saved in a copy of the Coalition’s repository made for your GitHub account. To have your work included in the repository that powers the Coalition’s site, you will need to propose your change to the Coalition’s developers.
This can be easily done on GitHub by filing what they call a “pull request.” The page that comes up after your commit is saved has a big button helping you do this. Click it and submit the form that comes up next.
Claim your prize!
Soon after you file the request, I will review your work. If there are no errors I will merge it into the the core repository.
All that’s left is to claim your prize. Send your mailing address to firstname.lastname@example.org and you’ll soon see your custom sticker in the mail.
If you have any free time while you wait, feel free to research more candidates without parties and submit as many pull requests as you can.