owned this note
owned this note
Published
Linked with GitHub
# Data Visualization Notes
---------------
### Febuary 17, 2022
-Attention Economy
### March 03, 2022
1. Sequential (based on brightness, saturation..)
2. Categorical Data - classified into different classes( e.g, blood type and gender)
3. [Logarithmic Scale](https://www.wikiwand.com/en/Logarithmic_scale)
4. Regular Expressions:
- Quantifiers
- ?, *, +, {}, [], \d, (),
### March 17, 2022
[code]create view title_revenue as select inventory_list.title, sum(paymen
t.amount)as revenue from payment join rental on payment.rental_id=re
ntal.rental_id join inventory_list on rental.inventory_id=inventory_
list.inventory_id group by inventory_list.title order by revenue desc
### March 31, 2022
**Terms:**
1. Concatenation
3. Literal
4. Variable
5. Expression
6. Statement
7. Type Casting - converting integer to string ....
8. Type coercion
9. Destructive - there will be a change
10. Non-destructive - there will be no change
11. Shallow Copy
12. Pointer Variables - store addresses (of other variables)
13. Dictionary - or Associative Array
Types of Interval:
1. open interval
2. close interval
3. half open half close interval
**Codes To Observe:**
*** **fruit = ['guava', 'papaya', 'grape', 'apple', 'cherry', 'banana', 'pineapple', 'orange']**
*** sorted(fruit)
*** fruit.sort() | *Sorting the fruit*
*** fruit | *checking the fruit Array*
*** reversed(fruit) | *<list_reverseiterator object at 0x7f221e24daf0>*
*** list(reversed(fruit)) | *Reversed the array*
*** fruit.reverse() |
*** fruit[2:] | *Show all the result except the first two string*
*** fruit[:2] | *Show the first two string*
*** fruit[2:5] | *Show the string from 2-5 only*
*** fruit[:] | *Show everything*
*** y = fruit | **
*** y[2] = 'passionfruitt' | **
*** z = fruit[:] | *create an alias*
*** z[0] = 'pear' | **
**Helpful Links to Understand the Lesson**
[Shallow Copy vs Deep Copy](https://newtoypia.blogspot.com/2020/09/shallow-deep-copy.html)
[Python 3 *for practice*](https://replit.com/languages/python3)
[Python](https://www.codegrepper.com/codeexamples/python/grab+the+first+letter+of+each+string+in+an+array+python)
### April 21, 2022
**codes to observe**
*** x[::-1] for x in fruits] | Reversed
*** x[0] for x in A | Printing the first value of A
*** cut -d, -f 1,5 satellites.csv > a.csv | [[ ]]
*** cut -d, -f 1,5 satellites.csv > b.csv | [[ CTRL + shift f6 || CTRL U ]]
*** paste -d, a.csv b.csv > c.csv | [[ ]]
**Note**
1. Piechart is only good at showing percentage.
2.
### April 28, 2022
** Codes to Practice (gnuplot) **
plot exp(-x**2 / 2) |
plot sin(x) |
plot sin(x)/x |
plot [-20:20] sin(x)/x |
plot [-20:20] sin(x)/x, cos(x) |
plot [-20:20] f(x)title "sinc", cos(x) title "cosine" |
set title "Some Trigonometric Function |
set title "Some Trigonometric Function" |
set xlabel "theta (angle)" |
set ylabel "value" |
replot |
plot x*x |
reset |
replot |
### May 12, 2022
Terms:
1. Grouped Bar Chart
2. Back to back Bar chart
3. Marimekko Chart (cat., sub cat., num, num) - squeezed stack bar.
Note:
* Hierarchical is good for icicle, tree map,
* [Be mindful about the Author's Question](https://www.perceptualedge.com/example13.php)
------------------------------------
## 2/24
Things to remember
colors:
-RGB colors
HSL(for hue, saturation, lightness)
HSV(for hue, saturation, value; also known as HSB, for hue, saturation, brightness)
( The difference between HSL and HSV is that a color with maximum lightness in HSL is pure white, but a color with maximum value/brightness in HSV is analogous to shining a white light on a colored object. )
3 main color scales :
-sequential
-diverging
-qualitative
-(for color blindness) redundant encoding: is the use of more than one graphical or visual structure to encode/represent one variable of data.
-frequency diagram
1. Logarithmic scale (log scale)
2. Categorical data
3. PCRE - Perl Compatible Regular Expressions
## 3/17
difflib- closest matches string in python
## 3/24
-Windows telemetry is a service in Windows Server 2019 which contains technical data on how the device and its related software is working.
## 3/31
1. String concatenation
2. Literal
3. Variable
4. Expression
5. Statement
6. Type casting
7. Type coersion
8. Destructive function
9. Non-destructive function
10. Shallow copy
11. Deep copy
12. Associative array / Dictionary
14.
Destructive- x.sort, x.del
Non-Destructive- x(sorted)
Literal- Hello world
Variable- x = [ hello world ]
Shallow copy - y = x
y[0][0]=99
y
#[[99, 2, 3], [4, 5], [6, 7, 8, 9]]
x = [ [ 1,2,3], [4,5], [6,7,8,9]]
x
#[[1, 2, 3], [4, 5], [6, 7, 8, 9]]
y = x
y[0][0]=99
y
#[[99, 2, 3], [4, 5], [6, 7, 8, 9]]
x
#[[99, 2, 3], [4, 5], [6, 7, 8, 9]] ()
deep copy-
shallow copy vs deep copy
##
split- 'hello'.split()
#['hello']
'hello,hi,haloooo'.split(',')
['hello', 'hi', 'haloooo']
## 4/21
## keyworld
1. row major column major
2. fortran
##
A = [[1,2,3],[4,5,6],[7,8,9],[10,11,12],[13,14,15]]
[ A [0][0], A[1][0], A[2][0], A [3][0] ]
#[1, 4, 7, 10]
[ x[0] for x in A ]
#[1, 4, 7, 10, 13]
--regular expression--
1. > output redirector
2. column -t -s (make the table easier to read)
---------
ctl+shift +f6 = move | cut -d, -f 1,5 sat.csv > a.csv
ctrl+shift +k= cut / cut -d, -f 1,5 sat.csv | cut -d, -f 2-4 sat.csv > b.csv
ctrl+ u= paste | paste -d. a.csv b.csv > c.csv
## 4/28
gnuplot
f(x)=sin(x)/x ---sinc function--
## 5/12
1. back to back barchart
2. grouped bar chart
3. marimekko chart = squeezed stacked bar
## For quiz https://www.perceptualedge.com/example13.php
Different names of {'a': 1, 'b':2, 'c':3} -> Dictionary, Object, Associative Array, Hash table, Key-Value pairs
---
| this | vs | that |
|:----------------------------------------------------------------:| --- |:---------------------------------------------------------------------:|
| destructive function-changing/alteration *eg. fruit.sort* | vs | non destructive function -w/o changing/alteration *eg. sorted(fruit)* |
| statements - *print(''), x = 1* | vs | expressions - *2 * 2* |
| literal - fixed value | vs | variable - symbolic name that is reference to an object |
| shallow - creating a mirror image, same location as the original | vs | deep copying - same contents, different location |
**concatenation** - joining two strings together, may use +
**type casting/coercion** - assigning/changing the current data type to another *eg. int(), str()*
**pointer variable** - stores memory addresses of other variables
*associative array* / *hash table* / *dictionary* / *map*
---
" > " -called output redirector
PDF
CDF
Absolute frequency
Relative frequency