Visualizing Environmental Action

How I visualized United Nations data on environmental treaties

Brian Sedaca
Nightingale
13 min readApr 22, 2021

--

Locked up in my house in Buenos Aires, I started to feel a desire to work on a new research and visualization project. I also wanted to improve my Tableau and overall dataviz skills. But what could be the topic? I was not certain, but I knew it had to be a theme that I was interested in.

(Here’s a tip: When looking for a personal research topic, pick one that you feel passionate enough about to spend hours on the computer, fall behind on that Netflix series you were watching, or even get occasional jealous gazes from your loved ones (true story!). The common kind of things dataviz make us do, right? The extra interest you have in the topic will give you the strength and purpose to carry on when the honeymoon phase with your research ends and difficulties arise.)

Far from being the older, Latin version of Greta Thunberg, I’ve found myself increasingly interested in how we can change the way we live to stop the damage that is being done to our environment. I have been shocked to learn about things such as The Great Pacific Garbage Patch, an offshore plastic accumulation zone that covers an area three times the size of France! This — the state of the environment — is not going well. Besides individual changes in our way of living, sovereign countries have a great responsibility, accountability, and capacity in shaping and furthering the global environmental agenda. Governments have the power (hopefully given by its people) to pass laws, set limits, establish restrictions, offer tax incentives, you name it — and all these measures can have a huge effect on the actions of people and territories. Sovereign states’ actions have enormous impact on the environment and the people living in it.

So, there was my topic: How are countries acting on environmental issues? I started my search for a dataset on countries’ environmental policies.

Illustration of a sweating globe
This is not going well! (Art Credit)

The United Nations Environment Statistics Division was the perfect place to look for an interesting dataset on my topic. When looking for a dataset, choose data from trusted entities. There are tons of high quality datasets that have never been publicly analyzed, much less visualized. As individuals, we do not have the structure, nor the time, to do extensive primary research. I advise that, when searching for a dataset, you leverage the resources, expertise, and reputation of organizations that are bigger than you and give their data your own twist through your viz. You will spend less time explaining where the data came from and will have more time to spend on the fun parts: insight analytics and data visualization.

Searching through the UN’s Environment Statistics webpage, there it was! Under the “Governance” section, I found the dataset I was looking for: “Participation in selected international environmental agreements.” It was love at first sight, at least from my end.

Now, I had all the ingredients I needed for my recipe:

Drive to do what I love (research, analytics, and data visualization) +

A topic that I feel passionate about (the environment) +

A trusted dataset (UN selection of 14 treaties) +

A tool (Tableau) +

Skills (not much) =

Let’s roll!

Girl riding on rollerskates
Let´s roll! (Art Credit)

The Index

It took me a while to figure out what to do with a dataset based solely on dates. For each country, the UN’s dataset lists the dates it entered into each of 14 selected international environmental agreements. No input data for a given country and agreement means that the country has not entered into that specific agreement (yet, or maybe it never will). After thinking through options for analyses, I started to ask what questions I might want to answer by exploring the dataset: Which countries or regions signed international agreements soonest? Which treaties were accepted most quickly? Which were most resisted? Can we rank or sort the countries and treaties according to some measure? Thus, the idea of an index came into play. An index can be one of the best ways to harmonize your data and speed up your time to insight.

But, wait, before I could transform the dates into an index, I had to do some data wrangling! For instance, I had to add the establishment dates for each agreement into the dataset, since those were not originally included. Although I have to admit this was not the hardest dataset to prep, here is another tip: Don’t underestimate the time and brainpower you will put into cleaning and preparing your data before jumping to analysis and visualization.

A man thinking, surrounded by question marks
It took me a while to figure it out (Art Credit)

To calculate the index, I had to transform a dataset of dates into meaningful numbers. I had the dates when each treaty was established and the dates when each country signed it. For instance, the Stockholm Convention was established in 2001, making it 20 years old. Some countries like Canada signed right away, within the same year. Others, like Brazil and Australia, took three years, signing in 2004. Here is an example of my index calculation:

Years since establishment = Today’s date (2021) — establishment date (2001) = 20 Years

Years since sign-off = Today’s date (2021)— country’s sign-off date(2004) = 17 Years

Country index for Stockholm Convention = Years since sign-off / Years since establishment = 17 / 20 = 0.85

