Pollination- Farms shapefile column titles

Hello NatCappers,

I've succesfully managed to run the pollination 3.4 model for 150 species across 60 LULC classes! Phew it took about a week to run it! 

Now I'm trying to build and include a layer on farms in order to estimate the impact on potential yields. I have some questions about how to name the seasons (in which the crops are pollinated) in the famr attribute table. In the user guide it says that the name of the season should be identical to that used in the guild table. 

Currently I have 'floral_resources_summer_index' in the Biophysical table and 'floral_activity_summer_index' in my guilds table. Which of these naming conventions should I be following? When I justed used 'summer' the error told me it had to match what was written in both tables - but they are not identical.

Any clarification would be greatly appreciated!

Best,
Sylvie

Comments

  • DougDoug Administrator, NatCap Staff
    Hi Sylvie,

    Just an avid InVEST user here but thought maybe I could help. It is a bit confusing, but I believe you want to match the 
    guilds table naming convention, except I believe the guild table requires the column headers to be such as: 
    'foraging_activity_summer_index' (replace summer, with spring, autumn, etc...).

    So if you swap out 'floral' for 'foraging' in your guild table, and then use that for your farm polygon shapefile, it should be satisfied!

    If that still doesn't seem to fix the issue, could you post the log file? There could be a weird regular expression matching issue going on.

    Good luck! 
  • SylvieSylvie Member
    Hi Doug,

    Thanks for this tip! I tried filling in the 'season' attribute with the labels from the guilds table as you suggested (using foraging rather than floral) but I still get an error because my Biophysical table uses 'floral'. However, I previously ran my model with these labels in the biophysical table and guild table without problem. So I'm not sure if I also need to change the labels in the Biophysical table as well?

    ValueError: Expected a biophysical, guild, and farm entry for 'summer'
    but instead found only {'biophysical': u'floral_resources_summer_index',
    'guild': u'foraging_activity_summer_index'}. Ensure there are corresponding
    entries of 'summer' in both the guilds, biophysical table, and farm fields.

    I've attached the log in a separate document

    Thanks!


  • DougDoug Administrator, NatCap Staff
    Hey Sylvie,

    It looks like the guild and biophysical table are in good shape the way you have it. The farm polygon / attribute table is the issue I think.

    I think a concrete example will help clear things up. Let's say we have spring and summer seasons. Then in the farm shapefile attribute table we would have the following fields:
    - fr_spring
    - fr_summer
    - season
    - n_cavity
    - n_ground  (where ground / cavity is the substrate)

    So under the 'season' field it will either be 'summer' or 'spring', and in the 'fr_spring', 'fr_summer' field will be the 0-1 value. (note these are just the necessary matching fields, the other fields: 'half_sat', etc are still expected).

    Likewise in the guild table for headers / fields:
    - foraging_activity_spring_index
    - foraging_activity_summer_index
    - nesting_suitability_cavity_index
    - nesting_suitability_ground_index

    And in Biophysical table:
    - floral_resources_spring_index
    - floral_resources_summer_index
    - nesting_cavity_availability_index
    - nesting_ground_availability_index

    Hopefully this helps line up what the model expects as far as "matching" goes across tables. I think for your 'season' field in the farm table you just want the name of the season. Then the fr_[SEASON], n_[SUBSTRATE] fields.

    Let me know how it goes!
  • SylvieSylvie Member
    That worked!

    I also didnt realize that the titles in the farm polygone layer were case sensitive. I had them all as capslock because it was written fr_[SEASON] which was also causing some of my problem. 

    Thank you so much for all the help!
Sign In or Register to comment.