📝 Week 13a – Biases in design, Data Visualization with JSON / JavaScript Objects

Biases in Design

These examples are cited from a lecture by Devin Washburn.


 

Handmade Visualizations Show and Tell

Review data observations, what did we notice?



Data Visualization with JSON / JavaScript Objects

Today we’ll be using JavaScript objects to display data on a website. This will build on everything we’ve learned so far.

What Are JavaScript Objects?

These definitions are from javascripttuttorial.net

In JavaScript, an object is an unordered collection of key-value pairs. Each key-value pair is called a property.

The key of a property can be a string. And the value of a property can be any value, e.g., a string, a number, an array, and even a function.

The following example creates an empty object using the object literal notation:
let empty = {};
Code language: JavaScript (javascript)

To create an object with properties, you use the key:value within the curly braces. For example, the following creates a new person object:

let person = {
    firstName: 'John',
    lastName: 'Doe'
};

The person object has two properties firstName and lastName with the corresponding values 'John' and 'Doe'.
When an object has multiple properties, you use a comma (,) to separate them like the above example.


Demos

1. Garden visualization where the scale of each flower is based on the amount