- 10
- 3 732
GHDars_HiTech
Pakistan
Приєднався 15 чер 2023
Відео
Create a dataframe in R with columns of years and months
Переглядів 8510 місяців тому
Create a dataframe in R with columns of years and months
convert daily data into monthly and yearly formats
Переглядів 18811 місяців тому
This video will show you how to convert daily data into monthly and yearly formats in R using xts package.
Climate Change Knowledge Portal
Переглядів 626Рік тому
In this video, I will explore the climate change knowledge portal wherein excellent information is available about the historical changes and projected changes in the climate. If you use this data, please don't forget to cite the World Bank.
Numpy Package in Python
Переглядів 119Рік тому
In this video, i will show you how to create Arrays, manipulate, and indexing using Numpy Package in Python.
Conditions and Loops in Python
Переглядів 88Рік тому
In this video, i will describe the conditions and loops in Python.
Intro 2 Python - Data Types
Переглядів 98Рік тому
In this video, i will show you built-in data types in Python.
Intro 2 Python1
Переглядів 127Рік тому
In this video, i will show how to launch Jupyter Notebook from your drive and describe some basics of Python.
Clip netcdf data using a shapefile
Переглядів 2 тис.Рік тому
You can clip data in Python (using Jupyter Notebook)
Cannot pass a single ndarray as region - please pass it as a list Cell 24 any suggestion? thanks
geometries = list(shapefile.geometry) # Convert to list poly = regionmask.Regions(geometries)
rm(list = ls()) library(tsibble) library(readxl) library(tidyr) setwd("D:/Data/PMD Data") excel_data <- readxl::read_excel("PMD sindh Data.xlsx", sheet = "Hyd") head(excel_data) your_data_long <- excel_data %>% pivot_longer(cols = -Year, names_to = "Month", values_to = "Value") head(your_data_long,13) library(openxlsx) # Specify the file path where you want to save the Excel file file_path <- "D:/Data/PMD Data/Hyd_timeseries.xlsx" # Save the data frame to an Excel file write.xlsx(your_data_long, file_path, rowNames = FALSE)
Very helpful video
rm(list=ls()) # Create vectors for years and months years <- rep(1980:2020, each = 12) head(years,13) print(years) months <- rep(month.name, times = 1) head(months) # Combine vectors into a data frame data_frame <- data.frame(Year = years, Month = months) head(data_frame,13) # Concatenate Year and Month without a separator # data_frame$Concatenated <- paste0(data_frame$Year, data_frame$Month) # Print the resulting data frame print(data_frame) # If you want to save it into excel file install.packages("openxlsx") # Load the openxlsx package library(openxlsx) # Specify the file path where you want to save the Excel file file_path <- "D:/Data/PMD Data/years_month.xlsx" # Save the data frame to an Excel file write.xlsx(data_frame, file_path, rowNames = FALSE) # Print a message indicating successful save cat("Data frame saved to Excel file:", file_path, " ")
I am interested in downloading historical data on average temperature and rainfall data all countries. How can we download it? Do you have any idea?
Excellent ❤❤❤🎉🎉🎉
rm(list = ls()) library(xts) library(readxl) setwd('D:/Trainings/Aquacrop') my_data <- read_excel("data_badin-1701850474616.xlsx", sheet = "Model_Data") head(my_data) dim(my_data) CAVA_daily_pr <- my_data[,4] head(CAVA_daily_pr) dim(CAVA_daily_pr) # length.out length to which you wanna make data to annual # if you have one year data then it will be three sixty five date <- seq(as.Date("1980/1/1"), by = "day", length.out = 731) value <- CAVA_daily_pr [1:731,] daily_model_data <- xts(value, order.by = date) head(daily_model_data) monthly_data <- apply.monthly(daily_model_data, sum) monthly_data yearly_data <- apply.yearly(daily_model_data, sum) yearly_data
Good effort.
Thanks Sir very informative.
❤❤❤
❤❤🎉🎉
Hi
Sir I request you to give an task or exercise for more practice..! Thanks
Masha Allah sir so great
Msha Allah sir so great ❤
Good 👍👍
Sir Good
sir can you plz add a link of this Python script here
Sure, I will.
Sir good
Sir zabardast