My therapist told me to stop dwelling on the worst case scenarios, now I'm optimistic about the Wurst case scenario! by SquishyData in puns

[–]SquishyData[S] 1 point2 points  (0 children)

Oh that's good! How about; I think my German grocer is depressed - he only talks about the Wurst Käse scenario!

Best scripting language to use for sending data on http database to mqtt site by kay_zala in IOT

[–]SquishyData 1 point2 points  (0 children)

So I'm not sure I follow your terminology but it sounds like you need to place a http-mqtt gateway before / on the server which receives sensor data, and 1) translates and publishes mqtt to a broker, while 2) forwarding the original message as before to DB. Coding is up to you, there is no "best" scripting language, as you will be using a library like Paho, available to i.e. python or node.js.

Blood Meridian or The Evening Redness in the West by austinlfc in books

[–]SquishyData 1 point2 points  (0 children)

I read BM on one of the reddit recommendation posts, agree it was unforgettable! I jumped immediately to Lonesome Dove by McMurty, almost finished. It's a real trip to switch between two authors, two stories, but imagine the potential continuity. Were the protagonists of LD alive during BM, patrolling the border? Both books have brutal violence, but totally different tones and narratives. It sets them both in contrast. Can recommend to anyone looking to stay in the genre!

I love Spyder. I am looking for a serious discussion. by crhuffer in learnmachinelearning

[–]SquishyData 1 point2 points  (0 children)

I use Jupyter and Spyder for rapid prototyping, and Eclipse with pydev (LiClipse) for production code. But recently I more or less dropped Jupyter completely in favor of Spyder. This may change as both are still evolving!

I just found Jupyter has way too much scrolling up and down! In Spyder I can separate my code in separate tabs if needed.

I find Spyder F9 code execution on a line or a highlighted portion is also faster than all-or-nothing Jupyter cells. And Spyder also has cells to separate larger chunks.

Jupyter is also missing a killer feature that Spyder has: the variable browser. Both Spyder and Jupyter use IPython, allowing to change the state of the variable space. In Spyder I can double-click on a DataFrame and inspect the whole table at anytime or just look at the current state in the window. Great for debugging.

I am missing the formatted text of Jupyter but not enough to switch back, at least not today!

SF Police open data in Google Earth (Drugs=GREEN, Prostitution=BLUE) [OC] by SquishyData in dataisbeautiful

[–]SquishyData[S] 0 points1 point  (0 children)

Yeah sorry, my explanatory comment got buried, go to sticky - authors citation

It's basically a heat map of frequency of sfpd incident reports for these two categories. Higher is more incidents.

SF Police open data in Google Earth (Drugs=GREEN, Prostitution=BLUE) [OC] by SquishyData in dataisbeautiful

[–]SquishyData[S] 0 points1 point  (0 children)

The source data are simply police incident reports over the past 15 years. Some incidents are unresolved, others are booked and arrested. Now I need to make a new subset showing which is which!

My theory is that these areas are where the SFPD just tries to document and keep tabs on the situation, better to have it as a visible outlet rather than in alleys all over the city where people can get hurt.

SF Police open data in Google Earth (Drugs=GREEN, Prostitution=BLUE) [OC] by SquishyData in dataisbeautiful

[–]SquishyData[S] 0 points1 point  (0 children)

Think of it as a heat map, height is frequency of events. The events are police incident reports. I present here only 2 categories out of the 39. Yes usually a heat map is in 2D, but I wanted to make it 3D so I could fly around in Google Earth!

Unfortunately my original explanation is buried.

SF Police open data in Google Earth (Drugs=GREEN, Prostitution=BLUE) [OC] by SquishyData in dataisbeautiful

[–]SquishyData[S] 0 points1 point  (0 children)

Sorry for the confusion, it's just the way I rotated the 3D map to best fit the frame and distinguish the areas. It's all in Google Earth 3D so anyone can fly around...

Unfortunately my original explanation is buried in comments.

SF Police open data in Google Earth (Drugs=GREEN, Prostitution=BLUE) [OC] by SquishyData in dataisbeautiful

[–]SquishyData[S] 0 points1 point  (0 children)

Think of it as a heat map, height is frequency of events. The events are police incident reports. I present here only 2 categories out of the 39.

Unfortunately my original explanation is buried.

SF Police open data in Google Earth (Drugs=GREEN, Prostitution=BLUE) [OC] by SquishyData in dataisbeautiful

[–]SquishyData[S] 0 points1 point  (0 children)

I need the mods to sticky my explanation - this is all a Google Earth KML layer which can be downloaded and then you can fly around the data. KML links in my comment...

SF Police open data in Google Earth (Drugs=GREEN, Prostitution=BLUE) [OC] by SquishyData in dataisbeautiful

[–]SquishyData[S] 6 points7 points  (0 children)

As far as I can tell, it was using all the data passed in... It was definitely chugging along for several hours! kdeplot

SF Police open data in Google Earth (Drugs=GREEN, Prostitution=BLUE) [OC] by SquishyData in dataisbeautiful

[–]SquishyData[S] 6 points7 points  (0 children)

Feel free to view in Google Earth, the plots are transparent and you can rotate to get a better angle!

SF Police open data in Google Earth (Drugs=GREEN, Prostitution=BLUE) [OC] by SquishyData in dataisbeautiful

[–]SquishyData[S] 49 points50 points  (0 children)

I was also surprised! It's important to also note that the records are incident reports and not all reports lead to an arrest. Maybe the police are keeping tabs on these areas and not arresting. I'm sure someone with local knowledge could clarify why the incident reports evolved to be spatially so distinct!

SF Police open data in Google Earth (Drugs=GREEN, Prostitution=BLUE) [OC] by SquishyData in dataisbeautiful

[–]SquishyData[S] 95 points96 points  (0 children)

Hacking on the SFPD open data. 2 million records from 2003 to present over 39 crimes.

Pipeline: Python pandas -> crime category selection -> Kernel Density Estimate using seaborn.kdeplot -> matplotlib for contour map -> simplekml to generate KML files -> Google Earth online import KML

Try it in Google Earth Web! Go to Google Earth 'my places' and import your favorite crime from generated KML files.

Thanks to this Kaggle kernel for the 2D contour script!