Uncategorized

Why can’t I embed a Tableau dashboard on WordPress?

After you’ve uploaded your Tableau dashboard to Tableau Public, you might have had plans to upload it to your WordPress site. You try to paste the code you found under your dashboard (Embed code), into a ‘custom HTML block’ in your WordPress post.

This is an example of what your post will look like in WordPress

But once you actually press ‘publish’ and look at your website, it looks like this:

What it looks like when you post the embedded Tableau Public code

Sure, your dashboard is visible, but some code spilled onto your website for everyone to see and your dashboard isn’t interactive at all.

The only reason I have been able to find is that only WordPress sites with a ‘Business Plan’ are allowed to embed Javascript into their websites. See this WordPress documentation about code.

WordPress states the following on using Javascript:

JavaScript may be used with sites on our Business plan with plugins installed. For security reasons, sites on the Premium Plan and below are not allowed to post JavaScript.

This is because JavaScript can be used for malicious purposes. As an example, JavaScript has taken sites such as MySpace.com and LiveJournal offline in the past. The security of all WordPress.com sites is a top priority for us, and until we can guarantee scripting languages will not be harmful, they will not be permitted.

JavaScript from trusted partners, such as YouTube and Google Video, is converted into a WordPress shortcode when a post is saved.

Uncategorized

Dutch Elections: Borrowing American Rhetoric

Election day is approaching in the Netherlands, on the 17th of March Dutch citizens will be able to cast their vote. However this year people will have to do a little more homework on parties’ policies than they’re used to, as a record number of political parties have registered to participate in the elections. 89 parties1 in total. These parties are competing for a spotlight to get their ideologies out. Therefore, as a political party, it has become imperative to participate in online media to win votes. Relying on traditional media (e.g. TV, radio, and newspapers) isn’t enough. Parties seem to be fully aware of this and have extensively used social media platforms over the past couple of months to get their points across. However, with a large ‘American’ presence on social media, Dutch parties have started using typical American discourse to appeal to Dutch voters.

Concepts and phrases endemic to American media and literature can now also be found in Dutch political campaigns. These words and phrases are sometimes overt and directly referential to its American origin. Though, other times, the concepts are inserted in Dutch political discourse in such a seemingly casual way that it almost seems as if the rhetoric was historically Dutch all along.

The Netherlands are GREAT?

The tweet that can be seen here is a prime example of an overt reference to American politics. The political party “Christian Democratic Appeal” (CDA) uses the American ‘Republican-Democrat dichotomy’ to frame their centrist stance. While it might get the message across, the American political landscape does not translate well to the Dutch political spectrum.

In their tweet they also borrow former president Trump’s recognizable rallying cry “Make [noun] great again”. While the message tries to appeal to centrist voters, the language used here is associated with Republican (e.g. conservative) beliefs. But in this context that might not be relevant, as it serves to appeal to nationalistic attitudes.

Furthermore, the tweet also alludes to the Netherlands being “great”. This kind of wording is evident in American media and literature to describe the United States and stems from American exceptionalism. American exceptionalism is the idea that the United States are inherently different from other nations. They might be conscientiously borrowing this rhetoric as they specifically refer to the country (“land”) being great.

The Dutch dream?

This is a post shared by former prime minister Mark Rutte of the People’s Party for Freedom and Democracy (VVD). The phrasing used by Rutte borrows two concepts from American discourse.

First, he uses the ‘bootstraps mentality’. This is the creed that one can achieve success through one’s own effort. Social mobility is possible for everyone, all you have to do is work for it. This mindset has existed in the American political discourse for a very long time2. A recent political example would be the words of Senator Tim Scott, as said the following: “That’s the beauty of America, from cotton to Congress in one lifetime”3. Rutte hijacks this type of discourse in his post as well, stating “[…] don’t give up! You can achieve anything you want in this country”.

As for the second concept, Rutte refers to the “Dutch dream” being alive. Which blatantly plagiarizes the well-known phrase, “the American dream”. Moreover it also hints at the contemporary discussions whether this “American dream” is still alive (e.g. NYTimes: The American Dream is Alive and Well4). Rutte takes this recognizable concept and attempts to embed it into the Dutch political context, in which is doesn’t exist yet.

(Green) New deal?

This is a retweet by the Green Political Party (GL) referring to a tweet by CDA. CDA mentions the “New Deal” here. The New Deal was comprised of financial programs and reforms implemented in the United States during the Great Depression. CDA uses the New Deal as a concept to indicate what the party will do for the Dutch economy after the pandemic.

GL responds to this tweet by mentioning the Green New Deal, this proposal for policy is based on Roosevelt’s New Deal. The Green New Deal has also been part of the American political landscape as Democratic house members have tried to pass legislature with the same name in 20195.

