Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plotting option for shock test #46

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/website.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ def print_header(msg, sym='*'):

stats_df['Mean Speed [km/h]'] = stats_df['Mean Speed [m/s]']*3.6

# Filter out "shock" trials for figure generation
shock_df = stats_df[stats_df['Road Surface'] == 'Shock']
stats_df = stats_df[stats_df['Road Surface'] != 'Shock']

print(shock_df)
print_header("Grand Statistics Data Frame")
print(stats_df)

Expand Down Expand Up @@ -499,6 +504,8 @@ def print_header(msg, sym='*'):

plt.close('all')

complete_stats_df = pd.concat([stats_df, shock_df], ignore_index=True)

html_source = INDEX.format(
date=datetime.datetime.today(),
githash=githash,
Expand All @@ -513,7 +520,7 @@ def print_header(msg, sym='*'):
trial_html='\n '.join(html_data['trial_html']),
srot_html='\n '.join(html_data['srot_html']),
sync_html='\n '.join(html_data['sync_html']),
trial_table=stats_df.to_html(),
trial_table=complete_stats_df.to_html(),
)
with open(os.path.join(PATH_TO_REPO, 'index.html'), 'w') as f:
f.write(html_source)