Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
26b3d27
nav bar and code chunk
randyer Feb 23, 2024
8dabc97
Merge pull request #1 from azzhang3/initial-design
azzhang3 Feb 23, 2024
b7303ab
Added New Files and Title on Home Page
azzhang3 Feb 23, 2024
c31d87b
Added voronoi js and html
azzhang3 Feb 23, 2024
a15ec84
voronoi tree
azzhang3 Feb 23, 2024
047393c
Merge pull request #2 from azzhang3/azhang-final
randyer Feb 23, 2024
6448050
simple voronoi example
randyer Feb 27, 2024
08110e3
Merge pull request #3 from azzhang3/simple-voronoi
azzhang3 Feb 27, 2024
b09b7b0
Home Page - Working Progress
azzhang3 Feb 28, 2024
e3b72ec
home page - in progress
azzhang3 Feb 29, 2024
a3aeb49
deleted unnecessary file
azzhang3 Feb 29, 2024
c27e1cf
Code Page - Outline done
azzhang3 Feb 29, 2024
db147e2
changes to circle voronoi
azzhang3 Feb 29, 2024
17036b4
All Pages Are Working
azzhang3 Feb 29, 2024
7490c51
Merge pull request #4 from azzhang3/azhang-final
azzhang3 Feb 29, 2024
e6fc4ab
Create CNAME
azzhang3 Feb 29, 2024
f2a7a23
Delete CNAME
azzhang3 Feb 29, 2024
91fffd4
small changes to home page
azzhang3 Feb 29, 2024
1cc07ac
added code tutorial to home page
azzhang3 Feb 29, 2024
33b1301
new Examples
randyer Feb 29, 2024
9da52c1
Merge pull request #5 from azzhang3/azhang-final
randyer Feb 29, 2024
0a0b30a
added data for code example
randyer Feb 29, 2024
faa423e
Vornoi gdp updates
randyer Feb 29, 2024
d8597ac
Merge pull request #7 from azzhang3/voronoi-gdp
randyer Feb 29, 2024
ef8da70
Merge pull request #6 from azzhang3/data-example
randyer Feb 29, 2024
419f935
updated examples page
randyer Mar 1, 2024
1f02744
updated size of visualization
randyer Mar 1, 2024
e0c9adc
styling
randyer Mar 1, 2024
ecb427b
centered voronoi example and added Label
azzhang3 Mar 1, 2024
c328d1e
more examples
randyer Mar 1, 2024
0249942
Merge branch 'main' into examples
azzhang3 Mar 1, 2024
de736a7
Merge pull request #9 from azzhang3/examples
azzhang3 Mar 1, 2024
f0aeb9c
main page formatting adjustments
azzhang3 Mar 1, 2024
6861126
added opacity to nav bar and animation on scroll for pics, graphs, an…
azzhang3 Mar 1, 2024
a1226db
Merge pull request #10 from azzhang3/azhang-newfinal
azzhang3 Mar 1, 2024
0b30c90
data changes to simple voronoi
azzhang3 Mar 1, 2024
b4ab27c
Merge pull request #11 from azzhang3/azhang-newfinal
azzhang3 Mar 1, 2024
da342c9
outline for background processes
azzhang3 Mar 1, 2024
feb7abc
Update index.html
nadavk2002 Mar 1, 2024
fccc94d
minor UI changes
azzhang3 Mar 1, 2024
b12e82b
added voronoi general background processes to the end
azzhang3 Mar 1, 2024
b223112
small changes
azzhang3 Mar 1, 2024
ef16f17
d3-vor lib added
randyer Mar 1, 2024
6f40f95
Merge pull request #12 from azzhang3/voronoi-lib
azzhang3 Mar 1, 2024
4952ccf
animation adjustments
azzhang3 Mar 1, 2024
883c39a
change title to About Voronoi Treemaps
azzhang3 Mar 1, 2024
6107336
title bug fix
azzhang3 Mar 1, 2024
03af4c8
readme - progress
azzhang3 Mar 1, 2024
1485cff
link bug fixes
azzhang3 Mar 1, 2024
be73163
formatting changes in last section
azzhang3 Mar 1, 2024
94bd835
readme basically done
azzhang3 Mar 1, 2024
660ed6d
small change
azzhang3 Mar 1, 2024
54ab1b8
small change
azzhang3 Mar 1, 2024
4080fdd
small change
azzhang3 Mar 1, 2024
d8b352a
Update README.md
azzhang3 Mar 1, 2024
731c424
small changes and references
azzhang3 Mar 1, 2024
0cd04e5
Update README.md
azzhang3 Mar 1, 2024
25f19e7
Update README.md
azzhang3 Mar 1, 2024
8adc24a
Create processBook.pdf
nadavk2002 Mar 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions Asia.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "world",
"children": [
{
"name": "Asia",
"color": "#f58321",
"children": [
{"name": "China", "weight": 14.84, "code": "CN"},
{"name": "Japan", "weight": 5.91, "code": "JP"},
{"name": "India", "weight": 2.83, "code": "IN"},
{"name": "South Korea", "weight": 1.86, "code": "KR"},
{"name": "Russia", "weight": 1.8, "code": "RU"},
{"name": "Indonesia", "weight": 1.16, "code": "ID"},
{"name": "Turkey", "weight": 0.97, "code": "TR"},
{"name": "Saudi Arabia", "weight": 0.87, "code": "SA"},
{"name": "Iran", "weight": 0.57, "code": "IR"},
{"name": "Thaïland", "weight": 0.53, "code": "TH"},
{"name": "United Arab Emirates", "weight": 0.5, "code": "AE"},
{"name": "Hong Kong", "weight": 0.42, "code": "HK"},
{"name": "Israel", "weight": 0.4, "code": "IL"},
{"name": "Malasya", "weight": 0.4, "code": "MY"},
{"name": "Singapore", "weight": 0.39, "code": "SG"},
{"name": "Philippines", "weight": 0.39, "code": "PH"}
]
}
]
}
18 changes: 18 additions & 0 deletions AsiaGDP.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[
{"name": "China", "weight": 14.84},
{"name": "Japan", "weight": 5.91},
{"name": "India", "weight": 2.83},
{"name": "South Korea", "weight": 1.86},
{"name": "Russia", "weight": 1.8},
{"name": "Indonesia", "weight": 1.16},
{"name": "Turkey", "weight": 0.97},
{"name": "Saudi Arabia", "weight": 0.87},
{"name": "Iran", "weight": 0.57},
{"name": "Thaïland", "weight": 0.53},
{"name": "United Arab Emirates", "weight": 0.5},
{"name": "Hong Kong", "weight": 0.42},
{"name": "Israel", "weight": 0.4},
{"name": "Malasya", "weight": 0.4},
{"name": "Singapore", "weight": 0.39},
{"name": "Philippines", "weight": 0.39}
]
158 changes: 56 additions & 102 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,125 +1,79 @@
Final Project - Interactive Data Visualization
All About D3 Voronoi Treemaps
===

