Skip to content

Second_str not transformed in current hk_accidents dataset #17

@KHwong12

Description

@KHwong12

In the current script used for data cleaning, Second_str (the column storing secondary street name, available when the collision happens at/close to street junctions) is not yet transformed.

# labelling ----------------------------------------------------------------
hk_accidents_new_cleaned_labelled <-
hk_accidents_new_cleaned_unlabelled %>%
mutate(
Street_Name = look_up(Street_nam, dictionary = t_A1_street_name),
Overtaking = look_up(Overtaking, dictionary = t_Overtaking),
Within_70m = look_up(Within_70m, dictionary = t_Within_70m),
Road_Type = look_up(Road_type_, dictionary = t_Road_type_),
Cycle_Type = look_up(Pedal_cycl, dictionary = t_Ped_Cycle),
Type_of_Collision_v2 = look_up(TypeOfCo_P, dictionary = t_Collision_Type),
Structure_Type = look_up(Struc_Type, dictionary = t_Struc_Type),
Road_Class_L = look_up(RD_Class_L, dictionary = t_Road_class_L),
Road_Classification_v2 = look_up(Road_class, dictionary = t_Road_class)
) %>%

But dropped afterwards

# Remove old names ------------------------------------------------------
select(
-Street_nam,
-Second_str,
-Road_type_,
-Pedal_cycl,
-TypeOfCo_P,
-Struc_Type,
-RD_Class_L,
-Road_class,
-Overtaking # not used
) %>%

Should we add sth like below and add it as a new column in the next release?

mutate(
     Street_Name_2nd = look_up(Second_str, dictionary = t_A1_street_name)
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions