Open MaxGhenis opened 4 years ago
personally, i'm not sure there's a huge benefit to doing this rename inside the function rather than as a second step... either way you have to set the mapping from variable name to display name, so is it jsut that you want to avoid the explicit rename
call?
That said, I also don't see any specific reason we'd want to avoid this option, so PRs welcome :)
This is an interesting idea, and it costs us nearly nothing to implement it, since it's just a setup/cleanup operation. Should definitely be doable for the next point release :smile:
A nice feature of tidycensus is that you can pass a renaming of fields directly to the function. From this example:
One way to do this today with cenpy is to make a dict and then extract the fields accordingly, then rename, e.g.:
It'd be nice if it were part of the functions themselves, i.e. doing some logic based on