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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change scrape.R in police-deaths #195

Open
wants to merge 3 commits into
base: master
from
Open

Conversation

@tyluRp
Copy link

tyluRp commented Jul 4, 2018

Change scrape.R so that it scrapes all the data.

Currently scrape.R gives:

[1] person dept   eow    cause 
<0 rows> (or 0-length row.names)

The modified scrape.R now gives:

# A tibble: 23,436 x 4
   person                          dept                                          eow                   cause     
   <chr>                           <chr>                                         <chr>                 <chr>     
 1 Constable Darius Quimby         Albany County Constable's Office, NY          EOW: Monday, January… Cause: Gu…
 2 Sheriff Cornelius Hogeboom      Columbia County Sheriff's Office, NY          EOW: Saturday, Octob… Cause: Gu…
 3 Deputy Sheriff Isaac Smith      Westchester County Sheriff's Department, NY   EOW: Thursday, May 1… Cause: Gu…
 4 Marshal Robert Forsyth          United States Department of Justice - United… EOW: Saturday, Janua… Cause: Gu…
 5 Sheriff Robert Maxwell          Greenville County Sheriff's Office, SC        EOW: Sunday, Novembe… Cause: Gu…
 6 High Sheriff John Caldwell Cook Mecklenburg County Sheriff's Office, NC       EOW: Tuesday, Octobe… Cause: Gu…
 7 Watchman Christian Luswanger    New York City Watch, NY                       EOW: Thursday, Decem… Cause: St…
 8 Deputy Sheriff John A. Gooch    Livingston County Sheriff's Department, KY    EOW: Saturday, March… Cause: Gu…
 9 Deputy Sheriff Ebenezer Parker  Cumberland County Sheriff's Office, ME        EOW: Monday, January… Cause: As…
10 Night Watchman George Workner   Baltimore City Police Department, MD          EOW: Tuesday, March … Cause: St…
# ... with 23,426 more rows

I'd be happy to modify the original code as well if the for loop is preferred over the dplyr chain or if a data.frame is preferred over a tibble.

tyluRp added 3 commits Jul 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant
You can’t perform that action at this time.