@@ -23,7 +23,7 @@ options(betydb_key = readLines('.betykey', warn = FALSE),
2323
2424First, query the plots for Season 2. The simple way to use this is based on the fact that the plot names at Maricopa contain the season.
2525
26- ``` {r traits-05-query-mac-sites}
26+ ``` {r traits-05-query-mac-sites, echo = TRUE }
2727sites <- betydb_query(
2828 table = "sites",
2929 city = "Maricopa", sitename = "~Season 2 range", limit = "none")
@@ -33,10 +33,10 @@ A more robust (but complicated way) would be to query the experiments and experi
3333
3434### Plot Season 2 plots
3535
36- ``` {r traits-05-map-mac-polygons}
36+ ``` {r traits-05-map-mac-polygons, echo = TRUE }
3737site_bounds <- (sites
38- %>% rowwise()
39- %>% do(boundaries = readWKT(text = .$geometry, id = .$id)))
38+ %>% rowwise()
39+ %>% do(boundaries = readWKT(text = .$geometry, id = .$id)))
4040
4141site_bounds <- do.call('rbind', site_bounds$boundaries)
4242#names(site_bounds) <- sites$sitename
@@ -53,35 +53,46 @@ leaflet() %>%
5353 addPolygons(data=site_bounds, popup = sites$sitename)
5454```
5555
56+ ``` {r}
5657## Cultivars
5758
59+ ```
5860
5961``` {r traits-05-mac-cultivars}
60- cultivars <- betydb_query(
61- table = "cultivars", limit = "none") %>%
62- rename(cultivar_id = id)
63-
64- traits <- traits <- betydb_search(
65- Season = "~Season 4",
66- include_unchecked = 'true',
67- limit = "none") %>%
68- rename(trait_id = id)
62+ #cultivars <- betydb_query(
63+ # table = "cultivars", limit = "none") %>%
64+ # rename(cultivar_id = id)
65+
66+
67+ # getting HTTP 504 - Gateway timeout
68+ # comment this chunk out
69+ #traits <- traits <- betydb_search(
70+ # Season = "~Season 4",
71+ # include_unchecked = 'true',
72+ # limit = "none") %>%
73+ # rename(trait_id = id)
6974```
7075
71-
76+ ``` {r}
7277## Time series of canopy cover, height, NDVI
7378
74- First look up variables by name. Let's look for measurements related to canopy size:
79+ #First look up variables by name. Let's look for measurements related to canopy size:
80+
81+ ```
7582
7683``` {r traits-05-height-cover-ndvi}
77- variables <- betydb_query(
78- table = "variables", name = "~^(NDVI|canopy_height|canopy_cover|)$")
84+ # variables <- betydb_query(
85+ # table = "variables", name = "~^(NDVI|canopy_height|canopy_cover|)$")
7986
80- variables %>%
81- select(id, name, units, n_records = `number of associated traits`)
87+ # variables %>%
88+ # select(id, name, units, n_records = `number of associated traits`)
8289```
8390
84- Exercise: Why are there two variables named canopy_height, and what database fields should you examine to decide which one you want?
91+ ``` {r}
92+
93+ #Exercise: Why are there two variables named canopy_height, and what database fields should you examine to decide which one you want?
94+
95+ ```
8596
8697``` {r traits-05-get-variables-comment}
8798
0 commit comments