Skip to content

Instantly share code, notes, and snippets.

View j8jacobs's full-sized avatar

Julian Jacobs j8jacobs

View GitHub Profile
@j8jacobs
j8jacobs / get_iso_names_from_wiki.py
Last active August 24, 2022 02:36
Generate ISO Code CSV from Wiki link
# original link found here: https://gis.stackexchange.com/questions/1047/seeking-full-list-of-iso-alpha-2-and-iso-alpha-3-country-codes
import csv
import urllib.request as urllib2
from bs4 import BeautifulSoup
import sys
# helper function to get text and anchor tag text
# this removes the new line characters, connects all the elements of the column
def format_text(array):
return ''.join(array).strip()