Hans Rosling’s 200 Countries, 200 Years, 4 Minutes

As a part of the visualization section of the python for data science course on EdX we watched this awesome video showing the health and wealth correlation of 200 countries over the last 200 years.

This is a fascinating look into the power of visualization, statistics, and data science. It is also a very interesting story that Rosling was able to convey in just 4 minutes.

Posted in data science | Leave a comment

German Mini Van

I booked a mini van

Get hyped

I got this message from my friend tzeejay after he invited us to visit Yosemite with him over the Thanksgiving break. I was looking forward to the trip all week since I have not seen him in a while and I’ve never been to Yosemite.

Wednesday evening comes around, and he pulls up to our apartment in a huge white Cadillac Escalade. At first I assumed that mini van in German was slang for “huge SUV”, but then he said “They were out of mini vans.”

We made our way toward the central valley on 580, stopping in Dublin so that I could pick up a pair of boots and grabbing dinner at In-N-Out burger. We arrived in the evening at the Courtyard in Merced and spent the night there before leaving early Thursday morning toward Yosemite.

Road to Yosemite

The biggest challenge with traveling during a massive national holiday is that there is a lack of places that are open to get meals. We went through Mariposa, CA on the way to the mountain and every single restaurant and diner in the entire city was closed. Luckily there was a gas station deli that was open so we stopped there to grab some food. They had some delicious fatty and cheesy double sausage breakfast sandwiches and mediocre gas station coffee.

We finally got to Yosemite National Park. I was surprised at how many people were there during a holiday. I can’t imagine what it must be like there during a weekend in the summer.

I’ve seen a lot of beauty during my travels, but I think that Yosemite Valley is the most beautiful place on earth.

Yosemite Valley

El Capitan

Posted in travel | Leave a comment

Sofia Heisler No More Sad Pandas 

In this excellent talk, Sofia Heisler explains how to optimize Pandas code. There is a striking difference between a naive implementation and an optimized one, a nearly 500x improvement.

She also described two very useful benchmarking functions, timeit, and line_profiler.

I wonder how much of this would apply to “normal” python development? If nothing else, the two benchmarking functions will certainly come in handy in future optimization.

Posted in data science | Tagged | Leave a comment

Six Foot Long Scorpions

There was a super interesting article in the SF Chronicle today about scorpions. It profiled Lauren Esposito, an arachnologist at the California Academy of Sciences, and her work studying these creatures. The venom found in some species of scorpions has been used to provide us with insights in fighting disease and developing opioid free pain relief. She discussed how original scorpions were over six feet long. Can you image?

It all began, she said, about 450 million years ago, when the ancestors of scorpions became the first arthropods to leave the sea. At the time, they were monsters, up to 6½ feet long, with stingers to match.

Source: Bay Area scientist stung by public’s perception of scorpions as scary scourge – SFChronicle.com


Posted in science | Leave a comment

Installing Python Packages for DSE200x with pip

Python for Data Science is an introductory course that provides an overview of various tooling that exists in the python world that is useful for data science purposes.

This includes things like:

  • Jupyter Notebooks
  • The numpy library
  • The scipy library
  • The pandas library
  • The matplotlib library

The course provides an excellent overview to python, and suggests using anaconda which is a distribution of python geared toward data science purposes. Although this is a great way to get started with python if you have never used it before, installing multiple versions of python (which this approach would do) can be quite a pain to manage long term. This is especially true if you use python for other purposes such as web development with flask or django.

If you try to work through some of the jupyter notebooks that are presented in the course without installing anaconda, you will often see error messages like this:

ModuleNotFoundError Traceback (most recent call last)
1 get_ipython().run_line_magic('matplotlib', 'inline')
2 import numpy as np
----> 3 from scipy import misc
4 import matplotlib.pyplot as plt

ModuleNotFoundError: No module named 'scipy'

The solution is of course to install the package that is missing. In the example above we can install the missing package with pip3 install scipy.

You can use the one liner below to install all of the required packages for the course in one go. Note, this assumes you already have python3 and pip3 installed on your computer.

pip3 install jupyter pandas numpy scipy matplotlib imageio folium
Posted in data science | Leave a comment

Data Science Helps Fight Wildfires

I’m taking a data science course on EdX as a part of the UCSD MicroMaster program. I’ve always been curious in data science from a cursory point of view, but now I want to use it to analyze and understand business problems.

So far we have learned that data science is used in nearly every industry to provide actionable insights into complex problems. One of the most interesting things that I’ve seen so far is how data science is being used to help fight forest fires in real time.

Coming off a terrible week for wildfires where California faced the deadliest fire in its history, this application of data science seems more relevant and urgent than ever.

Posted in data science | Leave a comment

Hot Dog Coma

I’ve been in New York City for two days now. One of the greatest cities in the world; center of the universe, a culinary heaven, full of Michelin star restaurants, and all I keep eating is Gray’s Papaya Hot Dogs and cheap slices of pizza.

I’ve been walking in circles around the 4-5 block radius between 35th and 45th street and 8th avenue with papaya juice in one sauerkraut smelling hand and a cigarette in the other.

There is a mustard stain on my hoody. I am getting ready to fall into a hot dog coma. I couldn’t be happier.

Posted in travel | Leave a comment

Continental Freshwater People

In a recent blog post on the Vonnegut Library blog, Rai Peterson, an English Professor at Ball State University writes about the perception of how writers only come from

“that cluster of states on the east coast that were so small their names on maps had to be written on the ocean.”

One of my favorite quotes from “A Man Without a Country”, is when Vonnegut describes himself as a “continental freshwater person”. This is one of the more interesting ways that I have heard someone describe the mindset that comes with growing up in the midwest. Despite my love for Vonnegut’s work, I am a bit ashamed to admit that until I visited the Vonnegut Museum and Library I had no idea that he was from Indianapolis.

Growing up in Cincinnati Ohio, I also dreamed of becoming a writer and the sentiment that Peterson describes rings true to me to this day.

Later in life, like many others, I escaped the continental freshwater, and found my way to a city by the ocean. Over the last few years I have been visiting every state capital and reading a ton of books along the way. Vonnegut, along with all of the other writers in those lists who did not come from a city by the ocean give me a lot of hope that although writers may end up in the same place, but they can come from anywhere.

Posted in writing | Leave a comment


I saw a man this morning burning a bible on the sidewalk. He had a blanket over his head and was screaming “LIES” into the street.

Commuters passed him by on their way to work like nothing interesting was going on. Just another day in San Francisco.

I wonder which translation it was.

Posted in thoughts | Leave a comment

Killed the bird

I deleted Twitter the other day. I got tired of the bullshit.

I wanted to tell the world that I did this. But I have no idea how to do that now that I don’t have Twitter.

I’ll probably post brief thoughts here more often. Or better yet, I’ll keep them to myself.

Posted in thoughts | 2 Comments