Skip to content

ajo01/loneliness

Repository files navigation

Loneliness - A Story

You can see the project here.

The feeling of loneliness can sometimes feel inescapable. In many, it can become chronic and even lead to depression. In others, it can spur a need to take action and go out more. Why do we feel lonely? And what factors contribute to it? What can we discover about loneliness and its patterns? These are the questions that led us to explore the topic of loneliness for our project. For our project, we wanted to focus on the everyday impacts and factors that contribute to loneliness. We wanted to take a data-driven story approach to talk about the issue of loneliness and its factors and see correlations and interesting patterns for ourselves and others alike.

screenshot-2023-12-07-at-2 14 32-pm sankey dot screenshot-2023-12-07-at-2 17 31-pm

How to run

This a React app. You can run it 2 ways.

  1. React Server

    npm i then npm start

    This should open the app at http://localhost:3000/

  2. Static Server

    npm run build

    cd build

    npx http-server

    This should open the app at http://127.0.0.1:8080/

  3. Static Server - no NPM

We attached the build folder for those without npm installed. In this case you just need to run two commands.

cd build

npx http-server

This should open the app at http://127.0.0.1:8080/

How to run the preprocessing script

cd preprocessing

jupyter notebook

go to localhost:8888

select on script.ipynb

select Cell > Run All

✍️ Citations:

Arrows

Indicators

Linear Gradient

Make dashed lines

Sort by object string property

Gradient texts

Dynamic tooltip text

Stacked Bar Chart

Understanding Keys for Stacked Bar

Adding Emojis to the Bar Chart

Dot chart

Sankey chart

Typewriter Effect

📊 Data Pre-processing:

Dataset #1 (StatCan) 9:22

  • changed "-1" values in "amount" column to be 0, as to not skew results when summing
  • got rid of all "total persons" data
  • created a "categories" column that differentiates each datum by its "type", these are the categories:
    • age: [ 15 to 24 years, 25 to 34 years, 35 to 44 years, 45 to 54 years, 55 to 64 years, 65+ years, and more overlapping categories ]
    • gender (2): [ male, female]
    • education (5): ["No certificate, diploma or degree", "Secondary (high) school diploma or equivalency certificate", "Apprenticeship or trades certificate or diploma", "College, "CEGEP or other non-university certificate or diploma", "Bachelor's degree or higher" ] took out other sections as they were redundant, or just didn't have sufficient data across the board
    • urbanization (2): [ Rural areas, Urban areas ]
    • immigration (2): [ Non-immigrants, Immigrants ] removed all other categories encapsulated already in immigrants
    • work (3): [ Working at a paid job or business, Retired, Other activity]