better match for econ param parse to dict (#2123)

* better match econ param parse to dict

* Update econdb_model.py

* fix str assignment error

Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
This commit is contained in:
MOMINCKS
2022-07-23 08:16:35 +08:00
committed by GitHub
parent b60101ca0e
commit 8c3145fcb4

View File

@@ -498,6 +498,8 @@ def get_macro_data(
The units of the macro data, e.g. 'Bbl/day" for oil.
"""
country = country.replace(" ", "_")
country = country[0].upper() + country[1:]
parameter = parameter.upper()
if country not in COUNTRY_CODES:
console.print(f"No data available for the country {country}.")