Skip to content

Instantly share code, notes, and snippets.

View dlebauer's full-sized avatar
😀

David LeBauer dlebauer

😀
View GitHub Profile
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,
@dlebauer
dlebauer / MAB.R
Last active April 10, 2021 01:47
how much easier is it to estimate a mean than a minimum?
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)

Environment comparisons

This folder contains code used to compare setaria growth in different environments.

Contents:

  • inputs/

  • scripts/ folder:

@dlebauer
dlebauer / pecan.xml
Created January 28, 2021 20:03
testing out met workflow from web interface
<?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>
@dlebauer
dlebauer / simple_purple_shaker.py
Last active January 16, 2021 18:07
Pyzero implementation of the purple shaker guy from scratch
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
# from https://pygame-zero.readthedocs.io/en/stable/introduction.html
import pgzrun
#import random
WIDTH = 500
HEIGHT = 1000
alien = Actor('alien')
alien.pos = WIDTH/2, HEIGHT/2
Formula What It Accounts for Limitations How to Use it Misc. Citation(s)
@dlebauer
dlebauer / PI_cultivars.txt
Created July 3, 2020 01:39
renaming cultivars so that they follow the PIXYZ convention rather thant PI_XYZ see https://github.com/terraref/data-paper/issues/24
6000001885 PI_598070
6000001886 PI_533997
6000001887 PI_597946
6000001888 PI_533937
6000001889 PI_655984
6000001890 PI_659695
6000001891 PI_656058
6000001892 PI_533769
6000001893 PI_576364
6000001894 PI_533750