Mosquitoes or Culicidae consist of 41 known genera, with around 3,500 species. They act as vectors of disease pathogens like malaria, yellow fever and dengue ( Foster and Walker, 2019). It is seen that the wings of male mosquitoes can range between 2.11 mm and 2.48 mm ( Hatala et al., 2018).
Library being used
# vtable is use to generate formatted table of a given data-set.library(vtable)
Warning: package 'vtable' was built under R version 4.1.2
Loading required package: kableExtra
Warning: package 'kableExtra' was built under R version 4.1.2
# ggplot2 is used to create plots like scatter plots, line plots and many more based on a given data set.library(ggplot2)# dplyr is used to transform data frame using pipe commands (%>%). library(dplyr)
Warning: package 'dplyr' was built under R version 4.1.2
Attaching package: 'dplyr'
The following object is masked from 'package:kableExtra':
group_rows
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
Importing data in R-Studio
#Convert the data-set in to a .csv format for R-Studio to understand. mosquito_df <-read.csv("~/Desktop/MRes/Research Methods/Formative/mosquitos.csv" , header =TRUE)
Finding the summary
# summary () is used to summarise the data of each column and find statistical data like mean, median and many more. summary (mosquito_df)
ID wing sex
Min. : 1.00 Min. :25.16 Length:100
1st Qu.: 25.75 1st Qu.:41.42 Class :character
Median : 50.50 Median :48.42 Mode :character
Mean : 50.50 Mean :48.78
3rd Qu.: 75.25 3rd Qu.:56.24
Max. :100.00 Max. :69.82
# vtable () is used to produce a much more detailed and formatted summary. vtable (mosquito_df)
mosquito_df
Name
Class
Values
ID
integer
Num: 1 to 100
wing
numeric
Num: 25.158 to 69.818
sex
character
Finding the data type
# sapply () is used to identify the data type of the column in a data-set. sapply (mosquito_df, class)
ID wing sex
"integer" "numeric" "character"
Finding the structure of the data
#str () is understand the kind of data including rows abd columns. str (mosquito_df)
'data.frame': 100 obs. of 3 variables:
$ ID : int 1 2 3 4 5 6 7 8 9 10 ...
$ wing: num 37.8 50.6 39.3 38.1 25.2 ...
$ sex : chr "f" "f" "f" "f" ...
Representing the data as a bar chart
# A bar chart is use to show data points across different groups in a data frame. mosquito_df %>%ggplot(aes(x = sex, color = sex, fill = sex)) +geom_bar(alpha =0.5) +labs(x ="Sex", y ="Count", fill ="Sex", color ="Sex", title ="Mosquitos counting by Sex") +theme_minimal() +theme(axis.text =element_text(size =14),axis.title =element_text(size =14))
Representing the data as a Boxplot
# Box plots are used to see the distribution of numerical values and compare them between multiple groups. mosquito_df %>%na.omit() %>%ggplot(aes(x=sex, y = wing,color=wing, fill=wing))+geom_boxplot(alpha=0.7)+geom_boxplot(color ="blue",fill ="lightblue")+labs(x ="Sex", y ="Wing", fill ="Sex", color ="Sex", title ="Wing span depending on Sex")+theme(axis.text=element_text(size=14),axis.title=element_text(size=14))
Warning: The following aesthetics were dropped during statistical transformation: colour
and fill.
ℹ This can happen when ggplot fails to infer the correct grouping structure in
the data.
ℹ Did you forget to specify a `group` aesthetic or to convert a numerical
variable into a factor?
Representing the data as a Histogram
# Histogram is used for summarise continuous data that are measured on a regular interval scale. mosquito_df %>%ggplot(aes(x = wing, color = sex, fill = sex)) +geom_histogram(alpha =0.5, bins =30) +labs(x ="Wing Length", y ="Count", fill ="Sex", color ="Sex", title ="Wing Length Distribution by Sex") +theme_minimal() +theme(axis.text =element_text(size =14),axis.title =element_text(size =14))
Formulation of a Question
After looking and undertnading different graphs a question was formulated. Is there a link between the gender (sex) and wing span of mosquitoes? Also, is there a correlation between the gender (sex) and the wings of adult mosquitoes? To answer this, a correlation graph was plotted.
Representing the correlation between span and sex
# Correlations are used to access the strenght of a linear relationship between differnet varlaibles and pairs. mosquito_df %>%ggplot(aes(x = sex, y = wing)) +geom_point() +labs(x ="Sex", y ="Wing", fill ="Sex", color ="Sex", title ="Wing span depending on Sex") +geom_point(color ="blue")+theme_minimal() +theme(axis.text =element_text(size =14),axis.title =element_text(size =14))
As seen from the graph there is no real correlation between the wing span and gender (sex). It is seen from the graph that the wing span of mosquitoes can range betwenn 25 mm to 70 mm, regardless the gender (sex).
References
Foster, W.A. and Walker, E.D., 2019. mosquitoes (Culicidae). In Medical and veterinary entomology (pp. 261-325). Academic press.
Hatala, A.J., Harrington, L.C. and Degner, E.C., 2018. Age and body size influence sperm quantity in male Aedes albopictus (Diptera: Culicidae) mosquitoes. Journal of medical entomology, 55(4), pp.1051-1054.