-
Notifications
You must be signed in to change notification settings - Fork 7
Room 1 - volcano script added #14
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: main
Are you sure you want to change the base?
Conversation
"#3aefaf", "#0b57dd", "#f666b7", "#cf1833", "#a35c0a", | ||
"#bc0bfe", "#61ff41", "#eabf72", "#09dbc3", "#ffffff") | ||
|
||
do_map = function(vulc_type, colid = NULL) { |
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.
This should be defined before this script, not in the middle of it
mutate(logpop10 = log10(population_within_10_km+0.1)) %>% | ||
select(primary_volcano_type, pop=logpop10, longitude, latitude) | ||
|
||
# cleaning data a bit as there are some plural versions of volcano names |
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 would put this in a seperate function
"#3aefaf", "#0b57dd", "#f666b7", "#cf1833", "#a35c0a", | ||
"#bc0bfe", "#61ff41", "#eabf72", "#09dbc3", "#ffffff") | ||
|
||
do_map = function(vulc_type, colid = NULL) { |
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.
Would be good to have a brief comment explaining what this function does
sc_max <- max(processed_volcano$pop) | ||
sc_min <- min(processed_volcano$pop) | ||
|
||
col_palette = c("#d11141", "#00b159", "#00aedb", "#f37735", "#ffc425", |
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.
Perhaps better to use an existing colour palette. Indexing col_palette in this case doesn't work if colid > 15.
No description provided.