<jupyter_start><jupyter_text>Count of injured: per injury severity<jupyter_code>print(involved_hebrew['injury_severity'].isnull().sum())
print(involved_hebrew['injury_severity'].value_counts())
sns.countplot(x='injury_severity', data=involved_hebrew)
# Count of injured per injury severity
total_accidents = involved_hebrew.shape[0]
injury_severity_percentage = involved_hebrew.groupby('injury_severity')['accident_id'].count() / total_accidents
print(injury_severity_percentage)
sns.barplot(x=injury_severity_percentage.index, y=injury_severity_percentage)
# Count of injured per injury severity normalized<jupyter_output>injury_severity
0    0.375925
1    0.002293
2    0.012532
3    0.609250
Name: accident_id, dtype: float64<jupyter_text>Count of injured: inter/in-city<jupyter_code>markers_hebrew = pd.read_csv('../data/views_2019/views_2019/markers_hebrew.csv')
markers_hebrew.head().T
markers_hebrew['road_type'].head()
# 1,2 -> In-city, 3,4 -> Inter-city
# roads are only for inter-city data records 
# while streets are only for in-city
def inter_or_in_city(road_type):
    # 0 is in-city, 1 is inter-city
    if road_type == 1 or road_type == 2:
        return 0
    else:
        return 1

markers_hebrew['inter/in-city'] = markers_hebrew['road_type'].apply(inter_or_in_city)
markers_hebrew['inter/in-city'].head()
sns.countplot(x='inter/in-city', data=markers_hebrew)
# Count of injured per inter/in-city
total_accidents = markers_hebrew.shape[0]
distr_percentage = markers_hebrew.groupby('inter/in-city')['provider_and_id'].count() / total_accidents
print(distr_percentage)
sns.barplot(x=distr_percentage.index, y=distr_percentage)
# Count of injured per inter/in-city normalized<jupyter_output>inter/in-city
0    0.751402
1    0.248598
Name: provider_and_id, dtype: float64<jupyter_text>Count of injured: per geo resolution/radius<jupyter_code>news_flash = pd.read_csv('../data/news_flash.csv')
news_flash.head().T
def plot_based_on_radius(accident_df, coordinates):
    # Accepts input (lat, lng) to be used as the center of the radius<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11634615384615385, 'fraction_numerical': 0.03461538461538462, 'mean_word_length': 6.379432624113475, 'pattern_counts': {'":': 0, '<': 11, '<?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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '304209', 'license': 'MIT', 'n_tokens_mistral': 819, 'n_tokens_neox': 744, 'n_words': 139, 'path': 'tasks/19/Task-Count of injured.ipynb', 'repo_name': 'dinasv/anyway-data-science', 'size': '2080'}