I want to add some information obtained from external source to assessed Collect Earth plots to make those information available for analysis using SAIKU. Is it possible? If so, how can I do that?

asked 22 Sep '15, 11:09

abejin's gravatar image

abejin
11112
accept rate: 0%


This is a process that involves four steps.

  1. Add the extra attributes to the survey in Collect Survey Designer
  2. Refresh the database structure with the new attributes by exporting the survey to CEP and double click on it
  3. Generate a CSV file with the values of those attributes per plot
  4. Import the CSV file into your survey do that the current database is imported

ATTENTION: For this you will need to have imported the survey (you can use the placemark.idm.xml file inside the CEP) into you Open Foris Collect and should have it installed somewhere (possibly your computer)

Adding a new attribute

So, step 1 is quite straight forward. Lets say that you have your survey already loaded in the survey designer. You need to access the survey, go to the scheme tab and there add a new attribute, use text, number or code depending on the attribute type you will be using.

It is important, as this data is added after you have already have collected the data, that you mark the field as Never being relevant using the false() expression. This means that the attribute will not show up in the form and it will not be required if new data is collected.

alt text

So, say that now you have added a new code attribute called soilcode. It is linked to a code-list called "soiltypes" where you have imported the codes for the possible types of codes in your region. Obviously the codes must coincide with the data you will import. If this was a text attribute then it wouldn't matter.

Exporting the Survey and updating the database

This one is quite easy. You just need to export the Collect survey though Collect Designer and double click on the resulting CEP file!

alt text

Generate the CSV with the data to load/update

So after you modified the survey and imported it the structure of the Collect database used by Collect Earth has changed and now there is a new "column" soilcode on the plot table.

The data for this soilcode is empty and you need to update the data on the plots ALREADY ON THE DATABASE (if you have not yet collected data for a plot you cannot update it) .

To do this you need to generate a CSV file that links the plots (using the ID) to the value of the soilcode. If you are extracting data from a soil map shapefile you can easily process the data using QGis or similar. Please see this other answer on the forum on how to do this: LINK.

So you will end up with a CSV file updatePlots.csv like this (say that 5888,5889,5890.... are the IDs of the plots for which you have collected information and that SOL and NET are codes contained in the codelist soiltypes that the soilcode attribute makes reference to )

plot_id,soilcode
5888,SOL
5889,NET
5890,SOL

Import the CSV data

So now this is the final step and quite straight forward. Use the menu Tools->Data Import/Export->Update current records using CSV and select the file that you have generated updatePlots.csv . You get a dialog that shows the process running.

Once that is done you can run Saiku again (choosing to update the database when you are prompted) and the new attribute should be shown on the left panel!!

Easy peasy!

permanent link

answered 22 Sep '15, 16:36

collectearth's gravatar image

collectearth ♦
63015
accept rate: 15%

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:

×191

question asked: 22 Sep '15, 11:09

question was seen: 3,827 times

last updated: 22 Sep '15, 16:36