This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#install and load in the traits package | |
install.packages("traits") | |
library(traits) | |
#set default options | |
#find your api key at terraref.ncsa.illinois.edu/bety/users and save it to a file in your current directory named '.betykey' | |
options(betydb_key = readLines('.betykey', warn = FALSE), | |
betydb_url = "https://terraref.ncsa.illinois.edu/bety/", | |
betydb_api_version = 'v1') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
insert into sites_cultivars (site_id, cultivar_id) values ((select id from sites where sitename = 'MAC Field Scanner Season 6 Range 1 Column 1'), (select id from cultivars where name = 'SP1516')); | |
insert into sites_cultivars (site_id, cultivar_id) values ((select id from sites where sitename = 'MAC Field Scanner Season 6 Range 1 Column 2'), (select id from cultivars where name = 'SP1516')); | |
insert into sites_cultivars (site_id, cultivar_id) values ((select id from sites where sitename = 'MAC Field Scanner Season 6 Range 1 Column 3'), (select id from cultivars where name = 'SP1516')); | |
insert into sites_cultivars (site_id, cultivar_id) values ((select id from sites where sitename = 'MAC Field Scanner Season 6 Range 1 Column 4'), (select id from cultivars where name = 'SP1516')); | |
insert into sites_cultivars (site_id, cultivar_id) values ((select id from sites where sitename = 'MAC Field Scanner Season 6 Range 1 Column 5'), (select id from cultivars where name = 'SP1516')); | |
insert into sites_cultivars (site_id, c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
insert into cultivars (specie_id, name, ecotype) values ((select id from species where genus = 'Sorghum'), 'SP1516', 'BAP'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
insert into citations_sites (citation_id, site_id) | |
select c.citation_id, s.site_id | |
from (select id as citation_id from citations where author = 'Newcomb, Maria' and year = 2018) as c cross join (select id as site_id from sites where sitename like 'MAC Field Scanner Season 6%') as s; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
insert into cultivars (specie_id, name, ecotype) values ((select id from species where genus = 'Sorghum'), 'Orita', ''); | |
insert into cultivars (specie_id, name, ecotype) values ((select id from species where genus = 'Sorghum'), 'Tiburon', ''); | |
insert into cultivars (specie_id, name, ecotype) values ((select id from species where genus = 'Sorghum'), 'UNIBO Durum Panel DP_181', ''); | |
insert into cultivars (specie_id, name, ecotype) values ((select id from species where genus = 'Sorghum'), 'UNIBO Durum Panel DP_106', ''); | |
insert into cultivars (specie_id, name, ecotype) values ((select id from species where genus = 'Sorghum'), 'UNIBO Durum Panel DP_103', ''); | |
insert into cultivars (specie_id, name, ecotype) values ((select id from species where genus = 'Sorghum'), 'UNIBO Durum Panel DP_145', ''); | |
insert into cultivars (specie_id, name, ecotype) values ((select id from species where genus = 'Sorghum'), 'UNIBO Durum Panel DP_259', ''); | |
insert into cultivars (specie_id, name, ecotype) values ((select id from species |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
insert into sites_cultivars (site_id, cultivar_id) values ((select id from sites where sitename = 'MAC Field Scanner Season 5 Range 1 Column 1 W'), (select id from cultivars where name = 'Orita' and specie_id = (select id from species where genus = 'Sorghum'))); | |
insert into sites_cultivars (site_id, cultivar_id) values ((select id from sites where sitename = 'MAC Field Scanner Season 5 Range 1 Column 1 E'), (select id from cultivars where name = 'Orita' and specie_id = (select id from species where genus = 'Sorghum'))); | |
insert into sites_cultivars (site_id, cultivar_id) values ((select id from sites where sitename = 'MAC Field Scanner Season 5 Range 1 Column 2 W'), (select id from cultivars where name = 'Orita' and specie_id = (select id from species where genus = 'Sorghum'))); | |
insert into sites_cultivars (site_id, cultivar_id) values ((select id from sites where sitename = 'MAC Field Scanner Season 5 Range 1 Column 2 E'), (select id from cultivars where name = 'Orita' and specie_id = (select id from species |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
insert into citations_sites (citation_id, site_id) | |
select c.citation_id, s.site_id | |
from (select id as citation_id from citations where author = 'Newcomb, Maria' and year in (2017, 2018)) as c cross join (select id as site_id from sites where sitename like 'MAC Field Scanner Season 5%') as s; |