<jupyter_start><jupyter_text>Gas Prices per Week<jupyter_code>week_grouper = pd.Grouper(freq='W-MON')
df_week_summary = compute_quantiles(metric, week_grouper)
fig, ax = plot_gas_prices(df_week_summary[gas_type], title_post_fix='over Time')
# format the ticks
ax.xaxis.set_major_locator(mdates.MonthLocator())
ax.xaxis.set_major_formatter(mdates.DateFormatter('%B'))
ax.xaxis.set_minor_locator(mdates.DayLocator(interval=7));

#plt.savefig(f'{metric}.png', dpi=300)<jupyter_output>argmin: 2020-04-27 00:00:00+00:00
argmax: 2020-04-06 00:00:00+00:00<jupyter_text>Gas Prices per Weekday<jupyter_code>weekday_map = dict(enumerate(calendar.day_name))
df_weekday_summary = compute_quantiles(metric, metric.index.dayofweek)
fig, ax = plot_gas_prices(
    df_weekday_summary[gas_type],
    index=df_weekday_summary.index.map(weekday_map),
    title_post_fix='per Weekday'
)
# format the ticks
plt.xticks(rotation=45);
metric_without_weekly_trend = adjust_trend(metric, week_grouper)
df_weekday_summary = compute_quantiles(metric_without_weekly_trend, metric_without_weekly_trend.index.dayofweek)
fig, ax = plot_gas_prices(
    df_weekday_summary[gas_type],
    index=df_weekday_summary.index.map(weekday_map),
    title_post_fix='per Weekday (Week Trend Adjusted)'
)
# format the ticks
plt.xticks(rotation=45);<jupyter_output>argmin: 2
argmax: 0<jupyter_text>Gas Prices per Hour<jupyter_code>df_hour_summary = compute_quantiles(metric, metric.index.hour)

fig, ax = plot_gas_prices(df_hour_summary[gas_type], title_post_fix='per Hour')
ax.set_xlabel('Hour');
#plt.savefig(f'{metric}.png', dpi=300)
metric_without_weekly_trend = adjust_trend(metric, week_grouper)
df_hour_summary = compute_quantiles(metric_without_weekly_trend, metric_without_weekly_trend.index.hour)

fig, ax = plot_gas_prices(df_hour_summary[gas_type], title_post_fix='per Hour (Week Trend Adjusted)')
ax.set_xlabel('Hour');
#plt.savefig(f'{metric}.png', dpi=300)
metric_without_weekly_and_hourly_trend = adjust_trend(metric_without_weekly_trend, metric_without_weekly_trend.index.dayofweek)
df_hour_summary = compute_quantiles(metric_without_weekly_and_hourly_trend, metric_without_weekly_and_hourly_trend.index.hour)

fig, ax = plot_gas_prices(df_hour_summary[gas_type], title_post_fix='per Hour (Week/Weekday Trend Adjusted)')
ax.set_xlabel('Hour');
#plt.savefig(f'{metric}.png', dpi=300)<jupyter_output>argmin: 20
argmax: 5<jupyter_text>Gas Prices per Hour per Weekday<jupyter_code>df_hour_weekday_summary = compute_quantiles(metric, metric.index.weekday*24+metric.index.hour)

fig, ax = plot_gas_prices(df_hour_weekday_summary[gas_type], title_post_fix='per Hour per Weekday')
ax.set_xlabel('Weekday*24+Hour');
#plt.savefig(f'{metric}.png', dpi=300)
x = 67
print(x // 24) # day
print(x % 24) # hour
metric_without_weekly_trend = adjust_trend(metric, week_grouper)

df_hour_weekday_summary = compute_quantiles(metric_without_weekly_trend, metric_without_weekly_trend.index.weekday*24+metric_without_weekly_trend.index.hour)

fig, ax = plot_gas_prices(df_hour_weekday_summary[gas_type], title_post_fix='per Hour per Weekday (Week Trend Adjusted)')
ax.set_xlabel('Weekday*24+Hour');
#plt.savefig(f'{metric}.png', dpi=300)
x = 66
print(x // 24) # day
print(x % 24) # hour<jupyter_output>2
18
{'fraction_non_alphanumeric': 0.11985248924400738, 'fraction_numerical': 0.026736324523663185, 'mean_word_length': 9.778145695364238, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '438889', 'license': 'MIT', 'n_tokens_mistral': 1370, 'n_tokens_neox': 1280, 'n_words': 170, 'path': 'analysis/gas_trend_analysis.ipynb', 'repo_name': 'BigCrunsh/home-monitoring', 'size': '3254'}