Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Room 1 - volcano script added #14

wants to merge 1 commit into from

Conversation

tlestang
Copy link
Owner

No description provided.

"#3aefaf", "#0b57dd", "#f666b7", "#cf1833", "#a35c0a",
"#bc0bfe", "#61ff41", "#eabf72", "#09dbc3", "#ffffff")

do_map = function(vulc_type, colid = NULL) {

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

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) {
Copy link

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",

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.

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

Successfully merging this pull request may close these issues.

5 participants