Data and Visualization I: Structuring Information
Course overview
In this course, students learn the foundations of data. They build the ability to organize numbers and text systematically and turn them into graphs to discover patterns and meaning. After understanding the principles of visualization with turtle graphics, they make professional graphs with Matplotlib and analyze real music/fashion data.
Estimated time: 16-32 hours
The time required depends on the student's grade level, prior experience, and learning speed, and varies greatly. It also differs between just learning the basic concepts and moving on, versus additional practice problems or creative projects: taking those on makes a difference too. The times above are an average range, so please proceed flexibly at your child's pace.
What abilities will it build?
"the ability to structure data and represent it visually" is what students train. They build the foundations of data literacy, one of the most important competencies of the 21st century. They expand their thinking from single values to large datasets and adopt a data-driven mindset that replaces "gut feeling" with "evidence".
What principles will you learn?
- (organizing data) With lists and dictionaries, they manage multiple pieces of data systematically. This is the basic structure of modern data systems such as databases, JSON, and APIs.
- (comparison/trend analysis) They compare magnitudes with bar graphs and grasp change over time with line graphs. This is the core skill of turning numbers into visual patterns.
AI-era thinking: computing (problem-solving) | data-driven | probabilistic thinking
Data science thinking
| Skill | Description | Example activity |
|---|---|---|
| ๐ data and visualization | Turning numbers into graphs | Compare sales with a bar graph |
| ๐ Pattern discovery | Finding regularities in data | Analyze the trend of monthly UFO sightings |
| ๐งช Hypothesis testing | Confirming a guess with data | Test "there are more UFO sightings in summer" |
| ๐ฝ Data filtering | Extracting only the data that meets a condition | Select only data from 2020 onward |
Mathematical connections
| Math concept | Programming application | Learning benefit |
|---|---|---|
| Statistics | Calculating average, max, and min | sum(data)/len(data) -> average |
| ratios and percentages | Calculating pie chart proportions | Each part's % of the whole |
| Coordinate plane | Marking a location on a map by latitude/longitude | Extending the (x, y) coordinate concept |
| Correlation | Analyzing the relationship between two variables | The "music tempo <-> popularity" relationship |
The scientific inquiry process
flowchart LR
A[1. Question] --> B[2. Hypothesis]
B --> C[3. Collect]
C --> D[4. Analyze]
D --> E[5. Conclusion]
E -.->|new question| A
| Steps | Example |
|---|---|
| Question | "Which brand of sneaker is the most expensive?" |
| Hypothesis | "Nike will be the most expensive" |
| Collect | Load price data from a CSV file |
| Analyze | Bar graph of average price by brand |
| Conclusion | "Actually, Yeezy was the most expensive" |
Media literacy
๐ป Code examples & visualization
Example 1: Bar Graph - Matplotlib
import matplotlib.pyplot as plt
# Data
fruits = ['Apple', 'Banana', 'Orange', 'Grape']
sales = [45, 30, 25, 40]
# Create a bar graph
plt.bar(fruits, sales, color=['red', 'yellow', 'orange', 'purple'])
plt.title('Fruit Sales')
plt.xlabel('Fruit')
plt.ylabel('Sales')
plt.show()
Result:
Fruit Sales
โ
50โค โโ
40โค โโ โโ โโ
30โค โโ โโ โโ โโ
20โค โโ โโ โโ โโ
10โค โโ โโ โโ โโ
0โผโโโโโโโโโโโโโโโโโโโโโ
Apple Banana Orange Grape
Example 2: Pie Chart - Visualizing Proportions
import matplotlib.pyplot as plt
# Data
labels = ['Gaming', 'YouTube', 'Studying', 'Exercise']
times = [3, 2, 4, 1] # Time (unit: hours)
# Pie chart
plt.pie(times, labels=labels, autopct='%1.1f%%')
plt.title('Daily Activity Time Breakdown')
plt.show()
Result:
Daily Activity Time Breakdown
Studying
(40%)
โฑโโโโโโโโโฒ
โฑ โฒ
Gaming Exercise
(30%) (10%)
โฒ โฑ
โฒโโโโโโโโโฑ
YouTube
(20%)
Example 3: Line Graph - Trend Analysis
import matplotlib.pyplot as plt
# Data
months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']
temperature = [2, 5, 12, 18, 23, 27]
# Line graph
plt.plot(months, temperature, marker='o', color='red')
plt.title('Monthly Average Temperature')
plt.xlabel('Month')
plt.ylabel('Temperature (ยฐC)')
plt.grid(True)
plt.show()
Result:
Monthly Average Temperature
โ
30โค โ
25โค โ
20โค โ
15โค โ
10โค
5โค โ
0โคโ
โผโโโโโโโโโโโโโโโโโโโโโ
Jan Feb Mar Apr May Jun
Example 4: Map Visualization - Folium
import folium
# Create a map centered on Seoul
map = folium.Map(
location=[37.5665, 126.9780], # Seoul coordinates
zoom_start=12
)
# Add a marker
locations = [
[37.5796, 126.9770, "Gyeongbokgung"],
[37.5512, 126.9882, "Namsan Tower"],
[37.5662, 126.9785, "Gwanghwamun"]
]
for loc in locations:
folium.Marker(
location=[loc[0], loc[1]],
popup=loc[2],
icon=folium.Icon(color='red')
).add_to(map)
map.save("seoul_map.html")
Run result (map):
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ด Gyeongbokgung โ
โ โฒ โ
โ โฒ Seoul map โ
โ ๐ด Gwanghwamun โ
โ โฒ โ
โ โฒ โ
โ ๐ด Namsan Tower โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Example 5: Dictionary - Structuring Data
# UFO sighting data (dictionary)
ufo_sighting = {
"date": "2024-03-15",
"location": "Seoul",
"Latitude": 37.5665,
"Longitude": 126.9780,
"shape": "disc",
"duration": "5 minutes"
}
# Access the data
print(f"UFO sighting location: {ufo_sighting['location']}")
print(f"UFO shape: {ufo_sighting['shape']}")
# Multiple sightings (list + dictionary)
ufo_data = [
{"City": "Seoul", "count": 15},
{"City": "Busan", "count": 8},
{"City": "Daegu", "count": 5}
]
Data structure:
ufo_data = [
โโโโโโโโโโโโโโโโโโโโโโโ
โ {"city":"Seoul", โ โ ufo_data[0]
โ "count": 15} โ
โโโโโโโโโโโโโโโโโโโโโโโค
โ {"city":"Busan", โ โ ufo_data[1]
โ "count": 8} โ
โโโโโโโโโโโโโโโโโโโโโโโค
โ {"city":"Daegu", โ โ ufo_data[2]
โ "count": 5} โ
โโโโโโโโโโโโโโโโโโโโโโโ
๐ฎ Hands-on Practice - Part 1: Data Structures
Exercise 1.1: Making a List
Fill in the blanks to complete the list!
Exercise 1.2: Manipulating a List
Fill in the blanks to modify the list!
Exercise 1.3: Completing a Dictionary
Fill in the blanks to complete the game character dictionary!
Exercise 1.4: Adding Data to a Dictionary
Fill in the blanks to add a new item to the dictionary!
Exercise 1.5: Calculating an Average
Fill in the blanks to calculate the average score!
๐ฎ Hands-on Practice - Part 2: Drawing Graphs
Exercise 2.1: Completing a Bar Graph
Fill in the blanks to complete the bar graph!
Exercise 2.2: Adding Color to a Bar Graph
Apply colors to the bar graph!
Exercise 2.3: Completing a Line Graph
Fill in the blanks to complete the line graph!
Exercise 2.4: Comparing Two Lines
Fill in the blanks to compare two students' scores!
Exercise 2.5: Completing a Pie Chart
Fill in the blanks to complete the pie chart!
Exercise 2.6: Highlighting a Pie Chart Slice
Fill in the blanks to highlight a specific item!
๐ฎ Hands-on Practice - Part 3: Data Analysis
Exercise 3.1: Finding the Max/Min Value
Fill in the blanks to find the max and min values!
Exercise 3.2: Filtering Data by a Condition
Fill in the blanks to filter data that meets a condition!
Exercise 3.3: Sorting Data
Fill in the blanks to sort the data!
Exercise 3.4: Finding the Max-Value Record
Fill in the blanks to find the item with the largest value!
๐ฎ Hands-on Practice - Part 4: Debugging Practice
Exercise 4.1: Fixing an Index Error
_____Replace it with the correct index to fix the error!
Exercise 4.2: Fixing a Dictionary Key Error
Enter the correct key name to fix the error!
Exercise 4.3: Fixing a Data Count Error
Match the data counts to fix the graph error!
๐ Fill-in-the-Blank Practice
List basics:
- Creating a list:
my_list = - Adding an item:
my_list.(4) - Removing an item:
my_list.(2) - List length:
(my_list) - First item:
my_list[]
Dictionary basics:
- Creating a dictionary:
my_dict = {} - Getting a value:
my_dict[] - Adding/modifying a value:
my_dict['์ํค'] = - All keys:
my_dict.() - All values:
my_dict.()
Matplotlib basics:
- Bar chart:
plt.(x, y) - Line graph:
plt.(x, y) - Pie chart:
plt.(sizes) - Show the graph:
plt.() - Add a title:
plt.('title') - x-axis label:
plt.('label') - Show the legend:
plt.() - Add a grid:
plt.(True)
Data analysis:
- Max value:
(list) - Min value:
(list) - Sum:
(list) - Average:
sum(list) /(list) - Sort:
(list)
๐ฏ Quiz
Why learn data and visualization?
Key 21st-Century Competency
| Data and visualization skills | Real-life uses |
|---|---|
| Reading graphs | Understanding statistics in the news |
| Trend analysis | Grasping market trends |
| Pattern discovery | Scientific discovery |
| Map visualization | Location-based analysis |
| Communicating information | Presentations, writing reports |
Data literacy is a democratic citizen essential for critically evaluating information as
1. Drawing Graphs with Turtle
| Item | Content |
|---|---|
| What will you learn? | Basic concepts of data and visualization |
| Core Concepts | Defining data, bar graphs, pie charts |
Data is collected information. With turtle graphics, students draw graphs by hand and understand the structure of bar graphs and pie charts. Bar graph is suited to comparing categories, and the pie chart is suited to showing each part's proportion of the whole. Before using a library, students grasp the principles.
2. Lists and Data
| Item | Content |
|---|---|
| What will you learn? | Data structures and dictionaries |
| Core Concepts | Lists, dictionaries, data management |
Dictionaryis {"์ด๋ฆ": value} form to store data. Students learn how to store and access real data efficiently. This data structure is the core tool used most often in data analysis.
3. Matplotlib (Browser)
| Item | Content |
|---|---|
| What will you learn? | Python's standard data and visualization library |
| Core Concepts | The Matplotlib API, various chart types |
Matplotlib is the most widely used visualization library in Python. You can make almost any type of graph - bar graphs, line graphs, scatter plots, histograms, pie charts, and more. Students learn the tools data scientists and researchers actually use.
4. Music Data Lab
| Item | Content |
|---|---|
| What will you learn? | Analyzing real music-industry data |
| Core Concepts | Trend analysis, correlation, hypothesis testing |
real Spotify data to analyze music trends. They answer intriguing questions like "Is music getting louder and louder?" and "Are sad songs more popular?" With data, students form and test hypothesesand experience the scientific method.
| Mission | Analysis topics |
|---|---|
| Loudness Wars | Analyzing change over time |
| Sad Banger | Correlation analysis |
| Seasonal | Seasonal trends |
| Major/Minor | Comparison by group |
5. SneakerBot Streetwear Lab
| Item | Content |
|---|---|
| What will you learn? | Fashion/consumer data analysis |
| Core Concepts | Market analysis, consumer behavior |
Sneaker/streetwear sales data. They explore questions like "Nike vs Adidas, who wins?" and "Are limited editions really more expensive?" Students work with real business dataand get their first taste of the fundamentals of marketing and management.
| Mission | Analysis topics |
|---|---|
| Hype Tax | Price premium |
| Brand Wars | Brand competition |
| Global | Analysis by region |
| Inflation | Price changes |
When you finish this course...
Learning outcomes
Students will be able to:
- Lists and dictionariesto structure data
- various graph types(bar, line, pie) for the right situation
- Matplotlibto create professional graphs
- real datasetsand analyze them
- identify a trends and patternsin the data
- form and test hypothesesdata-science thinking
Next step
Students who finish Data & Visualization I can move on to Data and Visualization IIto learn map visualization, hands-on data analysis, and data storytelling.