ladybug-tools / spider-2020

Your 2020 3D happy place for online browsing of building data files
http://ladybug.tools/spider-2020/
MIT License
4 stars 1 forks source link

COVID-19 Statistic: Problem with South Korea #3

Closed paulmasson closed 4 years ago

paulmasson commented 4 years ago

@theo-armour the country name is given as "Korea, South" in double quotes with a comma included. You can't just split on commas without massaging the data first.

theo-armour commented 4 years ago

@paulmasson

Good catch! I had seen the faulty output and wondered why

theo-armour commented 4 years ago

@paulmasson

not very scientific, but seems to work:

response = response.replace( /Korea,/, "Korea" ).replace( /Virgin Islands,/, "Virgin Islands");

paulmasson commented 4 years ago

@theo-armour please replace Korea, South with South Korea for legibility. I'd do a PR for this but I know from past collaboration that you'll likely overwrite my changes.