Skip to content

Room 1 - volcano script added#14

Open
tlestang wants to merge 1 commit intomainfrom
volcano_analysis_R
Open

Room 1 - volcano script added#14
tlestang wants to merge 1 commit intomainfrom
volcano_analysis_R

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