AdamWilsonLabEDU
/
2024-geo511-spatial-data-science-final-project-GEO511_QuartoProjectTemplate
Public
generated from AdamWilsonLabEDU/GEO511_QuartoProjectTemplate
-
Notifications
You must be signed in to change notification settings - Fork 25
/
index.qmd
120 lines (85 loc) · 3.38 KB
/
index.qmd
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
---
title: "My Final Project Template"
author: Your name here
subtitle: Subtitle here if desired
date: today
date-format: long
---
# Introduction
\[\~ 200 words\]
Clearly stated background and questions / hypotheses / problems being addressed. Sets up the analysis in an interesting and compelling way. Include figures if you like.
# Materials and methods
\[\~ 200 words\]
Narrative: Clear narrative description of the data sources and methods. Includes data from at least two sources that were integrated / merged in R.
Code: The code associated with the project is well organized and easy to follow. Demonstrates mastery of R graphics and functions.
Data: The underlying data are publicly accessible via the web and downloaded/accessed within the Rmd script. If you want to use your own data, you must make it available on a website (e.g. Figshare) so that others are able to re-run your code.
You can do bullets like this:
- The first most important thing
- The second most important thing
- The third most important thing
You can do numbers like this:
1. The first most important thing
2. The second most important thing
3. The third most important thing
See <http://rmarkdown.rstudio.com/> for all the amazing things you can do.
Here's my first code chunk.
```{r}
x=3+4
```
Refer to output in your narrative like this: x=`r x` .
Load any required packages in a code chunk (you may need to install some packages):
```{r, message=F, warning=F}
library(tidyverse)
library(leaflet)
library(kableExtra)
library(htmlwidgets)
library(widgetframe)
knitr::opts_chunk$set(widgetframe_widgets_dir = 'widgets' )
knitr::opts_chunk$set(cache=TRUE) # cache the results for quick compiling
```
## Download and clean all required data
```{r}
n=20
data=data.frame(x=runif(n,-180,180),
y=runif(n,-60,60),
size = runif(n, 5, 20),
category = factor(
sample(letters[1:5], n, replace = TRUE)
),
value = rnorm(n))
```
```{r, results='asis'}
data %>%
slice(1:10) %>% #show only 1:n rows
kable(digits=2,align="c")%>% #make table and round to two digits
kable_styling(bootstrap_options =
c("striped", "hover", "condensed", "responsive")) #apply other formatting
```
Add any additional processing steps here.
# Results
\[\~200 words\]
Tables and figures (maps and other graphics) are carefully planned to convey the results of your analysis. Intense exploration and evidence of many trials and failures. The author looked at the data in many different ways before coming to the final presentation of the data.
Show tables, plots, etc. and describe them.
```{r, fig.width=6, fig.height=3, fig.cap="Map of completely random data"}
m <- leaflet(data) %>%
addTiles() %>%
addCircleMarkers(~x, ~y, radius = ~size,color = ~as.factor(category)) %>%
addPopups(~x[2], ~y[2], "Random popup")
m # a map with the default OSM tile layer
```
```{r}
data %>%
ggplot(aes(x=x,y=y,col=category))+
geom_point()
```
### Dygraphs Example
```{r}
library(dygraphs)
dygraph(nhtemp, main = "New Haven Temperatures") |>
dyRangeSelector(dateWindow = c("1920-01-01", "1960-01-01"))
```
# Conclusions
\[\~200 words\]
Clear summary adequately describing the results and putting them in context. Discussion of further questions and ways to continue investigation.
# References
All sources are cited in a consistent manner