-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
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.
hkdatasets/.dev/script/new-traffic-data_20210508_accidents.R
Lines 119 to 134 in 9d00910
# 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
hkdatasets/.dev/script/new-traffic-data_20210508_accidents.R
Lines 135 to 146 in 9d00910
# 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
Labels
No labels