Skip to content

Instantly share code, notes, and snippets.

@andriilive
Created September 8, 2023 19:36
Show Gist options
  • Save andriilive/69c4a8b2db483222ce312d2f68e52107 to your computer and use it in GitHub Desktop.
Save andriilive/69c4a8b2db483222ce312d2f68e52107 to your computer and use it in GitHub Desktop.
Countries GEO
# Get the ISO 3166-1 alpha-2 codes for the countries
countries=(IT FR CZ DE GB US VN CN AE IN UZ)
# Loop through the countries
for country in "${countries[@]}"
do
# Get the URL for the JSON data
url="https://api.worldbank.org/v2/country/$country?format=json"
# Download the JSON data to a file
curl -o data/$country.json $url
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment