Warabandi or Roster of Turn

Introduction: This function will generate roster for a week (168 hrs. or 24X7). Flow time of a watercourse to an individual farmer calculate based on their holding area (bigga or hectares), This flow time roster generated by this function known as "warabandi" in canal irrigated agricultural areas (Punjab, Rajasthan, Haryana and Some areas of Pakistan)

Load Package


data structure of input data


Calulation of roster

Here we are not writing output to reduce vignettes and space

output<-warabandi(file = warabandi_data, output = FALSE, nof = "my_file.csv")

Lets take a look at output

Output generated by package is a list of different objects. 1. Flow time per unit area in minutes 2. Rakva or total area under command subject to be irrigated 3. Bharai or fillig time; as a compensation 4. Jharai or empty time 5. Weekdays or total duration has to be divided 6. Final table calculated by warabandi saved as a output file to the working directory


Report generation of warabandi

Generation of the report in printable format which can be supplied or distribut- ed among all the farmers. This step is highle depend on the external packages (knitr, flextable). Code chunk provide below is a sample which can be modified as per user need like header and fotters. Lets read output file generated by warabandi package


Lets make table


Lets generate report for individual farmer

data3 <- data.frame(head(data2))
invisible(by(data3, seq_len(nrow((data3))), function(row) {
  chak<-"Chak-38 R.B" 
distributries<- "R.B II"
dateOd<-"Date of distribution __/__/____"
note1<-"Note: All schedules issued before this, are cancelled"
Year_o_Valid<-"Year: April 2019 to 2025"
Issue<-"Issue Serial No:________/___"
Jal_upbhokta<-"Jal Upbhokta Sangam:"
d5 <-flextable::fit_to_width(flextable::flextable(row), max_width = 7,
                             inc=1L, max_iter = 20)
d5 <- flextable::add_header_lines(d5, c(paste(Year_o_Valid,"\t","\t", chak), paste(Jal_upbhokta,
                                                                                   distributries, "\t","\t", Issue, "\t","\t","\t","\t",  dateOI)))
d5 <-flextable::add_footer_lines(d5, 
                                 c(paste(dateOd, "\t", "\t", note1), 
                                   paste("President", "\n", "\n", "\n", 
                                         Jal_upbhokta, distributries)))


Lets take a look at report for individual farmer

Contact us

That's all! Thanks for being here. Let me know if you heve any doubt about this package or issue Harvinder Singh Department of pharmacology PGIMER, Chandigarh (160012) harvindermaan4@gmail.com ORCID https://orcid.org/0000-0002-6349-3143

Try the warabandi package in your browser

Any scripts or data that you put into this service are public.

warabandi documentation built on July 9, 2021, 9:09 a.m.