Visualizing Population Density

This week, Arame and I used processing to visualize data from the World Bank. We were concerned with visualizing population density: the proportion between the number people who live in a given area relative to the size of the area. In our visualization, each ellipse is a country, where the size of the ellipse indicates the country’s area and the number of points within the ellipse represent the country’s population — one point for every 100,000 inhabitants.

Our code has two main components. One retrieves and processes the data from the World Bank’s csv file: it tells processing to make one ellipse per country (row or line in the dataset) and assigns it size attributes based on the area of the country. It also assigns the number of inner ellipses based on the population.

We rely on a single class, ‘Circle’, for our ellipses. This class is largely built using vectors. Movement around the screen and colors are randomly generated every time you run the program.
Things to improve: allow the user to ‘zoom in’ and ‘out’ of the frame in order to visualize all countries (we dropped Russia from the sample because it was just too big), and add other features such as animations to be able to visualize change over time and the relationship of population with other economic performance indicators.