<commit_before>import pandas as pd
import matplotlib.pyplot as plt

df = pd.read_csv('~/thousandsmiles/analysis/08-2021/tscharts-output/register_register-final.txt', encoding="latin-1", sep="__")

# drop the first 11 rows, these were earlier clinics with restarts and
# not worth displaying

N = 11
df = df.iloc[N: , :]

clinicdf = pd.read_csv('~/thousandsmiles/analysis/08-2021/tscharts-output/clinic_clinic-final.txt', encoding="latin-1", sep="__")

clinicdf = clinicdf.iloc[N: , :]

df['clinic_id'] = df['clinic_id'].map(clinicdf.set_index('id')['start'])

df['clinic_id'].value_counts().sort_index().plot(kind='bar')
plt.title("Registrations per Clinic")
plt.xlabel("Clinic ID")
plt.ylabel("Count")
plt.show()
<commit_msg>rotate registration plat x axis to display sanely<commit_after>import pandas as pd
import matplotlib.pyplot as plt

df = pd.read_csv('~/thousandsmiles/analysis/08-2021/tscharts-output/register_register-final.txt', encoding="latin-1", sep="__")

# drop the first 11 rows, these were earlier clinics with restarts and
# not worth displaying

N = 11
df = df.iloc[N: , :]

clinicdf = pd.read_csv('~/thousandsmiles/analysis/08-2021/tscharts-output/clinic_clinic-final.txt', encoding="latin-1", sep="__")

clinicdf = clinicdf.iloc[N: , :]

df['clinic_id'] = df['clinic_id'].map(clinicdf.set_index('id')['start'])

df['clinic_id'].value_counts().sort_index().plot(kind='bar', alpha=0.75, rot=0)
plt.title("Registrations per Clinic")
plt.xlabel("Clinic ID")
plt.ylabel("Count")
plt.show()

{'fraction_non_alphanumeric': 0.17186463171864633, 'fraction_numerical': 0.026542800265428004, 'mean_word_length': 6.1469194312796205, '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': '2491327', 'n_tokens_mistral': 622, 'n_tokens_neox': 556, 'n_words': 103}