File:BAC driving risk.svg

Size of this PNG preview of this SVG file: 614 × 461 pixels. Other resolutions: 320 × 240 pixels | 639 × 480 pixels | 1,023 × 768 pixels | 1,280 × 961 pixels | 2,560 × 1,922 pixels.
Original file (SVG file, nominally 614 × 461 pixels, file size: 15 KB)
![]() | This is a file from the Wikimedia Commons. Information from its description page there is shown below. Commons is a freely licensed media file repository. You can help. |
Summary
DescriptionBAC driving risk.svg |
English: Curve describing the increased relative risk for a traffic crash with elevated blood alcohol content. Based on data from Figure 1 / Table 3 of Blomberg, Richard D.; Peck, Raymond C.; Moskowitz, Herbert; Burns, Marcelline; Fiorentino, Dary (August 2009). "The Long Beach/Fort Lauderdale relative risk study". Journal of Safety Research. 40 (4): 285–292. doi:10.1016/j.jsr.2009.07.002. PMID 19778652. |
Date | |
Source | Own work |
Author | Mathnerd314159 |
SVG development InfoField | ![]() This plot was created with Matplotlib. |
Source code InfoField | Python codeimport numpy as np
import matplotlib.pyplot as plt
from numpy.polynomial.polynomial import Polynomial
points = [
(0,1),
(0.01,1.03),
(0.02,1.03),
(0.03,1.06),
(0.04,1.18),
(0.05,1.38),
(0.06,1.63),
(0.07,2.09),
(0.08,2.69),
(0.09,3.54),
(0.1,4.79),
(0.11,6.41),
(0.12,8.9),
(0.13,12.06),
(0.14,16.36),
(0.15,22.1),
(0.16,29.48),
(0.17,39.05),
(0.18,50.99),
(0.19,65.32),
(0.2,81.79),
(0.21,99.78),
(0.22,117.72),
(0.23,134.26),
(0.24,146.9),
(0.25,153.68)]
x = np.array([point[0] for point in points])
y = np.array([point[1] for point in points])
spl = Polynomial.fit(x, y, 16) # highest order without ringing
roots_arr = [0,0.10]
for n in range(1,5):
dspl = spl.deriv(n)
roots = dspl.roots()
for r in roots:
if isinstance(r,complex):
if abs(r.imag) > 0.001:
continue
r = r.real
if not (0.11 < r < 0.25):
continue
r = round(r, 2)
if r == 0.24:
continue
roots_arr.append(r)
roots = np.array(roots_arr)
x_fine = np.linspace(0, 0.25, 1000)
y_fine = spl(x_fine)
# check fit
if False:
y_spl_err = spl(x)-y
plt.plot(x,y_spl_err,'.')
plt.show()
plt.plot(x_fine,y_fine,'-',x,y,'.')
plt.show()
roots_y = spl(roots)
plt.plot(x_fine,y_fine,'-',roots,roots_y,'o')
plt.grid(False)
plt.axis('off')
for i in range(len(roots)):
plt.annotate(f'{roots_y[i]:.0f}x @ {roots[i]:.2f}%', (roots[i], roots_y[i]), textcoords="offset points", xytext=(0,10), ha='right')
plt.savefig('BAC_driving_risk.svg')
plt.show()
|
Licensing
I, the copyright holder of this work, hereby publish it under the following license:
![]() ![]() |
This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication. |
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse |
Captions
Curve describing the increased relative risk for a traffic crash with elevated blood alcohol content.
Items portrayed in this file
depicts
some value
19 July 2024
image/svg+xml
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 04:58, 20 July 2024 | ![]() | 614 × 461 (15 KB) | wikimediacommons>Mathnerd314159 | Uploaded own work with UploadWizard |
File usage
The following page uses this file:
Metadata
This file contains additional information, probably added from the digital camera or scanner used to create or digitize it.
If the file has been modified from its original state, some details may not fully reflect the modified file.
Width | 460.8pt |
---|---|
Height | 345.6pt |
Retrieved from "https://enwiki.freddythechick.net/wiki/File:BAC_driving_risk.svg"