py-ecomplexity
py-ecomplexity copied to clipboard
RPOP - Handling zeros in diversity / ubiquity
Diversity / ubiquity is often 0 when calculating with RPOP. Need better handling of these cases, since ECI / PCI show up as NaN for all countries in these cases (the eigenvectors are returned as NaN's).
Just ran into this issue when testing rpop. How can I work around it?
Simple workaround for now - run ecomplexity once, then filter for diversity and ubiquity > 0 and then run again. Merge the dropped countries and products back in so you don't lose any data.