Because of the Green New Deal already existing in online (American) political discourse, GL can effortlessly use this phrase to introduce concepts related to climate change policies.

New medium new tools

Media such as Twitter has given politicians a platform to appeal to voters. And Twitter ‘forces’ users to encode a message in a few sentences. This means that users will have to resort to already known concepts. Because of the large presence of American politics on the Internet, social media users from all over the world have learned to understand concepts from an American political context. Thus, the political concepts from American discourse create a framework that politicians from other countries can use in their effort to communicate with potential voters.

  1. https://www.kiesraad.nl/actueel/nieuws/2020/12/30/89-partijnamen-geregistreerd-voor-tweede-kamerverkiezing-2021
  2. https://ideas.time.com/2012/09/07/the-myth-of-bootstrapping/
  3. https://www.huffpost.com/entry/tim-scott-family-racism_n_5787fd89e4b08608d333c56d
  4. https://www.nytimes.com/2020/05/18/opinion/inequality-american-dream.html
  5. https://www.nbcnews.com/politics/congress/senate-fails-advance-green-new-deal-democrats-protest-mcconnell-sham-n987506
Analysis

Tracking vaccinations in the Netherlands

The COVID-19 vaccinations started on January 6th in the Netherlands. The Dutch government (“Rijksoverheid”) has received its share of criticism regarding the speed of vaccination so far. It is lagging behind its vaccination roadmap as laid out in December last year. For the first few weeks Rijksoverheid did not have an online vaccination tracker. The number of administered vaccines would be communicated in other ways, such as through Twitter by the Minister of Health, Welfare, and Sport.

Starting January 27th, Rijksoverheid started to list the number of administered vaccines alongside its “Coronadasboard“. Every day the number of (estimated) administered vaccines gets updated, the number is a cumulative number of vaccinations administered since January 6th. The dashboard created by Rijksoverheid currently does not display the number of vaccines over time. I think this has to do with the fact that they do not have the actual number of vaccines administered by the day. This might be caused by a delay in reporting of administered vaccines by different institutions. Furthermore, the number of administered vaccines is an estimation based on the vaccines that are delivered to vaccination locations.

Due to the lack of information about administered vaccines over time, I have created a dashboard that can be seen on vaccinetracker.nl. As explained above, these are not the actual administered vaccines by the day. These numbers are the daily reported numbers by Rijksoverheid. It does not give us an actual representation of vaccination speed, instead it gives us somewhat of an idea of what is currently happening.

Below is a screenshot of the dashboard as seen on vaccinetracker.nl. Please visit the website for the interactive version.

Click on the image to go to the interactive version.

Uncategorized

Analysis: Dutch Elections

Using data from Wikipedia, I have created an analysis of the Dutch Elections. Wikipedia often has articles that include tables with interesting data. I simply copy and paste this data into an Excel sheet, clean it, and import it into Tableau.

The full dashboard and analysis is available on my Tableau Public profile. Unfortunately, I am unable to insert any HTML code that includes Javascript on this WordPress site, therefore I can’t embed the dashboard into this post.

The non interactive dashboard can be seen below. The interactive version can be see on my Tableau Public profile.

Click on the dashboard to be redirected to the interactive version.
Uncategorized

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.

Analysis

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.
Uncategorized

Analysis: Streaming services

The fragmentation of streaming services has been said to lead to an increase in torrenting traffic. Subscribing to multiple platforms means more bills coming in to be paid. Furthermore, it requires more actions from people to be able to get to their favorite shows. Currently there are several big players on the streaming services market, these include Netflix, Prime Video, Disney+, and Hulu. Each service might offer exclusive content, but they also overlap in some of their content.

Dataset

On Kaggle I found a dataset which lists movies hosted by the four aforementioned streaming platforms. The dataset was created by scraping content from Reelgood.com, combined with an IMDb dataset. The IMDb dataset serves to display the IMDb ratings for the movies in the Reelgood.com dataset. The Kaggle dataset was quite clean, it mostly just contained NaNs for unknown values. Therefore not much cleaning was needed. I only needed to shape the data into a usable form for the insights that I wanted to provide. To see this code, take a look at my Jupyter Notebook.

Analysis

  1. Which genres do streaming services offer?
  2. Do streaming services offer old or new movies?
  3. How are movies rated on the platforms?
  4. Bonus: Do the streaming platforms have movies in common?

1. Which genres do streaming services offer?

What are the top 10 genres for each streaming platform? This shows the number of movies each streaming platform hosts for each genre.

