Skip to content

Instantly share code, notes, and snippets.

@mrcnc
Last active November 24, 2019 01:42
Show Gist options
  • Save mrcnc/bab05e8e607bc9ef228bdb73c7eb42d8 to your computer and use it in GitHub Desktop.
Save mrcnc/bab05e8e607bc9ef228bdb73c7eb42d8 to your computer and use it in GitHub Desktop.
{
"01": "Acadia",
"02": "Allen",
"03": "Ascension",
"04": "Assumption",
"05": "Avoyelles",
"06": "Beauregard",
"07": "Bienville",
"08": "Bossier",
"09": "Caddo",
"10": "Calcasieu",
"11": "Caldwell",
"12": "Cameron",
"13": "Catahoula",
"14": "Claiborne",
"15": "Concordia",
"16": "DeSoto",
"17": "East Baton Rouge",
"18": "East Carroll",
"19": "East Feliciana",
"20": "Evangeline",
"21": "Franklin",
"22": "Grant",
"23": "Iberia",
"24": "Iberville",
"25": "Jackson",
"26": "Jefferson",
"27": "Jefferson Davis",
"28": "Lafayette",
"29": "Lafourche",
"30": "LaSalle",
"31": "Lincoln",
"32": "Livingston",
"33": "Madison",
"34": "Morehouse",
"35": "Natchitoches",
"36": "Orleans",
"37": "Ouachita",
"38": "Plaquemines",
"39": "Pointe Coupee",
"40": "Rapides",
"41": "Red River",
"42": "Richland",
"43": "Sabine",
"44": "St. Bernard",
"45": "St. Charles",
"46": "St. Helena",
"47": "St. James",
"48": "St. John",
"49": "St. Landry",
"50": "St. Martin",
"51": "St. Mary",
"52": "St. Tammany",
"53": "Tangipahoa",
"54": "Tensas",
"55": "Terrebonne",
"56": "Union",
"57": "Vermilion",
"58": "Vernon",
"59": "Washington",
"60": "Webster",
"61": "West Baton Rouge",
"62": "West Carroll",
"63": "West Feliciana",
"64": "Winn"
}
@mrcnc
Copy link
Author

mrcnc commented Nov 24, 2019

copied the text from here into a file

then used vim + regex to wrangle it

# remove the abbreviated version
:%s/[A-Z]\{4\}//

# surround 2 digit numbers with double quotes
:%s/\d\{2\}/"\0":/

# surround parish names with double quotes
:%s/[A-Z]\{1\}[A-Za-z. ]\+[A-Za-z]/"\0",/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment