├── Layouts.pdf
├── visna.png
├── EDAV2Notes.pdf
├── LineCharts.pdf
├── ReadingFiles.pdf
├── Transitions.pdf
├── EDAV6Lect-Axes.pdf
├── Interactivity.pdf
├── cartogramfinal.png
├── EDAV6Lect-Scales.pdf
├── ObjectConstancy.pdf
├── UpdateEnterExit.pdf
├── .gitignore
├── Test2SampleSolutions.md
├── porosity.csv
├── docs
├── porosity.csv
├── EDAV3.html
├── D3template.html
├── read.md
├── HorizontalBarChart.md
├── HorizontalBarChart.html
├── EDAV2.html
├── SixBlueCircles.html
├── SixBlueCircles.md
├── DataBindwithKeys.md
├── DataBindwithKeys.html
├── ScaleBand.html
├── EDAV1.html
├── EventListener.md
├── EventListener.html
├── index.md
├── EDAV8_1_linegen.html
├── EDAV5_1.html
├── EDAV5_2.html
├── line.html
├── EDAV8_2_linechart.html
├── EDAV5_3.html
├── EDAV8_3_readfile.html
├── EDAV5_4_scaleBand.html
├── EDAV5_5_scaleLinear.html
├── MultipleTransitions.html
├── EDAV6_1_margins.html
├── EDAV4Sol.html
├── EDAV6_2_yaxis.html
├── CorrelationCoefficient.md
├── EDAV7_1_axes.html
├── EDAV7_2_transitions.html
├── EDAV7_3_obj_constancy.html
├── BestFittingLine.md
├── Boxplot.md
└── Boxplot.html
├── D3.Rproj
├── EDAV3.html
├── D3template.html
├── EDAV5_Solutions.md
├── HorizontalBarChart.html
├── SixBlueCircles.html
├── EDAV2.html
├── DataBindwithKeys.html
├── ScaleBand.html
├── EDAV6Notes.md
├── EventListener.html
├── EDAV1.html
├── EDAV8_1_linegen.html
├── EDAV5_1.html
├── Tips4D3debugging.md
├── EDAV5_2.html
├── line.html
├── README.md
├── EDAV8_2_linechart.html
├── EDAV5_3.html
├── EDAV9Notes.md
├── EDAV8_3_readfile.html
├── EDAV5_4_scaleBand.html
├── EDAV5_5_scaleLinear.html
├── EDAV6_1_margins.html
├── EDAV4Sol.html
├── EDAV6_2_yaxis.html
├── EDAV7_1_axes.html
├── EDAV7_2_transitions.html
├── EDAV1Notes.md
├── EDAV7_3_obj_constancy.html
├── Test2SampleQuestions.md
├── EDAV3Notes.md
├── R
└── EDAV3Notes.Rmd
├── EDAV7Notes.md
├── EDAV8Notes.md
├── EDAV4Notes.md
├── EDAV5Notes.md
├── ExerciseSolutions.md
└── EDAV2Notes.md
/Layouts.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jtr13/D3/master/Layouts.pdf
--------------------------------------------------------------------------------
/visna.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jtr13/D3/master/visna.png
--------------------------------------------------------------------------------
/EDAV2Notes.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jtr13/D3/master/EDAV2Notes.pdf
--------------------------------------------------------------------------------
/LineCharts.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jtr13/D3/master/LineCharts.pdf
--------------------------------------------------------------------------------
/ReadingFiles.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jtr13/D3/master/ReadingFiles.pdf
--------------------------------------------------------------------------------
/Transitions.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jtr13/D3/master/Transitions.pdf
--------------------------------------------------------------------------------
/EDAV6Lect-Axes.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jtr13/D3/master/EDAV6Lect-Axes.pdf
--------------------------------------------------------------------------------
/Interactivity.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jtr13/D3/master/Interactivity.pdf
--------------------------------------------------------------------------------
/cartogramfinal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jtr13/D3/master/cartogramfinal.png
--------------------------------------------------------------------------------
/EDAV6Lect-Scales.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jtr13/D3/master/EDAV6Lect-Scales.pdf
--------------------------------------------------------------------------------
/ObjectConstancy.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jtr13/D3/master/ObjectConstancy.pdf
--------------------------------------------------------------------------------
/UpdateEnterExit.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jtr13/D3/master/UpdateEnterExit.pdf
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .Rproj.user
2 | .Rhistory
3 | .RData
4 | .Ruserdata
5 | *copy*
6 | *Lect*
7 | Untitled.*
8 |
--------------------------------------------------------------------------------
/Test2SampleSolutions.md:
--------------------------------------------------------------------------------
1 | 1. D
2 |
3 | 2. B
4 |
5 | 3. C
6 |
7 | 4. A
8 |
9 | 5. A
10 |
11 | 6. C
12 |
13 | 7. D
14 |
15 | 8. B
16 |
17 | 9. A
18 |
19 | 10. B
20 |
--------------------------------------------------------------------------------
/porosity.csv:
--------------------------------------------------------------------------------
1 | x,y
2 | 99,28.8
3 | 101.1,27.9
4 | 102.7,27
5 | 103,25.2
6 | 105.4,22.8
7 | 107,21.5
8 | 108.7,20.9
9 | 110.8,19.6
10 | 112.1,17.1
11 | 112.4,18.9
12 | 113.6,16
13 | 113.8,16.7
14 | 115.1,13
15 | 115.4,13.6
16 | 120,10.8
--------------------------------------------------------------------------------
/docs/porosity.csv:
--------------------------------------------------------------------------------
1 | x,y
2 | 99,28.8
3 | 101.1,27.9
4 | 102.7,27
5 | 103,25.2
6 | 105.4,22.8
7 | 107,21.5
8 | 108.7,20.9
9 | 110.8,19.6
10 | 112.1,17.1
11 | 112.4,18.9
12 | 113.6,16
13 | 113.8,16.7
14 | 115.1,13
15 | 115.4,13.6
16 | 120,10.8
--------------------------------------------------------------------------------
/D3.Rproj:
--------------------------------------------------------------------------------
1 | Version: 1.0
2 |
3 | RestoreWorkspace: Default
4 | SaveWorkspace: Default
5 | AlwaysSaveHistory: Default
6 |
7 | EnableCodeIndexing: Yes
8 | UseSpacesForTab: Yes
9 | NumSpacesForTab: 2
10 | Encoding: UTF-8
11 |
12 | RnwWeave: knitr
13 | LaTeX: XeLaTeX
14 |
15 | AutoAppendNewline: Yes
16 | StripTrailingWhitespace: Yes
17 |
--------------------------------------------------------------------------------
/EDAV3.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | EDAV3
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/D3template.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | EDAV3
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/docs/EDAV3.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | EDAV3
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/docs/D3template.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | EDAV3
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/docs/read.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | EDAV5_3
5 |
6 |
7 |
8 |
9 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/docs/HorizontalBarChart.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Bar Chart
5 |
6 |
7 |
8 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/EDAV5_Solutions.md:
--------------------------------------------------------------------------------
1 | EDAV 5 SOLUTIONS
2 | ==============
3 |
4 | ### Sample standard deviation
5 |
6 | ``` js
7 | var x = [3, 5, 7, 8, 9]
8 | ```
9 |
10 | Deviations from mean:
11 |
12 | ``` js
13 | var dev = x.map(d => d - d3.mean(x))
14 | ```
15 |
16 | Squared deviations:
17 |
18 | ``` js
19 | var devsq = dev.map(d => Math.pow(d, 2));
20 | ```
21 |
22 | Sum of squared deviations:
23 |
24 | ``` js
25 | var sumdevsq = d3.sum(devsq);
26 | ```
27 |
28 | Sample variance:
29 |
30 | ``` js
31 | var variance = sumdevsq/(x.length - 1);
32 | ```
33 |
34 | Sample standard deviation:
35 |
36 | ``` js
37 | var sd = Math.sqrt(variance);
38 | ```
39 |
40 | OR
41 |
42 | ``` js
43 | var sd = Math.sqrt(d3.sum(x.map(d => Math.pow(d - d3.mean(x), 2)))/(x.length-1));
44 | ```
45 |
46 | or
47 | ``` js
48 | d3.deviation(x);
49 | ```
50 |
51 | :-)
52 |
--------------------------------------------------------------------------------
/HorizontalBarChart.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Bar Chart
6 |
7 |
8 |
9 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/docs/HorizontalBarChart.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Bar Chart
6 |
7 |
8 |
9 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/docs/EDAV2.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | EDAV2
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
22 |
23 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/SixBlueCircles.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Six Blue Circles
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
22 |
23 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/docs/SixBlueCircles.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Six Blue Circles
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
22 |
23 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/EDAV2.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | EDAV2
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
23 |
24 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/docs/SixBlueCircles.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Six Blue Circles
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | Six Blue Circles (online version)
13 |
22 |
23 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/docs/DataBindwithKeys.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Data Bind with Keys
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/DataBindwithKeys.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Data Bind with Keys
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/docs/DataBindwithKeys.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Data Bind with Keys
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/ScaleBand.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | d3.scaleBand
6 |
7 |
8 |
9 |
10 |
11 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/docs/ScaleBand.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | d3.scaleBand
6 |
7 |
8 |
9 |
10 |
11 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/docs/EDAV1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | EDAV1
6 |
7 |
8 |
9 |
13 |
14 |
15 |
16 |
17 | h1 header
18 | h2 header
19 | h3 header
20 | paragraph
21 |
22 |
29 |
30 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/docs/EventListener.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Six Blue Circles
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/EDAV6Notes.md:
--------------------------------------------------------------------------------
1 | EDAV6 Notes
2 | ================
3 |
4 | Scales
5 | =======
6 | [EDAV6Lect-Scales.pdf](EDAV6Lect-Scales.pdf)
7 |
8 | Practice creating an ordinal scale (function) in the Console:
9 |
10 | ``` js
11 | var ordscale = d3.scaleBand()
12 | .domain([0, 1, 2, 3, 4])
13 | .range([0, 100])
14 |
15 | ordscale(1);
16 |
17 | ordscale(3);
18 |
19 | ordscale(2.5);
20 |
21 | ordscale(7);
22 | ```
23 |
24 | Add inner padding and try again.
25 |
26 | See diagram here: https://github.com/d3/d3-scale#band-scales
27 |
28 | (Do not use `d3.scaleOrdinal()` for this purpose.)
29 |
30 |
31 | Ordinal scale for x-axis
32 |
33 | Simple example [ScaleBand.html](ScaleBand.html)
34 |
35 | [EDAV5_4_scaleBand.html](EDAV5_4_scaleBand.html)
36 |
37 | Linear scale for y-axis
38 | [EDAV5_5_scaleLinear.html](EDAV5_5_scaleLinear.html)
39 |
40 | Axes
41 | =======
42 | [EDAV6Lect-Axes.pdf](EDAV6Lect-Axes.pdf)
43 |
44 | Margins [EDAV6_1_margins.html](EDAV6_1_margins.html)
45 |
46 | y-axis [EDAV6_2_yaxis.html](EDAV6_2_yaxis.html)
47 |
48 | Practice
49 | =======
50 | Add an x-axis to the previous file.
51 |
--------------------------------------------------------------------------------
/EventListener.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Event Listener
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/EDAV1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | EDAV1
7 |
8 |
9 |
10 |
14 |
15 |
16 |
17 |
18 | h1 header
19 | h2 header
20 | h3 header
21 | paragraph
22 |
23 |
30 |
31 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/docs/EventListener.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Event Listener
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 | [BestFittingLine.html](BestFittingLine.html)
2 |
3 | [Boxplot.html](Boxplot.md)
4 |
5 | [CorrelationCoefficient.html](CorrelationCoefficient.md)
6 |
7 | [DataBindwithKeys.html](DataBindwithKeys.md)
8 |
9 | [EDAV5_1.html](EDAV5_1.html)
10 |
11 | [EDAV5_2.html](EDAV5_2.html)
12 |
13 | [EDAV5_3.html](EDAV5_3.html)
14 |
15 | [EDAV5_4_scaleBand.html](EDAV5_4_scaleBand.html)
16 |
17 | [EDAV5_5_scaleLinear.html](EDAV5_5_scaleLinear.html)
18 |
19 | [EDAV6_1_margins.html](EDAV6_1_margins.html)
20 |
21 | [EDAV6_2_yaxis.html](EDAV6_2_yaxis.html)
22 |
23 | [EDAV7_1_axes.html](EDAV7_1_axes.html)
24 |
25 | [EDAV7_2_transition.html](EDAV7_2_transitions.html)
26 |
27 | [EDAV7_3_obj_constancy.html](EDAV7_3_obj_constancy.html)
28 |
29 | [EDAV8_1_linegen.html](EDAV8_1_linegen.html)
30 |
31 | [EDAV8_2_linechart.html](EDAV8_2_linechart.html)
32 |
33 | [EDAV8_3_readfile.html](EDAV8_3_readfile.html)
34 |
35 | [EventListener.html](EventListener.md)
36 |
37 | [HorizontalBarChart.html](HorizontalBarChart.md)
38 |
39 | [MultipleTransitions.html](MultipleTransitions.html)
40 |
41 | [SixBlueCircles.html](SixBlueCircles.md)
42 |
43 | [read.html](read.md)
44 |
--------------------------------------------------------------------------------
/EDAV8_1_linegen.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Line generator
6 |
7 |
14 |
15 |
16 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/docs/EDAV8_1_linegen.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Line generator
6 |
7 |
14 |
15 |
16 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/EDAV5_1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | EDAV5_1
6 |
7 |
8 |
9 |
10 |
11 |
56 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/docs/EDAV5_1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | EDAV5_1
6 |
7 |
8 |
9 |
10 |
11 |
56 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/Tips4D3debugging.md:
--------------------------------------------------------------------------------
1 | Debugging Tips
2 | ================
3 |
4 | ### Submit a pull request to add to this file.
5 |
6 | SVG elements don't appear
7 | =======
8 | Strategy: Click Elements in Javascript Console to see what happened
9 |
10 | ### Example 1:
11 | ``` js
12 |
27 | ```
28 |
29 | #### Elements
30 | ``` html
31 | ...
32 |
33 |