<jupyter_start><jupyter_text>Citi-bike age analysisThis gives a analysis of each station's user age distribution. Target to different user age group, we want to promote different types of information to them so as to custimize information sharing at each the station. Using open data, we record each station's user age and do a simple analysis. We will present each station's maxmum user age, minmum user age, and average user age.<jupyter_code>import csv
ages = []
stations = []
filename = "smaller.csv"
with open(filename, 'r') as csvfile:
    filereader = csv.reader(csvfile,delimiter = ',')
    header = next(filereader)
    for row in filereader:
        stations.append(row[4])
        ages.append(2016 - int(row[13]))
        
        
        
$station_age = dict(zip(stations, ages)) 
print(station_age["Howard St & Centre St"])
for i in stations:
    print(i)
uniquestations = set(stations)
#for stations in uniquestations:



print(station_age)
print("max_age = %d" %(max(ages)))
print("min_age = %d" %(min(ages)))
print("ave_age = %0.1f" %(sum(ages)/len(ages)))<jupyter_output>20
Howard St & Centre St
E 31 St & 3 Ave
10 Ave & W 28 St
Howard St & Centre St
Central Park S & 6 Ave
Kent Ave & N 7 St
Amsterdam Ave & W 73 St
Howard St & Centre St
E 33 St & 2 Ave
{'Kent Ave & N 7 St': 32, 'E 33 St & 2 Ave': 53, 'E 31 St & 3 Ave': 47, 'Central Park S & 6 Ave': 64, 'Amsterdam Ave & W 73 St': 53, '10 Ave & W 28 St': 34, 'Howard St & Centre St': 20}
max_age = 64
min_age = 20
ave_age = 46.2
{'fraction_non_alphanumeric': 0.11481975967957277, 'fraction_numerical': 0.04005340453938585, 'mean_word_length': 3.7436708860759493, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '160824', 'license': 'MIT', 'n_tokens_mistral': 565, 'n_tokens_neox': 500, 'n_words': 205, 'path': 'python_operation/citi-age.ipynb', 'repo_name': 'bubbledoodle/citi-bike', 'size': '1498'}