This folder contains code used to compare setaria growth in different environments.
-
inputs/ -
scripts/folder:
| sum_out <- broom.mixed::tidyMCMC(coda_out, conf.int = TRUE, conf.level = 0.95) %>% | |
| rename(mean = estimate, sd = std.error, pc2.5 = conf.low, pc97.5 = conf.high) %>% | |
| mutate(sig = if_else(pc2.5 * pc97.5 > 0, TRUE, FALSE)) # test if UCL and LCL both have the same sign | |
| years <- data.frame(year_index = 1:length(unique(x$year)), year = unique(x$year)) | |
| states <- data.frame(state_index = 1:length(unique(x$state)), state = unique(x$state)) | |
| sum_rep <- broom.mixed::tidyMCMC(coda_rep, conf.int = TRUE, conf.level = 0.95) %>% | |
| rename(mean = estimate, sd = std.error, pc2.5 = conf.low, pc97.5 = conf.high) %>% | |
| separate(term, sep = '\\[|\\]|,', into = c('term', 'i', 'j', 'other'), convert = TRUE) %>% |
| #CSV downloaded from https://quickstats.nass.usda.gov/results/12827E57-2B20-368C-A91F-1B97FF8F7B35#E2E0BF24-9F88-35DB-8526-8E47D941FDBF | |
| library(dplyr) | |
| library(tidyr) | |
| nass_data <- readr::read_csv("raw_data/E2E0BF24-9F88-35DB-8526-8E47D941FDBF.csv",na = '(D)', | |
| skip = 1, | |
| col_names = c( | |
| "program", "period", "week_ending", "geo_level", "state", "state_ansi", | |
| "ag_district", "ag_district_code", "county", "county_ansi", "zip_code", | |
| "region", "watershed_code", "watershed", "commodity", "data_item", |
| library(ggplot2) | |
| library(dplyr) | |
| download.file(url = 'https://datadryad.org/stash/downloads/file_stream/624637', destfile = 'trait_data.zip', mode = 'wb') | |
| unzip(zipfile = 'trait_data.zip', unzip = 'unzip') | |
| s6heights <- readr::read_csv('traits/season_6_traits/season_6_canopy_height_sensor.csv') | |
| s4heights <- readr::read_csv('traits/season_4_traits/season_4_canopy_height_sensor.csv') | |
| heights <- bind_rows(s4heights, s6heights) |
| select | |
| t.treatment_id :: text as treatmentDbId, | |
| t.site_id :: text as observationUnitDbId, | |
| t.variable_id :: text as observationVariableDbId, | |
| v.name as observationVariableName, | |
| t.id :: text as observationDbId, | |
| t.mean :: text as value, | |
| t.date as observationTimeStamp, | |
| s.sitename as observationUnitName, | |
| t.cultivar_id :: text as germplasmDbId, |
| n_sim <- 10000 | |
| mu <- -10 | |
| sd <- 2 | |
| n <- 30 | |
| z <- array(NA, c(3,n_sim)) | |
| for(i in 1:n_sim){ | |
| x <- rnorm(n, mu, sd) | |
| z[1, i] <- mean(x) |
| <?xml version="1.0"?><pecan> | |
| <info> | |
| <notes/> | |
| <userid>-1</userid> | |
| <username/> | |
| <date>2021/01/28 19:56:08 +0000</date> | |
| </info> | |
| <outdir>/data/workflows/PEcAn_99000000009</outdir> | |
| <database> | |
| <bety> |
| import pgzrun | |
| import time | |
| import random | |
| WIDTH = 400 | |
| HEIGHT = 400 | |
| guy = Actor("purple_guy") | |
| guy.pos = (200, 200) | |
| guy.angle = -25 |
| library(tidyverse) | |
| library(wesanderson) | |
| library(cowplot) | |
| library(lubridate) | |
| allfields <- read_csv('~/Downloads/canopycover_ratiomask.csv') %>% | |
| mutate(method = 'French') | |
| field3 <- read_csv('~/Downloads/canopycover_ratiomask_field3.csv') %>% | |
| mutate(method = 'French') | |
| all_tr <- read_csv('~/Downloads/allcanopycover (1).csv') %>% select(-X1) %>% | |
| mutate(method = 'Li') |
| --- | |
| title: "Meta analysis plot organization" | |
| output: html_document | |
| --- | |
| ```{r setup, include=FALSE} | |
| knitr::opts_chunk$set(echo = TRUE) | |
| ``` | |
| ## Lets look at what MA outputs look like |