These bar charts show the top 10 genres for each streaming platform. This top 10 is calculated using the amount of movies that are present on each platform per genre. We see that for Netflix, Prime Video, and Hulu that the number one genre is Drama followed by Comedy as a number two.

Disney+ has the Family genre as its number one. Family is much lower down the list for the other three platforms.

2. Do streaming services offer old or new movies?

This chart displays the number of movies according to the year of release for Netflix.
This chart displays the number of movies according to the year of release for Prime Video.
This chart displays the number of movies according to the year of release for Disney+.
This chart displays the number of movies according to the year of release for Hulu.
This chart displays the number of movies according to the year of release for all platforms.

The charts above show the number of movies according to the year of release. From these graphs we can infer that most movies hosted on these platforms are from the last 20 years.

Prime and Disney+ seem to have the most varied selection in terms of movie release dates.

3. How are movies rated on the platforms?

This histogram shows the number of movies hosted by Netflix according to the IMDb rating.
This histogram shows the number of movies hosted by Prime Video according to the IMDb rating.
This histogram shows the number of movies hosted by Disney+ according to the IMDb rating.
This histogram shows the number of movies hosted by Hulu according to the IMDb rating.

These graphs display the IMDb rating frequency for each streaming platform. IMDb ratings range from 1 – 10 stars. The higher the rating, the better.

4. Bonus: Do the streaming platforms have movies in common?

Title Netflix Hulu Prime Video Disney+
0 Amy Yes No Yes Yes
1 The Square Yes Yes Yes No
2 The Interview Yes Yes Yes No
3 Blame! Yes Yes Yes No
4 Evolution Yes Yes Yes No
5 No Game No Life: Zero Yes Yes Yes No
6 Zapped Yes Yes No Yes
7 Mother Yes Yes Yes No
8 The Kid No Yes Yes Yes
9 Inside Out No Yes Yes Yes

Interestingly, there isn’t one movie that all platforms host. However, there are 10 different movies that three of four platforms stream (see table above). The ‘yes / no’ values indicate whether the movie in the Title column is hosted on the platform.

Uncategorized

Hyperreality: the reality of “Facetuning”

Image by ErikaWittlieb from Pixabay

Facetune is an app which allows its users to retouch their pictures. You can add filters to your pictures or you can alter facial features. This is now commonly referred to as “facetuning”. Edited photos can be uploaded to any social media site desired. The free version of the Facetune app, Facetune2, boldly displays their slogan on their website: “Wow your friends with every selfie”.

Body image?

Facetuning tools are used by users of different backgrounds. It has also been embraced by celebrities and influencers on social media. The consensus on using such tools have been widely debated. Users have come forward and admitted to using the tools and have expressed their positive sentiment towards using them. However, on the other side of the debate are those concerned about the possible consequences of (young) social media users seeing these altered images. These concerns focus on the negative impact on body image as the edited images showcase an unattainable appearance.

Spotting wobbly door frames

There is also an online fascination with trying to catch users in the act of using these tools. The Reddit community r/instagramreality seeks to spot inconsistencies in pictures that might give alterations away. The hunt to spot wobbly door frames is also carried out by different creators on YouTube. It has become more of a game as these tools have gotten more sophisticated over time. It is now also possible to edit body parts in moving videos. Content creators on TikTok have been found to edit their waist to look smaller in videos of them dancing. It remains a race between those developing Facetune tools and those trying to spot the evidence of these tools being used.

Hyperreality: what is even real

Facetune is the new Disneyland. Disneyland is a common example used to explain “hyperreality”, which is the failure to recognize reality in certain contexts. Disneyland, with its tagline “The Happiest Place On Earth” attempts to create a new reality using elements from actual reality. Baudrillard explains Disneyland as a hyperreality in Simulacra and Simulation:

But what attracts the crowds the most is without a doubt the social microcosm, the religious, miniaturized pleasure of real America, of its constraints and joys. […] Thus, everywhere in Disneyland the objective profile of America, down to the morphology of individuals and of the crowd, is drawn. All its values are exalted by the miniature and the comic strip. Embalmed and pacified.

Jean Baudrillard in Simulacra and Simulation

The Magic Castle, the tiny houses, the princes and princesses, the bright colors… all of these cater to the hyperreal experience that is Disneyland. As Baudrillard writes in his book, the juxtaposition between hyperreality and reality is felt especially when one stands in Disneyland’s parking lot. Only then do you realize how your perception of reality can be altered.

Living my (Kardashian) fantasy

With tools such as Facetune we are able to create the “Disney experience” of ourselves. You can shape your facial features or body parts exactly how you would like them to look in a particular context. Whether or not people will see the “real” you outside of Instagram no longer matters. The Kardashians, avid for-profit Instagram users, have been “caught” editing their pictures. But it does not matter, most of their followers or fans will never see the Kardashians in the flesh. Just as most of us do not get to see Disneyland backstage. Facetune caters to a fantasy, not a reality, as Valentina, a RuPaul’s Drag Race: All Stars‘ contestant once said on the show:

When it comes to me and living in my world, in this little coconut head that I got, it’s a lots of fantasies, and when I feel the fantasy it is my reality! And nobody can change that.

Valentina on RuPaul’s Drag Race: All Stars’ fourth season

I want what they’re having

What is the difference between looking at reality or a simulation of reality? The hyperreality that is Disneyland or Facetune will not go away. We will still go out of our way to be able to buy into a fantasy. Augmented and virtual reality are as popular as ever. The whole point of media is to make the experience as real and as authentic as possible. The movie industry seeks to implement sophisticated CGI tools to make movies feel more “real”. The gaming industry continues to explore ways in which gamers can fully immerse themselves into their gaming experience. We might or might not be entirely aware of how reality around is intentionally constructed, but we also don’t care that much.

Interesting content related to experiencing (hyper)reality

Uncategorized

Analysis: Big 5 Personality Test (openpsychometrics)

On openpsychometrics you can take the famous Big Five personality test. This test will assess how a person scores on five different personality traits. These traits are: openness, conscientiousness, extraversion, agreeableness, and neuroticism. To see what these traits entail, check out this post.

People score differently on these traits. For instance, some people score high on extraversion and actively seek out a lot of social interaction. Those who score high on conscientiousness prefer to keep things organized. Scoring low on neuroticism means experiencing less stress and anxiety. If you would like to see how you score on these traits, go to openpsychometrics. You can also download the dataset on their website.

1. using this questionnaire for analysis

I have looked at the questionnaire itself, it is comprised of 50 statements, with 10 statements per trait. I am a bit unsure of the questions for the trait “openness”. These questions mainly focus on imagination and abstract thinking. However, I would argue that openness is also about general curiosity and the willingness to try new things.

Furthermore, this test is online and free for anyone to take. If you are looking for a representative sample, this might not be the perfect sample for you. People taking this test have access to a computer and internet, are aware of personality testing, and are interested in assessing their personality. I am sure that this is a mere subset of the whole human population.

Therefore, I am not fully convinced of the reliability (“what does the test measure?”) of the test and the representativeness. Though, I will still like to look at the data and figure out the trends within this sample.

2. what does the questionnaire look like?

As you can see in the screenshot above, participants have to rate whether statements are applicable to them. To do so, they can pick on a scale that ranges from “disagree” to “agree”, in the data set this translates to scoring a 1, 2, 3, 4, or 5. With 1 being “disagree” and 5 being “agree”. As aforementioned, the questionnaire consists of 50 statements, with 10 statements per trait.

3. prepping the data for analysis

As can be seen in the screenshot above, the statements are either positive or negative. For instance, “I am the life of the party” is a positive statement that would indicate a high score on extraversion. But “I don’t talk a lot” is a negative statement, which would indicate a low score on extraversion. To deal with these inconsistencies I have to reverse score some of the statements. See my full Jupyter Notebook.

To reverse score the whole dataframe, I wrote the following code:

#this piece of code uses pandas
import pandas as pd
#dictionary to reverse score 'negative' statements
rev = {1:5, 2:4, 4:2, 5:1}
#iterate over dataframe columns that need remapping
ext_n = ["EXT2", "EXT4", "EXT6", "EXT8", "EXT10"]
for i in ext_n:
    EXT.replace({i: rev}, inplace = True)

First, I created a dictionary to reverse score the numbers. Second, I created a list of columns that needed to be adjusted. Third, I created a loop that would iterate over the columns that needed to be remapped, using the dictionary.

Analysis

All Big Five personality traits

These 5 graphs are histograms of all five personality traits. A histogram shows how many people score what on average per trait. For example, for the trait openness we see that most participants score a ‘4’, which is towards the higher end of the spectrum. So each bar represents the frequency of participants and their average score.

Openness

How all participants on average score on openness
Example of a question to show how participants score on one of the openness questions

Conscientiousness

How all participants on average score on conscientiousness

Example of a question to show how participants score on one of the conscientiousness questions

Extraversion

How all participants on average score on extraversion
Example of a question to show how participants score on one of the extraversion questions

Agreeableness

How all participants on average score on agreeableness
Example of a question to show how participants score on one of the agreeableness questions

Neuroticism

How all participants on average score on neuroticism
Example of a question to show how participants score on one of the neuroticism questions