Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Shopping Habits

Public visualization

Viewing a saved revision (read-only)

8460c1bf57fd404699e58416ceccfe91

Shopping Habits

0 stars1🌍 Public
Mmacgregorm01@gmail.com
Last edited Oct 30, 2024
Created on Sep 4, 2024

This example displays the first row of a shopping habits dataset as a formatted JSON object in a container. It prints the data as a `<pre>` element with a font size of 20 pixels using template literals and `innerHTML`. The dataset, imported from `data.csv` and listed with its full header row, includes columns like age, gender, item purchased, category, location, and review rating. The code first converts several quantitative attributes, such as `Customer_ID`, `Age`, and `Purchase_Amount_USD`, to numbers using the unary plus operator before rendering the sample.

AI-generated description

The Penguins Dataset, loaded and parsed as CSV.

Fork and modify this template to import your data to VizHub and export it for use in other vizzes! To do that:

  • Fork this viz
  • Clear out the README
  • Update the README with details about your dataset (including original source)
  • Replace data.csv with your own data
  • Replace the parsing logic in index.js with your own
  • Set the custom URL so you can import from it easily

Challenge

  • Find 3 datasets on a topic you are interested in
  • For each of those, fork this viz and replace the data
  • Parse the quantitative attributes into numbers
  • Update README.md to indicate the original data source