Hong-Kong-Districts-Info / hktrafficcollisions

Shiny app dashboard of HK traffic collisions that result in injury. | 香港車禍傷亡資料庫:利用互動地圖和儀表版,將香港車禍位置和相關數據可視化。
Other
8 stars 2 forks source link

Fix: correct variables of 2020 and 2021 new data. #115

Closed KHwong12 closed 10 months ago

KHwong12 commented 10 months ago

Summary

This branch corrects variables (column names and values) of 2020 and 2021 new data.

Changes

The changes made in this PR are:

  1. Change the "SSPO" value in the district column of 2020 and 2021 data to "SSP". This keeps the district abbr in line with the original one.
  2. Treat observations with easting and northing values of 800000 as NA values instead of valid spatial location. In raw data, 800000 refers to missing values.
  3. Change the "collision_type" column variable in the pedestrian district dashboard to "collision_type_with_cycle". This replacement is missed in #113.

Check


Note

Sequel for the leftover steps that should be completed in #113

KHwong12 commented 10 months ago

Code used to correct and clean data available in https://gist.github.com/KHwong12/4e5d7e628ed8888cabe9cf511af323a7