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

plot_usmap gets confused by a column named "values" #48

Closed
mnr opened this issue Dec 4, 2021 · 0 comments · Fixed by #50
Closed

plot_usmap gets confused by a column named "values" #48

mnr opened this issue Dec 4, 2021 · 0 comments · Fixed by #50
Assignees
Labels
bug A bug or issue that should be resolved
Milestone

Comments

@mnr
Copy link

mnr commented Dec 4, 2021

The bug

plot_usmap is confused when a column is named "values"

Assume a data.frame as follows...

str(myDF)
$ fips : Factor w/ 30 levels ...
$ values : int ...

plot_usmap(data = myDF)
Error in [.data.frame(map_df, , values) : undefined columns selected

this also fails...

plot_usmap(data = myDF, values = "values" )
Error in [.data.frame(map_df, , values) : undefined columns selected

BUT...this works...

str(myDF)
$ fips : Factor w/ 30 levels ...
$ population : int ...

plot_usmap(data = myDF, values = "population" )

which produces the expected plot

@mnr mnr added the bug A bug or issue that should be resolved label Dec 4, 2021
@pdil pdil self-assigned this Feb 11, 2022
@pdil pdil added this to the v0.6.0 milestone Feb 11, 2022
@pdil pdil closed this as completed in #50 Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug or issue that should be resolved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants