Skip to content

Commit 16d22e1

Browse files
committed
checking scores and such
1 parent ea69672 commit 16d22e1

1 file changed

Lines changed: 75 additions & 0 deletions

File tree

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
---
2+
title: "Website data: MRF"
3+
output: html_document
4+
---
5+
6+
```{r setup, include=FALSE}
7+
library(tidyverse)
8+
library(here)
9+
scores <- read_csv(here("yearly_results/global2021/OHI_final_formatted_scores_2021-10-28.csv"))
10+
11+
```
12+
13+
### LSP
14+
How many countrys have 30% protected areas?
15+
```{r}
16+
scores %>%
17+
filter(scores$dimension == "status") %>%
18+
filter(scenario == 2021) %>%
19+
filter(goal == "LSP") %>%
20+
filter(value >= 100) %>%
21+
data.frame()
22+
23+
scores %>%
24+
filter(scores$dimension == "status") %>%
25+
filter(scenario == 2012) %>%
26+
filter(goal == "LSP") %>%
27+
filter(value >= 100) %>%
28+
data.frame()
29+
30+
31+
## has this changed over time?
32+
33+
tmp <- scores %>%
34+
filter(scores$dimension == "score") %>%
35+
filter(value < 50) %>%
36+
data.frame()
37+
table(tmp$scenario)
38+
39+
40+
scores %>%
41+
filter(scores$dimension == "score") %>%
42+
filter(region_name == "Puerto Rico and Virgin Islands") %>%
43+
filter(goal == "TR") %>%
44+
data.frame()
45+
```
46+
47+
48+
### TR
49+
```{r}
50+
51+
read_csv(here("eez/layers/tr_jobs_pct_tourism.csv")) %>%
52+
filter(rgn_id=="8") %>%
53+
data.frame()
54+
55+
```
56+
57+
### AO
58+
```{r}
59+
60+
61+
tmp <- read_csv(here("eez/layers/ao_need.csv")) %>%
62+
group_by(year) %>%
63+
summarize(value = mean(value, na.rm=TRUE))
64+
plot(tmp$year, tmp$value, ylab="Rescaled GDPpcPPP")
65+
66+
read_csv(here("eez/layers/ao_access.csv")) %>%
67+
group_by(year) %>%
68+
summarize(value = mean(value, na.rm=TRUE))
69+
70+
tmp <- read_csv(here("eez/layers/ao_sust.csv")) %>%
71+
group_by(year) %>%
72+
summarize(score = mean(score, na.rm=TRUE))
73+
74+
plot(tmp$year, tmp$score, ylab="Avg B/Bmsy score for artisanal species")
75+
```

0 commit comments

Comments
 (0)