Visualizing Barcelona Datasets

Part 2: Intermediate visualisations and plotting techniques

Mani Yaswanth
Analytics Vidhya
6 min readSep 28, 2019

--

In my previous blog we have seen some basic plottings and what medium to use at what situation. In this blog we will see some advanced graphs and when to use them.

If you haven’t seen my last blog here is the link blog1. It consists of some basic plottings

We will first start by analyzing population dataset. If someone wants to shift to some place in Barcelona, the first thing he will look at is how the place looks and how is the pollution over there, pollution is depending on the population. More the population, more the pollution from the vehicles etc. So, now we will analyze population data of Barcelona. We will get some insights from population data so that this person will get benefited.

Barcelona population dataset consists of 8 parameters like year, District Code, District Name, Neighbourhood Code, Gender, Age, Number(Population). Year talks about the calendar year and District codes are the codes for each district and neighbourhood name is the neighbourhood of a particular district and neighbourhood code is the code for that particular district’s neighbourhood. We can see the gender population in each district and also ages and the population in each district.

Graph 1:

From this figure we can easily tell . The female population is slightly higher than the male and we can also tell that in 2017 female population is highest among all the years recorded.

Graph 2:

The city of Barcelona’s population remains relatively stable as it’s already extremely densely populated. The population per year is very similar, so in the following visualization we will only take into account the last year (2017). We can continue with the population by age.

The population distribution is centered around 35–44 years. It’s interesting to observe how the male population decreases considerably from the 40–44 years old range, while in the female gender the decrease is less pronounced. It seems clear that men live less years in Barcelona.

Graph 3:

In this case, we use stacked bars. From the figure, The percentages tells us about male and female population. Bar length tells us about the population in that particular district. If bar length is more means that there is more population in that district. So, we can easily tell that population is more in Eixample and very less in Les Corts.

Graph 4:

Population with respect to age in 2013 looks like this. We did not use bars in the way we used for the graph 2 because in graph 2 we are comparing 2 categorical variables with respect to other variable so we used that kind of graph. In this case there will be only one variable age and we are finding age with respect to population. So, we are just using a normal bar graph

From the above graph we can see that age group 35–39 are more in Barcelona and age group 95+ are very less in Barcelona. We can conclude that may be job holders are more in Barcelona because 35–39 age group consists of more job holders.

Graph 5:

In this graph we will see what is the population change from 2013–2014 with respect to age groups

From the above graph, we can easily tell that more change occurs in age group 90–94 which is 5.89% and followed by age group 95+ and there is a drastic decrease in age group 75–79 which is 5.78%. Rest all age groups have comparatively less change in their population.

Graph 6:

In this graph we can see that what is the population in each district and all the slices are ordered in descending order. As we can see that Eixample is having more population and Les Corts is having the least

In this case we are showing the percentage of population in each district, else it will be difficult to distinguish between Eixample and Sant Marta because both are looking almost same. So pie charts are not recommendable, We can choose bars in this case which will be perfect for comparision.

Now we will have some insights from unemployment data. Suppose if a person came to Barcelona for the first time and he wants to be recruited in some company, if he knows these data insights, it will be very helpful for him.

But how???

Suppose if he knows where there is so much unemployment, he will prefer to go there because there is so much of unemployment and so there will be more probability of he getting recruited. It is obvious that where there is very less unemployment, there will be very less chance for him to be recruited.

Graph 7:

This graphs shows about unemployed females in barcelona

From the above graph we can see that, unemployed females are more in Barcelona in 2015 and very less in 2017. We used line graph for this because, we are checking for unemployed females from 2013 to 2017. So, we are checking with respect to time. Whenever we are checking something with respect to time. We will use line graphs.

Graph 8:

In this graph we will see about unemployed males in Barcelona

The difference between the previous graph and the present graph is in both the graph we have used line graph but in this graph, we have reduced the data ink ratio where all the grid lines are removed and y-axis scale is removed. Y-axis scale is removed because labels were already given for the points, so y-axis scale is not required.

Graph 9:

In this graph we are going to see unemployment in every district

In this case, we have used bars because bars are best for comparisons and all the districts are arranged in descending order according to their unemployment.

Graph 10:

In this graph we will see the average unemployment according to the month

We have used line graph in this situation because we are seeing the trend or change from jan-feb or feb-march and so on. It is related to time, so we use line graphs.

Graph 11:

In this graph we will see district wise unemployment based on gender

We have used this chart because there are three variables involved in this situation Gender, Population, District. So, we used this kind of graph.

Now we will get some insights from Emigrants and Immigrants data

Graph 12:

In this graph we will see year wise immigration and emigration with respect to gender

In this case we used two stacked bars to represent the gender and we can see both emigrants and immigrants to and from Barcelona with respect to gender

Graph 13:

In this graph we will see the emigrants and immigrants with respect to age in Barcelona

As we can see, there were more than 20.000 immigrants between 20–24 years old in 2017. With respect to emigration, the distribution is centered around 25–39 years old.

These are some advanced graphs compared to the previous blog of mine. Let’s see some more advanced and some more sophisticated graphs in my next blog:)

--

--