© Copyright 2021      Jiachen Li - All Rights Reserved


1. Enter a word in the input box.
2. Choose one of the five icons and press
3. Enter another word in the input box, press an icon, repeat the previous actions
4. Refresh the page to restart

Newscity is a word processor that retrieves the text entered by the user and outputs the same content in different sizes and colors.

The user needs to enter a word and click the button to select a category. When the user operation is completed, Newscity will search the total number of articles related to the keyword in the category using the NY Times API. The category selected by the user determines the color of the text, and the number of related articles determines the size of the text. The processed text will be displayed on the screen in a random position.

There are five categories that users can select: sports, science, business, politics, and culture. The colors they represent are: red, green, blue, purple and yellow.

In addition, at the top of the input box, there is a diagram that counts and displays the percentage of text in each category. Each category has a different color. The color of these colors mixed according to the percentage is the overall background color (the background color is superimposed with a layer of dark gray to make the text display clearer).

When the total number of articles retrieved under the category is 0, the input is considered “trash” and the corresponding gray text will be displayed on the screen.

The overall concept is relatively simple, but Newscity has shown some very interesting results:

1.   The same text will have completely different results in different categories.
e.g. “election” is larger under the political and business categories, but very small under the sports, science and politics categories

2.   Certain words can show some social issues worth pondering
e.g. When inputting “he” and “she” respectively, under the “sports” category, the size of “he” is much larger than “she”. In the “culture” category, “he” is still slightly larger than “she”, but it is not as significant as the “sports” category.

3.   The integration of background color and text-diversity
When the background color is biased toward the color of a certain category, the words belonging to that category have similar colors, which are less obvious than other categories. This interestingly shows the characteristics of “diversity” and the uniqueness of the minority.

© Copyright 2021      Jiachen Li - All Rights Reserved