Publications by Patrick Ford
World Energy Consumption
pacman::p_load(pacman, tidyverse, reshape2) # Load the data World_Energy_By_Region_1965_to_2023 <- read_csv("World_Energy_By_Country_And_Region_1965_to_2023.csv") ## Rows: 111 Columns: 60 ## ── Column specification ───────────────────────────────────────────�...
7 sym Python (3110 sym/3 pcs) 16 img
Aridity Gradient - Israel
pacman::p_load(pacman, tidyverse) # Read the dataset data <- read_csv("Aridity_Gradient_Israel.csv") ## Rows: 420 Columns: 4 ## ── Column specification ──────────────────────────────────────────────────────── ## Delimiter: "," ## chr...
18 sym 2 img
Greenhouse Experiment
pacman::p_load(pacman, ggplot2, dplyr, tidyr) # Load the data data <- read.csv("Greenhouse_experiment.csv") # Display the first few rows of the data to check the structure head(data) ## Species Watering_treatments Locality Individual ## 1 Hedypnois rhagadioloides 30 Mediterranean 1 ## 2 Hedypnois ...
19 sym 4 img
Productivity Gradient - Germany
pacman::p_load(pacman, ggplot2, dplyr, readr) # Read the data data <- read_csv("Productivity_Gradient_Germany.csv") ## Rows: 420 Columns: 4 ## ── Column specification ──────────────────────────────────────────────────────── ## Delimi...
23 sym Python (4780 sym/16 pcs) 4 img
Linear Model.
pacman::p_load(pacman, tidyverse, gridExtra) # Function to read, process, and predict future sales for a given data file process_and_predict <- function(file_path, currency_col) { # Read data, specifying column types data <- read_csv(file_path, col_types = cols( Year = col_character(), !!currency_col := col_double() )) # Process d...
5 sym Python (2247 sym/1 pcs) 1 img
STL, ETS and SARIMA Modelling
pacman::p_load(pacman, tidyverse, gridExtra, zoo, forecast) # Function to read, process, and predict future sales for a given data file process_and_predict <- function(file_path, currency_col) { # Read data, specifying column types data <- read_csv(file_path, col_types = cols( Year = col_character(), !!currency_col := col_double() ))...
9 sym Python (2906 sym/3 pcs) 3 img
eBay Sales
Chart explanation, below code. pacman::p_load(pacman,tidyverse,gridExtra,zoo) # Read the data ebay_data <- read_csv("eBay.csv", col_types = cols( Year = col_character(), `Billion USD` = col_double() )) # Convert Year to a date format for easier plotting ebay_data <- ebay_data %>% separate(Year, into = c("Year", "Quarter"), sep = " ") %>% ...
2667 sym Python (1987 sym/2 pcs) 1 img
Alibabas Sales
Chart explanation,below code. pacman::p_load(pacman,tidyverse,gridExtra,zoo) # Read the data alibaba_data <- read_csv("Alibaba.csv", col_types = cols( Year = col_character(), `Billion CYD` = col_double() )) # Convert Year to a date format for easier plotting alibaba_data <- alibaba_data %>% separate(Year, into = c("Year", "Quarter"), sep = ...
2843 sym Python (2023 sym/2 pcs) 1 img
Amazon Sales
Chart explanation, below code. pacman::p_load(pacman,tidyverse,gridExtra,zoo) # Read the data amazon_data <- read_csv("Amazon.csv", col_types = cols( Year = col_character(), `Billion USD` = col_double() )) # Convert Year to a date format for easier plotting amazon_data <- amazon_data %>% separate(Year, into = c("Year", "Quarter"), sep = " "...
2608 sym Python (2011 sym/2 pcs) 1 img
Travelling Salesman Problem 1
Travelling Salesman Problem: Visit Each City Once In The Shortest Route and Finish Where You Started. pacman::p_load(pacman,geosphere,GA) # Read the CSV file correctly cities <- read.csv("UK_Cities.csv", header = TRUE, sep = ",") # Split the City, Latitude, Longitude, and Population into separate columns cities_split <- do.call(rbind, strsplit(as...
1856 sym Python (5739 sym/16 pcs)