There are lots of fun ways to play with your phone: Angry Birds, Snapchat, Facebook, Face-swapping. Maybe you like to play with sensors? Anyone? Anyone? Well, in this post I will share some Python code and a video of how you can stream your Android's accelerometer data to your laptop and then visualize it. In fact, you can do this with any of the sensors in the unit, the accelerometer, gyroscope or the magnetometer.
Sometimes it may be necessary to simplify a set of points into a network. It may be for qualitative reasons such as determining intersection points and conduits of a network. It may also be for quantitative reasons like shrinking a dataset and speeding up computations. In this post I will go over a case study of GPS data and how I to turn this data into a smaller and more usable dataset.
Recent advances in data acquisition in the NBA allow us to gain insight into the sport and it's players, and, we can use this data to play with Python's visualization abilities. In this post data from the current season is used to see just how dominant the Golden State Warriors are; Fivethirtyeight's ELO rankings help to make an interactive graph (not usable on a mobile device); shot charts from stats.nba.com help to build a 3D visualization of a player's shots; and, we will look for any changes in Stephen Curry's play that may explain his explosive 2015-2016 season.
What is the safest way to get from point A to point B? A simple question with a not so simple answer. What does it mean to be safe? Is it the feeling of safety or actually being safe? How are of either of these measured? Most importantly, If I've had too much too drink, what is my safest way home?
We begin to answer these abstract questions in a very tangible environment. Classic 1980's arcade games. I love the 80's.
Ms. Pac Man
In 1981 Ms. Pac Man was released forever giving people like me a reason to get out of bed in the morning. In the figure to the left, the small yellow boxes are pills Ms. Pac Man eats for points, and the 4 super pills allow Ms. Pac Man to eat the ghosts. The 4 tunnels on the left and right edges, "wrap" the board. For example, if Ms. Pac Man enters the tunnel in the top left she will come out on the top right.
When I decided to move to Israel the most frequent question, asked overtly or discretely, was "Is it safe?" The undertone was always that Israel is not and I may be a bit crazy for going. This post will examine how safe Israel is using the USA as the default comparison. There are so many ways to measure safety. Feeling safe is much different than actually being safe. What it means to be safe is not clear. However, there are some basic metrics we will explore here.
The first thing that comes to mind is homicide. The following graph comes from the world bank. The USA is, at all times, at least twice as dangerous than Israel for homicides.
Most good questions start over a round of beers and this is no different. During game 5 of the 2014-2015 NBA finals my friends and I got into a typical sports argument; who is the best and why? I had been arguing that Lebron James' performance in these finals was historically good but my friends disagreed. Forcefully. As this discussion flowed and ebbed we got into rating styles of professional basketball itself, and eventually, what makes a good NBA draft. Let's take a look using data from basketball-reference.com.
Nothing says romance like analyzing WhatsApp text messages using Python. In an effort to understand my relationship with my girlfriend I present, with lovely graphs, our texting habits.
Using Python and some of its standard packages like Numpy, Scipy, Matplotlib, and Pandas, I parsed data from our WhatsApp conversations. The data began on August 12, 2014, at 10:47pm local time in Amsterdam. The last entry used is from May 18, 22:45 Mountain time. There are a total of 27192 texts. The first table gives some statistics regarding the data.