Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HACKTOBER] Add 100 District Attorneys #80

Open
billimarie opened this issue Aug 27, 2020 · 22 comments
Open

[HACKTOBER] Add 100 District Attorneys #80

billimarie opened this issue Aug 27, 2020 · 22 comments

Comments

@billimarie
Copy link
Owner

billimarie commented Aug 27, 2020

馃敟 Hacktoberfest Status: 7 District Attorneys to go! 馃敟

Welcome, Hacktober participants! 馃憢馃徑

This is a collaborative issue for Hacktoberfest 2020. Join us!

Why This Project?

If you're looking for a meaningful repo to contribute to, this is one. Our goal is to collect as much information as we can about District Attorneys because prosecutors are the only figures who can charge cops with police brutality. As such, we believe prosecutors are a key contributor to the ongoing police violence against unarmed individuals. Prosecutors who fail to hold cops accountable actively encourage police brutality. Our mission with this web app is to help educate voters so that they vote against prosecutors who let cops engage in this violence. (read more)

Who Can Contribute

This issue is perfect anyone looking to get their feet wet for Hacktober. From beginners learning to code or use GitHub, to intermediate & advanced developers who are interested in data science, we can use your help harvesting basic information about the nation's District Attorneys. (Unsurprisingly, a dataset of this magnitude does not already exist.) You can see what we currently have on our live web app.

Our Hacktober 2020 Goal: Add 100 District Attorneys 馃帀

By the end of Hacktober, we hope to add 100 District Attorneys to our web app. We need your help with gathering basic information, including:

  • name
  • role
  • state
  • county
  • party
  • age range
  • gender
  • race
  • appointed date OR elected date
  • headshot (profile picture)
  • website
  • wikipedia entry
  • targeted google news search
  • social media (facebook, twitter, instagram, linkedin, youtube)
  • office address
  • contact info: email
  • contact info: phone
  • any relevant articles (link, title, summary, feature image)

Whew! You see why we're looking for as many people as we can to help. That's a lot of simple data to mine.

How You Can Help

Instructions For Setting Up Git / GitHub in Terminal / Command Line (OPTIONAL; if you've done this in the past, you don't have to do it again)

1.) Find your public SSH key:

cat ~/.ssh/id_rsa.pub

2.) Copy the key, including the ssh-rsa (but not your computer name)

3.) Go to your GitHub settings

4.) Paste in your SSH key

5.) You should be good to go! Email me if you have any trouble pushing to the repo.

Instructions For Setting Up Your Local Environment

1.) Fork this repo

2.) Clone the forked repo to your local environment:

git clone git@github.com:[your username]/prosecutor-database.git

3.) Make sure your branch is up-to-date with everyone else's work:

git fetch origin hacktober-data

4.) Create your branch:

git checkout hacktober-data

5.) Install the npm packages.

npm install

Instructions For Gathering Data

1.) Now, the fun part! It's time to start gathering data. Search through our web app for a District Attorney in a state of your choosing. Click through their profile to see what information we have so far. (Example: search "California" & filter for "District Attorney").

2.) Once you find a missing District Attorney (or missing Profile Information about a District Attorney), visit our Google Sheet: US Prosecutor Database - Profile Template. You can add it to your own Google Drive or download it directly to your computer as a CSV file.

3.) Time to Google! (Or Bing, or DuckDuckGo.) Use your favorite search engine to find information about District Attorneys in the state you chose. Start populating your Basic Prosecutor Profile sheet (aka, your CSV data) with whatever data you can verify. Help: you can help with the import by deleting any columns that you don't collect; for example, a lot of people leave the articles columns blank. Please delete any columns which you don't collect information for. Thanks in advance!

4.) Once you've finished populating your sheet, save/download the .CSV file to the repo folder.

5.) Open your Terminal / Command Line. Enter the following command: npm install -g csvtojson. This will install a package called csvtojson, which is a CSV to JSON converter tool.

6.) Next, enter this command: csvtojson [your-file-name-here].csv > [your-file-name-here].json. This will convert your Basic Prosecutor Profile from a .CSV file into a code format called JSON.

Instructions For Submitting Your Pull Request

1.) Time to add, commit, & submit your pull request:

git add .
git commit -m "[Your commit message goes here]"
git push origin hacktober-data:master

2.) Celebrate! 馃帀 You'll receive a comment verifying I received your pull request. Once your PR has been merged, it'll be up on the live web app, & your GitHub profile will be added to the Contributors gallery.

Troubleshooting

Errors while trying to submit a pull request

1.) Have you connected your SSH key to GitHub? If not, go to "Step 1" in Instructions For Setting Up Git / GitHub in Terminal / Command Line (above). You might be getting an error because your SSH key isn't connected to GitHub.

2.) Are you getting a failed to push error? It looks like this:

To github.com:[your-username-here]/prosecutor-database.git
 ! [rejected]        hacktober-data -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:[your-username-here]/prosecutor-database.git'
hint: Updates were rejected because a pushed branch tip is behind its remote

If you see this in your terminal / command line, try git push. After pushing, go to your forked repository on GitHub.com & press "Pull Request." Select hacktober-data for the branch for your forked repo and the main repo. Press "Create Pull Request" and type a title and description for your PR.

Additional thanks to @caseyryan22465 & @shariq1989 for contributing instructions

@billimarie billimarie added this to the Update Data milestone Aug 27, 2020
@billimarie billimarie pinned this issue Aug 27, 2020
@billimarie billimarie changed the title [ONGOING] District & State Attorney Data [HACKTOBER] Add District Attorney & State Attorney Data Sep 2, 2020
@syeedameen
Copy link

