plotly.js
Version:
The open source javascript graphing library that powers plotly
66 lines (62 loc) • 1.4 kB
JavaScript
;
// Mapping of lowercase full US state names to two-letter abbreviations
const usaLocationList = {
alabama: 'AL',
alaska: 'AK',
arizona: 'AZ',
arkansas: 'AR',
california: 'CA',
colorado: 'CO',
connecticut: 'CT',
delaware: 'DE',
'district of columbia': 'DC',
florida: 'FL',
georgia: 'GA',
hawaii: 'HI',
idaho: 'ID',
illinois: 'IL',
indiana: 'IN',
iowa: 'IA',
kansas: 'KS',
kentucky: 'KY',
louisiana: 'LA',
maine: 'ME',
maryland: 'MD',
massachusetts: 'MA',
michigan: 'MI',
minnesota: 'MN',
mississippi: 'MS',
missouri: 'MO',
montana: 'MT',
nebraska: 'NE',
nevada: 'NV',
'new hampshire': 'NH',
'new jersey': 'NJ',
'new mexico': 'NM',
'new york': 'NY',
'north carolina': 'NC',
'north dakota': 'ND',
ohio: 'OH',
oklahoma: 'OK',
oregon: 'OR',
pennsylvania: 'PA',
'rhode island': 'RI',
'south carolina': 'SC',
'south dakota': 'SD',
tennessee: 'TN',
texas: 'TX',
utah: 'UT',
vermont: 'VT',
virginia: 'VA',
washington: 'WA',
'washington dc': 'DC',
'washington d.c.': 'DC',
'west virginia': 'WV',
wisconsin: 'WI',
wyoming: 'WY'
};
const usaLocationAbbreviations = new Set(Object.values(usaLocationList));
module.exports = {
usaLocationAbbreviations,
usaLocationList
};