cid-harvard / py-ecomplexity

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

Possible mistake in the code of ecomplexity.py #23

Closed tomleung1996 closed 2 years ago

tomleung1996 commented 2 years ago

Hi,

I found a possible mistake in line #209 of ecomplexity.py. According to the book The atlas of economic complexity, both ECI and PCI should be z-score normalized. While the code normalizes ECI correctly, resulting in mean=0 and std=1, the PCI does not.

In line #209, PCI is normalized using the mean and standard deviation of ECI. I thought it might be a mistake? Though it does not harm the rankings.

Thank you!

tomleung1996 commented 2 years ago

Also, I am confused about line #90-93, which is suggested to "Adjust sign of ECI and PCI so it makes sense, as per book". I could not find this procedure in The atlas of economic complexity.

Could you help me with that?

shreyasgm commented 2 years ago

Refer #19