How to add information obtained from external source to Collect Earth plots?

  • Asked
  • Active
  • Viewed 7236 times
0

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?

0

Accepted answer

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!

Your answer

Markdown text. Shortcuts: Ctrl+B bold, Ctrl+I italic, Ctrl+K link, Ctrl+E code, Ctrl+Shift+V paste as plain text. Tab indents list items and code; press Escape, then Tab, to leave the text box.

Insert an image

Say what the image shows, for people who can't see it.

Tip: type a few words from the error message, or put a tag in [brackets] to look only there.

Menu

Keyboard shortcuts

Anywhere

?
Show this list
/
Search
g h
Go to the home page
g q
Go to the questions
g t
Go to the tags
g u
Go to the users
a
Ask a question

Lists of questions

j k
Next or previous question
Enter
Open the question

Question pages

j k
Next or previous post

Shortcuts never apply while you type in a text field. Members can turn them off in their preferences.