lshillman / generation-ship-calculator

A tool for calculating generation ship feasibility, given several user-defined factors.
https://lshillman.github.io/generation-ship-calculator/
0 stars 0 forks source link

As a developer, I want to implement an autosuggest field for selecting countries, so that my users don't give me unusable data. #5

Open lshillman opened 2 years ago

lshillman commented 2 years ago

The World Bank API we'll be using for getting GDPs requires us to pass two- or three-letter country codes as parameters. We'll need to find an autosuggest widget and fill it with these country values.

Here are the values (I've tested several 3-letter codes with the API and all have worked): https://www.iban.com/country-codes We could either copy this list into our widget or use a countries API like this: https://restcountries.com/v3.1/name/peru

Here's a possible autocomplete library we could use: https://www.sitepoint.com/javascript-autocomplete-widget-awesomplete/

Note: a non-jQuery autocomplete library is "a technology we haven't used before" :D

lshillman commented 2 years ago

The more I research, the more I'm leaning toward a basic