-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplottingOceanData-script.R
More file actions
154 lines (47 loc) · 2.24 KB
/
plottingOceanData-script.R
File metadata and controls
154 lines (47 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
### Damariscotta River cruise data
### Challenge A
##
## 1.a. Create a scatter plot of fluorescence_mg_m3 (x-axis) by temperature_degC
## (y-axis) and color the points by station.
##
## 1.b. Do the same as 1.a. but convert the station values to factors. What is
## the difference between the two plots?
##
## 2. Create boxplots looking at the distribution of temperature_degC by
## (tip: change the station values to factors).
##
## 3. Plot temperature by depth for samples for the cruise from September 8th
## 2016, coloring the points by station (tip: filter the data frame on the date column)
### Visualizing relationships between multiple variables
#### Data manipulation
### Challenge B
##
## What are the steps we need to take to manipulate our data into a data frame
## with three columns: cruise, station and fluorescence averaged over the top
## 2 m? Describe the step and say the associated dplyr data frame manipulation
## functions you would use to do it.
#### Visualizing using contour plots
#### Visualizing using bubble plots
### Interpolating and visualizing data
### Challenge C
## 1. Create a geom_tile plot for temperature_degC from the cruise that took place on Sept 12th 2017.
##
## 2. Are there any examples from your own data that you could plot in this way?
#### Interpolation
### Challenge D
## Create a plot like the above that shows temperature interpolated by depth and latitude
## for the cruise that took place on Sept 12th 2017.
### Functions and for loops for creating multiple versions of figures
#### Functions
## Challenge E
## Create a plot like the above that shows fluorescence interpolated by depth and
## latitude for every cruise in 2016 (one plot per cruise). To get a list of all
## the dates of cruises in 2016 do unique(data2016$date) and look at the object
## printed to the console
#### For loops
## Challenge F
##
## Adapt the cruiseInterpolationPlot function such that the x, y and color bar
## limits are determined from input arguments and re-plot all the fluorescence
## data for each cruise in 2016. (Hint: use the xlim and ylim functions with
## ggplot and include the limits argument in the scale_fill_distiller function.)