Settings

Theme

San Francisco's Drug Geography

lmart999.github.io

91 points by laurenmo 11 years ago · 21 comments

Reader

joshuahhh 11 years ago

I am impressed by how quickly the notebook goes from raw data to interesting patterns. Nice.

If I wanted to be picky about statistics (I generally do), I'd note:

1. Equating enforcement-related statistics with usage-related statistics is a dangerous thing to do. For example:

a. The rate of non-CRACK incidents in TENDERLOIN is probably low (disproportionate with actual use) due to the focus limited police resources put on crack.

b. I would bet that the high rate of WEED incidents in INGLESIDE / BAYVIEW vs, say, MISSION, is due to police using weed enforcement as a weapon against gangs (and minorities). I mean, people smoke a lot of weed in the Mission.

2. Putting "AMPHETAMINE"-related crimes under "METH" is inaccurate, as is putting "OPIUM"/"OPIATE"-related crimes under "HALLUCINOGENIC".

ihaveajob 11 years ago

This is an awesome exercise in data visualization. It's most striking to see how crack use was essentially flat until 2008, and then it started a steady decline. Looking at the charts, I would venture to interpret that the wave of gentrification following the market crash had the effect of disproportionately displacing crack users.

I wonder what this same study would look like across the bay, in Oakland.

galago 11 years ago

It would be interesting to compare police data with a sewage study like this: http://www.addictionjournal.org/press-releases/wastewater-an...

My guess would be that San Francisco's marijuana and cocaine consumption is at a per capita all-time high, even as police incidents decline.

leftcoaster 11 years ago

Why are opiates classified as hallucinogenic and not rolled in with heroin?

dmix 11 years ago

http://lmart999.github.io/assets/drug_agg.png

Looking at this chart and being a bit assumptive, is it safe to say crack use has declined and meth has increased?

Maybe meth isn't really a new epidemic with a new user group, crack users just transferred to meth. Basically, those looking for cheap escapist drugs targeted at the very poor have moved onto a new product.

I'm curious which one is worse for society and the users?

  • GeneralMayhem 11 years ago

    Only partially. The total number of meth incidents (light blue, top chart) looks like it was up a little bit in 2014, but by nowhere near as much as the drop in crack, and is down in the last few bars. Meth has grown proportionally, but only because of the drastic decline in crack and heroin.

  • j_baker 11 years ago

    Meth is quite possibly the most dangerous drug in existence. It's cheap. It's almost as addictive as heroin. It makes people aggressive, impulsive, and even violent for hours.

    Now, don't go trying to convert meth-heads to doing crack. They're both very harmful.

    • dmix 11 years ago

      > It makes people aggressive, impulsive, and even violent for hours.

      Source?

      Meth is an amphetamine like Adderall. I'm pretty sure using a strong stimulant just increases the negative (and positive) attributes already in people.

      This sounds like the nonsense about bath salts making people murderers.

      People love conflating mental health issues with the drugs people take.

      *Not that I'm defending meth users, but I doubt that needs to be said.

  • lqdc13 11 years ago

    I am not sure if there is an increase in meth use. Last couple of years look roughly the same as 10 yrs ago in absolute amount.

  • ild 11 years ago

    Crack is a drug popular among blacks. Blacks leave, so does crack.

j_baker 11 years ago

Maybe I'm just obtuse, but this graph makes no sense to me: http://lmart999.github.io/assets/cluster_gis.png

What exactly do the colors mean? And what do those brackets at the top and at the side mean?

  • valleyer 11 years ago

    The colors are to normalize the different districts. The darkest color is always the most prevalent drug in that precinct, and the other colors in that column are relative to that drug.

    The brackets are presumably an explanation of how the "clustering" was done, though with such a small data set it could have been done manually.

stevesearer 11 years ago

Are there any resources on how to properly format raw data t make it most useful for display on a map? I'm hoping to do a crime map for my city and haven't quite found a good place to start.

  • roel_v 11 years ago

    Many of the online universities have 'data management' sections as part of their statistics or big data courses. Often using Python/Pandas. Just google'ing for Pandas tutorials will also get you started.

  • clay_to_n 11 years ago

    Look into d3.js if you want it in a browser, there are a lot of examples. You'll have to re-format the data probably which might be annoying on a large data set, but I think there are tools out there.

    • stevesearer 11 years ago

      I've been playing around with cartodb but am more looking for how to first format the datasets to then display them in a meaningful way

lqdc13 11 years ago

That seaborn lib cut down on the code a lot. I can imagine it would be 10x more if you implement all of those graphs with pure matplotlib.

leeoniya 11 years ago

i would much prefer to see the columns in the initial chart to be horizontal so that the labels were legible. my neck hurts.

valleyer 11 years ago

No precinct covers the Presidio?

  • joecasson 11 years ago

    The Presidio is considered federal land. So if I'm not mistaken, the crimes reported there wouldn't go to the city database, but a federal one. This is a guess, but seems likely to me.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection