Skip to content

Commit

Permalink
add sample size
Browse files Browse the repository at this point in the history
  • Loading branch information
Nate-Wessel committed Apr 24, 2024
1 parent 367e389 commit f360fd3
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions backend/app/get_travel_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,25 +88,28 @@ def get_travel_time(start_node, end_node, start_time, end_time, start_date, end_
'seconds': tt_seconds,
'minutes': tt_seconds / 60,
'clock': secs2clock(tt_seconds),
'confidence_intervals': {
'p=0.9': {
'lower': {
'seconds': p90lower,
'clock': secs2clock(p90lower)
'confidence': {
'sample': len(sample),
'intervals': {
'p=0.9': {
'lower': {
'seconds': p90lower,
'clock': secs2clock(p90lower)
},
'upper': {
'seconds': p90upper,
'clock': secs2clock(p90upper)
}
},
'upper': {
'seconds': p90upper,
'clock': secs2clock(p90upper)
}
},
'p=0.95': {
'lower': {
'seconds': p95lower,
'clock': secs2clock(p95lower)
},
'upper': {
'seconds': p95upper,
'clock': secs2clock(p95upper)
'p=0.95': {
'lower': {
'seconds': p95lower,
'clock': secs2clock(p95lower)
},
'upper': {
'seconds': p95upper,
'clock': secs2clock(p95upper)
}
}
}
}
Expand Down

0 comments on commit f360fd3

Please sign in to comment.