Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback #1

Open
wants to merge 28 commits into
base: feedback
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

.idea/
Binary file added FinalPaper.pdf
Binary file not shown.
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,27 @@
# final-project-starter-code
# Project Page

Title: Gender Inequality in China

Team Member: Yunyi Zhu ([email protected])

Summary Image: ![left: a webpage with summary, right: a webpage with visualization](https://github.com/6859-sp21/final-project-yunyi/blob/main/final-6859-data/figures/0_fig1/fig1.png)

Abstract: In this project, we develop an interactive website that introduces and visualizes the gender inequality in China. It includes visualizations using multiple datasets that focus on discrimination faced by Chinese women in different life stages. For each life stage, it uses scrollytelling to display the data together with paragraphs that provides the contexts of the data. We hope that this website brings awareness to different parties on the gender inequalities faced by women living in China.

Link to Paper: https://github.com/6859-sp21/final-project-yunyi/blob/main/FinalPaper.pdf

Link to Video: https://www.youtube.com/watch?v=0M9cH8rjX0w

Link to Visualization Github Pages: https://6859-sp21.github.io/final-project-yunyi/#/


# Project Process

Split Work: this is a one-person project so all parts are implemented by myself.

During the data search and implementation, I made several compromises on the interactivity of the visualization. In the first sketch, there will be five subcategories: birth, education, work, marriage and inheritance. Each of the subcategories have enough non-numerical data that supports them, but they really lack numerical data.

Crawling and processing the data was harder than I estimated so I ended up using aggregated data from documents such as governmental and industrial reports. For example, I originally planned to crawl all the court pages that are related to domestic violence, classify them and create an interactive system where people can hover and see each individual case. The challenges of this plans include (1) crawling all the data, (2) classify the data and (3) translate the data to English. I crawled the data but they were all textual data, so I ended up falling back to my plan B, which is to use aggregated data.

For education and work inequalities, it was even harder because the data were nowhere to be found. Originally, I wanted to find different cut offs of the college entrance exam for men and women, but those cut offs turn out to be private. I could potentially get in touch with feminist groups that collect such info, but in that case the data can be skewed, so I put this part to future work since I will need more time to find places to get data.

1 change: 1 addition & 0 deletions final-6859-data/assets-attribution/favicon/icon.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<a target="_blank" href="undefined/icons/set/female">Female icon</a> icon by <a target="_blank" href="">Icons8</a>
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions final-6859-data/assets-attribution/ink-stain/ink-stain.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
chinese ink ink PNG Designed By 588ku from <a href="https://pngtree.com/">Pngtree.com</a>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8,374 changes: 8,374 additions & 0 deletions final-6859-data/figures/0_fig1/fig1.ai

Large diffs are not rendered by default.

Binary file added final-6859-data/figures/0_fig1/fig1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6,043 changes: 6,043 additions & 0 deletions final-6859-data/figures/2_result/1_ratio-explain/ratio-explain.ai

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added final-6859-data/general-report.pdf
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"sex": "boy",
"ratio": 1.212,
},
{
"sex": "girl",
"ratio": 1
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
http://www.stats.gov.cn/tjsj/pcsj/rkpc/6rp/indexch.htm
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import csv
import json

# Function to convert a CSV to JSON
# Takes the file paths as arguments
def make_json(csvFilePath, jsonFilePath, dataFieldMapping):

# create a dictionary
data = []

# Open a csv reader called DictReader
with open(csvFilePath) as csvf:
csvReader = csv.DictReader(csvf)

# Convert each row into a dictionary
# and add it to data
for row in csvReader:

filtered_row = {}

for key in dataFieldMapping.keys():
value = row[key]
new_key = dataFieldMapping[key]
filtered_row[new_key] = value

data.append(filtered_row)

# Open a json writer, and use the json.dumps()
# function to dump data
with open(jsonFilePath, 'w') as jsonf:
jsonf.write(json.dumps(data, indent=4))

# Driver Code

# Decide the two file paths according to your
# computer system
csvFilePath = r'source.csv'
jsonFilePath = r'result.json'
dataFieldMapping = {
"Country Code": "id",
"2009": "value"
}

# Call the make_json function
make_json(csvFilePath, jsonFilePath, dataFieldMapping)
Loading