terraref / reference-data

Coordination of Data Products and Standards for TERRA reference data
https://terraref.org
BSD 3-Clause "New" or "Revised" License
9 stars 2 forks source link

Upload season 7 leaf chemistry data #258

Closed dlebauer closed 4 years ago

dlebauer commented 5 years ago

Need to upload data from Duke Pauli from Oct 8. See forwarded email for data.

dlebauer commented 5 years ago

For the existing crude_protein and sugar content variables, we need to distinguish the variable from the method. These data were measured using the John Deer Harvestlab 3000 https://www.deere.com/en/technology-products/precision-ag-technology/data-management/harvest-lab-constituent-sensing/

Prior to uploading the new leaf chemistry data, please:

kimberlyh66 commented 5 years ago

The trait records for crude_protein and sugar_content are already linked to a citation. Will there be a problem if I update the method for the records to be harvestlab which is linked to a new citation?

dlebauer commented 5 years ago

@kimberlyh66 no - the trait data is linked to one citation record that identifies the person or publication responsible for the data (in this case, Duke Pauli) while the method record is linked to a citation that describes the method of measurement - in this case there will be one method with a citation pointing to HarvestLab documentation and the other method to documentation from Ward Laboratories.

kimberlyh66 commented 5 years ago

@dlebauer thanks for the clarification. Here is the update statement to link the existing trait records of crude_protein and Sugar_content to the new harvestlab method.

update traits
set method_id = (select id from methods where name = 'Protein leaf and stem measurement')
where variable_id in ((select id from variables where name = 'crude_protein'), (select id from variables where name = 'Sugar_content'));

Also, I have temporarily assigned the year to be 2019 in the new harvestlab citation. Do you know what the year should be?

dlebauer commented 5 years ago

thanks. If you are referencing a website, use the access date of 2019. If a pdf, either use the publication date or the access date.

dlebauer commented 5 years ago

I've updated the protein methods in the database per https://github.com/terraref/reference-data/issues/258#issuecomment-453586661

kimberlyh66 commented 5 years ago

Sites with data need to be associated with Duke Pauli's citation. Here is the insert statement.

insert into citations_sites (citation_id, site_id)
  select c.id, s.id
  from (select id from citations where author = 'Duke Pauli')
    as c cross join (select id from sites where sitename ~ '^MAC Field Scanner Season 7 ((Range (17|18|19|20|21|22|23|24|26|27|28) Column (2|3|4|5|6|7|8|9|10|11|12|13|14|15))|(Range 25 Column (2|3|4|6|7|8|9|10|11|12|13|14|15)))$') as s;

It looks like there is no data for Range 25 Column 5.

dlebauer commented 4 years ago

this has been completed