bcgov / BC-demography

Apache License 2.0
1 stars 1 forks source link

Age distribution: would forcats be more efficient? #2

Closed MonkmanMH closed 1 year ago

MonkmanMH commented 7 years ago

Some data carpentry is necessary to get the StatCan data into data types that sort consistently (age categories import as strings, but with no padding so in an alpha sort "1 year" is followed by "10 years", not "2 years"). The initial solution (which works) has been to strip the strings of the alphabetic and space characters, and convert the remainder to an integer.

But: is there a factor solution, using the funtions in forcats?

MonkmanMH commented 3 years ago

Was a good idea 4 years ago...remains so today