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

Basic data massaging-Open to better ideas #13

Open
AxisMeetsWorld opened this issue Jun 14, 2017 · 5 comments
Open

Basic data massaging-Open to better ideas #13

AxisMeetsWorld opened this issue Jun 14, 2017 · 5 comments

Comments

@AxisMeetsWorld
Copy link

I am trying to input data on various employment statistics from Universities around the nation. Problem is that one data source might write a university with an abbreviation, while another might not (IE "Oregon State" vs "Oregon St."). When I import new data in from a new source I use the setdiff() function to find the school representations that aren't found in the names I have decided on for them. I then keep a dataframe (call it convert dataframe) of representations I find in the new set and what I would like them to be converted to for consistency. I have a user-defined function that allows me to type in what I had, and the converted representation. This updates the convert dataframe with the new values. I finally have one more function that I can use to run through a new dataframe that has these discrepancies and look at the convert dataframe so that the newly imported information is consistent with university representations already stored. I am just wondering if this is the easiest way, or if there might be something else I should try. I will be at the R user-group tomorrow so I can show if necessary. Thanks!

@sckott
Copy link
Member

sckott commented Jun 14, 2017

thanks @AxisMeetsWorld - will add this to the agenda for tomorrow

@laderast
Copy link

laderast commented Jun 16, 2017

forcats has the fct_collapse() function which may be really helpful for mapping these.

@AxisMeetsWorld
Copy link
Author

@sckott
Copy link
Member

sckott commented Jun 16, 2017

@AxisMeetsWorld code isn't public, and you make it public?

@AxisMeetsWorld
Copy link
Author

Should be public now

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

No branches or pull requests

3 participants