In this section of my Week 3 Report, I want to clarify some parts of the data collection process that I had said that I needed the De Leo lab to explain to me in my report for Week 2. Primarily, the dataset that I am using for my project is regarding the source of the parasite prevalence and location data obtained from the Global Neglected Tropical Disease database (GNTD). This dataset was accessed from GTND in 2016, and spans the years 1934-2010, with the majority of the data post-1980. The geophysical and climate variables were sampled at the point locations using Google Earth Engine.
The data dictionary as per Task 2 of the Week 3 deliverables are listed at this Google Sheets link: https://docs.google.com/spreadsheets/d/1OUM9m4VrZv2X1ygdcaqv4FH2ZBxoTUlOM6ycB-FZSDg/edit?usp=sharing.
library(readxl)
Datasci120_Dataset <- read_excel("C:/Users/syeda/OneDrive/Desktop/Sophomore Year Stanford/DATASCI 120/Datasci120 Dataset.xlsx",
col_types = c("skip", "numeric", "numeric",
"numeric", "text", "text", "text",
"numeric", "numeric", "numeric",
"numeric", "numeric", "numeric", "numeric",
"numeric", "numeric", "numeric", "numeric", "numeric",
"numeric", "numeric", "numeric", "numeric", "numeric",
"numeric", "numeric", "numeric", "numeric", "numeric",
"numeric", "numeric", "numeric", "numeric", "skip",
"numeric", "numeric", "numeric"),
na = c("NA", "N/A", "")) # Define what should be considered as NA values
View(Datasci120_Dataset)
Originally, I had loaded in my dataset and RStudio read most of the variables as the wrong type. Therefore, I re-imported the dataset by making the necessary type changes to the code.
summary(Datasci120_Dataset)
## percent_pos longitude latitude lat_long
## Min. : 0.00 Min. :-17.440 Min. :-42.383 Length:11330
## 1st Qu.: 0.00 1st Qu.: -3.706 1st Qu.: -1.307 Class :character
## Median : 8.15 Median : 11.450 Median : 7.364 Mode :character
## Mean : 21.87 Mean : 13.390 Mean : 4.574
## 3rd Qu.: 37.50 3rd Qu.: 32.760 3rd Qu.: 13.123
## Max. :100.00 Max. : 47.433 Max. : 20.258
##
## loc_spp parasite_s yearof_pub bio01
## Length:11330 Length:11330 Min. : 0 Min. :12.08
## Class :character Class :character 1st Qu.:1982 1st Qu.:23.00
## Mode :character Mode :character Median :1990 Median :25.91
## Mean :1839 Mean :25.10
## 3rd Qu.:1996 3rd Qu.:27.40
## Max. :2010 Max. :30.43
## NA's :31
## bio02 bio03 bio04 bio05
## Min. : 5.90 Min. :43.00 Min. : 1.469 Min. :20.07
## 1st Qu.:10.70 1st Qu.:57.00 1st Qu.:10.448 1st Qu.:31.30
## Median :13.00 Median :63.00 Median :18.046 Median :34.00
## Mean :12.54 Mean :65.46 Mean :18.371 Mean :34.66
## 3rd Qu.:14.40 3rd Qu.:72.56 3rd Qu.:25.490 3rd Qu.:39.00
## Max. :19.90 Max. :91.87 Max. :53.857 Max. :42.60
## NA's :31 NA's :31 NA's :31 NA's :31
## bio06 bio07 bio08 bio09
## Min. : 1.50 Min. : 7.90 Min. :11.26 Min. :10.30
## 1st Qu.:13.56 1st Qu.:14.50 1st Qu.:23.10 1st Qu.:21.90
## Median :15.30 Median :19.90 Median :25.70 Median :24.60
## Mean :15.11 Mean :19.54 Mean :25.09 Mean :23.72
## 3rd Qu.:17.50 3rd Qu.:24.25 3rd Qu.:27.20 3rd Qu.:26.30
## Max. :22.90 Max. :31.10 Max. :35.60 Max. :31.87
## NA's :31 NA's :31 NA's :31 NA's :31
## bio10 bio11 bio12 bio13
## Min. :13.28 Min. :10.30 Min. : 11 Min. : 3.0
## 1st Qu.:24.60 1st Qu.:21.50 1st Qu.: 615 1st Qu.: 167.4
## Median :27.60 Median :23.43 Median : 977 Median : 216.0
## Mean :27.35 Mean :22.66 Mean :1043 Mean : 230.5
## 3rd Qu.:30.50 3rd Qu.:24.96 3rd Qu.:1314 3rd Qu.: 282.0
## Max. :36.15 Max. :28.70 Max. :4226 Max. :1139.4
## NA's :31 NA's :31 NA's :31 NA's :31
## bio14 bio15 bio16 bio17
## Min. : 0.000 Min. : 25.16 Min. : 7.0 Min. : 0.00
## 1st Qu.: 0.000 1st Qu.: 66.00 1st Qu.: 408.0 1st Qu.: 0.00
## Median : 1.000 Median : 99.00 Median : 536.2 Median : 6.00
## Mean : 8.618 Mean : 98.11 Mean : 573.4 Mean : 39.41
## 3rd Qu.:13.000 3rd Qu.:128.00 3rd Qu.: 694.0 3rd Qu.: 64.00
## Max. :94.000 Max. :183.00 Max. :2798.8 Max. :337.74
## NA's :31 NA's :31 NA's :31 NA's :31
## bio18 bio19 hnd upa
## Min. : 4.00 Min. : 0.0 Min. : 0.000 Min. : 0.01
## 1st Qu.: 92.34 1st Qu.: 2.0 1st Qu.: 2.267 1st Qu.: 0.01
## Median :188.00 Median : 26.0 Median : 6.740 Median : 0.03
## Mean :212.19 Mean : 223.8 Mean : 14.653 Mean : 161.65
## 3rd Qu.:301.00 3rd Qu.: 380.6 3rd Qu.: 16.476 3rd Qu.: 0.10
## Max. :996.00 Max. :2798.8 Max. :408.948 Max. :276274.60
## NA's :31 NA's :31 NA's :25 NA's :25
## slope gHM elevation pH
## Min. : 0.000 Min. :0.0000 Min. : -2.748 Min. :4.024
## 1st Qu.: 1.256 1st Qu.:0.3145 1st Qu.: 195.749 1st Qu.:5.601
## Median : 1.891 Median :0.5270 Median : 365.933 Median :6.023
## Mean : 2.793 Mean :0.5062 Mean : 565.760 Mean :6.116
## 3rd Qu.: 3.002 3rd Qu.:0.6850 3rd Qu.: 950.891 3rd Qu.:6.501
## Max. :47.420 Max. :0.9630 Max. :3181.426 Max. :9.039
## NA's :24 NA's :79 NA's :24 NA's :169
## aspect clay sand
## Min. : 0.0 Min. : 0.00 Min. :16.13
## 1st Qu.:116.4 1st Qu.:17.99 1st Qu.:47.65
## Median :166.0 Median :23.90 Median :56.85
## Mean :167.1 Mean :25.09 Mean :56.45
## 3rd Qu.:217.4 3rd Qu.:31.88 3rd Qu.:65.47
## Max. :350.1 Max. :58.72 Max. :99.00
## NA's :24 NA's :169 NA's :169
It is interesting to see that the number of NA’s have a pattern that corresponds to the different Google Earth Engine libraries used. For example, the “clay” and “sand” variables are derived from the same Google Earth Engine library and both have 169 NA’s. Another example of this can be seen through the DEM-derived variables (slope, elevation, and aspect), which all have 24 NA’s. All missing values are summarized and dealt with as “NA”s in the summary table.
It is defined as aggregated schistosomiasis parasitology study percentage positivity of parasite presence at each “loc_spp.” This data is collected from the GNTD database mentioned earlier. It is a quantitative variable whose values range from 0 to 100 with units in percentage. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = percent_pos)) +
geom_histogram(binwidth = 10, color = "black", fill = "gray") +
labs(title = "Histogram of Percent_pos",
x = "Percent_pos (%)",
y = "Frequency") +
theme_minimal()
# Variable 2: Longitude
This contains the longitude coordinates of each observation. This data is collected from the GNTD database mentioned earlier. It is a quantitative variable whose values range from -180 to 180 with units in degrees. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = longitude)) +
geom_histogram(binwidth = 10, color = "black", fill = "gray") +
labs(title = "Histogram of Longitude",
x = "Longitude (degrees)",
y = "Frequency") +
theme_minimal()
Since the dataset primarily represents data from Africa, the longitudes seem the be concentrated there.
This contains the latitude coordinates of each observation. This data is collected from the GNTD database mentioned earlier. It is a quantitative variable whose values range from -90 to 90 with units in degrees. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = latitude)) +
geom_histogram(binwidth = 10, color = "black", fill = "gray") +
labs(title = "Histogram of Latitude",
x = "Latitude (degrees)",
y = "Frequency") +
theme_minimal()
Since the dataset primarily represents data from Africa, the latitudes seem the be concentrated there.
The latitude-longitude coordinates are merged into one column. I don’t think I will be using this data at this point since I already have the latitude and longitude columns separately. Hence, I will not be plotting it or describing it again in this report after already mentioning it in the data dictionary.
This column contains the latitude-longitude coordinates for each location and also contains the species of parasite: Schistosoma haematobium, Schistosoma mansoni or Schistosoma intercalatum. I don’t think I will be using this data at this point since I already have the latitude, longitude, and specie columns separately. Hence, I will not be plotting it or describing it again in this report after already mentioning it in the data dictionary.
This contains the parasite species for each observation. This data is collected from the GNTD database mentioned earlier. It is a qualitative variable whose categories are Schistosoma haematobium, Schistosoma mansoni or Schistosoma intercalatum. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = parasite_s)) +
geom_bar(color = "black", fill = "gray") +
labs(title = "Bar Graph of Parasite Species",
x = "Category",
y = "Count") +
theme_minimal()
This contains the year each study was published. This data is collected from the GNTD database mentioned earlier. It is a quantitative variable whose values can range from 1900 to 2010. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset # Ensure your dataset is correctly loaded
# Creating a histogram with xlim to start from 1900
ggplot(dataframe, aes(x = yearof_pub)) +
geom_histogram(binwidth = 5, color = "black", fill = "gray") +
xlim(1930, NA) + # Set lower limit to 1900 and upper limit to automatic
labs(title = "Histogram of Publication Year",
x = "Publication Year",
y = "Frequency") +
theme_minimal()
## Warning: Removed 856 rows containing non-finite outside the scale range
## (`stat_bin()`).
## Warning: Removed 1 row containing missing values or values outside the scale range
## (`geom_bar()`).
This contains the annual mean temperature. This data is collected from the Google Earth Engine “WorldClim BIO Variables V1” dataset provided by UC Berkeley. It is a quantitative variable whose values range from -29 to 32 with units in degree celsius. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = bio01)) +
geom_histogram(binwidth = 1, color = "black", fill = "gray") +
labs(title = "Histogram of Annual Mean Temperature",
x = "Annual Mean Temperature (celsius)",
y = "Frequency") +
theme_minimal()
## Warning: Removed 31 rows containing non-finite outside the scale range
## (`stat_bin()`).
This contains the mean diurnal range. This data is collected from the Google Earth Engine “WorldClim BIO Variables V1” dataset provided by UC Berkeley. It is a quantitative variable whose values range from 0.9 to 21.4 with units in degree celsius. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = bio02)) +
geom_histogram(binwidth = 1, color = "black", fill = "gray") +
labs(title = "Histogram of mean diurnal range",
x = "Mean diurnal range (celsius)",
y = "Frequency") +
theme_minimal()
## Warning: Removed 31 rows containing non-finite outside the scale range
## (`stat_bin()`).
This contains the isothermality of each observation. This data is collected from the Google Earth Engine “WorldClim BIO Variables V1” dataset provided by UC Berkeley. It is a quantitative variable whose values range from 7 to 96 with units in percentage. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = bio03)) +
geom_histogram(binwidth = 5, color = "black", fill = "gray") +
labs(title = "Histogram of isothermality",
x = "Isothermality (%)",
y = "Frequency") +
theme_minimal()
## Warning: Removed 31 rows containing non-finite outside the scale range
## (`stat_bin()`).
This contains the Temperature seasonality of each observation, which is just the standard deviation * 100. This data is collected from the Google Earth Engine “WorldClim BIO Variables V1” dataset provided by UC Berkeley. It is a quantitative variable whose values range from 0.6 to 227 with units in degree celsius. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = bio04)) +
geom_histogram(binwidth = 5, color = "black", fill = "gray") +
labs(title = "Histogram of Temperature Seasonality",
x = "Temperature Seasonality (degree celsius)",
y = "Frequency") +
theme_minimal()
## Warning: Removed 31 rows containing non-finite outside the scale range
## (`stat_bin()`).
This contains the Max temperature of warmest month. This data is collected from the Google Earth Engine “WorldClim BIO Variables V1” dataset provided by UC Berkeley. It is a quantitative variable whose values range from -9.6 to 49 with units in degree celsius. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = bio05)) +
geom_histogram(binwidth = 5, color = "black", fill = "gray") +
labs(title = "Histogram of Max Temperature of Warmest Month",
x = "Max Temperature of Warmest Month (degree celsius)",
y = "Frequency") +
theme_minimal()
## Warning: Removed 31 rows containing non-finite outside the scale range
## (`stat_bin()`).
This contains the Min temperature of coldest month. This data is collected from the Google Earth Engine “WorldClim BIO Variables V1” dataset provided by UC Berkeley. It is a quantitative variable whose values range from -57.3 to 25.8 with units in degree celsius. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = bio06)) +
geom_histogram(binwidth = 5, color = "black", fill = "gray") +
labs(title = "Histogram of Min Temperature of Coldest Month",
x = "Min Temperature of Coldest Month (degree celsius)",
y = "Frequency") +
theme_minimal()
## Warning: Removed 31 rows containing non-finite outside the scale range
## (`stat_bin()`).
This contains the Temperature annual range. This data is collected from the Google Earth Engine “WorldClim BIO Variables V1” dataset provided by UC Berkeley. It is a quantitative variable whose values range from 5.3 to 72.5 with units in degree celsius. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = bio07)) +
geom_histogram(binwidth = 1, color = "black", fill = "gray") +
labs(title = "Histogram of Temperature Annual Range",
x = "Temperature Annual Range (celsius)",
y = "Frequency") +
theme_minimal()
## Warning: Removed 31 rows containing non-finite outside the scale range
## (`stat_bin()`).
This contains the mean temperature of wettest quarter. This data is collected from the Google Earth Engine “WorldClim BIO Variables V1” dataset provided by UC Berkeley. It is a quantitative variable whose values range from -28.5 to 37.8 with units in degree celsius. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = bio08)) +
geom_histogram(binwidth = 1, color = "black", fill = "gray") +
labs(title = "Histogram of Mean Temperature of Wettest Quarter",
x = "Mean Temperature of Wettest Quarter (celsius)",
y = "Frequency") +
theme_minimal()
## Warning: Removed 31 rows containing non-finite outside the scale range
## (`stat_bin()`).
This contains the Mean temperature of driest quarter. This data is collected from the Google Earth Engine “WorldClim BIO Variables V1” dataset provided by UC Berkeley. It is a quantitative variable whose values range from -52.1 to 36.6 with units in degree celsius. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = bio09)) +
geom_histogram(binwidth = 1, color = "black", fill = "gray") +
labs(title = "Histogram of Mean Temperature of Driest Quarter",
x = "Mean Temperature of Driest Quarter (celsius)",
y = "Frequency") +
theme_minimal()
## Warning: Removed 31 rows containing non-finite outside the scale range
## (`stat_bin()`).
This contains the Mean temperature of warmest quarter. This data is collected from the Google Earth Engine “WorldClim BIO Variables V1” dataset provided by UC Berkeley. It is a quantitative variable whose values range from -14.3 to 38.3 with units in degree celsius. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = bio10)) +
geom_histogram(binwidth = 1, color = "black", fill = "gray") +
labs(title = "Histogram of Mean Temperature of Warmest Quarter",
x = "Mean Temperature of Warmest Quarter (celsius)",
y = "Frequency") +
theme_minimal()
## Warning: Removed 31 rows containing non-finite outside the scale range
## (`stat_bin()`).
# Variable 18: bio11
This contains the Mean temperature of coldest quarter. This data is collected from the Google Earth Engine “WorldClim BIO Variables V1” dataset provided by UC Berkeley. It is a quantitative variable whose values range from -52.1 to 28.9 with units in degree celsius. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = bio11)) +
geom_histogram(binwidth = 1, color = "black", fill = "gray") +
labs(title = "Histogram of Mean Temperature of Coldest Quarter",
x = "Mean Temperature of Coldest Quarter (celsius)",
y = "Frequency") +
theme_minimal()
## Warning: Removed 31 rows containing non-finite outside the scale range
## (`stat_bin()`).
This contains the annual precipitation. This data is collected from the Google Earth Engine “WorldClim BIO Variables V1” dataset provided by UC Berkeley. It is a quantitative variable whose values range from 0 to 11401 with units in millimeters. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = bio12)) +
geom_histogram(binwidth = 100, color = "black", fill = "gray") +
labs(title = "Histogram of Annual Precipitation",
x = "Annual Precipitation (mm)",
y = "Frequency") +
theme_minimal()
## Warning: Removed 31 rows containing non-finite outside the scale range
## (`stat_bin()`).
This contains the Precipitation of wettest month. This data is collected from the Google Earth Engine “WorldClim BIO Variables V1” dataset provided by UC Berkeley. It is a quantitative variable whose values range from 0 to 2949 with units in millimeters. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = bio13)) +
geom_histogram(binwidth = 50, color = "black", fill = "gray") +
labs(title = "Histogram of Precipitation of Wettest Month",
x = "Precipitation of Wettest Month (mm)",
y = "Frequency") +
theme_minimal()
## Warning: Removed 31 rows containing non-finite outside the scale range
## (`stat_bin()`).
This contains the Precipitation of driest month. This data is collected from the Google Earth Engine “WorldClim BIO Variables V1” dataset provided by UC Berkeley. It is a quantitative variable whose values range from 0 to 752 with units in millimeters. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = bio14)) +
geom_histogram(binwidth = 10, color = "black", fill = "gray") +
labs(title = "Histogram of Precipitation of Driest Month",
x = "Precipitation of Driest Month (mm)",
y = "Frequency") +
theme_minimal()
## Warning: Removed 31 rows containing non-finite outside the scale range
## (`stat_bin()`).
This contains the precipitation seasonality. This data is collected from the Google Earth Engine “WorldClim BIO Variables V1” dataset provided by UC Berkeley. It is a quantitative variable whose values range from 0 to 265 with units as coefficient of variation. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = bio15)) +
geom_histogram(binwidth = 10, color = "black", fill = "gray") +
labs(title = "Histogram of Precipitation Seasonality",
x = "Precipitation Seasonality",
y = "Frequency") +
theme_minimal()
## Warning: Removed 31 rows containing non-finite outside the scale range
## (`stat_bin()`).
This contains the precipitation of wettest quarter. This data is collected from the Google Earth Engine “WorldClim BIO Variables V1” dataset provided by UC Berkeley. It is a quantitative variable whose values range from 0 to 8019 with units as millimeter. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = bio16)) +
geom_histogram(binwidth = 100, color = "black", fill = "gray") +
labs(title = "Histogram of Precipitation of Wettest Quarter",
x = "Precipitation of Wettest Quarter (mm)",
y = "Frequency") +
theme_minimal()
## Warning: Removed 31 rows containing non-finite outside the scale range
## (`stat_bin()`).
This contains the precipitation of driest quarter. This data is collected from the Google Earth Engine “WorldClim BIO Variables V1” dataset provided by UC Berkeley. It is a quantitative variable whose values range from 0 to 2495 with units as millimeter. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = bio17)) +
geom_histogram(binwidth = 10, color = "black", fill = "gray") +
labs(title = "Histogram of Precipitation of Driest Quarter",
x = "Precipitation of Driest Quarter (mm)",
y = "Frequency") +
theme_minimal()
## Warning: Removed 31 rows containing non-finite outside the scale range
## (`stat_bin()`).
This contains the precipitation of warmest quarter. This data is collected from the Google Earth Engine “WorldClim BIO Variables V1” dataset provided by UC Berkeley. It is a quantitative variable whose values range from 0 to 6090 with units as millimeter. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = bio18)) +
geom_histogram(binwidth = 50, color = "black", fill = "gray") +
labs(title = "Histogram of Precipitation of Warmest Quarter",
x = "Precipitation of Warmest Quarter (mm)",
y = "Frequency") +
theme_minimal()
## Warning: Removed 31 rows containing non-finite outside the scale range
## (`stat_bin()`).
This contains the precipitation of coldest quarter. This data is collected from the Google Earth Engine “WorldClim BIO Variables V1” dataset provided by UC Berkeley. It is a quantitative variable whose values range from 0 to 5162 with units as millimeter. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = bio19)) +
geom_histogram(binwidth = 50, color = "black", fill = "gray") +
labs(title = "Histogram of Precipitation of Coldest Quarter",
x = "Precipitation of Coldest Quarter (mm)",
y = "Frequency") +
theme_minimal()
## Warning: Removed 31 rows containing non-finite outside the scale range
## (`stat_bin()`).
This contains the hydrologically adjusted elevation, also know as “hand” (height above the nearest drainage). This data is collected from the Google Earth Engine “MERIT Hydro: Global Hydrography Datasets” dataset provided by University of Tokyo. It is a quantitative variable whose values range from 0 to 90 with units as meter. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = hnd)) +
geom_histogram(binwidth = 10, color = "black", fill = "gray") +
labs(title = "Histogram of Hnd",
x = "Hnd (m)",
y = "Frequency") +
theme_minimal()
## Warning: Removed 25 rows containing non-finite outside the scale range
## (`stat_bin()`).
This contains the upstream drainage area (flow accumulation area). This data is collected from the Google Earth Engine “MERIT Hydro: Global Hydrography Datasets” dataset provided by University of Tokyo. It is a quantitative variable whose values range from 0 to 200 with units as kilometer^2. The distribution of the values is described in the summary table at the start of this report - there was an error I was getting when trying to generate this histogram. I hope to address the issue in Office Hours can provide an update in my report for Week 4.
This contains the slope of terrain (digital elevation model [DEM]-derived). This data is collected from the Google Earth Engine “SRTM Digital Elevation Data Version 4” dataset provided by NASA. It is a quantitative variable whose values range from 0 to 90 with units as degrees. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = slope)) +
geom_histogram(binwidth = 1, color = "black", fill = "gray") +
labs(title = "Histogram of Slope",
x = "Slope (degrees)",
y = "Frequency") +
theme_minimal()
## Warning: Removed 24 rows containing non-finite outside the scale range
## (`stat_bin()`).
This contains the global human modification: a cumulative measure of human modification of terrestrial lands globally at 1 square-kilometer resolution. This data is collected from the Google Earth Engine “CSP gHM: Global Human Modification” dataset provided by Conservation Science Partners. It is a quantitative variable whose values range from 0 to 1 with units as kilometer^2. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = gHM)) +
geom_histogram(binwidth = 0.1, color = "black", fill = "gray") +
labs(title = "Histogram of gHM",
x = "gHM (km^2)",
y = "Frequency") +
theme_minimal()
## Warning: Removed 79 rows containing non-finite outside the scale range
## (`stat_bin()`).
This contains the elevation of terrain (digital elevation model [DEM]-derived). This data is collected from the Google Earth Engine “SRTM Digital Elevation Data Version 4” dataset provided by NASA. It is a quantitative variable whose values range from -444 to 8806 with units as meter. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = elevation)) +
geom_histogram(binwidth = 100, color = "black", fill = "gray") +
labs(title = "Histogram of Elevation",
x = "Elevation (m)",
y = "Frequency") +
theme_minimal()
## Warning: Removed 24 rows containing non-finite outside the scale range
## (`stat_bin()`).
This contains the metric to measure soil acidity - this data had to be transformed by scaling the values by 0.1 to represent a regular pH scale which I did through Excel. This data is collected from the Google Earth Engine “OpenLandMap Soil pH in H2O” dataset provided by EnvirometriX Ltd. It is a qualitative variable whose values range from 0 to 14 with 1 unit increments (eg. 1, 2, …, 13, 14). The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = pH)) +
geom_histogram(binwidth = 1, color = "black", fill = "gray") +
labs(title = "Histogram of pH",
x = "pH",
y = "Frequency") +
theme_minimal()
## Warning: Removed 169 rows containing non-finite outside the scale range
## (`stat_bin()`).
Note: Even though this is a qualitative variable, I plotted it as a histogram because the pH could be any value from 0 - 14. I hope to clarify my approach with regards to this variable in Office Hours and include it in my Week 4 report.
This contains the aspect of terrain (digital elevation model [DEM]-derived). This data is collected from the Google Earth Engine “SRTM Digital Elevation Data Version 4” dataset provided by NASA. It is a quantitative variable whose values range from 0 to 360 with units as degrees. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = aspect)) +
geom_histogram(binwidth = 10, color = "black", fill = "gray") +
labs(title = "Histogram of Aspect",
x = "Aspect (degrees)",
y = "Frequency") +
theme_minimal()
## Warning: Removed 24 rows containing non-finite outside the scale range
## (`stat_bin()`).
This contains how much of the soil content is clay. This data is collected from the Google Earth Engine “OpenLandMap Clay Content” dataset provided by EnvirometriX Ltd. It is a quantitative variable whose values range from 0 to 100 as a percentage. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = clay)) +
geom_histogram(binwidth = 10, color = "black", fill = "gray") +
labs(title = "Histogram of Clay",
x = "Clay (%)",
y = "Frequency") +
theme_minimal()
## Warning: Removed 169 rows containing non-finite outside the scale range
## (`stat_bin()`).
This contains how much of the soil content is sand. This data is collected from the Google Earth Engine “OpenLandMap Sand Content” dataset provided by EnvirometriX Ltd. It is a quantitative variable whose values range from 0 to 100 as a percentage. The distribution of the values of the variable can be plotted for greater insight:
library(ggplot2)
dataframe <- Datasci120_Dataset
ggplot(dataframe, aes(x = sand)) +
geom_histogram(binwidth = 10, color = "black", fill = "gray") +
labs(title = "Histogram of Sand",
x = "Sand (%)",
y = "Frequency") +
theme_minimal()
## Warning: Removed 169 rows containing non-finite outside the scale range
## (`stat_bin()`).
In this report, I created my data dictionary and then performed exploratory data analysis on every variable to understand how the data is distributed for when I start considering relationships between variables.