I like to keep track of my life; collecting data about random things–one of them happens to be my travel patterns. While visualizing my own travels I started to wonder what the global airport network might look like. I remember reading about the structure of the airport network in the architecture of complex weighted networks by A. Barrat et al. but the paper never visualized the network. To figure it out, I first needed some data, luckily OpenFlights.org has a database of routes as well as airports, which allows us to create some pretty nice looking visualizations (see above figure).
Trying to kill some time on a 4-hour long train ride I played around with simulating random walk in two dimensions. Coloring each walker with it’s own unique colors, the motion of individual walkers will more or less look like confused ants moving around on a piece of paper. Resembling the behavior illustrated below – see code below.
As usual lets first import some packages. Note, I still use Python 2.7.
import matplotlib.pyplot as plt import numpy as np
Then we define some parameters, such as how many steps the simulation should run for as well as how many walkers we want to have. All walkers start from the same initial condition, coordinates (0,0), and for each step we randomly select the direction walkers should move in. Last we pick the step length, i.e. how far a walker should move in this given step. Here you can play around by sampling step-length from different distributions, see more below.
# define some parameters steps = 1000 walkers = 100 x = np.zeros((steps,walkers)); y = np.zeros((steps,walkers)) # go through steps for step in range(1,steps): # pick direction angle = np.random.rand(walkers)*2*np.pi # pick step length length = np.random.rand(walkers) #length = np.random.exponential(size=walkers) #length = np.random.poisson(lam=2,size=walkers) #length = np.random.power(a=3,size=walkers) # update position x[step] = x[step-1,:]+np.cos(angle)*length y[step] = y[step-1,:]+np.sin(angle)*length
After having run the simulation (its relatively fast) I use matplotlib to plot the trajectories.
# define plot limits lim = 30 # define colors - give each walker its own colors colors = plt.cm.gist_ncar(np.linspace(0,1,walkers)) # plot stuff plt.figure(figsize=(10,10)) for walker in range(walkers): plt.plot(x[walker],y[walker],alpha=0.4,color=colors[walker],lw=0.8) plt.xlim(-lim,lim) plt.ylim(-lim,lim) plt.axis('off') plt.savefig('random_walk/%03d.png' % p_count,dpi=100,facecolor='black',bbox_inches='tight',pad=0) plt.close()
This Sunday while surfing the web I came across a figure depicting the Rössler attractor and while looking at it, it suddenly struck me that I have always seen it depicted from this specific angle. But what does it look like from other angles? Curious, I sat down, quickly wrote a python script to generate the dynamics, used Matplotlib to plot the figure from multiple angles, and ffmpeg to aggregate them into an animation (see below). One thing lead to another and soon I found myself reading about other strange attractors, such as Clifford attractors, and writing code to generate the figures you see above.
I received questions from a couple of people asking me how I drew the network featured on the cover of PNAS (read about it here). Well, this blogpost is for you, and anybody else.
We (Sune Lehmann, Arek Stopczynski and yours truly) recently published a paper in PNAS where we give our two cents on how to uncover meaningful, “fundamental”, social structures from temporal complex networks. In addition to submitting the paper we also sent some pictures along which we felt would look good on the cover of PNAS. As it turns out one of them was actually selected!
I was watching the season finale of Game of Thrones the other day and wondered—with so many characters in the series what does the interaction network look like? Well, as it turns out I was not the first person to get this thought. In fact A. Beveridge and J. Shan read through Storm Of Swords (third book in the series) and mapped all the interactions between characters, and released the data. You can read more about their cool project here. They are, further, planning to release data regarding the others books as well.
While finalizing my PhD I was asked, alongside Sune Lehmann, to author a popular article about networks by the magazine Kvant (danish journal for physics and astronomy). We wrote and submitted the piece and were fairly confident in our work. Nonetheless we were surprised when we were contacted by the editor who asked us for permission to use one of my figures for the cover! This is my first cover, and I gotta say, it feels awesome, next stop …. Nature :)
Have you ever wondered which areas of New York City are the most popular? You need not worry anymore, this little movie will answer your questions. The video shows the dynamics of pick-ups and drop-offs within a representative week. It is interesting to see how the popularity of areas changes over the course of a day, and how certain areas attract more attention during nighttime. To me the circadian patterns resembles a heartbeat.
One of the most iconic sights in New York are its Yellow cabs. They are ubiquitous and an important lifeline that tie the city and its inhabitants together. Understanding how cabs move around can give us new insights into how people travel within the city, how people use the city, and which neighborhoods are popular.
Is just around the corner! We have some cool results that hopefully should be published soon. Until then here are two teaser pics.
Since I as a kid watched my first world cup (1994), I have been hooked on football (or soccer as the Americans call it). Back then l I remember that almost every player used to wear Adidas Copa Mundials - a stylish, yet simple black leather boots with 3 white stripes.
Things are moving fast now. We just uploaded another paper to ArXiv. Check it out! Measuring large-scale social networks with high resolution
Just submitted a paper - Wohoo! Meanwhile until it is published you can find it on arXiv. The paper investigates usability of the Bluetooth sensor is as a proxy for real life face-to-face interactions. You can learn more about the data on the SensibleDTU homepage.
I will be giving a talk at the Niels Bohr Institute on December 4th. Topic will be “Social Contacts and Commnities”. It is based on the results and finding from the SensibleDTU project.
How do we as humans interact over the course of a day? The video shows proximity interactions for student participating in the SensibleDTU project for a randomly chosen 24-hour interval.