Urban Flood Risk Mitigation


Hi, everyone I´ couldn´t run this model because it gave me an mistake, it says: "DataFrame index must be unique for orient=´index´.

Log file

InVEST-Urban-Flood-Risk-Mitigation-log-2022-09-05–16_10_47.txt (4.4 KB)

InVEST version


Thanks for the help!!

Hi @MariaFarrier, and welcome to the forum!

Thanks for posting your log file. In it is this error:

ERROR The ‘key_field’ : ‘lucode’ column values are not unique: [11, 13, 13, 13, 6]

I’m noticing now that the User Guide does not specify this, but each land use code must be a unique integer, in order for the model to match the land use type in the input raster with the values given in the biophysical table. Try reclassifying 2 of the “13” values to new, unique values and see if that helps. Meanwhile, I’ll update the User Guide to make this requirement explicit.

~ Stacie

Hii, thanks for yor anwer. Ok, I got it. But still have a doubt.
I put three time “13” because my study area is in that category (Data Sources — InVEST documentation , that´s where I look it), the thing is that I have three differents type of urban and built up (comercial and business, industrial and residential) and I thoug that the three could be by the same number category; so now I don´t know what lucode use for the others two.
I´m attaching you my biophysical table so you can understand better what I´m saying.

Thamk you so much.
Tabla-Biofisica.csv (306 Bytes)

@MariaFarrier , You mentioned that you have 3 different types of urban/built-up landcover classes that you would like to represent in the same way. You can only define landcover 13 once in your biophysical table, so you’ll need to modify your raster to convert these other 2 landcover codes to 13 as @swolny mentioned.

For example, if your 3 urban/built-up landcover codes are 13, 14 and 15, you will need to use a reclassification tool in your GIS to reclassify 14 → 13 and reclassify 15 → 13.

Then you would re-run the model with your biophysical table.

Let us know if you have any questions!

1 Like

Got it!!!
I alredy changed it and the model finally runs. It was very simple jeje

Thanks for the help!!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.