-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.R
157 lines (130 loc) · 6.77 KB
/
main.R
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
#####################################################
# Evaluating the impact of solar power generation #
# developments on deforestation on Kauai Hawaii #
# C7 project #
# Developed by Vladimir Metelitsa #
# Last updated: 30/04/2017 #
#####################################################
# Project background: Like many remote islands, the island of Kauai, Hawaii used to depend on barrels of oil imported by sea
# for all the majority of their energy needs. In early 2017, the island saw the completion of a major project aiming to end it's reliance of fossil fuel imports,
# instead fully powering the island with renewable solar energy.
# The project was composed of 55 thousand solar panels (generating 13MW) and large batteries for storage (52MWh capacity).
# However, there are claims that the land use change (Kauai has a very high forrest cover) for the instalation of the solar farm, as well as the grid changes
# likely resulted in more negative environmental impacts than years of importing and using fossil fuel.
# The company in charge of the instalation, however, claims that no major impacts exist.
# This study attempts to verify the veracity of the claim.
# Aims: Compare the vegetation level before and after the project, to verify if there are any major impacts.
# Methods: NDVI, supervised classification, moving window
# Dependencies
install.packages(c('maps', 'mapdata', 'raster', 'rgdal'))
library(maps)
library(mapdata)
library(raster)
library(rgdal)
# Setting the working directory for the project
setwd("~/RScripts/C7project")
## Getting the boundaries of Kauai
# National administrative boundaries downloaded from the GADM project
# The border data was obtained from http://www.gadm.org/
# Selecting "United States" as the country, "R (SpatialPolygonsDataFrame)" as the format
# Level 2 to have access to boundaries of separate states/islands
boundaries <- readRDS("ctr_boundaries/USA_adm2.rds")