<jupyter_start><jupyter_text>This notebook is a first exploration of querying the sqlite data and plotting it.<jupyter_code>import pandas as pd
import sqlite3
import matplotlib.pyplot as plt
%matplotlib inline
datadirectory = "/Users/peter/repos/esc/data/P18"
databasefile = datadirectory + "/emrecdem.db"
q1 = """ SELECT videofeatures.time, audiofeatures.pitch, videofeatures.*
FROM videofeatures
INNER JOIN audiofeatures USING(id, time, participant_id, experiment_id)
WHERE pitch < 2000;"""

conn = sqlite3.connect(databasefile)
df = pd.read_sql_query(q1, conn)
featurenames = df.columns.values
print(df)
ncols = 3
nrows = 6

fig, ax = plt.subplots(nrows, ncols, sharex='col', sharey='row')
fig.set_size_inches(14, 2*nrows)
cnt = 0
for i in range(nrows):
    for j in range(ncols):
        
        yvar = featurenames[cnt+6]
        cnt = cnt + 1
        df_low = df[df[yvar].notnull() & (df['pitch'] < 300)]
        df_high = df[df[yvar].notnull() & (df['pitch'] >= 300)]
        ax[i, j].boxplot([df_low[yvar],df_high[yvar]])
        ax[i, j].set(xlabel='pitch', ylabel=yvar)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13783783783783785, 'fraction_numerical': 0.021621621621621623, 'mean_word_length': 4.472906403940887, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 6, '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': '418131', 'license': 'Apache-2.0', 'n_tokens_mistral': 437, 'n_tokens_neox': 403, 'n_words': 95, 'path': 'notebooks/query_examples.ipynb', 'repo_name': 'emrecdem/emrecdem-framework', 'size': '1110'}