cid-harvard / py-ecomplexity

Python package to compute economic complexity and associated variables
MIT License
63 stars 24 forks source link

RPOP - Handling zeros in diversity / ubiquity #22

Open shreyasgm opened 2 years ago

shreyasgm commented 2 years ago

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).

fedemoscatelli commented 1 year ago

Just ran into this issue when testing rpop. How can I work around it?

shreyasgm commented 1 year ago

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.