forked from AdamWilsonLabEDU/2024-geo511-spatial-data-science-final-project-GEO511_QuartoProjectTemplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5bd357e
Showing
16 changed files
with
3,300 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
source("renv/activate.R") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
|
||
name: Quarto Publish | ||
|
||
jobs: | ||
build-deploy: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Quarto | ||
uses: quarto-dev/quarto-actions/setup@v2 | ||
|
||
- name: Install Linux Library Dependencies | ||
run: |- | ||
sudo apt install libudunits2-dev libgdal-dev libgeos-dev libproj-dev libfontconfig1-dev | ||
- name: Install R | ||
uses: r-lib/actions/setup-r@v2 | ||
|
||
- name: Install R Dependencies | ||
uses: r-lib/actions/setup-renv@v2 | ||
with: | ||
cache-version: 1 | ||
|
||
- name: Render and Publish | ||
uses: quarto-dev/quarto-actions/publish@v2 | ||
with: | ||
target: gh-pages | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.Rproj.user | ||
.Rhistory | ||
.RData | ||
.Ruserdata | ||
_site | ||
*cache | ||
*_files | ||
/.quarto/ | ||
styles* | ||
widgets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Version: 1.0 | ||
|
||
RestoreWorkspace: No | ||
SaveWorkspace: No | ||
AlwaysSaveHistory: Yes | ||
|
||
EnableCodeIndexing: Yes | ||
UseSpacesForTab: Yes | ||
NumSpacesForTab: 2 | ||
Encoding: UTF-8 | ||
|
||
RnwWeave: Sweave | ||
LaTeX: pdfLaTeX | ||
|
||
AutoAppendNewline: Yes | ||
StripTrailingWhitespace: Yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Template Repository for Quarto Website | ||
|
||
This repository serves as a template for building a quarto website that is automatically rendered using GitHub Actions. |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
project: | ||
type: website | ||
|
||
website: | ||
title: "GEO511_FinalProject" | ||
navbar: | ||
left: | ||
- href: index.qmd | ||
text: Home | ||
- about.qmd | ||
|
||
format: | ||
html: | ||
theme: cosmo | ||
includes: | ||
after_body: include/after_body.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: "About" | ||
--- | ||
|
||
About this site | ||
|
||
```{r} | ||
1 + 1 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Place any data needed by your analysis in this folder. Please do not store large files here. | ||
Then read in any data using the 'data' path. For example, `read_csv("data/data.csv")`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- give the footer some space --> | ||
<br/> | ||
<br/> | ||
|
||
<footer id="site-footer"> | ||
<div id="footer1"> | ||
This website is a project for Adam Wilson's <a href="https://wilsonlab.io/GEO511"><i> Spatial Data Science (GEO511) </i></a>Course at the University at Buffalo | ||
</div> | ||
<div id="footer2"> | ||
<a rel="license" property="http://creativecommons.org/ns#license" | ||
href="http://creativecommons.org/licenses/by/4.0/" ><img src="img/cc-by.svg" alt="cc-by"/></a> | ||
</div> | ||
</footer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |
Oops, something went wrong.