```{r setup, include=FALSE}
knitr::opts_chunk$set(
  results = 'asis',
  echo = FALSE,
  warning = FALSE,
  message = FALSE,
  fig.align = 'center'
)

#Load libraries
library(tidyverse)
library(gapminder)
library(kableExtra)
```
<style>
  h1.title {
    text-align: center;
  }

  body {
    text-align: justify;
  }
  
  .caption {
    color: black;
    font-size: 12px;
    font-weight: bold;
    text-align: justify;
}
  
  #pattern {
    border-style: solid;
    border-width: 2px;
    border-color: #757579;
  }
  
  #index {
    width: 62px;
    margin-top: -30px;
  }
  
  div#pattern div.figure p.caption{
    margin: 40px 0 0 0;
    position: absolute;
    width: 908px;
  }
  
  div#figures{
    position: relative;
    padding: 20px 0;
  }
  
  div#figure2 {
    display: block;
    float: left;
    width: 50%;
  }
  
  div#figure3 {
    display: block;
    float: right;
    width: 50%;
  }
  
  div#last {
    display: inline-block;
  }
  
</style>

# Introduction

My name is Ming Wang. I am a postdoctoral researcher at CSIRO in Canberra, and working on wind pests dispersal modelling. I have graduated from the University of Queensland with a PhD in *computational modelling*. I was constructing 3D mechanistic simulation models for my PhD. Currently, my daily work pattern involves in conducting **computer simulations**.

# My Project

My project is to identify `where`, `when` and `how` pest invasion may occur and also demonstrate the spatio-temporal dynamics of dispersal patterns from putative source sites. From a biosecurity perspective, the accurate predictions of pathways and infested areas of pest organisms will aid in eradicating the invasive pests by taking early intervention activities. The identification of the sources of pest organisms will allow us to know more about alien species such as their physiology, behaviour and ecology, thereby developing the most suitable control methods for targeted species. The outcomes from my project could have implications for future biosecurity surveillance programs both at the farm, state or federal level.

## Preliminary results

<div id = "pattern">
```{r figure1, fig.cap = "The dispersal patterns of fungal spores (10 um) generated from computer simulations using HYSPLIT based on the nine putative source locations over the year of 2017"}

knitr::include_graphics("resources/img/pattern.png")

```
<div id = "index">
```{r index, fig.width=60}
knitr::include_graphics("resources/img/index.png")

```
<h6><b>Low - High</b></h6>
</div>
  
</div>

<br>
<br>

<div id = figures>
<div id = figure2>
```{r figure2, out.width='100%', out.height='100%', fig.align='centre', fig.cap="Variations among the seasons from 2014 to 2018"}

raw_data <- read_csv("poster/resources/data/percentage.csv")

season <- raw_data %>% 
  filter(Season != "Total for year") %>% 
  group_by(Season) %>% 
  summarise(percentage = sum(Percent)/5) %>% 
  mutate(Season = factor(Season, levels = c("Spring", "Summer", "Autumn", "Winter")))


ggplot(data = season,
        mapping = aes(x = Season,
        y = percentage,
        fill = Season)
) +
  geom_bar(stat = "identity",
           colour = "black",
           size = 0.6) +
  labs(y = "Proportion") +
  scale_x_discrete(breaks = c("Spring", "Summer", "Autumn", "Winter"))+
  scale_y_continuous(limits = c(0, 40),
                     breaks = c(seq(0, 40, 10)),
                     labels = c("0%", "10%", "20%", "30%", "40%"),
                     expand = c(0, 0)
  ) +
  scale_fill_manual(values = c("#FFFFFF", 
                               "#C0C0C0",
                               "#696969", 
                               "#000000"), 
                    name = "Seasons",
                    labels = c("Spring", 
                               "Summer", 
                               "Autumn", 
                               "Winter")
  ) +
  theme_classic() +
  theme(axis.title.x = element_blank(),
        axis.title.y = element_text(colour = "black", face = "bold", size = 16),
        axis.ticks.x = element_blank(),
        axis.text.x = element_blank(),
        axis.text.y = element_text(colour = "black", face = "bold", size = 12),
        legend.title = element_text(colour = "black", size = 12, face = "bold"),
        legend.text = element_text(colour = "black", size = 10, face = "bold"),
        axis.line = element_line(colour = "black", size = 1)
  )

```
</div>
<div id = figure3>
```{r figure3, out.width='100%', out.height='100%', fig.align='centre', fig.cap="The proportion of fungal spores arrived from each putative source location from 2014 to 2018"}

source_locations <- raw_data %>% 
  filter(Season == "Total for year") %>% 
  group_by(Origin) %>% 
  summarise(percentage = sum(Percent))

ggplot(data = source_locations,
       mapping = aes(x = Origin,
                     y = percentage,
                     fill = Origin)
       ) +
  geom_bar(stat = "identity",
           color = "black",
           size = 0.5) +
  labs(y = "Proportion") +
  #scale_fill_brewer(palette = "Greys") + 
  #scale_y_discrete(limits=c("0%", "40%"))+
  scale_y_continuous(limits=c(0, 35),
                     breaks = c(seq(0, 35, 5)),
                     labels = c("0%", "5%", "10%", "15%", "20%", "25%", "30%", "35%"),
                     expand = c(0, 0)
                     ) +
  scale_fill_manual(values = c("#FFFFFF", 
                               "#F0F0F0", 
                               "#DCDCDC", 
                               "#D0D0D0",
                               "#808080", 
                               "#696969", 
                               "#606060",
                               "#404040", 
                               "#000000"), 
                    name = "Source locations",
                    labels = c("East Timor", 
                               "Java/Bali coastal", 
                               "North Island (New Zealand)", 
                               "Papua West/Papua coastal",
                               "Papua West/Papua mainland",
                               "Papua New Guinea coastal",
                               "Papua New Guinea mainland",
                               "South Island (New Zealand)",
                               "Sumatra")
                    ) +
  theme_classic() +
  theme(axis.title.x = element_blank(),
        axis.title.y = element_text(colour = "black", face = "bold", size = 16),
        axis.ticks.x = element_blank(),
        axis.text.x = element_blank(),
        axis.text.y = element_text(colour = "black", face = "bold", size = 12),
        legend.title = element_text(colour = "black", size = 12, face = "bold"),
        legend.text = element_text(colour = "black", size = 10, face = "bold"),
        axis.line = element_line(colour = "black", size = 1)
        )

```
</div>
</div>
<div id = "last">
# My Data School Experience

I have had a great experience during Data School. The instructors are very nice and patient. I really appreciate their help. I have learned R in a systematic way, and also improved my data analysis skills. I would highly recommend you to attend the next round.

</div>