-
Notifications
You must be signed in to change notification settings - Fork 4
/
generation.qmd
686 lines (488 loc) · 24.8 KB
/
generation.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
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
---
title: "Net/Gross Generation"
subtitle: "Generation by Fuel Type in Alaska, 2011-2021"
---
```{r}
# Import required packages
library(tidyr)
library(dplyr)
library(readr)
library(ggplot2)
library(ggiraph)
# Import the data
generation_data <- read.csv(file = "data/final_data/generation.csv")
#Generation data in gWh
gen_data_gwh <- generation_data %>%
mutate(generation = generation/1000)
# Regional totals
regional_generation_data <- generation_data %>%
group_by(
acep_region, year) %>%
summarize(
"total_gen" = sum(generation, na.rm = TRUE)) %>%
mutate(
total_gen = total_gen / 1000) %>%
mutate(
acep_region = factor(acep_region, levels = c("Coastal", "Railbelt", "Rural Remote")))
# Regional generation mixes
regional_generation_mix <- generation_data %>%
group_by(acep_region, year, fuel_type) %>%
summarize(
generation = sum(generation, na.rm=TRUE)) %>%
filter(
fuel_type != c("Storage", "Other")) %>%
group_by(
acep_region, year) %>%
mutate(
total_generation = sum(generation,na.rm=TRUE)) %>%
group_by(
acep_region,year,fuel_type) %>%
mutate(
gen_share = ((generation / total_generation)*100)) %>%
mutate(
acep_region = factor(acep_region,
levels = c("Coastal", "Railbelt", "Rural Remote")))
# Function declarations
source("scripts/inline_functions/generation_inline_functions.R")
source("scripts/R/theme_electrified.R")
# Function to make space regardless of execution format
# To use: write `r space() outside of a code block
# Modify globally at ./scripts/inline_functions/space.R
source("scripts/R/space.R")
```
`r space(br="", vspace="-3em")`
## General Overview {#sec-generation}
This section outlines the trends in generation by fuel type for each region. Generation in our context has two separate definitions. Data collected through the Energy Information Administration (EIA) records "net" generation, which excludes electricity use for power plant operations.[^1] However, data collected from the Alaska Energy Authority's (AEA) Power Cost Equalization (PCE) program is presented as "gross" generation, which does not make this exclusion.[^2]
[^1]: The EIA-923 data used for net generation was supplemented with FERC Form No. 1 data to account for missing statistics for the Southcentral Power Project. Please visit [the patch notes to learn more about our methodology and findings](https://github.com/acep-uaf/aetr-web-book-2024/tree/main/data/patches/patch_001).
[^2]: The PCE data do show powerhouse consumption as a separate data item, which would allow for the computation of "net generation" in PCE communities. However, we have continued to report generation in PCE communities as the gross amount in order to be consistent with previous Alaska Energy Statistics Reports.
`r if (knitr::is_html_output())"@fig-generation-by-region-html" else if (knitr::is_latex_output()) "@fig-generation-by-region-pdf"` provides a visual representation of yearly electricity generation for the Coastal, Railbelt, and Rural Remote regions. All regions produced a relatively consistent amount of electricity between 2011 and 2021. Across this time period, the Railbelt generated an average of `r regional_generation("Railbelt")` GWh, the Coastal region generated an average of `r regional_generation("Coastal")` GWh, and the Rural Remote region generated an average of `r regional_generation("Rural Remote")` GWh. Between 2011 and 2021, the average yearly growth rate for generation was `r cagr("Coastal")`% in the Coastal region, `r cagr("Railbelt")`% in the Railbelt region, and `r cagr("Rural Remote")`% in Rural Remote communities.[^3] The Coastal and Rural Remote trends are in line with improvements in rural electrification, as well as modest population growth. Of the regions, the Railbelt is the only one that consistently saw decreases in generation across the years. Total statewide generation increased at an average annual growth rate of `r cagr("Statewide")`%.
[^3]: Calculated with the compound average growth rate: $CAGR = \left(\left(\frac{gen_{2021}}{gen_{2011}} \right)^{\frac{1}{2021-2011}} -1\right)$
`r space(vspace="0em")`
```{r}
regional_generation_plot <-
ggplot(
regional_generation_data,
aes(
x = year,
y = total_gen,
fill = acep_region)) +
scale_x_continuous(
name = "\nYear",
breaks = seq(2011, 2021, by = 1)) +
scale_y_continuous(
name = "Generation (GWh)\n",
limits = c(0,7150),
breaks = seq(0,7000, by = 1000),
expand = c(0, 0)) +
scale_fill_manual(values = c("#8cbbda","#97cd93","#f28d8c")) +
theme_electrified() +
theme(panel.grid.major.x = element_blank()) +
guides(fill = guide_legend(nrow = 1))
```
```{r, eval=knitr::is_html_output(), fig.pos = "H"}
#| label: fig-generation-by-region-html
#| fig-cap: "Electricity Generation by Region"
regional_generation_html <-
regional_generation_plot +
geom_col_interactive(aes(fill = acep_region,
tooltip =
paste("Year:", year,
"<br>ACEP Region", acep_region,
"<br>Generation (GWh):",
round(total_gen, 2))),
position = position_stack(reverse = TRUE))
girafe(code = print(regional_generation_html))
```
```{r, eval=knitr::is_latex_output(), fig.pos = "H"}
#| label: fig-generation-by-region-pdf
#| fig-cap: "Electricity Generation by Region"
regional_generation_pdf <-
regional_generation_plot +
geom_col(position = position_stack(reverse = TRUE))
print(regional_generation_pdf)
```
`r space(vspace="0em")`
While generation did not change significantly during the observed time period, the resources from which generation occurred, did. `r if (knitr::is_html_output())"@fig-generation-changes-by-region-html" else if (knitr::is_latex_output()) "@fig-generation-changes-by-region-pdf"` shows how the mix of generation fuels changed between 2011 and 2021.[^4]
[^4]: Oil consists of generators whose primary fuel source is diesel/distillate, naphtha, or jet fuel. Gas consists of natural or landfill gas. Hydro refers to conventional hydroelectric turbines. Wind and solar are both utility-scale (excluding behind-the-meter solar). Storage is not included in these calculations.
`r space(vspace="0em")`
```{r}
#Creating a modified version of the data
share_data <- generation_data %>%
group_by(year, acep_region, fuel_type) %>%
summarize(generation = sum(generation, na.rm = T), .groups = "drop")
#Creating total generation data from each region and year
total_gen <- share_data %>%
group_by(year, acep_region) %>%
summarize(total_generation = sum(generation, na.rm = T), .groups = "drop")
#Creating a joined table from the above two
join <- share_data %>%
full_join(total_gen, by = join_by(year == year, acep_region == acep_region))
#Creating a column with shares
join_shares <- join %>%
filter(!fuel_type %in% c("Storage", "Other")) %>%
mutate(generation_share = (generation/total_generation)*100)
join_shares_2011_2021 <- join_shares %>%
filter(year %in% c(2011, 2021))
fuel_type_names <- c("Coal", "Oil", "Gas", "Hydro", "Wind", "Solar")
gen_mix_diff <- join_shares_2011_2021 %>%
mutate(delta = generation_share - lag(generation_share, n = nrow(.)/2)) %>%
filter(year == 2021) %>%
mutate(fuel_type = factor(fuel_type, levels = rev(fuel_type_names)))
gen_data_gwh <- join %>%
filter(!fuel_type %in% c("Storage", "Other")) %>%
mutate(generation_gwh = generation/1000)
```
```{r}
regional_changes_plot <-
ggplot(gen_mix_diff,
aes(x = delta, y = fuel_type, fill = fuel_type)) +
facet_grid(rows = vars(acep_region)) +
scale_x_continuous(name = "\nPercentage Point Change",
limits = c(-14, 8),
breaks = seq(-14,8, by = 2),
expand = c(0, 0)) +
scale_y_discrete(name = "") +
scale_fill_manual(values = rev(c("#7f7f7f","#BFBFBF","#DCD9C5","#96B3DF","#F79646","#F5C243"))) +
labs(caption = "Percentage point differences in generation mix between 2021 and 2011") +
theme_electrified() +
theme(strip.background = element_blank(),
strip.text.y.right = element_text(angle = 0),
panel.grid.major.x = element_blank(),
panel.border = element_rect(color = "black", fill = NA),
plot.caption = element_text(hjust = 0.5, colour = "gray65"),
plot.caption.position = "plot") +
guides(fill = guide_legend(nrow = 1, reverse = TRUE))
```
```{r, eval=knitr::is_html_output(), fig.pos = "H"}
#| label: fig-generation-changes-by-region-html
#| fig-cap: "Regional Changes in Net Generation"
regional_changes_html <-
regional_changes_plot +
geom_col_interactive(aes(fill = fuel_type,
tooltip =
paste("Percentage Point Change:", round(delta,2),
"<br>Fuel Type:",fuel_type)))
girafe(code = print(regional_changes_html))
```
```{r, eval=knitr::is_latex_output(), fig.pos = "H"}
#| label: fig-generation-changes-by-region-pdf
#| fig-cap: "Regional Changes in Net Generation"
regional_changes_pdf <-
regional_changes_plot +
geom_col()
print(regional_changes_pdf)
```
`r space(vspace="0em")`
We show that for these resources, the Coastal region displaced oil generation with hydro and wind generation. The Railbelt displaced gas and oil generation with coal, hydro, and solar generation. Finally, the Rural Remote region of the state displaced coal and a small amount of hydro with gas, solar, and wind generation.
This figure does not include trends in storage or the other category. Storage net generation is always negative due to the efficiency of current battery systems where more energy is sent to storage than can be recovered. The "other" category was not included in this figure as net generation was zero in 2011 and 2021 (but not throughout the series, which we show in the subsequent sections).
`r space()`
::: {.content-visible when-format="pdf"}
\newpage
:::
## Coastal
In 2011, the Coastal region generated `r generation_share("Coastal",2011,"Hydro")`% of its electricity from hydro, `r generation_share("Coastal",2011,"Oil")`% from oil, and the remainder from wind.[^5] In 2021, the region generated `r generation_share("Coastal",2021,"Hydro")`% of electricity from hydro, `r generation_share("Coastal",2021,"Oil")`% from oil, and `r generation_share("Coastal",2021,"Wind")`% from wind. In addition, storage played a role in generation, albeit the net result is negative due to efficiencies. `r if (knitr::is_html_output())"@fig-generation-fuel-coastal-html" else if (knitr::is_latex_output()) "@fig-generation-fuel-coastal-pdf"` shows how this generation mix has changed over the years.
[^5]: Net generation from storage facilities are not included in these calculations.
`r space(vspace="0em")`
```{r}
coastal_shares <- join_shares %>%
filter(acep_region == "Coastal", fuel_type %in% c("Oil", "Hydro", "Wind")) %>%
mutate(fuel_type = factor(fuel_type, levels = c("Oil", "Hydro", "Wind")))
coastal_shares_plot <-
ggplot(coastal_shares,
aes(x = year,
y = generation_share,
fill = fuel_type)) +
scale_x_continuous(
name = "\nYear",
breaks = seq(2011, 2021, by = 1)) +
scale_y_continuous(
name = "Share of Electricity Generation (%)\n",
limits = c(0,101),
breaks = seq(0, 100, by = 10),
expand = c(0,0)) +
scale_fill_manual(values = c("#BFBFBF","#96B3DF","#F79646")) +
labs(caption ="Note: Storage is not included here since net generation is negative.") +
theme_electrified() +
theme(plot.caption = element_text(hjust = 0.5, colour = "gray65"),
plot.caption.position = "plot") +
guides(fill = guide_legend(nrow = 1))
```
```{r, eval=knitr::is_html_output(), fig.pos = "H"}
#| label: fig-generation-fuel-coastal-html
#| fig-cap: "Share of Net Generation by Fuel Type, Coastal Region"
coastal_shares_html <-
coastal_shares_plot +
geom_col_interactive(
aes(
fill = fuel_type,
tooltip = paste(
"Year:", year,
"<br>Fuel Type:", fuel_type,
"<br>Share of Electricity Generation", round(generation_share,2))),
position = position_stack(reverse = TRUE))
girafe(code = print(coastal_shares_html))
```
```{r, eval=knitr::is_latex_output(), fig.pos = "H"}
#| label: fig-generation-fuel-coastal-pdf
#| fig-cap: "Share of Net Generation by Fuel Type, Coastal Region"
coastal_shares_pdf <-
coastal_shares_plot +
geom_col(position = position_stack(reverse = TRUE))
print(coastal_shares_pdf)
```
`r space(vspace="0em")`
Generation grew at an average annual growth rate of `r cagr("Coastal")`% from 2011 to 2021. `r if (knitr::is_html_output())"@fig-generation-coastal-html" else if (knitr::is_latex_output()) "@fig-generation-coastal-pdf"` highlights the yearly trends in generation by fuel source.
`r space(vspace="0em")`
```{r}
coastal_generation_gwh <- gen_data_gwh %>%
filter(
acep_region == "Coastal",
fuel_type %in% c("Oil", "Hydro", "Wind")) %>%
mutate(fuel_type = factor(fuel_type, levels = c("Oil", "Hydro", "Wind")))
coastal_generation_gwh_plot <-
ggplot(coastal_generation_gwh,
aes(x = year,
y = generation_gwh,
fill = fuel_type)) +
scale_x_continuous(
name = "\nYear",
breaks = seq(2011, 2021, by = 1)) +
scale_y_continuous(
name = "Generation (GWh)\n",
limits = c(0,1300),
breaks = seq(0, 1250, by = 250),
expand = c(0,0)) +
scale_fill_manual(values = c("#BFBFBF","#96B3DF","#F79646")) +
theme_electrified() +
theme(panel.grid.major.x = element_blank()) +
guides(fill = guide_legend(nrow = 1))
```
```{r, eval=knitr::is_html_output(), fig.pos = "H"}
#| label: fig-generation-coastal-html
#| fig-cap: "Electricity Generation, Coastal Region"
coastal_generation_gwh_html <-
coastal_generation_gwh_plot +
geom_col_interactive(
aes(
fill = fuel_type,
tooltip = paste("Year:", year,
"<br>Fuel Type:", fuel_type,
"<br>Generation (GWh)", round(generation_gwh,2))),
position = position_stack(reverse = TRUE))
girafe(code = print(coastal_generation_gwh_html))
```
```{r, eval=knitr::is_latex_output(), fig.pos = "H"}
#| label: fig-generation-coastal-pdf
#| fig-cap: "Electricity Generation, Coastal Region"
coastal_generation_gwh_pdf <-
coastal_generation_gwh_plot +
geom_col(position = position_stack(reverse = TRUE))
print(coastal_generation_gwh_pdf)
```
`r space()`
::: {.content-visible when-format="pdf"}
\newpage
:::
## Railbelt
Railbelt generation has seen notable changes in how it generates electricity between 2011 and 2021. In 2011, the Railbelt region generated `r generation_share("Railbelt",2011,"Gas")`% of electricity from gas, `r generation_share("Railbelt",2011,"Coal")`% from coal, `r generation_share("Railbelt",2011,"Hydro")`% from hydro, and `r generation_share("Railbelt",2011,"Oil")`% from oil. Additionally, a small amount of wind generation was present. In 2021, the region generated `r generation_share("Railbelt",2021,"Gas")`% of electricity from gas, `r generation_share("Railbelt",2021,"Coal")`% from coal, `r generation_share("Railbelt",2021,"Hydro")`% from hydro, `r generation_share("Railbelt",2021,"Oil")`% from oil, and `r generation_share("Railbelt",2021,"Wind")`% from wind. Additionally, a small amount of solar generation was present. In addition, storage played a role in generation, albeit the net result is negative due to non-perfect efficiencies. `r if (knitr::is_html_output())"@fig-generation-fuel-railbelt-html" else if (knitr::is_latex_output()) "@fig-generation-fuel-railbelt-pdf"` shows how this generation mix has changed over the years.
`r space(vspace="0em")`
```{r}
railbelt_shares <- join_shares %>%
filter(acep_region == "Railbelt", fuel_type %in% c("Coal", "Oil", "Gas", "Hydro", "Wind", "Solar")) %>%
mutate(fuel_type = factor(fuel_type, levels = c("Coal", "Oil", "Gas", "Hydro", "Wind", "Solar")))
railbelt_shares_plot <-
ggplot(railbelt_shares,
aes(x = year,
y = generation_share,
fill = fuel_type)) +
scale_x_continuous(
name = "\nYear",
breaks = seq(2011, 2021, by = 1)) +
scale_y_continuous(
name = "Share of Electricity Generation (%)\n",
limits = c(0,101),
breaks = seq(0, 100, by = 10),
expand = c(0,0)) +
scale_fill_manual(values = c("#7f7f7f","#BFBFBF","#DCD9C5","#96B3DF","#F79646","#F5C243")) +
labs(caption ="Note: Storage is not included here since net generation is negative.") +
theme_electrified() +
theme(
plot.caption = element_text(hjust = 0.5, colour = "gray65"),
plot.caption.position = "plot") +
guides(fill = guide_legend(nrow = 1))
```
```{r, eval=knitr::is_html_output(), fig.pos = "H"}
#| label: fig-generation-fuel-railbelt-html
#| fig-cap: "Share of Net Generation by Fuel Type, Railbelt Region"
railbelt_shares_html <-
railbelt_shares_plot +
geom_col_interactive(aes(fill = fuel_type, tooltip = paste("Year:", year,
"<br>Fuel Type:", fuel_type,
"<br>Share of Electricity Generation", round(generation_share,2))),
position = position_stack(reverse = TRUE))
girafe(code = print(railbelt_shares_html))
```
```{r, eval=knitr::is_latex_output(), fig.pos = "H"}
#| label: fig-generation-fuel-railbelt-pdf
#| fig-cap: "Share of Net Generation by Fuel Type, Railbelt Region"
railbelt_shares_pdf <-
railbelt_shares_plot +
geom_col(position = position_stack(reverse = TRUE))
print(railbelt_shares_pdf)
```
`r space(vspace="0em")`
Generation from 2011 to 2021 saw an average annual growth rate of `r cagr("Railbelt")`%. `r if (knitr::is_html_output())"@fig-generation-railbelt-html" else if (knitr::is_latex_output()) "@fig-generation-railbelt-pdf"` highlights the yearly trends in generation by fuel source.
`r space(vspace="0em")`
```{r}
railbelt_generation_gwh <- gen_data_gwh %>%
filter(acep_region == "Railbelt", fuel_type %in% c("Coal","Oil","Gas","Hydro","Wind","Solar")) %>%
mutate(fuel_type = factor(fuel_type, levels = c("Coal","Oil","Gas","Hydro","Wind","Solar")))
railbelt_generation_gwh_plot <-
ggplot(railbelt_generation_gwh,
aes(x = year,
y = generation_gwh,
fill = fuel_type)) +
scale_x_continuous(name = "\nYear",
breaks = seq(2011, 2021, by = 1)) +
scale_y_continuous(name = "Generation (GWh)\n",
limits = c(0,5500),
breaks = seq(0, 5000, by = 1000),
expand = c(0,0)) +
scale_fill_manual(values = c("#7f7f7f","#BFBFBF","#DCD9C5","#96B3DF","#F79646","#F5C243")) +
theme_electrified() +
theme(panel.grid.major.x = element_blank()) +
guides(fill = guide_legend(nrow = 1))
```
```{r, eval=knitr::is_html_output(), fig.pos = "H"}
#| label: fig-generation-railbelt-html
#| fig-cap: "Electricity Generation, Railbelt Region"
railbelt_generation_gwh_html <-
railbelt_generation_gwh_plot +
geom_col_interactive(
aes(
fill = fuel_type,
tooltip = paste(
"Year:", year,
"<br>Fuel Type:", fuel_type,
"<br>Generation (GWh)", round(generation_gwh,2))),
position = position_stack(reverse = TRUE))
girafe(code = print(railbelt_generation_gwh_html))
```
```{r, eval=knitr::is_latex_output(), fig.pos = "H"}
#| label: fig-generation-railbelt-pdf
#| fig-cap: "Electricity Generation, Railbelt Region"
railbelt_generation_gwh_pdf <-
railbelt_generation_gwh_plot +
geom_col(position = position_stack(reverse = TRUE))
print(railbelt_generation_gwh_pdf)
```
`r space()`
::: {.content-visible when-format="pdf"}
\newpage
:::
## Rural Remote
The Rural Remote region has seen notable changes between 2011 and 2021 in how it generates electricity. In 2011, the region generated `r generation_share("Rural Remote",2011,"Oil")`% of electricity from oil, `r generation_share("Rural Remote",2011,"Gas")`% from gas, `r generation_share("Rural Remote",2011,"Hydro")`% from hydro, and `r generation_share("Rural Remote",2011,"Wind")`% from wind. In 2021, the region generated `r generation_share("Rural Remote",2021,"Oil")`% of electricity from oil (mostly diesel), `r generation_share("Rural Remote",2021,"Gas")`% from gas, `r generation_share("Rural Remote",2021,"Hydro")`% from hydro, and `r generation_share("Rural Remote",2021,"Wind")`% from wind. Additionally, a small amount of solar generation was present. `r if (knitr::is_html_output())"@fig-generation-fuel-rural-html" else if (knitr::is_latex_output()) "@fig-generation-fuel-rural-pdf"` shows how this generation mix has changed over the years.
`r space(vspace="0em")`
```{r}
rural_remote_shares <- join %>%
filter(
acep_region == "Rural Remote",
fuel_type %in% c("Oil", "Gas", "Hydro", "Wind", "Solar", "Other")) %>%
mutate(
generation_share = generation/total_generation*100,
fuel_type = factor(fuel_type,
levels = c("Oil", "Gas", "Hydro", "Wind", "Solar", "Other")))
rural_remote_shares_plot <-
ggplot(rural_remote_shares,
aes(x = year,
y = generation_share,
fill = fuel_type)) +
scale_x_continuous(name = "\nYear",
breaks = seq(2011, 2021, by = 1)) +
scale_y_continuous(name = "Share of Electricity Generation (%)\n",
limits = c(0,101),
breaks = seq(0, 100, by = 10),
expand = c(0,0)) +
scale_fill_manual(values = c("#BFBFBF","#DCD9C5","#96B3DF","#F79646","#F5C243","#C0504D")) +
labs(caption ="Note: Storage is not included here since net generation is negative.") +
theme_electrified() +
theme(plot.caption = element_text(hjust = 0.5, colour = "gray65"),
plot.caption.position = "plot") +
guides(fill = guide_legend(nrow = 1))
```
```{r, eval=knitr::is_html_output(), fig.pos = "H"}
#| label: fig-generation-fuel-rural-html
#| fig-cap: "Share of Net Generation by Fuel Type, Rural Remote Region"
rural_remote_shares_html <-
rural_remote_shares_plot +
geom_col_interactive(
aes(
fill = fuel_type,
tooltip = paste(
"Year:", year,
"<br>Fuel Type:", fuel_type,
"<br>Share of Electricity Generation",
round(generation_share,2))),
position = position_stack(reverse = TRUE))
girafe(code = print(rural_remote_shares_html))
```
```{r, eval=knitr::is_latex_output(), fig.pos = "H"}
#| label: fig-generation-fuel-rural-pdf
#| fig-cap: "Share of Net Generation by Fuel Type, Rural Remote Region"
rural_remote_shares_pdf <-
rural_remote_shares_plot +
geom_col(position = position_stack(reverse = TRUE))
print(rural_remote_shares_pdf)
```
`r space(vspace="0em")`
Generation from 2011 to 2021 saw an average annual growth rate of `r cagr("Rural Remote")`%. `r if (knitr::is_html_output())"@fig-generation-rural-html" else if (knitr::is_latex_output()) "@fig-generation-rural-pdf"` highlights the yearly trends in generation by fuel source. From 2013 to 2014, a large increase in gas generation is observed due to operations on the North Slope - specifically in the Barrow Utilities & Electric Cooperative, Inc. (BUECI), Deadhorse, and Nuiqsut service regions.
`r space(vspace="0em")`
```{r}
gen_data_gwh_rural_remote <- join %>%
filter(fuel_type != "Storage" ) %>%
mutate(generation_gwh = generation/1000)
rural_remote_generation_gwh <- gen_data_gwh_rural_remote %>%
filter(
acep_region == "Rural Remote",
fuel_type %in% c("Oil","Gas","Hydro","Wind","Solar", "Other")) %>%
mutate(fuel_type = factor(fuel_type, levels = c("Oil","Gas","Hydro","Wind","Solar", "Other")))
rural_remote_generation_gwh_plot <-
ggplot(rural_remote_generation_gwh,
aes(x = year,
y = generation_gwh,
fill = fuel_type)) +
scale_x_continuous(name = "\nYear",
breaks = seq(2011, 2021, by = 1)) +
scale_y_continuous(name = "Generation (GWh)\n",
limits = c(0,600),
breaks = seq(0, 600, by = 100),
expand = c(0,0)) +
scale_fill_manual(values = c("#BFBFBF","#DCD9C5","#96B3DF","#F79646","#F5C243","#C0504D")) +
theme_electrified() +
theme(panel.grid.major.x = element_blank()) +
guides(fill = guide_legend(nrow = 1))
```
```{r, eval=knitr::is_html_output(), fig.pos = "H"}
#| label: fig-generation-rural-html
#| fig-cap: "Electricity Generation, Rural Remote Region"
rural_remote_generation_gwh_html <-
rural_remote_generation_gwh_plot +
geom_col_interactive(
aes(
fill = fuel_type,
tooltip = paste(
"Year:", year,
"<br>Fuel Type:", fuel_type,
"<br>Generation (GWh)", round(generation_gwh,2))),
position = position_stack(reverse = TRUE))
girafe(code = print(rural_remote_generation_gwh_html))
```
```{r, eval=knitr::is_latex_output(), fig.pos = "H"}
#| label: fig-generation-rural-pdf
#| fig-cap: "Electricity Generation, Rural Remote Region"
rural_remote_generation_gwh_pdf <-
rural_remote_generation_gwh_plot +
geom_col(position = position_stack(reverse = TRUE))
print(rural_remote_generation_gwh_pdf)
```
`r space(vspace="0em")`