Changing plot attributes in the Collect Earth database

  • Asked
  • Active
  • Viewed 16021 times
0

Hi.

Our partners in Kyrgyzstan would like to correct the plot attributes within the grid csv/ced file while also retaining data that has already been entered within Collect Earth for each plot.

Is it possible to re-upload a grid ced file with different supplementary attributes (like elevation, slope, aspect and region, NOT core attributes like plot id and XY coordinate) and have it automatically inherit data associated with the plot id in the database?

Would Saiku correct the supplementary attribute (region in this particular case) when regenerating the Saiku database?

0

Accepted answer

Hi Adia,

In order to achieve this functionality ( to update the values of certain variables that have already been collected ) you need to follow these steps:

  • Create a CSV file which will list the new values as columns and that includes the id of the plots.

So for instance if you have a variable called "region" and when you were assessing the plots through Collect Earth that variable was not set properly. See example of a plot location file which had no good information when it was created (missing elevation, slope,aspect and region data):

id,latitude,longitude,elevation,slope,aspect,region
1,41,12,0,0,0,Unknown
2,40,14,0,0,0,Unknown
3,45,9,0,0,0,Unknown

Now I want to fix the region information, so what I should do is to generate a CSV file with two columns : id (which would be the ID of the plot and is usually found as the first column of a plot location file - .ced ) and region like this

id,region    
1,Rome    
2,Naples    
3,Milano
  • Import the CSV file through the Collect Earth menu. Now if you had registers with the IDs 1,2 and 3 the regions will be updated. IMPORTANT: Use "Update current records using CSV"

alt text

That is it, if you followed the steps correctly the values stored for those variables should have changed in the Collect database ( attention : this process only updates data that is already there, it doesn't add new registers )

When you start Saiku again choose the option to refresh the Saiku database so this information is reloaded by Saiku and shown for the analysis.

alt text

Hope that was clear!

0

Accepted answer

Dear Tesfay,

One can always add a new attribute to the survey through the Survey Designer, e.g. a region attribute of type text. Then you export the survey as a CEP file so that you can load it in Collect Earth.

This means that in the database of Collect Earth you will have your current data plus a new variable, which will be empty, called region (per record).

Finally you update the database with the process that is explained in the previous response, where you are only specifying the value for the variable region and referencing the record by its plot id.

Of course, for the area calculation to work you need to make sure that the values of the region update to the DB coincide with the values of the region on the areas_per_attribute.csv file...

After you add the "region"to the survey then you use a CSV to update it (Tools->Data Import/Export->Update current records using CSV ) like this

id,region 
1,Region1 
2,Region1
3,Region2

And then the areas_per_attribute should be something like (beware of the column name headers):

region,area,weight
Region1,10000,1
Region2,5000,1
0

Accepted answer

Please, forgive me if the above answer or similar question has already been addressed. I am wondering how best to automatically update existing records at sql database during the QC/QA of completed grid.

example: I have a park boundary shapefile, and there is a column heading in my grid with the question what is the "land management" type?

I wanted to update all answers with discrepancies under this question into "conservation/protected" instead of correcting every record manually could I do this automatically somewhere and sync into SAIKU? Thank you! Tesfay

0

Accepted answer

Hi Tesfay,

From Collect Earth the easiest thing to do would be :

  1. Create a CSV file with the data ( go to Tools->Data Import/Export -> Export data to CSV)

  2. Open the file using Excel, LibreOffice or any other style sheet type of software. In Excel you will need to load the CSV file by using the Data tab alt text

  3. Now filter the data however you want through Excel/LibreOffice and remove all the columns in the CSV file except for the id ( the id of the plot in the DB) column and the column that you want to update. The result would be something like (assuming the attribute you want to change is called land_management, check the headers in your CSV!! ):

id,land_management

1,"conservation/protected"

2,"conservation/protected"

3,"conservation/protected"

4,"conservation/protected"

So at the end you have the list of all of the plots in the DB that you want to update and their newer values!

  1. SO the last steep is to import this data back into Collect Earth. Go to Tools->Data Import/Export->Update current records using CSV , and use this CSV that you have created!

Afterwards you can run Saiku again (making sure to say that you want to update the Saiku database when your are prompted). And that should it....

Hope this clarifies!

0

Accepted answer

Thanks again! interestingly, it is not updating the records in SAIKU database. But when I check the exported .cvs file. I do see the class was updated in csv file.

Tesfay

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.

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.