Datawheel / canon-stats

Reusable statistical and complexity calculations using NodeJS and Express
1 stars 1 forks source link

[pci api] api doesnt load on dev, it loads elsewhere #31

Closed AlanORB closed 3 years ago

AlanORB commented 3 years ago

https://oec.world/api/stats/pci?cube=trade_i_baci_a_92&rca=Exporter+Country,Section,Trade+Value&alias=Country,Section&Year=2016,2017,2018&ranking=true&threshold=Country:3000000000,Section:1500000000,Population:1000000&YearPopulation=2018

returns you expected output

https://dev.oec.world/api/stats/pci?cube=trade_i_baci_a_92&rca=Exporter+Country,Section,Trade+Value&alias=Country,Section&Year=2016,2017,2018&ranking=true&threshold=Country:3000000000,Section:1500000000,Population:1000000&YearPopulation=2018

doesnt loads

mcperez2 commented 3 years ago

The complexity_endpoint.py had a bad-referenced function on line #223. We changed the line from pop_params = convert_dict(convert_dict, "|") to pop_params = convert_dict(env_params, "|"). The updated canon-stats version (0.7.1) is loaded in dev.oec.