Hi,

My inventory uses nested sub-plots of different areas for different sized trees. In the Collect schema these trees are stored in different tables. I currently calculate variables (e.g. AGB, Carbon) for each sub-plot separately, define the plot area for each sub-plot, and can view and interact with the calculated variables in Saiku.

I would like to merge the outputs from the sub-plots so that I can display the calculated variables for all tree sizes in Saiku as a single variable. I think I need to merge the data in R and then write to the Postgres database but I don't know where in the Calc processing chain this should happen to make the merged outputs available in Saiku.

Can you recommend a workflow for this task?

Thanks for your help.

Jonathan

asked 30 Jul, 10:37

jpdash's gravatar image

jpdash
111
accept rate: 0%


Dear Jonathan,

Collect allows to use same attribute names in multiple tables, Calc does not allow. Indeed, this is a bad practice in Collect too. The duplicate attribute names are changed in Calc while importing the Collect data. Similarly, result variable names must be unique in Calc. So merging of entities is very tricky.

Secondly, in Calc computing of 'results per hectare' takes place at the very end of the calculation chain (system/0xx-persist-user-scripts.R) and we cannot not edit this part.

However, I offer this solution:

You should have an (extra) attribute (text/integer/code) for each subplot that defines the subplot type. You may have this already.

Export all tree data (tables) into CSV or Excel files. Survey Designer: keep the original tables as they are now but create with DUPLICATE method a new table 'tree_combined' for tree data, Publish and import all tree data into this new (blank) table (i.e. entity).

In Calc: add some results variable(s) for 'tree_combined' and in tree_combined$plot_area script write something like alt text

In this way you get your original Saiku reports plus results for combined tree data.

Hope this helps, Lauri

P.S. I will study your case still, it is very interesting and if I find a better solution, I will tell it here.

permanent link

answered 30 Jul, 13:51

LauriV's gravatar image

LauriV ♦♦
4902613
accept rate: 21%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×75

question asked: 30 Jul, 10:37

question was seen: 81 times

last updated: 30 Jul, 13:51