All Posts

Trendlines With Matplotlib

Okay, they look like sparklines, but as Tufte reminds us, sparklines are really meant to be super condensed and mostly used inline. But sometimes, a plot very much similar to sparklines can be a great way of showing trends.

Let’s call them trendlines.

I saw these sparklinesque plots used in the NYT Upshot article about the food trends.

Right now, I am working on blog post for OpenTable, and decided to quickly hand roll some code to plot these. Scroll to the bottom for the code, but here are how the results look:

trendline(xx, yy, xtick_pos_and_labels=[[0,6,12,18,24],['2000','2006','2012','2018','2024']])

written in matplotlib, plotting, python, sparkline, trendline Read on →

Inverted Aeropress Coffee on the Go: When a (Data) Scientist Needs to Think on the Road

SAN FRANCISCO, CA — Only today, I was discussing the relative merits of Ritual, Four Barrel and Blue Bottle coffee with my friend Eric from Bayes Impact, and he mentioned in the passing how badly he craved good coffee while traveling across the US away from the Bay Area. In my academic career, I used to travel roughly 80-120k miles (domestic + international) every year out of Berkeley, and I too faced this problem incessantly.

written in aeropress, coffee, inverted aeropress method Read on →

Fun With Interactive Visualizations in Astrophysics

Recently, I have been playing a lot with interactive data visualizations for my data science introspection work. While making these interactive plots, and experiencing their sheer power in expressing so many aspects of the data in clean and simple charts, I have often wondered how much more enriching such interactive visualizations would have been in my astrophysicist life.

written in astrophysics,, d3.js,, dimple.js,, interactive,, pandas, visualization, Read on →

On a Mission, in the Mission

or, how I leveraged machine learning to find must try dishes in my neighborhood!

SAN FRANCISCO, CA — Whether its the yummy focaccia de recco at Farina, the scrumptious steak tartare at Bar Tartine, the chicken liver mousse at Range, or the absolutely bulletproof sesame fried chicken at Foreign Cinema — each fine dining restaurant in the Mission District of San Francisco seems to have something mouthwateringly unique to offer.

written Read on →