-
Notifications
You must be signed in to change notification settings - Fork 5
Prep v2 - updated structure and choropleth map #51
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
base: v2
Are you sure you want to change the base?
Conversation
…e functions from the map_functions file over). Working on separate error checking file that is more robust
…t related functions
…ush since there isn't a good stopping point
…ust argument (needs tweaking still)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! See my comments inline.
R/error_checking.R
Outdated
#' @param map_legend_title (Character) - Text for the legend header | ||
#' @param map_x_label (Character) - Label for x axis (default Lon) | ||
#' @param map_y_label (Character) - Label for y axis (default Lat) | ||
verify_map_params <- function(bin_method, bins, dpi, expand_xy, map_xy_min_max , map_title, map_palette, map_palette_reverse, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No export for this one? Just checking, may be fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure how things are done here, if exports are selectively picked or just mostly exported unless there's a particular reason for it. I see the benefits of both so let me know and I can export most things. In this case, the only thinking behind no export was simply I that I couldn't think of a reason why someone would want to call this function externally.
R/error_checking.R
Outdated
#' @export | ||
return_error <- function(error, location) | ||
{ | ||
print(paste0("There was an error at - ", location, " - building your map:")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should you both print and return the error? Will this be duplicative?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be duplicative, but that was the idea. It would certainly be fine to just print the error string and return something empty like return() also. Or did you have an alternative idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe a single error is fine.
…f these issues before our meeting, ignore in this commit.
…es (backticks, formatting, etc)
This pull request sort of covers both the prep-v2 and the choropleth map issues. The structure should be mostly cleaned up and the choropleth map has been fortified for testing. Fixes #48 and fixes #49