Data Analysis: Women in politics and education around the world

I have been using Python for data analysis for about a year now. In the last couple of months, I have started to work with Tableau. Tableau is a visualization tool, which I find to be a very different experience from using the Python Panda’s library. The visualizations for today’s analysis can be found below and on Tableau Public.

Datasets and data prep

The UN has interesting (and free) datasets available on their website that look at countries around the world. For today’s data analysis, I first used a dataset that lists the share (%) of women in parliament around the world. And second, I used a dataset that provides the ratios between girls and boys for different levels of education (primary, secondary, and tertiary). Before I created graphs in Tableau, I slightly changed the format of the datasets using Tableau Prep. The country/region variable included different levels of countries and regions. Therefore, both continents (e.g. Africa) and countries (e.g. India) were included in the variable. I created a variable that only includes regions on a country level. Furthermore, the ‘share of women’ in parliament was in a format which Tableau won’t recognize as a percentage. This meant that I had to create a new variable for the share of women as well.


See the interactive visualization here. The first map displays the share of women in parliament around the world. You can select a specific year using the dropdown menu next to the map. Hover over the map to see the percentage, year, and country name. The higher the percentage, the higher share of women in that country’s parliament.

The second map displays the ratio (girls:boys) in education around the world. Using the dorpdown menus, you can filter for year and education level. A ratio above 1 indicates that there are more women in that level of education than men. A ratio below 1 indicates the opposite, more men in education than women.

The third graph displays the datapoints for each country, based on the share of women in parliament and the ratio of girls to boys in education. Countries below the horizontal reference line (of 1), have more men than women in enrolled in education. Countries above this reference line have more women enrolled. The countries to the left of the vertical reference line have a share of less than 50% women in parliament. Countries on the right side of the vertical reference line have parliaments that are made up of at least 50% women.

The third graph can be filtered using the ‘select education level’ filter (next to the second map). When you select different education levels, you will see that the share of women in parliament does not necessarily correlate with the ratio of girls to boys in education.

See interactive version here.
social sciences

How to deal with stress

Awhile ago I wrote a post on dealing with anxiety. Unfortunately, stress is another negative emotion people experience in their daily lives. While stress can force us to get things done and help us achieve goals, it can also impair us and cause health problems. Hormones involved in being in a stressed state can damage neurons in the brain(1). It affects our immune system, for instance, we can become more susceptible to colds(2). However, it is important to note that most of such consequences are related to chronic stress, which means being in a state of stress for longer periods of time.

In our modern world, there are many different situations which can affect our stress levels. Deadlines at work, school papers, paying the bills, maintaining relationships; each one of us experiences a myriad of stressors in a day. We might not be able to get rid of stress altogether, but we can try to find new ways to deal with it.

  • Having too much on your plate
    • Sometimes you have to say no. There are a lot of important things in our life we want to do. But we can’t do all of them. And if we did try to do all of them at once, we might end up failing at more things we anticipated. Quality over quantity. On the long term, it is more beneficial to focus on a few things, rather than devoting our time to a hundred things at once. We’re often unaware that many things can wait.
  • Get rid of the problem?
    • Sometimes you have to take a leap of faith. If something gives you chronic stress, it might be time to get rid of the problem. If you have to write a paper or take a course and you really can’t handle it with rest you got going on right now, maybe it would be better to try again next year or the next opportunity you get. Or maybe your work is severely affecting your mental health, you might want to consider quitting. Look for something that gives you more room to maintain your health.
  • Recognize your temporary emotions
    • Some things we can’t say no to. Not all of us have the privilege to postpone stressful situations that need our attention now, such as planning the funeral of a recently passed away loved one. Therefore, in such situations, it’s important to remember that it’s temporary. This isn’t the first stressful situation you’ve dealt it and it certainly won’t be the last. Remember you’ve tackled problems before and you will continue to do so.
  • Reach out
    • Others can help you. Whether it be to take off some of the load by helping you or to provide you with some moral support. Having your friends or family assure you that you can get through it might just be enough to get rid of some of the stress!
  • Don’t forget to focus on other important aspects
    • Remember to tend to other needs, such as nutrition and sleep. Temporary not eating well or not getting enough sleep for awhile is nothing to worry too much about. But don’t make it a habit. Also, try to convince yourself to get your daily nutritional needs. Emotional eating is a real thing and can be triggered in stressful times. Reaching for junk food might activate an endorphin release, due to the sugars(3). Endorphins make us feel good. We might also overeat, as feeling stuffed makes us feel tired and relaxed. However, you can also achieve this state of relaxation without overeating!
  • Take a break
    • If possible, take a break. Play a game (Sudoku, your favorite video game, a fun game app on your phone), watch TV, go for a walk, hang out with a friend. Moving away from the stressor might help you in the long run. Taking a small break will give you new energy you’ll need to take on your stressor.
  • Stop comparing yourself to others
    • If you feel stressed because you aren’t where you want to be in life school-wise, career-wise or anything else, it might be time to re-evaluate. Ask yourself why you need to be anywhere anyway. It’s not a race. The internet is filled with anecdotes of people who wrote their first best-selling book at 50, became a famous actor at 40, got the first real job they liked at 60 or finally overcame their fears at 38. There are only a few times opportunities will only present themselves once. With some out-of-the-box-thinking, you can still get where you need to be even if that means taking an alternative route.

1. Sapolsky, R. M. (1996). Stress, glucocorticoids, and damage to the nervous system: the current state of confusion. Stress, 1(1), 1-19.
2. Segerstrom, S. C., & Miller, G. E. (2004). Psychological stress and the human immune system: a meta-analytic study of 30 years of inquiry. Psychological bulletin, 130(4), 601.
3. Fortuna, J. L. (2010). Sweet preference, sugar addiction and the familial history of alcohol dependence: shared neural pathways and genes. Journal of psychoactive drugs, 42(2), 147-151.