light-pollution is a list of all U.S. prosecutors. It houses local and national prosecutor data in a .JSON masterlist, then displays the information in a simple, clean, and user-friendly website called Light Pollution.
Inspired by John Pfaff's new book, "Locked In," light-pollution has morphed into a community oversight project.
For LadyHacks, we'll be focusing on the Philadelphia DA candidates in preparation for Tuesday's election:
Fork the Repo (tutorial)
Have an idea for the type of data we should collect? Submit an issue!
Potential data we'll be gathering:
- party affiliation
- Wikipedia entries
- Picture (website)
- News Articles (Google)
- Office
- Address
- Contact
- Prosecution History
- This is the hard part, the dataset that hasn't even been conceived of / published. Our brainstorming session last night includes:
- LexisNexis/WestLawNex
- Court Records
- Bar Association
- Crime Statistics (working backwards)
- This is the hard part, the dataset that hasn't even been conceived of / published. Our brainstorming session last night includes:
- Trend Visualizations
- Optional
See the tutorial for how to get setup (below).
Optional: D3.js.
Git, Python, and Node (npm, Gulp):
git --version
python --version
node -v
npm install npm@latest -g
npm install --global gulp-cli
If you don't already have a GitHub account, now is the time to sign up.
Fork the repository.
Change directories to where your clone of the light-pollution repo is located.
cd path/goes/here/light-pollution
2.1 For people afraid of using Command Prompt / Terminal: Download GitHub Desktop
Clone, Fetch, and Checkout the master
branch.
git clone https://www.github.com/[YOUR-USERNAME-HERE]/light-pollution.git
cd light-pollution
git fetch
git checkout master
Make your own branch. Name it after the feature/fix you plan to implement (for example: Update-District-Attorney-websites
).
git branch [YOUR-BRANCH-NAME-HERE]
git checkout [YOUR-BRANCH-NAME-HERE]
For a detailed overview of the fork/clone GitHub workflow, view the GitHub tutorial.
In the root of the project, install npm dependencies.
npm install
Boot up a server in the /public
directory, then navigate to localhost:8000
in your browser.
cd public
Python -m SimpleHTTPServer
If you're using windows and get an error running SimpleHTTPServer, run python -m http.server
, instead.
You can view the local dev version of light-pollution by going to http://localhost:8000
in your browser.
To update and/or add new information to individual prosecutor pages, edit the related .handlebars
template and .json
file. (For example: edit templates/attorney-general-profile.handlebars
and public/attorney-general/_attorney-general-config.json
if you want to change the office hours of an Attorney General.)
Build out the website with Gulp. Make sure you're in the root, where the gulpfile.js
is located.
gulp handlebars
git add .
git commit -m "[INSERT YOUR COMMIT MESSAGE HERE (for example: Update index.html: new title)]"
git push origin [YOUR-BRANCH-NAME-HERE]
Go to the page of your fork on GitHub.
Select your branch and click the pull request button.
Once accepted, your pull request will be merged with the Github Pages branch (gh-pages
) and go live on the website.
Created and maintained by @billimarie.
Contributors of all skill levels warmly encouraged to participate.
There are several areas in need of contributors:
- Create Node.js RESTful API
- Submit prosecutor data and research via the Google Form
- Create an inline form on the website to replace the Google Form
- Populate the .JSON masterlist with ALL THE PROSECUTORS
- How to Organize Prosecutors: Role vs. Map vs. Zipcode
- Finalize Individual Prosecutor Pages: Design and Dev Templates
Before submitting an issue, view all current issues to limit duplicates.
If you discover an unlisted bug, open a new issue.
View the wiki for more information.