What is the purpose of the "Import Data from CSV" button under Data Import/Export? I know that it is NOT for

  • importing a new point grid (that's under Properties)
  • importing a data base (that works via XML files)

asked 06 Nov '14, 18:21

Antonia's gravatar image

Antonia
51449
accept rate: 0%


I agree the naming is confusing as the functionalities are different.

So basically in the coming version of Collect Earth the menu items will change name to something like :|

  • Add new records from XML

  • Update existing records with CSV

See the link that Giulio posted for more information of how to update the data already recorded in the database.

permanent link

answered 06 Nov '14, 22:09

collectearth's gravatar image

collectearth ♦
85215
accept rate: 16%

Hi Antonia, just today we were discussing about the naming of that feature since it will only update the values that are already present but it won't import new records. If you want to import records into a blank database, you need to import the XML exports.

This other discussion may shed more light.

http://www.openforis.org/support/questions/80/changing-plot-attributes-in-the-collect-earth-database

Thanks,

Giulio

permanent link

answered 06 Nov '14, 21:07

gmarchi's gravatar image

gmarchi ♦♦
36226
accept rate: 7%

edited 06 Nov '14, 21:07

Hi there @gmarchi

If I understand what you are saying correctly, this means that the only way I can import new records into a blank database is to import the XML exports. Will I be able to do this using the CSV exports? I have been always exporting my survey data via the CSV export function, and not the XML export function.

Warmest regards, Johanness

permanent link

answered 27 Dec '19, 05:05

J_Johanness's gravatar image

J_Johanness
73
accept rate: 0%

In response to @J_Johannes:

The purpose of the Tools->Data Import/Export->Update Current Records Using CSV is to update data currently on the database. This is not helpful for your purpose

AS A RULE: ALWAYS EXPORT THE DATA USING THE XML OPTION! This way you will always be able to easily import it into the database!

alt text

Since you only have the data as CSV then you are going to need to import the data using Open Foris Collect (attention, not Collect Earth, but Collect, the application that is used also to design the surveys)

So, this is a bit more complicated, roughly speaking these are the steps :

  1. Install Collect if you still don't have it!
  2. Open Collect ( Windows button --> Open Foris Collect )
  3. Import the survey you are using into Collect ( see this video, bit old so with an older interface, but the concepts are the same )
  4. PUBLISH THE SURVEY (this way the survey will be accessible in the Data Management section of Collect where the CSV can be imported)
  5. Now go to the Data Management section. Choose the survey you just published on the top-right selection field.
  6. Click on the Import -> From CSV/Excel button on the top menu.
  7. In the screen that appears select the Import Type option "Insert new records" and then select the CSV with your data! ...... OK, not really that easy (that is why we prefer the XML export/import to the CSV option) ... WHY? Because in Collect a survey has a root entity (i.e. the plot entity) which in its turn might have sub-entities ( i.e. the Land Cover/topography entity) which act as linked tables to the main table (the plot) if you are thinking from a relational database point of view. This means that in this process one must first import the data for the plot table, and then import the data for the entities inside the plot...
  8. Now you have to divide the data in your CSV into the different entities it belongs to. If you used the Collect Earth IPCC template for your survey then you will have the plot entity (main) and the topography entity (linked to the plot). So the trick is to divide the columns of the CSV you have into the CSV for the plot and the CSV for the topography. In order to see what is the expected columns in each one of the files you could go to the Data Management, use your survey and then export the data (maybe if you have a few plots on the DB) and Export as CSV with one CSV per entity. If you have calculated attributes inside the entities you do not need to import them!
  9. When you import the CSVs then you have to also explicitly choose which entity you are importing teh data for. First you should import the root entity data (plot) as the sub-entities (topography) reference the plot that their data belongs to: This is an example of a few plots from the plot CSV ( see that the id and round columns are the key attributes of this specific survey) alt text And this is the resulting topography csv, notice how for ech type of land cover there is a reference to each plot ( combination of id and round attribute) alt text
  10. OK... this is quite complex and error prone. Please let us know if you get stuck!

I will post more images later to guide you better!

permanent link

answered 02 Jan, 12:51

Open%20Foris's gravatar image

Open Foris ♦♦
6025614
accept rate: 8%

That was a wonderful and very detailed explanation, on a feature in Open Foris Collect that I was personally unfamiliar with. Thank you, I will try it next time if the opportunity arises. Thank you for the step-by-step guide, and the link to the tutorial video as well! It is very much appreciated.

From now on, I will abide by that rule: ALWAYS EXPORT THE DATA USING THE XML OPTION!

Thank you very much, this has been very informative.

Warmest regards, Johanness

permanent link

answered 14 Jan, 09:35

J_Johanness's gravatar image

J_Johanness
73
accept rate: 0%

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:

×237

question asked: 06 Nov '14, 18:21

question was seen: 3,657 times

last updated: 14 Jan, 09:35