Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to generate new equation_id's #51

Closed
gonzalezeb opened this issue Oct 2, 2018 · 3 comments
Closed

how to generate new equation_id's #51

gonzalezeb opened this issue Oct 2, 2018 · 3 comments

Comments

@gonzalezeb
Copy link
Contributor

How do I generate a new equation_id at the same time that I am:

  1. adding a new site, therefore likely new equations
  2. adding a new equation for an existing site

This is a direct question for @maurolepore

@maurolepore
Copy link
Member

@gonzalezeb,

Here is what I think the process would look like. It seems more difficult to explain than to do. Hopefully what I say here makes sense, but it might be better to practice with a tiny, dummy database with the most important columns and 2-3 rows (e.g. table site with columns site and equation_id, and table equations with columns equation_id and equation_allometry).

  1. If you add a new site, you would add a row in the sites table (sitespecies I believe?).

    1.1. If that new site uses an equation_allometry that already exists in the equations table, then in the sites table add the equation_id corresponding to the relevant equation_allometry (which lives in the equations table).

    1.2. If that new site uses a new equation_allometry -- i.e. not already in the equations table -- then you would add a new row in the equations table: Populate the column equation_allometry with whatever you get from the literature, and populate the column equation_id with a random id from data-raw/available_random_ids.csv (here). (Remove each id that you pick, so you don't assign the same id to two different equations).

  2. If you add a new equation for an already existing site, then the equations table gets a new row as in 1.2.. And the sites table also gets a new row, where the value for the column equation_id matches the equation_id correponding to the relevant equation_allometry in the equaitons table.

Again, I'm afraid my explanation might be unclear or my rationale wrong. Best to practice and check we got it rigth. We could meet online if you want, and try a few things together.

@maurolepore
Copy link
Member

Sorry, I closed accidentally.

@maurolepore
Copy link
Member

Closing because this has been already discussed and we are ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants