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

02-data-visualisation.Rmd line 187 wording #21

Open
thoughtfulbloke opened this issue Jan 1, 2023 · 1 comment
Open

02-data-visualisation.Rmd line 187 wording #21

thoughtfulbloke opened this issue Jan 1, 2023 · 1 comment

Comments

@thoughtfulbloke
Copy link
Contributor

Line 187 of 02-data-visualisation.Rmd currently has the wording

Island is a categorical variable, in R we call it a factor. The colours get tagged with their factor in the legend, so we can interpret which colour belongs to which factor. year is a numerical variable, so the colour becomes a gradient colour bar, rather than showing fewer distinctly different colours. ggplot treats numerical and factors different in this way precisely.

Finishing with the adverb reads a little oddly, but also because island, in the data, is a character variable with recent version of R from being read in with read.csv with the default settings rather than explicitly a factor, while numeric variables can also be factors, possibly the whole paragraph could be better explained in terms of discrete and continious, rather than specific data types. Something like this (as a suggestion):

Island is categorical character variable with a discrete range of possible values. This, like the data type of factor, is represented with colours by assigning a specific colour to each member of the discrete set. year is a continuous numeric variable in which any number of potential values can exist between known values. To represent this, R uses a colour bar with a continuous gradient.

@drmowinckels
Copy link
Collaborator

I like this very much. Would you consider doing a suggestion directly int he document. If you dont have experience with that, I am happy to guide you.

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

No branches or pull requests

2 participants