Previous steps

If you would like to return to information from the previous section, please click here.

Context

Homework for Visualisation of Status & Trends includes a number of exercises working with data and ggplot2, including:

  1. Creating “on-the-fly” data summaries
  2. Use of ggplot() geometries
  3. Faceting
  4. Figure export
  5. Managing workflow with integrate.R

Course participants should submit their homework to Github by Sunday, 11 July 2021 to allow time to consolidate & review your results.

Getting set up

Similar to previous homework exercises, course participants should begin by making a copy of the workwork materials to their participants_code folder:

 ## -- create local copy of homework scripts -- ##
  # Instructions:
  #  * 1.1. Copy homework script to your `participants_code` folder:
  #         copy `exercise_code/homework_visualisation.R` to
  #           the `exercise_code` folder in `participants_code/`

  #  * 1.2. Create a new script in your `participants_code` folder in
  #          `analysis_code` for working with one of the following examples:
  #           i.   CPCe data:    `data_raw/examples/formatting/cpce.xlsx`
  #           ii.  Kenya fishes: `data_raw/examples/formatting/kenya_fishes.xlsx`
  #

And using git add -A and git commit -m 'adding local copy of homework' and git push makes sure that you have registered the start of your homework exercises.

Using ggplot geoms

Building on previous exercises for Data Formatting & Standardisation, course participants should start their plotting script by using load() to call the *.rda from the data_intermediate folder:

 ## -- load data -- ##
  # Instructions:
  #  * 2.1. Using your new script:
  #           Call to *.rda file from `data_intermediate` folder using
  #           `data_locale <-` and `load()`
  #           Print the section of code and header of the object here:

Depending whether course participants have been working on the CPCe or Kenya fishes data, the plotting will look different, but the main tasks are similar:

  # Instructions:
  #  * 2.2. Using "On-the-fly" data summaries:
  #          Create a summary of percent cover by `Taxa category` with
  #           `mean()` and `sd()` per site
  #           Copy the section of the code, header output and copy it here:

  #  * 2.3. Visualise trends:
  #           Pipe `%>%` your data summary to `ggplot()` to visualise
  #             using `geom_point()` or `geom_bar()` by site.
  #           Add error bars using `geom_errorbar()`
  #           Keep the documentation of your data cleaning in your example script.

  #  * 2.4. Using facets:
  #           Using `facet_grid()` to separate trends for individual `Site` and
  #           `Taxa category`
  #           Copy the section of your code and paste it here:

Course participants should practise saving the resultant figures to their personal particpants_code folder:

  #  * 2.5. Export figure
  #           Use `ggsave()` to export your figure as a *.png.
  #           Hint:  use `figure_locale <-` assignment to point to the `figures`
  #                  folder in your `participants_code` folder
  #           Keep the documentation of your data cleaning in your example script.

Submitting homework for evaluation

Lastly, course participants should document their progress with git:

  # Instructions:
  #  * 4.1. In Gitbash or Git interface with RStudio:
  #           git add -A  ## -- this adds your work to the staging area -- ##
  #           git status  ## -- this verifies local changes in staging area -- ##
  #           git commit -m 'submitting homework for visualisation'
  #           git pull    ## -- this ensures your local copy is up-to-date -- ##
  #           git push    ## -- this uploads your changes to github -- ##

Next steps

After submitting homework, we will consolidate the results and review as a group to close this module.