Examining crime reports in San Francisco with SQL
periscopedata.com
periscopedata.com
The article mentions some of this, that "It could also be an effect of how this data is collected". That's my guess for every insight in this article.
So yeah, the bad data effect goes away somewhat when you aggregate the data by larger areas. And it doesn't make the overall trend of TL and Mission crime rates invalid or less obvious. But it's still visible in all your maps.
Here's the top crimes broken down by the first of the month vs the average for the rest of the month - some crimes are only reported (or never reported) on the first of the month, and "FRAUD" for example is twice as likely to be the first of the month: https://sli.mg/lHjo83
There are a LOT of these types of idiosyncrasies in crime data. If you do end up interviewing police officers in SF ask them why they don't publish homicide data as part of their crime data (I genuinely don't know the answer).
You can really only do useful analysis in a single jurisdiction, as there aren't any meaningful standards for data collection, and different jurisdictions vary dramatically in their reporting for lots of different reasons.
If someone gets shot in the middle of a large park/campus/highway/bridge/etc, what's the location? The answer varies!
This impacted a friend who is a bar owner -- some municipalities have a point system where your property gets a classification based on crimes and other events that happen nearby. He had issues during his license renewal because a number of crimes (assaults, vandalism) took place "within 500 ft" of his establishment. In reality, the scene of the crime was about 3/4 of a mile away in a park, but his business was about 400 ft from the nearest boundary of that park!
Using a SQL approach for that amount of data instead of manipulating the data via R/Python may be overkill and unnecessarily verbose. (e.g. date/time conversions and catching edge cases like Feb 29)
The title should likely read "with RedShift" instead of "with SQL".
Never figured out why prostitution dropped so much and the SFPD never responded back to me. Another interesting trend is that car thefts, IIRC, is the one category that shows a distinct rise in the past couple of years.
http://www.padjo.org/2014-10-14/
edit FWIW, the numbers in my post (from Fall 2014) are not reflected in the latest dataset. That is, instead of 269 prostitution related incidents in 2013, there are now 692 incidents. In 2014, there were 449. So still a drop. Interesting that older data gets so many updates/revisions 2+ years later (other than the change of disposition, of course)
> The 1st be the day for the dopeman; Slangin' that cocaine fool, and I'm working late tonight; And all them fiends be lovin' them thugs; 'Cause I got them rocks for them pipes