I have a CSV of GDP figures, both nominal and PPP. The structure is Country,Nominal,PPP.
Example:
Islamic Republic of Afghanistan,560.673,998.466
Albania,"3,616.10","7,381.00"
Algeria,"4,477.80","7,103.61"
Users enter in a nominal GDP value. What I’m trying to figure out is how to use that value to find the nearest nominal GDP value in an array constructed from the CSV file. Once I find the nominal value, I’m wanting to print the country and the PPP value.
I haven’t scripted anything in quite some time, so I can’t get my head around how to go about doing this.
1 Answer