Skip to content
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

Driver IMD scores not labelled #92

Closed
PublicHealthDataGeek opened this issue Mar 12, 2019 · 2 comments
Closed

Driver IMD scores not labelled #92

PublicHealthDataGeek opened this issue Mar 12, 2019 · 2 comments
Assignees

Comments

@PublicHealthDataGeek
Copy link

@PublicHealthDataGeek PublicHealthDataGeek commented Mar 12, 2019

library(stats19)
#> Data provided under OGL v3.0. Cite the source and link to:
#> www.nationalarchives.gov.uk/doc/open-government-licence/version/3/
    
    casualties = get_stats19(year = 2017, type = "cas", ask = FALSE)
#> Files identified: dftRoadSafetyData_Casualties_2017.zip
#>    http://data.dft.gov.uk.s3.amazonaws.com/road-accidents-safety-data/dftRoadSafetyData_Casualties_2017.zip
#> Attempt downloading from:
#> Data saved at /var/folders/1r/vlxqbrms055dqt5cpxkrn13m0000gn/T//RtmpChjy74/dftRoadSafetyData_Casualties_2017/Cas.csv
    vehicles = get_stats19(year = 2017, type = "veh", ask = FALSE)
#> Files identified: dftRoadSafetyData_Vehicles_2017.zip
#>    http://data.dft.gov.uk.s3.amazonaws.com/road-accidents-safety-data/dftRoadSafetyData_Vehicles_2017.zip
#> Attempt downloading from:
#> Data saved at /var/folders/1r/vlxqbrms055dqt5cpxkrn13m0000gn/T//RtmpChjy74/dftRoadSafetyData_Vehicles_2017/Veh.csv
    
    unique(casualties$casualty_imd_decile)
#>  [1] "More deprived 10-20%"         "Data missing or out of range"
#>  [3] "More deprived 40-50%"         "Less deprived 10-20%"        
#>  [5] "More deprived 20-30%"         "More deprived 30-40%"        
#>  [7] "Less deprived 40-50%"         "Most deprived 10%"           
#>  [9] "Least deprived 10%"           "Less deprived 30-40%"        
#> [11] "Less deprived 20-30%"
    unique(vehicles$driver_imd_decile)
#>  [1] -1  9  2  5  4  3  6  1  8  7 10

Created on 2019-03-12 by the reprex package (v0.2.1)

@Robinlovelace Robinlovelace self-assigned this Mar 13, 2019
@Robinlovelace
Copy link
Member

@Robinlovelace Robinlovelace commented Mar 13, 2019

Thanks for reporting this @PublicHealthDataGeek - will aim to look at this next week.

@Robinlovelace
Copy link
Member

@Robinlovelace Robinlovelace commented Apr 2, 2019

Heads-up @PublicHealthDataGeek I think I've fixed it - result on locally installed version. Please test this works after you've installed the latest dev version:

library(stats19)
#> Data provided under OGL v3.0. Cite the source and link to:
#> www.nationalarchives.gov.uk/doc/open-government-licence/version/3/
casualties = get_stats19(year = 2017, type = "cas", ask = FALSE)
#> Files identified: dftRoadSafetyData_Casualties_2017.zip
#>    http://data.dft.gov.uk.s3.amazonaws.com/road-accidents-safety-data/dftRoadSafetyData_Casualties_2017.zip
#> Attempt downloading from:
#> Data saved at /tmp/RtmppUpBjB/dftRoadSafetyData_Casualties_2017/Cas.csv
vehicles = get_stats19(year = 2017, type = "veh", ask = FALSE)
#> Files identified: dftRoadSafetyData_Vehicles_2017.zip
#>    http://data.dft.gov.uk.s3.amazonaws.com/road-accidents-safety-data/dftRoadSafetyData_Vehicles_2017.zip
#> Attempt downloading from:
#> Data saved at /tmp/RtmppUpBjB/dftRoadSafetyData_Vehicles_2017/Veh.csv
unique(casualties$casualty_imd_decile)
#>  [1] "More deprived 10-20%"         "Data missing or out of range"
#>  [3] "More deprived 40-50%"         "Less deprived 10-20%"        
#>  [5] "More deprived 20-30%"         "More deprived 30-40%"        
#>  [7] "Less deprived 40-50%"         "Most deprived 10%"           
#>  [9] "Least deprived 10%"           "Less deprived 30-40%"        
#> [11] "Less deprived 20-30%"
unique(vehicles$driver_imd_decile)
#>  [1] "Data missing or out of range" "Less deprived 10-20%"        
#>  [3] "More deprived 10-20%"         "More deprived 40-50%"        
#>  [5] "More deprived 30-40%"         "More deprived 20-30%"        
#>  [7] "Less deprived 40-50%"         "Most deprived 10%"           
#>  [9] "Less deprived 20-30%"         "Less deprived 30-40%"        
#> [11] "Least deprived 10%"

Created on 2019-04-03 by the reprex package (v0.2.1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.