-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.Rhistory
161 lines (161 loc) · 5.48 KB
/
.Rhistory
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
install.packages("dplyr")
install.packages("lubridate")
install.packages("readr")
install.packages("rgeos")
install.packages("dygraphs")
install.packages("leaflet")
# Script
# Seasons for plotting
seasons <- 2009:2016
source("./R/PFP_weather_stations.R")
source("./R/PFP_soil_moisture.R")
source("./R/PFP_soils.R")
# source("./R/PFP_VEPII_productivity.R")
source("./R/PFP_gardens.R")
FedData::pkg_test("bocinsky/paleocar")
FedData::pkg_test("bocinsky/paleocar", force = T)
devtools::install_github("bocinsky/paleocar", force = T)
source("./R/PFP_gardens.R")
remove.packages("ggplot2")
remove.packages("ggplot2")
source("./R/PFP_gardens.R")
install.packages("ggplot2")
source("./R/PFP_gardens.R")
library(ggplot2)
library(paleocar)
remove.packages("paleocar")
remove.packages("paleocar")
source("./R/PFP_gardens.R")
source("./R/PFP_gardens.R")
seasons <- 2009:2016
source("./R/PFP_weather_stations.R")
source("./R/PFP_soil_moisture.R")
source("./R/PFP_soils.R")
# source("./R/PFP_VEPII_productivity.R")
source("./R/PFP_gardens.R")
source("./R/PFP_gardens.R")
source("./R/PFP_gardens.R")
seasons <- 2009:2016
# Seasons for plotting
seasons <- 2009:2016
source("./R/PFP_weather_stations.R")
source("./R/PFP_soil_moisture.R")
source("./R/PFP_soils.R")
# source("./R/PFP_VEPII_productivity.R")
source("./R/PFP_gardens.R")
Hmisc::mdb.get
?Hmisc::mdb.get
Hmisc::mdb.get("../DATA/Pueblo\\ Farmers\\ Project\\ database.mdb")
getwd()
"../DATA/Pueblo Farmers Project database.mdb"
"../DATA/Pueblo Farmers Project database.mdb" %>% file.exists()
Hmisc::mdb.get("../DATA/Pueblo Farmers Project database.mdb")
Hmisc::mdb.get("../DATA/Pueblo\\ Farmers\\ Project\\ database.mdb")
file.copy(from = "/Volumes/crow-dfs/Pueblo Farming Project/DATA/Pueblo Farmers Project database.mdb",
to="../DATA/Pueblo Farmers Project database.mdb",
overwrite=T)
?file.copy
file.copy(from = "/Volumes/crow-dfs/Pueblo Farming Project/DATA/Pueblo Farmers Project database.mdb",
to="../DATA/Pueblo Farmers Project database.mdb",
overwrite = TRUE,
copy.mode = TRUE)
file.copy(from = "/Volumes/crow-dfs/Pueblo Farming Project/DATA/Pueblo Farmers Project database.mdb",
to="../DATA/Pueblo Farmers Project database.mdb",
overwrite = TRUE)
?unlink
source("./R/PFP_gardens.R")
# Script
# Seasons for plotting
seasons <- 2009:2016
source("./R/PFP_weather_stations.R")
source("./R/PFP_soil_moisture.R")
source("./R/PFP_soils.R")
# source("./R/PFP_VEPII_productivity.R")
source("./R/PFP_gardens.R")
source("./R/PFP_gardens.R")
install.packages("dygraphs")
# Script
# Seasons for plotting
seasons <- 2009:2016
source("./R/PFP_weather_stations.R")
source("./R/PFP_soil_moisture.R")
source("./R/PFP_soils.R")
# source("./R/PFP_VEPII_productivity.R")
source("./R/PFP_gardens.R")
# Script
# Seasons for plotting
seasons <- 2009:2016
source("./R/PFP_weather_stations.R")
source("./R/PFP_soil_moisture.R")
source("./R/PFP_soils.R")
# source("./R/PFP_VEPII_productivity.R")
source("./R/PFP_gardens.R")
# Script
# Seasons for plotting
seasons <- 2009:2016
source("./R/PFP_weather_stations.R")
source("./R/PFP_soil_moisture.R")
source("./R/PFP_soils.R")
# source("./R/PFP_VEPII_productivity.R")
source("./R/PFP_gardens.R")
update.packages()
install.packages("webshot")
devtools::update_packages()
## Load the R packages we are going to use
library(dplyr)
library(lubridate)
library(sp)
library(leaflet)
library(dygraphs)
# library(plotly)
## Load the data, processed by PFP_data_prep.R
# growth <- readr::read_csv("./growth.csv")
# Soils data
soils <- rgdal::readOGR(dsn = "./data/soils.geojson", "OGRGeoJSON", verbose = FALSE)
soil_moisture <- readr::read_csv("./data/soil_moisture.csv")
soils_VEPII_yields <- rgdal::readOGR(dsn = "./data/soils_VEPII_yields.geojson", "OGRGeoJSON", verbose = FALSE)
soils <- sp::spTransform(soils, soils_VEPII_yields@proj4string)
# Weather data
cortez_weather <- readr::read_csv("./data/cortez_weather.csv")
weather_stations <- readr::read_csv("./data/weather_stations.csv")
weather_stations_sp <- rgdal::readOGR(dsn = "./data/weather_stations.geojson", "OGRGeoJSON", verbose = FALSE)
# Garden data
garden_locations <- rgdal::readOGR(dsn = "./data/gardens.geojson", "OGRGeoJSON", verbose = FALSE)
garden_locations$color <- RColorBrewer::brewer.pal(length(garden_locations),"Dark2")
growth_summaries <- readr::read_csv("./data/growth_summaries.csv")
ears <- readr::read_csv("./data/ears.csv")
yields <- readr::read_csv("./data/yields.csv")
garden_locations@data <- cbind(garden_locations@data, rgeos::gCentroid(garden_locations, byid=T)@coords)
gardens_m <- leaflet::leaflet(garden_locations, width = "100%") %>%
leaflet::addProviderTiles("Esri.WorldImagery", group = "Satellite") %>%
leaflet::addProviderTiles("Esri.WorldTopoMap", group = "Topography") %>%
leaflet::addMarkers(lng = ~x,
lat = ~y,
popup = ~Popup
) %>%
leaflet::addLayersControl(
baseGroups = c("Satellite", "Topography"),
options = leaflet::layersControlOptions(collapsed = T)
)
gardens_m # Print the map
garden_locations@data
gardens_m <- leaflet::leaflet(garden_locations, width = "100%") %>%
leaflet::addProviderTiles("Esri.WorldImagery", group = "Satellite") %>%
leaflet::addProviderTiles("Esri.WorldTopoMap", group = "Topography") %>%
leaflet::addMarkers(lng = ~x,
lat = ~y,
popup = ~Popup
) %>%
leaflet::addLayersControl(
baseGroups = c("Satellite", "Topography"),
options = leaflet::layersControlOptions(collapsed = T)
)
gardens_m # Print the map
rmarkdown::shiny_prerendered_clean('pfp.Rpres')
devtools::install_github(c('ramnathv/htmlwidgets', 'rstudio/leaflet'))
install.packages("revealjs")
?renderDygraph
??renderDygraph
??dygraph
?inputPanel
?selectInput