<jupyter_start><jupyter_text>Question 2.1<jupyter_code>if (html_str):
    json_data = json.loads(html_str) # convert the string into json
    print (json_data[0])
    max_p=0
    max_c =''
    for v1,name,state,county in json_data[1:]:
        if max_p < int(v1):
            max_p = int(v1)
            max_c = name
    print(max_p, max_c)<jupyter_output>['B01001_001E', 'NAME', 'state', 'county']
1132887 Fairfax County, Virginia<jupyter_text>Question 2.2<jupyter_code>url_str = 'https://api.census.gov/data/2016/acs/acs5?get=B01001_002E,NAME&for=county:*&in=state:51&key='+census_api_key
print(url_str)
response = request.urlopen(url_str)

html_str = response.read().decode("utf-8")
if (html_str):
    json_data = json.loads(html_str)
    print (json_data[0])
    max_m=0
    max_c =''
    for v1,name,state,county in json_data[1:]:
        if max_m < int(v1):
            max_m = int(v1)
            max_c = name
    print(max_m, max_c)<jupyter_output>['B01001_002E', 'NAME', 'state', 'county']
560803 Fairfax County, Virginia<jupyter_text>Question 2.3<jupyter_code>url_str = 'https://api.census.gov/data/2016/acs/acs5?get=B01001_001E,B01001_002E,NAME&for=county:*&in=state:51&key='+census_api_key
print(url_str)

response = request.urlopen(url_str)

html_str = response.read().decode("utf-8")
if (html_str):
    json_data = json.loads(html_str)
    print (json_data[0])
    max_p= 0
    max_c = ''
    for v1,v2,name,state,county in json_data[1:]:
        if max_p< int(v2)/int(v1):
            max_p = int(v2)/int(v1)
            max_c = name
    print(max_p, max_c)<jupyter_output>['B01001_001E', 'B01001_002E', 'NAME', 'state', 'county']
0.6575470894059491 Sussex County, Virginia
{'fraction_non_alphanumeric': 0.15343601895734596, 'fraction_numerical': 0.0764218009478673, 'mean_word_length': 4.087349397590361, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 10, 'https://': 2, '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}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '327289', 'license': 'MIT', 'n_tokens_mistral': 779, 'n_tokens_neox': 711, 'n_words': 106, 'path': 'Lab 5.ipynb', 'repo_name': 'turnerfa/IA-241', 'size': '1688'}