Open daviddiviny opened 2 years ago
I love this idea. Should work so long as there's no duplicates, right?
What do you mean duplicates? Some classifications exist at multiple levels, e.g. Chief Executives, General Managers and Legislators
but I think it should return the highest level by default, with an option to return all levels?
Probably easily done in parallel with #50 so you can just filter?
Yep that's what I meant, classifications that exist at multiple levels. Returning the highest level by default makes sense... maybe with a message to inform the user that there are multiple matching levels?
I think the underlying data would look like this. What do you think the function should return?
code | occupation | level |
---|---|---|
1 | Managers | Major Group |
2 | Professionals | Major Group |
3 | Technicians And Trades Workers | Major Group |
4 | Community And Personal Service Workers | Major Group |
5 | Clerical And Administrative Workers | Major Group |
6 | Sales Workers | Major Group |
Perhaps a character vector ordered finest level to broadest. That way you would always know what the position in the vector means.
There is an issue where the ANZSCO6 is singular, but other levels are plural...
I was thinking that for example, this function would return the highest level (or all levels) for which a classification of an occupation exists.
For example:
find_anzsco_level("Chief Executives, General Managers and Legislators")
would returnSub-Major Group