-
Notifications
You must be signed in to change notification settings - Fork 244
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
EURO DEMO road 20 VS all roads - motorcycle accidents type #1558
Comments
Amazing! It will be easy I guess to duplicate fir other vehicles types in the future. |
@yuvalbar23 @MichalOren great work! This really looks awesome! I suggest creating an issue using the new template (see example here) Also I believe you'll need to elaborate in the new issue regarding the logic of choosing the accident types to be presented (perhaps top 5 in the current road - in our case road 20) Also - what do you think regarding vehicle type? Should we create this widget for motorcycle accidents only, or for all accidents without filtering motorcycle accidents? @galraij @yuvalbar23 @MichalOren any thoughts? |
HI
|
Great @MichalOren ! |
import pandas as pd #Loading data #Initialize parameters #Query vc_road = df_road.drop_duplicates('provider_and_id')['accident_type_hebrew'].value_counts(normalize=True)[:5] df_all = inv_mar[(inv_mar['vehicle_vehicle_type'].isin(vehicle_types))& vc_all = df_all['accident_type_hebrew'].value_counts(normalize=True) final = vc_road.join(vc_all.set_index('accident_type_hebrew'),on='accident_type_hebrew',how='inner') |
@MichalOren @yuvalbar23 can we close this one? Since we have #1606 ? |
yes we can close it |
JSON:

{
"name": "highway_motor_accident_type_road20_vs_all_roads",
"data": {
"items":
[
{
"accident_type_hebrew": "התנגשות צד בצד",
"Road 20": 0.3889334403,
"Other Roads": 0.2008490427
},
{
"accident_type_hebrew": "התנגשות חזית באחור",
"Road 20": 0.2518043304,
"Other Roads": 0.1324212429
},
{
"accident_type_hebrew": "החלקה",
"Road 20": 0.2197273456,
"Other Roads": 0.3053821743
},
{
"accident_type_hebrew": "התנגשות חזית בצד",
"Road 20": 0.0769847634,
"Other Roads": 0.1970661791
},
{
"accident_type_hebrew": "התנגשות עם עצם דומם",
"Road 20": 0.0160384924,
"Other Roads": 0.0190193977
}
]
}
}
The text was updated successfully, but these errors were encountered: