I’m trying to incorporate a built infrastructure vector to the model and continue to get KeyError ‘1’ in calculating damage to infrastructure in the AOI. I checked previous posts and assumed the error was an issue with my polygon type, but that seems to be fine and I’m unsure how to proceed.
Hi @paxton.lajoie ,
Thanks for including your logfile! I believe the issue here is that there’s a mismatch between what’s in your Build Infrastructure Table and the Damage Loss Table. From your logfile, it looks like there’s a value of
1 in the “Type” column of the Built Infrastructure Table that doesn’t have a corresponding value of
1 in the “Type” column of the Damage Loss Table.
Could you make sure that each value in the “Type” column of the Build Infrastructure Table is represented in the “Type” column of the Damage Loss table? If everything is already lining up, could you share those two tables here so we can take a closer look?
Thank you for the thought. I’ve attached my damage table and built infrastructure table. As far as I can tell, the types match up, but I still appreciate the second look.
Damage_Table2.csv (46 Bytes)
BuildingTable1.csv (1.6 MB)
Hi @paxton.lajoie ,
I have a hunch about what’s going on, but I’d like to test it out to make sure. Would it be possible to send me your inputs (specifically, your AOI and your Build Infrastructure Vector) so I can make sure this is fixed properly? Feel free to link to a shared folder with files, or else send them to my email address:
Thank you, here’s a link to that data: DEVELOP InVEST Files - Google Drive
Thanks so much for providing your inputs, @paxton.lajoie ! I believe this has been fixed now, but could you try running this development build and verify that everything is working OK on your computer?
Wow, that seems to have solved it! Thank you so much, I just had a successful run with those inputs.
OK great to hear! This fix will be included in the next release of InVEST.