Skip to content

Visualizing Drone Strikes in Pakistan

For our final data visualization project, my group has decided to create a visualization of US drone strikes in the greater middle east. The FBI has collected a lovely dataset on drone strikes since 2004, compiling targets, time of day, casualties, and infrastructure damage. We even have the number of civilian casualties to go with military deaths.

We intend on creating a scatter plot overlay on top of Pakistan, outlining groupings of drone strikes. Further coloring and categorization will allow us to show were drone strikes were particularly devastating, or if certain parameters lead to a particularly ‘effective’ drone strike.

Should be interesting.


Steps for Connecting to a Game Server

I am beginning to realize all the steps required for connecting to a game server. I knew from the start that I’d need a http server for delivering static game functionality and a game server for connecting you to a game room. I did not realize initially that I’d have an awaiting connection step for the game server and the room.

The steps to getting into an online game include:
Receive game main page over http and press join game ->
Connect to game server and join room waiting list ->
Receive open room connection ->
Connect to game room and join waiting to be created list ->
Receive constant stream of game data

They don’t initially seem like wait rooms as finding an open room takes milliseconds in typical .io games where new rooms are spun up automatically and skill matching doesn’t matter, however the step cannot be neglected.

Plant Generations and Time

I am exploring a number of visualization solutions for wrapping my  head around the various genetic variables of the SoilScape. In this visualization, I’m exploring the age of the plant population as time passes. Each plot point represents a population of plants of generation y. The wider the circle the larger the population.


There appears to be a blob of plants moving through time. This isn’t a particular group of plants growing older as a plant’s generation does not change. What this does represent is the average reproductive speed of the general plant population. There still exist generation 0 plants in existence after several hundred days, and there are trailblazers reproducing quickly on every column.

I am interested to which factors lend to longevity and what lends to quick reproduction. Perhaps I could color the dots by an average of one of the population’s  genetic variables. My hunch is that if I color by nutrient endowment and sexual maturity age, the two main factors that put off reproduction but supposedly reduce infant mortality rate, the bottom generations will be heavily colored to high endowment and late maturity.

DNA Area Charts

I’m exploring different data representation models for plant DNA data. I want to impart the effects of genetic drift on the carrying capacity of the world. At it’s most basic, we follow a line chart that represents the number of living plants on the planet over time. This will allow users to see the location of the carrying capacity line.

From there we can explore different genetic variables that upon alteration might also alter the carrying capacity of the planet. I’m particularly interested in modeling the sexual maturity age of plants over time, and whether it affects the carrying capacity.


I am exploring using an area chart to model the number of plants over time. The top line represents the total plants, and each stratification of the chart represents the required age for sexual maturity in plant agents. In this graph, three types of plants that mature at age 3, 6, and 10 respectively replace each other as the simulation progresses.

I am still working through how I’d represent the stratifications since there can be several dozen/hundreds of different sexual maturity ages. Perhaps I can represent it with a gradient of colors within the area of the line chart.

You can readily process the changes over time, and the maximum value doesn’t skew your perception of the data with this graph. Though I can see a multitude of maturity ages making this graph too noisy.

Effectiveness of DNA Map

I’m moving on to more formal analyses of the SoilScape simulation. In the past, I utilized maps where the intensity of the color at position x,y imparts the value over maximum ratio of the data point.

Screen Shot 2016-08-04 at 8.26.19 PM

The plant height over maximum plant height

This model was particularly effective at imparting comparative data i.e. this group of plants are taller than that group of plants. The model is not effective however when outliers are introduced.

Screen Shot 2016-06-05 at 1.28.23 AM

Tall mountains wash away good data

In this height map example, mountains have formed that far outstretch the height of their neighbors. These mountains jack up the max value of the height, meaning that color difference of the continents is minimized, creating an appearance of might-as-well-be-flat hills.

Another draw back of the colored map is showing progress over time. The plot cannot impart a time component, as each plot only represents a single day. What makes day to day comparison doubly difficult is that the max values of each day are different. What would the brightest point day 1 might become dark on day 10. Without an inherent numerical scale, it is hard to quantify the data over time.

Managing Packets over UDP

So I’ve worked through a few key roadblocks pertaining to creating a client server experience over udp. First, I worried that if integral packets like game room setup info were dropped then code that depended on it would break. I also worried about how I should structure larger messages.

I will be sending the position and velocity of all the players in the game. Do I send each players p and v as individual messages? Turns out you don’t have to split up messages like that, messages are broken up into appropriate packages on the fly.

To clear up my original fear, packets are continually sent until they are received, and client code is usually set up to wait for the arrival of integral information before continuing by using a request-response pattern.


Submodules, Heroku, & Node Modules

I’ve moved my cosmopolitos simulation into it’s own node module! Before I included the simulation files as a git submodule, which worked to a certain extent but made working with Heroku is a pain. Heroku very recently added submodule support, and keeping the submodule up to date and synced within the parent web app seemed like problem I shouldn’t have.

Wrapping the simulation code into a node module makes it easier to add and manage the code. Now, if I want to utilize the simulation as the base for future projects, it’s as easy as npm install soil-scape

I moved all the render and date management code out of the submodule, as how the simulation is displayed and stored is entirely up to the user. My Cosmopolitos web app and a Minecraft modder will have very different needs, though both could use the simulation.