<commit_before>import os
import json
import codecs
import datetime
import pytz

CUR_DIR = os.path.dirname(os.path.realpath(__file__))

regions = {
    'Northeast': ['ME','NH','VT','MA','RI','CT'],
    'Mid-Atlantic': ['NY','PA','MD','DE','DC','NJ','WV','VA'],
    'Southeast': ['NC','SC','TN','AR','LA','MS','FL','GA','AL'],
    'Midwest': ['WI','MI','IL','IN','OH','MO','ND','SD','NE','KS','MN','IA','KY'],
    'Southwest': ['OK','TX','NM','AZ','UT','CO'],
    'West': ['CA','NV'],
    'Northwest': ['WY','MT','ID','OR','WA'],
    'Pacific': ['AK','HI'],
}

states_dict = {}
for region in regions.keys():
    for state in regions[region]:
        if states_dict.has_key(state):
            print "here", state
        states_dict[state] = region

json_filepath = os.path.join(CUR_DIR, 'output/alerts.json')
f = codecs.open(json_filepath, 'r', 'utf-8')
contents = f.read()
f.close()
alert_data = json.loads(contents)

alerts = alert_data['alerts']

severities = {}
states = {}
events = {}
regions = {}

for alert in alerts:
    
    severity = alert['severity']
    event = alert['event']

    for state in set([c['state'] for c in alert['counties']]):
        if state in states.keys():<commit_msg>Added missing states to regions.<commit_after>import os
import json
import codecs
import datetime
import pytz

CUR_DIR = os.path.dirname(os.path.realpath(__file__))

regions = {
    'Northeast': ['ME','NH','VT','MA','RI','CT'],
    'Mid-Atlantic': ['NY','PA','MD','DE','DC','NJ','WV','VA'],
    'Southeast': ['NC','SC','TN','AR','LA','MS','FL','GA','AL','PR','VI'],
    'Midwest': ['WI','MI','IL','IN','OH','MO','ND','SD','NE','KS','MN','IA','KY'],
    'Southwest': ['OK','TX','NM','AZ','UT','CO'],
    'West': ['CA','NV'],
    'Northwest': ['WY','MT','ID','OR','WA'],
    'Pacific': ['AK','HI','AS','GU'],
}

states_dict = {}
for region in regions.keys():
    for state in regions[region]:
        if states_dict.has_key(state):
            print "here", state
        states_dict[state] = region

json_filepath = os.path.join(CUR_DIR, 'output/alerts.json')
f = codecs.open(json_filepath, 'r', 'utf-8')
contents = f.read()
f.close()
alert_data = json.loads(contents)

alerts = alert_data['alerts']

severities = {}
states = {}
events = {}
regions = {}

for alert in alerts:
    
    severity = alert['severity']
    event = alert['event']

    for state in set([c['state'] for c in alert['counties']]):
        if state in states.keys():
{'fraction_non_alphanumeric': 0.25646286417726716, 'fraction_numerical': 0.0008206811653672548, 'mean_word_length': 4.515837104072398, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1133495', 'n_tokens_mistral': 903, 'n_tokens_neox': 864, 'n_words': 169}