-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSite Map.Rmd
49 lines (36 loc) · 1.15 KB
/
Site Map.Rmd
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
---
title: 'N Cycle Expt: Site Map'
author: "Stephanie J. Wilson"
date: '2023-08-01'
output: html_document
---
## Set Up
```{r setup, include=FALSE}
#install.packages(c("cowplot", "googleway", "ggplot2", "ggrepel",
#"ggspatial", "libwgeom", "sf", "rnaturalearth", "rnaturalearthdata"))
library(ggplot2)
theme_set(theme_bw())
library("sf")
library("rnaturalearth")
library("rnaturalearthdata")
library(ggspatial)
world <- ne_countries(scale = "medium", returnclass = "sf")
class(world)
```
## Build Site Map
```{r}
sites <- read.csv("Site_Locations.csv")
head(sites)
map <- ggplot(data = world) +
geom_sf() +
geom_point(data=sites, x=sites$Long, y=sites$Latitude, size=3.5) +
geom_text(data= sites,aes(x=(sites$Long + 0.3), y=(sites$Latitude + 0.15), label=sites$Site),
color = "black", fontface = "bold", check_overlap = FALSE) +
labs(x=" ", y=" ") +
annotation_scale() +
annotation_north_arrow(location = "bl", which_north = "true",
pad_x = unit(0.15, "in"), pad_y = unit(0.25, "in"),
style = north_arrow_fancy_orienteering) +
coord_sf(xlim = c(-77.906228, -74.643288), ylim = c(36.703980, 39.720171))
map
```