NYPD Coronavirus

Analyzing the NYPDNews Twitter

img

As part of NYC response to COVID-19, the NYPD began posting regularly on members out sick, with a high of nearly 20%. They also posted on locations visited, including number opened and closed. However, there was no clear dataset or visuals, which I attempted to solve, using Python and SQL Server.

Code can be viewed here here.

The project was split into two parts: data gathering and report generation.

Data Gathering

To get the data, I used the Python Package twint to scrape Twitter, and put it into a JSON file. This file was examined and a structure found. I then used pyodbc to put the data into a SQL Server database for extration and to perform basic queries. Invesitagion showed it lacked a true datetime field, so I combined two fields to add it.

Report Generation

As of now, the project is still ongoing, however initial analysis shows that on most days, over half of bars and resturants were closed, as well as supermarkets. With rare exception, all personal care facilites were closed. There was also missing data, as well as inconsistent times from the start of reporting until it became more regular.