You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reorganized tutorials book to include vignette section (#81)
* fixed link to agronomic metadata tutorial
* Updated tutorial. Added a summary showing the 3 ways to access API data.
* Further updated the tutorial on how to access API using URL query and bash shell.
* Further updated tutorial. Added short comment on the use of the fromJSON function.
* Further updated R jsonlite portion of tutorial
* Update traits/01-web-access.Rmd
Co-Authored-By: kimberlyh66 <44081116+kimberlyh66@users.noreply.github.com>
* added comment. link to traitvis webapp not working.
* fixed links to terraref and pecan sites, betydb schemas, and doi reference. also updated comment on embedded shiny app (link to traitvis app does work).
* updated beta user program link, and fixed links to agronomic metadata tutorial and terraref bety home page
* made changes according to previous comments
* made minor edits - assuming betykey in traits directory since ~ does not work on Windows
* minor edit - removed comment
* -changed trait in sorghum height search from 'canopy_cover' to 'canopy_height'
-removed geom_smooth layer from ggplot
* made minor edits. changed api version from 'beta' to 'v1' and hid the results of the 'query-danforth' r chunk
* changed image name from 'betydb-postgis' to 'bety-postgis'
* changed ~ (home directory) to . (current directory)
* changed ~ (home directory) to . (current directory)
* Removed YAML metadata header. Added Chapter title.
* Removed YAML header. Added chapter title.
* Changed chapter title to be more specific. Chapter 6 title is also Phenotype Analysis.
* Removed text comment
* updated chapter title - made more specific
* commented out all chunks that were related to the traits-05-get-variables chunk (running this chunk results in a HTTP 504 Gateway Timeout)
* set betydb_query parameters using options
* loaded in some needed packages; set betydb_query function parameters using options
* set options for chunks to improve look of output
* changed headers to level 2 so not treated like a chapter title
* set warning option to FALSE
* removed .Rmd files that are not ready to be built into book
* changed path to .betykey file
* added tutorial 07 to rmd_files
* minor edit to rmd_files
* minor edits
* removed extra parentheses; commented out portion of code that called the 'yields' object (object not ever created - and no rows returned for yields table query)
* rearranged chunks and added some chunk options to improve output
* added chunk option
* Traits tutorials revisions (#41)
* added some context to index
* updated / added some stubs where we need more details
* updated rmd_files (added tutorials 5 and 6)
* added section header; added pointer urls
* added some context to traits/06
* changed files to include in rmd_files
* removed section header - not supposed to be in this file
* created section header
* changed some chunk parameters and added repository for traits installation
* changed chunk parameters
* changed chunk parameters and commented out sections that were not running correctly (HTTP 504)
* changed chunk parameters
* fix canopy_height query ... using sitename now.
* remove cache from canopy_height chunk
* remove cache from canopy_height chunk
* query canopy_height from season 2 instead of season 6
* updated tutorials to include in rmd_files
* removed cache = TRUE from chunk option
* changed chunk options and path to .betykey
* changed chunk options and path to .betykey
* loaded in jsonlite package; changed path to .betykey
* changed chunk options and installation of traits package from CRAN to github
* updated file to include new vignettes section
* created vignette folder and files
* changed traits section number to 2
* minor edits to chunk options and variable names
* updated introduction
* changed names of Rmd files - deleted old ones
* created new Rmd files (changed file names)
* removed tutorials that have not yet been revised and updated and added sensor tutorials on images and weather
* removed all references to the public key
* Update traits/05-maricopa-field-scanner.Rmd
Co-Authored-By: kimberlyh66 <44081116+kimberlyh66@users.noreply.github.com>
* Update traits/05-maricopa-field-scanner.Rmd
Co-Authored-By: kimberlyh66 <44081116+kimberlyh66@users.noreply.github.com>
* removed references to public key and made minor spacing edits
* deleted file
* removed "installing database locally" section
* changed title and added my draft of traits vignette
* Added in vignette contents
* Reverting my changes
* Fleshed out images vignette
* updated file names to match those in the vignettes folder
* Update vignettes/03-get-images-python.Rmd
Co-Authored-By: Chris-Schnaufer <schnaufer@email.arizona.edu>
* Added information on getting API keys
* * added ending to comment in index.Rmd
* set python engine to python3
* Cleaned up an API key related spot
* Removed some extra words
* Update vignettes/01-get-trait-data-R.Rmd
Co-Authored-By: kimberlyh66 <44081116+kimberlyh66@users.noreply.github.com>
* added a clarifying comment on how to use ~ for partial string matching in a query
Copy file name to clipboardExpand all lines: index.Rmd
+37-34Lines changed: 37 additions & 34 deletions
Original file line number
Diff line number
Diff line change
@@ -11,15 +11,38 @@ output:
11
11
12
12
# Overview
13
13
14
-
This book is intended to introduce users to TERRA REF data as quickly as possible.
14
+
This book is intended to quickly introduce users to TERRA REF data through a series of tutorials. TERRA REF has many types of data, and most can be accessed in multiple ways. Although this makes it more complicated to learn (and teach!), the objective is to provide users with the flexibility to access data in the most useful way.
15
15
16
-
It introduces to the wide range of phenomics datasets generated by the TERRA Reference program. Not only does TERRA REF have a large number of data sets, but many of the databases can be accessed in a number of different ways. While this makes it more complicated to learn, the goal is to provide users with the flexibility to access data in the most useful way.
16
+
17
+
## Contents
18
+
19
+
The first section walks the user through the steps of downloading and combining three different types of data: plot level phenotypes, meteorological data, and images. Subesquent sections provide more detailed examples that show how to access a larger variety of data and meta-data.
20
+
21
+
## Pre-requisites
22
+
23
+
While we assume that readers will have some familiarity with the nature of the problem - remote sensing of crop plants - for the most part, these tutorials assume that the user will bring their own scientific questions and a sense of curiosity and are eager to learn.
24
+
25
+
These tutorials are aimed at users who are familiar with or willing to learn programming languages including R (particularly for accessing plot level trait data) and Python (primarily for accessing environmental data and sensor data). In addition, there are examples of using SQL for more sophisticated database queries as well as the bash terminal.
26
+
27
+
Some of the lessons only require a web browser; others will assume familarity with programming at the command line in (typically only one of) Python, R, and / or SQL. You should be willing to find help (see finding help, below).
28
+
29
+
## Technical Requirements
30
+
31
+
At a minimum, you should have:
32
+
33
+
* An internet connection
34
+
* Web Browser
35
+
* Access to the data that you are using
36
+
+ The tutorials will state which databases you will need access to
37
+
* Software:
38
+
+ Software requirements vary with the tutorials, and may be complex
17
39
18
40
## User Accounts and permission to access TERRA REF data
19
41
20
-
TODO: link to relevant parts of docs.terraref.org
42
+
We have tried to write these tutorials using open access sample data sets. However, access to much of the data will require you to 1) fill out the TERRA REF Beta user questionaire ([terraref.org/beta](terraref.org/beta)) and 2) request access to specific databases.
21
43
22
-
* Info on how to [request access to data](https://docs.terraref.org/user-manual/how-to-access-data/using-betydb-trait-data-experimental-metadata)
44
+
<!-- Not sure where this goes, either in documentation or perhaps in an appendix. But I don't think this belongs in the introduction. Perhaps after the vignettes chaper
45
+
-->
23
46
24
47
## Ways of Acessing Data
25
48
@@ -40,41 +63,21 @@ The TERRA REF website: [terraref.org](http://terraref.org/)
40
63
41
64
The TERRA REF Technical Documentation: [docs.terraref.org](docs.terraref.org)
42
65
43
-
## Contents
44
-
45
-
Scope ...
46
-
47
-
Audience ...
48
-
49
-
50
-
## Pre-requisites
51
-
52
-
While we assume that readers will have some familiarity with the nature of the problem - remote sensing of crop plants - for the most part, these tutorials assume that the user will bring their own scientific questions and a sense of curiosity and are eager to learn.
53
-
54
-
Some of the lessons only require a web browser; others will assume familarity with programming at the command line in (typically only one of) Python, R, and / or SQL. You should be willing to find help (see finding help, below).
55
-
56
-
## Technical Requirements
57
-
58
-
At a minimum, you should have:
59
-
60
-
* An internet connection
61
-
* Web Browser
62
-
* A TERRA REF Beta User account
63
-
+ If you have not done so, please sign up at [terraref.org/beta](terraref.org/beta)
64
-
* Access to the data that you are using
65
-
+ The tutorials will state which databases you will need access to
66
-
* Software:
67
-
+ Software requirements vary with the tutorials, and may be complex
68
-
69
66
70
67
## Finding help
71
68
72
-
-[Slack](terra-ref.slack.com)
73
-
-[GitHub](https://github.com/terraref/tutorials)
74
-
-[Google](https://www.google.com/)
69
+
- Slack at terra-ref.slack.com ([signup](https://terraref-slack-invite.herokuapp.com/))
70
+
- Browse issues and repositories in GitHub:
71
+
- search the organization at github.com/terraref
72
+
- questions about the tutorials in the [tutorials repository](https://github.com/terraref/tutorials/issues)
73
+
- about the data in the [reference-data repository](https://github.com/terraref/reference-data/issues)
Copy file name to clipboardExpand all lines: traits/02-betydb-api-access.Rmd
+22-12Lines changed: 22 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -26,18 +26,19 @@ The first step toward reproducible pipelines is to automate the process of searc
26
26
### Using Your API key to Connect
27
27
28
28
An API key is like a password. It allows you to access data, and should be kept private.
29
-
Therefore, we are not going to put it in code that we share. The one exception is the key 9999999999999999999999999999999999999999 that will allow you to access metadata tables (all tables except _traits_ and _yields_). It will also allow you to access all of the simulated data in the https://terraref.ncsa.illinois.edu/bety-test database.
30
29
31
-
A common way of handling private API keys is to place it in a text file in your current directory.
32
-
Don't put it in a project directory where it might be inadvertently shared.
30
+
Therefore, we are not going to put it in code that we share.
31
+
32
+
A common way of handling private API keys is to place it in a text file in your current directory. Don't put it in a project directory where it might be inadvertently shared.
33
33
34
34
Here is how to find and save your API key:
35
35
36
36
* click file --> new --> text file
37
37
* copy the api key that was sent when you registered into the file
38
38
* file --> save as '.betykey'
39
39
40
-
For the public key, you can call this file `.betykey_public`.
40
+
An API key is not needed to access public data. This includes metadata tables and simulated data in the https://terraref.ncsa.illinois.edu/bety-test database.
41
+
41
42
42
43
43
44
## Accessing data using a URL query
@@ -49,7 +50,9 @@ For the public key, you can call this file `.betykey_public`.
49
50
* path to the api: `/api/v1`
50
51
* api endpoint: `/search` or `traits` or `sites`. For BETYdb, these are the names of database tables.
51
52
* Query parameters: `genus=Sorghum`
52
-
* Authentication: `key=9999999999999999999999999999999999999999` is the public key for the TERRA REF traits database.
53
+
54
+
* Authentication: `key=api_key` is your assigned API key. This will only be needed when querying trait data. No key is needed to access the public metadata tables.
55
+
53
56
54
57
### Constructing a URL query
55
58
@@ -62,17 +65,17 @@ First, lets construct a query by putting together a URL.
62
65
3. Add the name of the table you want to query. Lets start with `variables`
Create a file that contains your API key. If you have signed up for access to the TERRA REF database, your API key will have been sent to you in an email. You will need this personal key _and_ permissions to access the trait data. If you receive empty (NULL) datasets, it is likely that you do not have permissions.
26
31
27
-
Create a file that contains your API key. If you have signed up for access to the TERRA REF database, your API key will have been sent to you in an email. The public key will provide access to all metadata; you will need a personal key _and_ permissions to access the trait data. If you receive empty (NULL) datasets, it is likely that you do not have permissions.
28
32
29
33
```{r writing-key, echo = TRUE}
30
34
# This should be done once with the key sent to you in your email
Copy file name to clipboardExpand all lines: traits/04-danforth-indoor-phenotyping-facility.Rmd
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
# Danforth Indoor Phenotype Analysis
2
2
3
3
```{r 02-setup, include=FALSE}
4
+
4
5
knitr::opts_chunk$set(echo = TRUE, cache = TRUE)
5
6
library(jsonlite)
6
7
library(dplyr)
@@ -21,7 +22,8 @@ library(traits)
21
22
Unlike the first two tutorials, now we will be querying real data from the public TERRA REF database. So we will use a new URL, https://terraref.ncsa.illinois.edu/bety/, and we will need to use our own private key.
0 commit comments