Suddenly, the meaningless, overwhelming list of dates was transformed into a single index. But what does 0.85 actually mean? Out of context, nothing. With context, a lot more. A country’s index can range from 0 to 1. A score of 0 means that the country never accepted nor entered the environmental agreement; 1 means that it signed off at the very beginning. The range in between gives you a good idea of how fast (or slow) that country signed off on the agreement. My underlying assumption was simple, and in hindsight maybe too ambitious: I believed that countries with higher index scores would show a greater commitment to advancing an environmental agenda. On the contrary, I believed that countries with lower scores would be less supportive of programs and policies advancing sustainability.

The Data Visualization

I had a clear idea of the overall concept of the visualization I wanted to make. I wanted the user to be able to see the whole work: scrolling up and down, zooming in and out, even if the audience did not have Tableau availability. The visualization would serve two use cases: it would be an infographic showing the big picture of how fast (or even if) environmental treaties were being accepted by sovereign countries; at the same time, for those accessing the viz with Tableau, it would give the chance to explore the entire dataset by highlighting, hovering, and filtering.

The visualization I created is both exploratory and explanatory, as I point out key findings to the audience in titles and subtitles. I use color to clearly distinguish between positive vs. negative results. Speaking of colors, I chose to only use gray/black and the red-to-blue diverging option available within Tableau. These limited color choices were intentional, in order to maximize clarity and cohesiveness and reduce the time to insight. Wherever you see blue, acceptance of environmental treaties is high. Wherever you see red, it is low. Gray areas are in the middle. In the following sections, I describe my approach to making the visualization in more detail.

Infographic visualizing UN data on selected international treaties, including a world map, country rankings, and income correlations
Link to Viz

Data Overview (Icons and Text)

It is important for your audience, the consumers of your work, to have background information on the data you will be using. Besides including source links, which are referenced with asterisks (*), I clearly lay out the main data elements: 14 environmental agreements, 194 countries, and one index. This inventory is vital for framing the potential, as well as the limitations, of the research and insights. I use icons to emphasize the numbers. Icons can add value if they are clear or even obvious, though not if they introduce ambiguity. In fact, I am still a bit hesitant about the icon I choose to represent the index, so please comment below if you have other suggestions.

Icons representing a signed treaty, the world, and an index

The Selected Conventions (Timeline)

With every project I start, I commit to learn at least one new thing. I had never made a timeline in Tableau before, but I thought that one could help aid understanding and awareness with the type of data that I had. For the technical part, I employed the usual trick — typing into Google “how to make a timeline in Tableau.” I came across this tutorial by Tableau Zen Master Ryan Sleeper. It was a great and easy walk-through that got me to a lovely timeline within less than an hour. Moreover, the timeline did bring clarity and new insights. For instance, even when the data are sorted from oldest to newest, the intervals between agreements are not as easy to see as with the timeline display. What struck me the most about the timeline visualization was the gap between the last two selected conventions. There are 15 years between the Stockholm and Paris treaties! What happened during that long period? Were countries and the UN dealing with other priorities? Did the previous agreements already give enough homework to countries to address? Is the UN’s selection of agreements missing any important treaties? I don’t know, but it could be a good topic to investigate in the future.

Timeline of 14 international environmental treaties

The Big 14 Indices (Color-Coded BANs)

The index I created can be analyzed according to different dimensions. For example, by treaty. It is interesting to see that some agreements were more popular and accepted faster (e.g., Biodiversity & Climate Change, both with index scores of 0.89) and others were resisted (e.g., the Migratory Species treaty with an index of 0.38). In my visualization, I show color-coded Big A** Numbers (BANs) of the conventions’ index values, sorted chronologically. Here is my confession: unlike the rest of the color coding in the rest of the visualizations, I colored this section manually. No shame in that. Due to the structure of the data, I could not find a way (that I knew) to apply Tableau’s color coding at the convention level. However, I had already built other visualizations, like the map and the rankings described below, that were automatically color coded. Thus, I picked the darker blue color from highly ranked countries and applied it to the charts of the fastest-accepted agreements; I did the same with dark orange for the most-resisted agreements. I took another liberty, assigning an extra dark color to each extreme. Design processes usually involve tradeoffs between precision and accuracy. In this section of my visualization, I valued the clarity of the message over exactitude.

Grid of boxes, where each box shows the index value for a treaty

The World Index (Map)

Tableau’s mapping feature was the main reason I got hooked up with the tool. I love maps; it may be something to do with the countries I visited or would like to go to, the feeling of the unknown, or that I relate them to vacation time. Regardless of my predilection for maps, it made sense to map out the countries, color coding them by their respective overall index value. The country’s overall index is the average of all 14 individual treaty index values.