The key learning experience of this course is the final project.
You will design a web site and interactive visualizations that answer questions you have, provide an exploratory interface to some topic of your own choosing, or take on a more ambitious experiment than A3.
You will acquire the data, design your visualizations, implement them, and critically evaluate the results.

The path to a good visualization is going to involve mistakes and wrong turns.
It is therefore important to recognize that mistakes are valuable in finding the path to a solution, to broadly explore the design space, and to iterate designs to improve possible solutions.
To help you explore the design space, we will hold events such as feedback sessions in which you propose your idea and initial designs and receive feedback from the class and staff.

Proposals / Idea Generation
---

Submit project ideas using [this Google Form](https://docs.google.com/forms/d/e/1FAIpQLSc72vId8keotkEvLrB9Ef3Nt0e1uh_-mWmQ5okyPM5_q2a89Q/viewform?usp=sf_link).

You're encouraged to submit many ideas-- staff will help you identify the most promising ones and possible roadblocks.

Please stick to 1-4 folks per team.

Final Project Materials
Website Link: https://azzhang3.github.io/final/

Video: https://www.loom.com/share/9ee96bf9055e4b108f51c01c3d59ff3f?sid=5064df93-40a4-4107-aa99-fec39562a32a

For our final project we decided to delve into and explore the world of Voronoi Treemaps. We did that by creating a website and a video which showcases it.

Design Achievements:
- We sent a prototype to Professor Harrison, for general feedback and review, and then implemented those feedbacks.
- We sent a prototype to a graphics design major, for feedback and review on the UI, and then implemented those feedbacks.
- The navbar follows some of the design principles from apple's website, with 0.98 opacity and color that matches the aesthetics of the general website design.
- The navbar has a hover effect, which slightly changes the color of the text when you hover over it.
- We implemented a scrolling animation for pictures and codes, so it fades in as your scroll, which makes the website feel smoother to use.
- We implemented a dark and light mode based on your system preferences, so it doesn't blind the user if they are in dark mode.
- We implemented the first example in the examples sections, so users can interact with it, by hovering over the countries.
- We formatted the text so that the section titles are larger, and also added spacing between each section.
- We added a section for each example and provided links to the articles for clearer distinction between each example.
- We used a combination of CSS, JS, and HTML to format and ref
- Throughout the website, there are instances of pictures, videos, codes, links, descriptions, and examples to help the user better navigate and understand voronoi treemaps.
- We attempted to implement a button which allows the user to toggle, but that was still in progress.

Technical Achievements:
- We implemented a function for the scrolling effects, which uses an observer element to see if the picture is visible, and when it is it fades it in.
- We implemented a light and dark mode that checks and sees what your current system preferences are and adjusts the website's mode based on that.
- We implemented a dynamic simple and a dynamic complex voronoi treemaps. The simple one is used in the code examples to not overwhelm the reader, and the complex is used in the examples to showcase the capabilities of voronoi treemaps.
- We implemented a hover effect in the complex voronoi treemap so users can interact with it.
- We implemented two different pages and linked it to the navbar so it helps the user navigate our website.
- We used a combination of CSS, JS, and HTML to format and refactor the code, rather than having everything in the HTML. This makes it easier to make changes and adjustments later on.
- We attempted to implement a mobile version of the website, but that was still in progress.

Website Layout
---
For your final project you must hand in the following items.

### Process Book

An important part of your project is your process book. Your process book details your steps in developing your solution, including the alternative designs you tried, and the insights you got. Develop your process book out of the project proposal. Equally important to your final results is how you got there! Your process book is the place you describe and document the space of possibilities you explored at each step of your project. It is not, however, a journal or lab notebook that describes every detail - you should think carefully about the important decisions you made and insights you gained and present your reasoning in a concise way.

We strongly advise you to include many figures in your process book, including photos of your sketches of potential designs, screen shots from different visualization tools you explored, inspirations of visualizations you found online, etc. Several images illustrating changes in your design or focus over time will be far more informative than text describing those changes. Instead, use text to describe the rationale behind the evolution of your project.

Your process book should include the following topics. Depending on your project type the amount of discussion you devote to each of them will vary:

- Overview and Motivation: Provide an overview of the project goals and the motivation for it. Consider that this will be read by people who did not see your project proposal.
- Related Work: Anything that inspired you, such as a paper, a web site, visualizations we discussed in class, etc.
- Questions: What questions are you trying to answer? How did these questions evolve over the course of the project? What new questions did you consider in the course of your analysis?
- Data: Source, scraping method, cleanup, etc.
- Exploratory Data Analysis: What visualizations did you use to initially look at your data? What insights did you gain? How did these insights inform your design?
- Design Evolution: What are the different visualizations you considered? Justify the design decisions you made using the perceptual and design principles you learned in the course. Did you deviate from your proposal?
- Implementation: Describe the intent and functionality of the interactive visualizations you implemented. Provide clear and well-referenced images showing the key design and interaction elements.
- Evaluation: What did you learn about the data by using your visualizations? How did you answer your questions? How well does your visualization work, and how could you further improve it?

As this will be your only chance to describe your project in detail make sure that your process book is a standalone document that fully describes your results and the final design.
[Here](http://dataviscourse.net/2015/assets/process_books/bansal_cao_hou.pdf) are a [few examples](http://dataviscourse.net/2015/assets/process_books/walsh_trevino_bett.pdf) of process books from a similar course final.
### Code:
This page provides general explanations for voronoi treemaps.

Tip: Start your process book on Day 1. Make entries after each meeting, and trim / edit as needed towards the end of the project. Many folks use either slides software (like PowerPoint) or Google Docs to make this book, as both allow for flexible layouts and export to PDF.
#### About Voronoi Treemaps
The first section provides some background information, talking about what voronoi tree maps are and provides an example of a one. Additionally, in this section we provided an example of a default D3 rectangular treemap, so users can compare between the two.

#### Creating a Simple Voronoi Treemap with D3.js
The second section of the provides descriptions on how to create your own simple voronoi treemap with D3.js. In this section we provided a series of steps with detailed explanations and code examples, to help you get started. At the end of this section there is an Additional Info Section, which gives a basic overview of some of the major functions and algorithms that goes into making a voronoi treemap.

### Project Website
#### Voronoi General Background Processes
The third section provides information on the general background processes of voronoi treemap. In this section we take a deeper dive into what is actually going on when a voronoi treemap is being produced. We provided some steps and sample screenshots of what is actually going on. Additionally, we provided a website and a video for those we want to look into it more.

Create a public website for your project using GitHub pages or another web hosting service of your choice.
The web site should contain your interactive visualization, summarize the main results of the project, and tell a story.
Consider your audience (the site should be public if possible, unless you're running an experiment, etc.) and keep the level of discussion at the appropriate level.
Your process book and data should be linked from the web site as well.
Also embed your interactive visualization and your screen-cast in your website.
If you are not able to publish your work (e.g., due to confidential data) please let us know in your project proposal.
#### The d3-voronoi-treemap.js library
The final section provides information on the library with a link and some of the general code from it. Moreover, we provided explanations on two of the main functions that goes into developing and generating the voronoi treemap.

### Project Screen-Cast
### Examples:
This page provides some examples of voronoi treemaps.

Each team will create a two minute screen-cast with narration showing a demo of your visualization and/or some slides.

You can use any screencast tool of your choice, such as Camtasia or Loom (new and recommended).
Please make sure that the sound quality of your video is good -- it may be worthwhile to invest in an external USB microphone-- campus IT should have some you can borrow.
Upload the video to an online video-platform such as YouTube or Vimeo and embed it into your project web page.
For our final project presentation day, we will show as many videos in class as possible, and ask teams to field questions.

We will strictly enforce the two minute time limit for the video, so please make sure you are not running longer.
Use principles of good storytelling and presentations to get your key points across. Focus the majority of your screencast on your main contributions rather than on technical details.
What do you feel is the best part of your project?
What insights did you gain?
What is the single most important thing you would like your audience to take away? Make sure it is front and center rather than at the end.

Outside Libraries/References
Images of Website
---
![visual](readmeImg/pic1.png)

For this project you *do not* have to write everything from scratch.
![visual](readmeImg/pic2.png)

You may *reference* demo programs from books or the web, and *include* popular web libraries like Material UI, React, Svelte, etcetera.
![visual](readmeImg/pic3.png)

Please *do not* use libraries on top of d3 without consulting staff, however.
Libraries like nvd3.js look tempting, but such libraries often have poor defaults and result in poor visualizations.
There may be exceptions.
Instead, draw from the numerous existing d3 examples on the web.
![visual](readmeImg/pic4.png)

If you use outside sources please provide a References section with links at the end of your Readme.
![visual](readmeImg/pic5.png)

Resources
---
The "[Data is Plural](https://tinyletter.com/data-is-plural/archive)" weekly letter often contains interesting datasets.
![visual](readmeImg/pic6.png)

KAGGLE IS BANNED! You may propose to use a dataset from there if you really have a deep/cool idea, but please run it by me first.
![visual](readmeImg/pic7.png)

Think of something you're interested in, go find data on it! Include data collection and processing as part of your work on this project.
![visual](readmeImg/pic8.png)

Requirements
---

Store the following in your GitHub repository:

- Code - All web site files and libraries assuming they are not too big to include
- Data - Include all the data that you used in your project. If the data is too large for github store it on a cloud storage provider, such as Dropbox or Yousendit.
- Process Book- Your Process Book in PDF format.
- README - The README file must give an overview of what you are handing in: which parts are your code, which parts are libraries, and so on. The README must contain URLs to your project websites and screencast videos. The README must also explain any non-obvious features of your interface.

GitHub Details
---

- Fork the repo. You now have a copy associated with your username.
- Make changes to index.html to fulfill the project requirements.
- Make sure your "main" branch matches your "gh-pages" branch. See the GitHub Guides referenced above if you need help.
- Edit the README.md with a link to your gh-pages or other external site: for example http://YourUsernameGoesHere.github.io/DataVisFinal/index.html
- To submit, make a [Pull Request](https://help.github.com/articles/using-pull-requests/) on the original repository.

Grading
---

- Process Book - Are you following a design process that is well documented in your process book?
- Solution - Is your visualization effective in answering your intended questions? Was it designed following visualization principles?
- Implementation - What is the quality of your implementation? Is it appropriately polished, robust, and reliable?
- Presentation - Are your web site and screencast clear, engaging, and effective?
Your individual project score will also be influenced by your peer evaluations.

References
---
https://d3-graph-gallery.com/graph/treemap_basic.html

https://github.com/Kcnarf/d3-voronoi-treemap

- This final project is adapted from https://www.dataviscourse.net/2020/project/
https://www.npmjs.com/package/d3-voronoi-treemap?activeTab=code
14 changes: 14 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const observer = new IntersectionObserver((entries) => {
entries.forEach((entry) => {
if (entry.isIntersecting) {
entry.target.classList.add("visible");
} else {
entry.target.classList.remove("visible");
}
});
});

const hiddenElement = document.querySelectorAll(".hidden");
hiddenElement.forEach((element) => {
observer.observe(element);
});
45 changes: 45 additions & 0 deletions codeBlock.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="./style.css" />
<title>Code Example</title>
</head>
<body>
<div id="navbar"></div>

<!-- Your page content goes here -->

<div class="title">
<h1>All About Treemaps</h1>
</div>

<div class="container" id="code">
<h2>Inline Code Example</h2>
<p>
This is an example of <code>&lt;code&gt;</code> element for showing
inline code.
</p>

<h2>Code Block Example</h2>
<pre>
<code>
// This is a sample code snippet in JavaScript
function greet(name) {
console.log("Hello, " + name + "!");
}

greet("World");
</code>
</pre>
</div>
<script>
fetch("./navbar.html")
.then((response) => response.text())
.then((html) => {
document.getElementById("navbar").innerHTML = html;
});
</script>
</body>
</html>
Loading