banjtheman / dc_ndoch_2021

Code for DC 2021 National Day of Civic Hacking
1 stars 2 forks source link

DCPoliceDept 911 alert dataset #2

Open banjtheman opened 2 years ago

banjtheman commented 2 years ago

What is the Task

Create a scraper to collect data from DCPoliceDept on incidents that they mention 911 should be called

Why do we want to do this

We want to create a dataset to highlight what type of incidents DCPoliceDept is compiled to tell people to call 911

How can I get started?

There are many tools to choose from, pick what works for you - https://developer.twitter.com/en/docs/twitter-api/tools-and-libraries

The premise will be to find all tweets from DCPoliceDept that match this query https://twitter.com/search?q=(911)%20(from%3ADCPoliceDept)&src=typed_query&f=live

We will want to extract the following from each tweet

  1. Date
  2. location
  3. type of incident
  4. text
  5. source

And to create a csv with the data

date,location,incident,text,source
9/8/2021,400 block 61st Street NE,stabbing,Alert: Stabbing Investigation in the 400 block 61st Street NE. No Lookout. 
DO NOT TAKE ACTION, CALL 911 W/ EVENT,https://twitter.com/DCPoliceDept/status/1435686684151230472

Definition of Done

A csv is created from the DCPoliceDept tweets