Just because you have geographical data does not mean that a map will always be the best visualization for your data. Choropleth maps, like the one I chose to use, have received many critiques from those who spotted weaknesses in how accurately they represent data. For instance, unequal country areas may visually overemphasize large countries relative to other, smaller countries that are equally important in terms of the data you want to display. Non-uniform population distributions also add a challenge when using country-level maps to display aggregated data. However, many of these shortcomings, including the assumption of the same value for the entire country, turned out to be advantages for visualizing my index. If I want to show which states are furthering the global environmental agenda, it makes sense to show the area of each sovereign entity since governments have influence and decision-making power over the whole territory, populations, companies, and resources that are located within their geo-political boundaries.

World map of countries’ speed to sign on to environmental treaties, with countries color coded by the index value (orange/blue diverging)

Top 10 and Bottom 10 Rankings (Stacked Bar Charts)

Rankings are great ways to simplify measures, summarize findings, and reveal them to your audience. It may be due to my competitive nature and love for sports (especially soccer), combined with their ease of insight, but whenever I see a ranking, I skim through regardless of what’s being ranked. I am not the only one — people like rankings, especially if national pride is at stake. Regardless of their straightforwardness, my own personal taste, or popularity, the countries were craving to be ranked by index. I chose to show the Top 10 and Bottom 10 rankings with stacked bar charts made up of individual boxes, where each box represents a signed treaty sized according to its respective index value. I also color coded the boxes for emphasis. Thus, a large, blue box represents a treaty that was signed quickly. On the contrary, small, red boxes represent treaties that took a long time to be signed. The overall length and color of the bar indicates the country’s overall index. Tableau allowed me to add interactive tooltips to the boxes to show details for each agreement.

Why I did not include the full list of countries? One reason was the lack of space to list all 194 countries. On a more strategic note, I wanted to build interest and curiosity for the audience. If your research is intended to generate revenue, you could share part of your findings (Top 10/Bottom 10) and then request a fee to access the full results (and see where your country ranks, if it is not listed in the Top/Bottom rankings). This will not be the case for me — I will publish the dashboard in Tableau Public for anyone who is interested — but this is a marketing tip you can use if needed.

Ranking bar charts for Top 10 and Bottom 10 indices

Country Income Correlation (Jittered Scatterplot)

I saved the most controversial part for last, to make sure I kept everyone on board, at least until now. Although I love rankings, I do not feel right ranking countries on areas such as environmental policymaking when I know they may be struggling to provide basic necessities for survival like food, shelter, and human rights. For instance, the State of Palestine definitively has other priorities beyond keeping up its pace of signing environmental treaties — and the same is true for other countries in the Bottom 10, like South Sudan, Haiti, and Iraq. This is the reason I chose to merge the UN dataset with World Bank country income classifications.

I was expecting a perfect correlation (1) between the index and income. To me it seemed obvious that high income countries would be the paladins of an environmental agenda, while the poorest countries would be too busy with other priorities to be part of the movement. But like many times, I was wrong. Although there is a slight correlation between higher income countries signing global treaties faster than lower income countries, the difference was not significant. In fact, lower-middle income countries signed a bit faster than upper-middle income countries. Still, I wonder: why are high income countries such as San Marino and Andorra part of the Bottom 10?

Jittered scatterplot showing the relationship between country income and index value

Final Thoughts

I hope you enjoyed reading this and that you could take away at least a couple of tips, strategies, ideas, insights, or a general approach for your own research and visualizations. Whether you are interested in environmental topics, enjoy doing research, don’t know what to do with a dataset that includes only dates, or like ranks and maps, I hope you found something useful.

I do have one ask — I would love to know your thoughts on this research. What else could you do to visualize a dataset of dates? Did you take away other insights from the data beyond what I chose to show? Are there other visualizations you would like to try? What could be the ultimate use for these findings?

For instance, for my next iteration of this viz, I would like to include trellis (small multiple) maps color coded by treaty, in addition to the map of the overall average. That would help to compare the index across geographical regions at the treaty level. Regarding possible use cases for this research, I imagine that people could reach out to authorities to ask why their country ranks so low in terms of environmental treaty acceptance. Another use case is for green investors to check the rankings to choose where to invest their money. Lastly, I would love to correlate the indices with a real outcome measure, such as CO2 emissions or another environmental measure, to validate my findings. Do Top 10 ranked countries really achieve better sustainable development than countries that rank lower?

OK, I have already said too much, so please help me turn this into a conversation with your comments below!

--

--