News for hackers. Stuff that matters.
Re:San Francisco's Drug Geography by joshuahhh on Sunday March 01, 2015 @07:58PM (#9129719)
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".

Re:San Francisco's Drug Geography by ihaveajob on Sunday March 01, 2015 @06:26PM (#9129393)
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.

Re:San Francisco's Drug Geography by galago on Sunday March 01, 2015 @07:27PM (#9129613)
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.

Re:San Francisco's Drug Geography by leftcoaster on Sunday March 01, 2015 @07:48PM (#9129689)
Why are opiates classified as hallucinogenic and not rolled in with heroin?
Re:San Francisco's Drug Geography by dmix on Sunday March 01, 2015 @05:22PM (#9129157)
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?

Re:San Francisco's Drug Geography by GeneralMayhem on Sunday March 01, 2015 @06:40PM (#9129442)
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.
Re:San Francisco's Drug Geography by j_baker on Sunday March 01, 2015 @06:28PM (#9129400)
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.

Re:San Francisco's Drug Geography by dmix on Wednesday March 04, 2015 @09:13PM (#9148819)
> 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.

Re:San Francisco's Drug Geography by lqdc13 on Sunday March 01, 2015 @05:27PM (#9129175)
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.
Re:San Francisco's Drug Geography by ild on Sunday March 01, 2015 @10:36PM (#9130202)
Crack is a drug popular among blacks. Blacks leave, so does crack.
Re:San Francisco's Drug Geography by j_baker on Sunday March 01, 2015 @06:17PM (#9129362)
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?

Re:San Francisco's Drug Geography by valleyer on Sunday March 01, 2015 @06:31PM (#9129412)
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.

Re:San Francisco's Drug Geography by stevesearer on Sunday March 01, 2015 @09:48PM (#9130071)
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.
Re:San Francisco's Drug Geography by roel_v on Monday March 02, 2015 @03:52AM (#9130957)
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.
Re:San Francisco's Drug Geography by clay_to_n on Sunday March 01, 2015 @10:33PM (#9130190)
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.
Re:San Francisco's Drug Geography by stevesearer on Sunday March 01, 2015 @11:25PM (#9130327)
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
Re:San Francisco's Drug Geography by lqdc13 on Sunday March 01, 2015 @05:25PM (#9129162)
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.
Re:San Francisco's Drug Geography by leeoniya on Sunday March 01, 2015 @07:24PM (#9129598)
i would much prefer to see the columns in the initial chart to be horizontal so that the labels were legible. my neck hurts.
Re:San Francisco's Drug Geography by valleyer on Sunday March 01, 2015 @06:28PM (#9129403)
No precinct covers the Presidio?
Re:San Francisco's Drug Geography by joecasson on Sunday March 01, 2015 @06:44PM (#9129458)
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.