Unit 2 -
Data Representation and Analysis
Frequently Asked Questions
1
2
Hi! I’m Kira!
How to use this FAQ interactive document.
What type of question do you have?
3
I need help with representing data
I need help with data conversion
I need help understanding a concept
I need help with keeping my data clean
Which concept can we help you with?
4
RGB Color Coding
What is a Data?
Hardware VS. Software
Code: Map Plotting
What is Data?
5
RGB Color Coding
Also known as Red-Green-Blue colors. Each pixel is made up of these three components and the code given each color tells the pixel how much of each color to show.
6
Hardware VS. Software
Hardware
Software
7
I need help with data conversion.
8
What is Binary
Bits and Bytes
Representing Characters with Binary
(ASCII Code)
Representing Colors in Binary
(RGB)
Representing Numbers with Binary
Encoding Vs. Decoding
Hex Code
QR Codes
Encoding VS. Decoding
Encoding
Decoding
9
What is Binary?
10
← This circuit is open
0
← This circuit is closed
1
Bits and Bytes
11
0 → off
1 → on
Representing Characters with Binary (ASCII Code)
12
Representing Numbers with Binary
13
Value of each bit | 128 |
| 64 |
| 32 |
| 16 |
| 8 |
| 4 |
| 2 |
| 1 | | |
X | | X |
| X |
| X | | X |
| X |
| X |
| X | | | |
Binary Number | 1 | | 0 | | 1 | | 0 | | 1 | | 0 | | 0 | | 1 | | |
128 | + | 0 | + | 32 | + | 0 | + | 8 | + | 0 | + | 0 | + | 1 | = | 169 |
Representing Colors in Binary (RGB)
14
More about Hex Code
Hex Code
15
Hex | Binary | Hex | Binary | Hex | Binary | Hex | Binary |
0 | 0000 | 5 | 0101 | 4 | 0100 | C | 1100 |
1 | 0001 | 6 | 0110 | 9 | 1001 | D | 1101 |
2 | 0010 | 7 | 0111 | A | 1010 | E | 1110 |
3 | 0011 | 8 | 1000 | B | 1011 | F | 1111 |
QR Codes
16
Parts of a QR Code
Parts of a QR Code
17
Code: Map Plotting
18
Import Map Plot (Grid)
Data Parameter
Plot on Map
Show on display
Import Mat Plot (Grid)
19
import matplotlib.pyplot as plt
data = [[0, 1, 0, 1, 0, 0, 1, 1]
[0, 1, 1, 0, 0, 1, 0, 1]
[0, 1, 1, 0, 0, 0, 1, 1]
[0, 1, 1, 1, 0, 0, 1, 0]
[0, 1, 1, 0, 0, 1, 0, 1]
[0, 1, 1, 1, 0, 1, 0, 0]
[0, 0, 1, 0, 0, 0, 0, 1]
[0, 0, 1, 0, 0, 0, 0, 1]]
plt.imshow(data, cmap="gray")
plt.show()
* The plt module is a part of the base code for the visualizer and not covered in the MS course.
data parameter
Data Parameter
20
import matplotlib.pyplot as plt
data = [[0, 1, 0, 1, 0, 0, 1, 1]
[0, 1, 1, 0, 0, 1, 0, 1]
[0, 1, 1, 0, 0, 0, 1, 1]
[0, 1, 1, 1, 0, 0, 1, 0]
[0, 1, 1, 0, 0, 1, 0, 1]
[0, 1, 1, 1, 0, 1, 0, 0]
[0, 0, 1, 0, 0, 0, 0, 1]
[0, 0, 1, 0, 0, 0, 0, 1]]
plt.imshow(data, cmap="gray")
plt.show()
Plot on Map
21
import matplotlib.pyplot as plt
data = [[0, 1, 0, 1, 0, 0, 1, 1]
[0, 1, 1, 0, 0, 1, 0, 1]
[0, 1, 1, 0, 0, 0, 1, 1]
[0, 1, 1, 1, 0, 0, 1, 0]
[0, 1, 1, 0, 0, 1, 0, 1]
[0, 1, 1, 1, 0, 1, 0, 0]
[0, 0, 1, 0, 0, 0, 0, 1]
[0, 0, 1, 0, 0, 0, 0, 1]]
plt.imshow(data, cmap="gray") plt.show()
data parameter
Show on display
22
import matplotlib.pyplot as plt
data = [[0, 1, 0, 1, 0, 0, 1, 1]
[0, 1, 1, 0, 0, 1, 0, 1]
[0, 1, 1, 0, 0, 0, 1, 1]
[0, 1, 1, 1, 0, 0, 1, 0]
[0, 1, 1, 0, 0, 1, 0, 1]
[0, 1, 1, 1, 0, 1, 0, 0]
[0, 0, 1, 0, 0, 0, 0, 1]
[0, 0, 1, 0, 0, 0, 0, 1]]
plt.imshow(data, cmap="gray") plt.show()
plt.imshow
I need help with representing data.
23
Correlation VS. Causation
Parts of a Table
Scatter Plot
Line Graph
Bar and Column Graphs
Pie Chart
Trend
Parts of a Table
24
| Small Travel Mugs | Large Travel Mugs |
2019 | 4,296 | 5,537 |
2020 | 4,025 | 4,929 |
2021 | 3,458 | 5,273 |
2022 | 3,642 | 6,009 |
2023 | 4,200 | 5,728 |
2024 | 4,182 | 7,109 |
Header Row
Data Labels
Data
Scatter Plot
25
This chart uses dots to show two or more sets of data to see how closely they are correlated.
Line Graph
26
Line graphs look at changes over a period of time.
Bar and Column Graphs
27
Shows data using solid bars. Bar graphs go left to right and Column graphs go up and down.
Column Graph →
← Bar Graph
Pie Chart
28
This type of chart shows data as a part of the whole.
Correlation VS. Causation
Correlation
Causation
29
What is a Trend?
30
Trends are used to help predict future values. It tends to be represented on a graph by a straight line.
I need help with keeping my data clean.
31
Data Cleaning
Data Formatting
Data Bias
Noise and Outliers
What is Data Messiness?
What is Data Messiness?
When the data you are collecting is formatted in multiple ways, shows bias in the question format, is incorrect, or has unnecessary information.
32
Check out the information on how to clean up the messiness through Data Cleaning.
Data Cleaning
This process reviews the data collected to ensure that bias, formatting errors, data noise, and outliers.
33
Data Formatting
Data Bias
Noise and Outliers
Data Bias
Is an inaccurate or distorted representation of what is being measured.
34
Before gathering data, review your own questions to ensure you are not swaying your participants or data gathering.
Data bias can occur due to
Data Formatting
When recording the data for analysis be sure to keep a uniform format for your data. If you are looking for a correlation remember to plan out what you need and how it should be represented.
35
| Chocolate | Vanilla | Mint Chocolate | Strawberry | Coffee |
Chocolate | 11 | 9 | 7 | 8 | 3 |
White | 13 | 15 | 3 | 18 | 9 |
Yellow | 15 | 10 | 5 | 9 | 0 |
Marble | 1 | 2 | 2 | 5 | 8 |
Red Velvet | 2 | 5 | 0 | 0 | 1 |
Strawberry | 1 | 4 | 1 | 8 | 0 |
Noise and Outliers
This type of data causes distraction from the correlated data and causation data.
36
Noise
Outliers
We hope you keep learning and finding ways to use your new computational thinking!
37
Thank you!