Greetings of the day madam , I am a beginner in open source .
I would like to work on this.
And I am also taking part in Hacktoberfest , So can I contribute to it in October.

@billimarie
Copy link
Owner Author

Hi @syeedameen, thank you for reaching out. You are welcome to join us as we embark upon Prep-tember & Hacktoberfest. Feel free to follow the instructions listed above, then submit your pull request. If you have any questions, I can be reached here or through email (link in profile).

@andrefpoliveira
Copy link

Hey! I would like to work on this for the Hacktoberfest if possible 馃榿

@billimarie
Copy link
Owner Author

Hi @andrefpoliveira, thanks for reaching out. It's a collaborative issue so please feel free to tackle it. Let me know if you have any questions about setting up.

@dylancaponi
Copy link

Step 1 worked with git clone https://github.com/billimarie/prosecutor-database.git

@dylancaponi
Copy link

@billimarie What's the best way to just update missing photos or profiles with partial information?

@jSadoski
Copy link
Contributor

@dylancaponi If you feel comfortable diving into the .json file where the information exists and changing the values there, git will track those changes so you can upload them to GitHub!

@dylancaponi
Copy link

@jSadoski I'd much rather do that but I don't see the json files in master or hacktoberfest branches.

I do see them in PRs that were merged like this one: https://github.com/mattkduran/prosecutor-database/tree/master/csv-json-data

Where is that data getting merged?

@jSadoski
Copy link
Contributor

I was just noticing in the project that I think the data was restructured. It's now just .js files under ./api/ I believe.

@billimarie
Copy link
Owner Author

billimarie commented Sep 30, 2020

@dylancaponi @jSadoski Yes, the data is vetted first through this repo under the api folder. Once it has been verified, I clear out the csvtojson & import those entries into a MongoDB database, which the live Heroku instance then pulls from. An old issue (#51) references the keep or delete csvtojson dilemma. I opted for hosting them via a separate database so that this repo wouldn't get cluttered.

This was referenced Oct 1, 2020
@billimarie billimarie changed the title [HACKTOBER] Add District Attorney & State Attorney Data [HACKTOBER] Add District Attorney Data Oct 1, 2020
@shariq1989
Copy link
Contributor

shariq1989 commented Oct 4, 2020

FYI for newcomers. If you fail on step 3 after running git fetch like below:
git fetch origin hacktober-data
fatal: Not a git repository (or any of the parent directories): .git

You have to run cd prosecutor-database\ and then run the git fetch command

@fedGL
Copy link
Contributor

fedGL commented Oct 4, 2020

I've collected information and I'm ready to commit my CSV!

@fedGL
Copy link
Contributor

fedGL commented Oct 4, 2020

Question: I cloned the repo and I got my CSV ready to convert to JSON as it says in the instructions. Where should I put this? I see a folder called "馃敟 100 DISTRICT ATTORNEYS 馃敟" with a folder inside named "Your-State-Here" and csv and json files inside. I'm assuming that's the correct place?
Also, for the "Your-State-Here", what convention are you following for states with two words? Do we hypen them with - ?

@billimarie
Copy link
Owner Author

billimarie commented Oct 4, 2020

@shariq1989 Great tip! If you have the bandwidth, can you update the HACKTOBER2020.md file with those instructions?

@fedGL Wonderful. You can place it in the 100 District Attorneys folder & stick with the abbreviated states (ex: "CA" or "NY"). If you'd like to update the docs for other contributors, you can add the steps on the HACKTOBER2020.md file.

@janel-developer
Copy link

Hi @billimarie - I was just having a poke around the internet to see if I could find any data sources we could use and I found this api - https://www.courtlistener.com/api/rest-info/

Have you seen it? I thought I might send them a message and ask about access to the attorneys endpoint - which doesn't have public access. I thought I'd ask them what kind of data is there. I looked at the people and positions endpoints, but they don't seem to list district attorneys - at least not as district attorneys - looking at the possible values for position_type (attached here from a query)

position_types.txt

@billimarie
Copy link
Owner Author

Hello @janel-developer, thank you for researching data sources--would make this project a lot easier. I had not come across that api. It would be amazing if you could reach out. Would you like me to assign a dedicated issue for you? I appreciate your research on this.

@billimarie billimarie changed the title [HACKTOBER] Add District Attorney Data [HACKTOBER] Add 100 District Attorneys Oct 5, 2020
@janel-developer
Copy link

Happy to help! I've sent a message to see what I can find out.

It would be great to use a dedicated issue for this. I'I'd be happy to write something that just pulls and formats data as json on the server side.

@billimarie
Copy link
Owner Author

billimarie commented Oct 5, 2020

@janel-developer Wonderful--when you have a moment, can you leave a comment on the issue so I can assign it to you? See: #145

@lisaood
Copy link

lisaood commented Feb 6, 2021

Hello, I am a student in 3rd year of computer science license degree, I would like to contribute to your project . thank you

@k-garrido
Copy link

Hi there!
My is Katherinne Garrido, I'm student of Laboratoria and I really would like to contribute to this project, will there be another hacktober for 2021?
Greetings :)

@HallowedDust5
Copy link

Was this only for Hacktober 2020, or is this issue still open?

@mahiaash
Copy link

Hi,
I'm Mahia Asha and I was hoping to add to the project? Can I add more district attorneys or complete ones that exist? Is there anyway I could help? Please let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests