Assignment #4 – Code – ☆Meticulous Misleading☆

When we learned how to do data visualization, I immediately knew that this is what I wanted to do for this assignment. I find data very interesting, but probably not for the reasons you think. Ever since I am little, my dad tells me to think about and interpret data critically. In fact, data is very nuanced in the media. In many aspects of journalism, digital or not, the data may be honest. However, it is not about the data itself. It is about how it is presented.

I remember one instance two years ago: my dad showed me a  two-sided graph comparing deaths due to two different factors over time (I can’t remember what the factors were, nor can I find the picture unfortunately). At first glance, the two graphs seemed pretty similar. But after looking closely, the x-axis for factor A went from 0 to 10, whereas the x-axis for factor B went from 0 to 100. Therefore, the visual representation was very misleading. So, data is in fact about how it is presented, and often, it will be presented in a way that favors the author’s argument despite it being deceitful – whether that be by withdrawing or skewing information

For this assignment, then, I wanted to visualize data in a way that would say ABSOLUTELY NOTHING to the reader. I just wanted to make a sort of artwork with it to prove my point. I searched for “art” on Kaggle, and found a sheet containing the artists whose works are featured in the MoMA collection. Here is the link to the file: https://www.kaggle.com/datasets/momanyc/museum-collection

And here is my sketch:

The data I first wanted to visualize was the gender of the artists, in order to create some sort of visual comparison between the number of male and female artists featured in the collection. For that, I mapped the birth and death years to the canvas, which I then used to represent circleX and circleY respectively (I ended up switching from circles to points, so I just used circleX and circleY as the coordinates for the latter). I then used an if else function to attribute the colors green to female artists and orange to male artists.

Then, I started working on turning the visualization into an inaccurate/incomplete one:

  1. I changed the mapping to include birth years only after 1850, although some were born between 1730 and then. Similarly, I only included the artists who died after 1900, though some died between 1795 and then.
  2. I added 50 to both the width and the height in the mapping in order to “enlarge” the position of the sketch.
  3. I added a random component to circleX and circleY, which slightly randomized the position of each point, making it dynamic.
  4. I used the sin function to randomize the size of each point. Some are therefore bigger, and some are smaller, creating some sort of “illusion” when it comes to the data.
  5. I animated the background to transition from orange to green to black continuously. This way, you sometimes see all the points, sometimes only the green ones, and sometimes only the orange ones. It all depends then on at which point of the sketch you look, and you will see different things.
  6. Finally, I set the alpha of the background to 70 in order to have a trail. This gives the impression of having more points than there actually are.

For parts 5 and 6, here is the code:

//   mapping the sin value to different colors
let sinValue = (sin(angle) + 1) / 2;

let r, g, b;

if (sinValue < 1 / 3) {
  // transitions from black to green
  r = map(sinValue, 0, 1 / 3, 0, 215);
  g = map(sinValue, 0, 1 / 3, 0, 234);
  b = map(sinValue, 0, 1 / 3, 0, 193);
} else if (sinValue < 2 / 3) {
  // transitions from green to orange
  r = map(sinValue, 1 / 3, 2 / 3, 215, 232);
  g = map(sinValue, 1 / 3, 2 / 3, 234, 103);
  b = map(sinValue, 1 / 3, 2 / 3, 193, 42);
} else {
  // transitions from orange back to black
  r = map(sinValue, 2 / 3, 1, 232, 0);
  g = map(sinValue, 2 / 3, 1, 103, 0);
  b = map(sinValue, 2 / 3, 1, 42, 0);
}

background(r, g, b, 70);

I feel like I’ve achieved what I wanted to, and as usual, it has been a learning process. I would say I didn’t really encounter any difficulties, I just had fun practicing data visualization especially in my own little way 🙂

 

Leave a Reply