Skip to main content
Question

Comparing two vector fields to a spreadsheet matrix


Hi everyone,

 

I have a matrix stored in a spreadsheet and I would like to copy the corresponding value into a vector file by comparing two fields to the matrix.

 

To give more detail. I am unioning two habitat maps together, one from 2011 and one from 2017. I have a spreadsheet with habitat classes on row 1 and column A. The matrix then assigns each pair a change value e.g. no change, some change, extreme change etc.

 

Is it possible compare the 2011 field with row 1 of the spreadsheet and the 2017 field with column A and populate a new field with the result?

 

Many thanks,

 

Matthew

6 replies

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • January 18, 2019

@mattenvsys

 

You can compare any cell from any sheet to any cell from any sheet based on any criteria one can come up with, basically.

How you would do that kind of depends on the structure of the data. (maybe the structure from 2011 set is not same as 2017, but the data content is etc.)

 

" spreadsheet with habitat classes on row 1 and column A.' sounds like a cross table. So you should be able to identify any cell by its habitat class combination across the sheets.

Cell in a cross table can be accessed by 2 mergers after separating 1st column and first row from data, exploding the data.

 

Sample data would facilitate sample workbench.

 

 

 

 


  • Author
  • January 18, 2019
gio wrote:

@mattenvsys

 

You can compare any cell from any sheet to any cell from any sheet based on any criteria one can come up with, basically.

How you would do that kind of depends on the structure of the data. (maybe the structure from 2011 set is not same as 2017, but the data content is etc.)

 

" spreadsheet with habitat classes on row 1 and column A.' sounds like a cross table. So you should be able to identify any cell by its habitat class combination across the sheets.

Cell in a cross table can be accessed by 2 mergers after separating 1st column and first row from data, exploding the data.

 

Sample data would facilitate sample workbench.

 

 

 

 

Hi Gio,

Thanks for replying. I have uploaded a zipfile containing a sample shapefile and an extract of a spreadsheet.

In the shapefile, values in the field 'HAB2011' match those of row 1 in the spreadsheet. 'HAB2017' matches the values in column A.

I'm looking for a way to append a new field in the shapefile populated with either "compatible" or "not compatible" based on the combination of classes.

Hab_Test.zip


  • Author
  • January 21, 2019

@gio

Hi, I didn't tag you in my previous reply so I was unsure if you noticed it.

Here's the sample data.

In the shapefile, values in the field 'HAB2011' match those of row 1 in the spreadsheet. 'HAB2017' matches the values in column A.

I'm looking for a way to append a new field in the shapefile populated with either "compatible" or "not compatible" based on the combination of classes.

 

Hab_Test.zip


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • January 21, 2019

@mattenvsys

 

Hi,

 

Here is a workbench applying the "cross table".

 

Crosstable_variant.fmw

 

 

Greets

 


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • January 21, 2019
gio wrote:

@mattenvsys

 

Hi,

 

Here is a workbench applying the "cross table".

 

Crosstable_variant.fmw

 

 

Greets

 

and a pic, in case upload fails.


  • Author
  • January 23, 2019
gio wrote:

@mattenvsys

 

Hi,

 

Here is a workbench applying the "cross table".

 

Crosstable_variant.fmw

 

 

Greets

 

@gio

I finally got round to running this on the real data. I used your annotated picture to recreate the workbench as the initial downloaded didn't work.

Thanks for taking the time to create this for me. It worked really well


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings