<jupyter_start><jupyter_text>Land Zoning By <NAME><jupyter_code>import pandas as pd
import matplotlib.pyplot as plt
zone = pd.read_csv("./data/land-use-zoning.csv", sep=",")
zone.head(10)<jupyter_output><empty_output><jupyter_text>I start by opening the file and viewing the first 10 rows to check everything is working.<jupyter_code>zoning_score = dict()

for index,row in zone.iterrows():
    name = row[0]
    average = 0.0
    for i in range(4,8):
        average += float(row[i][:-1])
    average = average/4
    zoning_score[name] = average
    
zoning_score<jupyter_output><empty_output><jupyter_text>I then generate a score by averaging percent area of residential, industrial, commercial, and institutional area.   This is based on the assumption that the optimal neighborhood would have a balenced array of zoning.<jupyter_code>plt.bar(range(len(zoning_score)), list(zoning_score.values()), align='edge', width = 1)
plt.xticks(range(len(zoning_score)), list(zoning_score.keys()),rotation = 90)
plt.show()<jupyter_output><empty_output><jupyter_text>As you can see we may have a few too many data points. So lets get rid of the useless data<jupyter_code>score_av = 0.0
for x in zoning_score:
    score_av+=zoning_score[x]
score_av = score_av/len(zoning_score)
remove = []
for x in zoning_score:
    if zoning_score[x]<score_av:
        remove.append(x)
for x in remove:
    zoning_score.pop(x)
zoning_score
plt.bar(range(len(zoning_score)), list(zoning_score.values()), align='edge', width = 1)
plt.xticks(range(len(zoning_score)), list(zoning_score.keys()),rotation = 90)
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12091301665638494, 'fraction_numerical': 0.011721159777914868, 'mean_word_length': 5.647540983606557, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 18, '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}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '219198', 'license': 'MIT', 'n_tokens_mistral': 579, 'n_tokens_neox': 555, 'n_words': 142, 'path': 'landZoning.ipynb', 'repo_name': 'dta12/BestNeighborhood', 'size': '1628'}