Science_blog

Search This Blog

Saturday, 11 March 2023

EPUB format

A file saved with the .epub is a file format used for storing files as eBooks and other types of content. EPUB is the short name of electronic publication and named the official standard of the International Digital Publishing Forum (IDPF).

EPUB files can store words, images, sheets, fonts, metadata details, and tables of content. They are considered layout agnostic, meaning that screen size doesn’t affect the formatting—EPUB files can display content on screens as small as 3.5″. This and the fact it’s a freely available standard is why a majority of eReaders support EPUB files.

In Ubuntu, you can save your file or document i.e. text, image, table of content in EPUB format by clicking on "export as" tab in "File" menu. However to open these files you need other software to install. I tried to open pdf viewer, image viewer, Libre office files system and it could not open. Hence, I look to internate and i found that it is suitable for Kindle to read ebooks.

How to Open an EPUB File

EPUB files can be opened on a computer with several free programs, such as Calibre, Adobe Digital Editions, Apple BooksEPUB File Reader, Stanza Desktop, Okular, and Sumatra PDFIn addition to a few of the programs just mentioned, Mac users can read EPUB files with ReadiumGoogle Play Books is another place you can open EPUB files by uploading them to your Google account and viewing it through the web client.

Convert an EPUB File

1. Calibre is the premier program for this. It converts to and from most other eBook formats and other supported conversions are EPUB, FB2, HTML, LIT, LRF, PDF, PDB, RTF, TXT, and SNB.

2. Zamzar is an online EPUB converter worth mentioning. You can use the website to convert the book to PDF, TXT, FB2, and other similar text formats.

3. Online eBook Converter is one way to make an EPUB file from another document file like AZW or PDF.


References:
https://www.lifewire.com/what-is-an-epub-file-2621084#:~:text=with%20your%20eReader.-,What%20Is%20an%20EPUB%20File%3F,than%20any%20other%20file%20format.

https://www.howtogeek.com/362592/what-is-an-epub-file-and-how-do-i-open-one/


Which one better HP's Envy or Spectre or Pavilion or Chromebook ?

HP's notebook

HP Elitebook:

The top one from hp brand with high performance with top speed and weight < 1 kg, not only look great also is very robust and make it top in 2 in 1 convertible laptop. As I said top then the cost is also on top which ranges more than 1300 euros minimum now a days. 

The body part is made of aluminium and design is slim with high inter core processors and it comes with 8 or 16 GB ram minimum. The most important is battery life > 13 hrs which is very in comparison to others. Since, these laptops comes for business purpose hence it comes with numerous security such as: HP sure view privacy screen and fingerprint sensor.





HP Spectre:

Another Hp's premium laptop with high cost less than HP's Elitebook with weight 1  < 1.6 kg and again convertible 2in1 with high ram 8 - 16 GB with outstanding B&O speakers, the borders less IPS touch display, which is available in Full HD+ and 4K and powerful CPU. And these laptop also comes with security purpose too i.e. finger sensor. However the cost is very high lower than Elitebook. The body part is also made of aluminium and design is slim with high inter core processors.



HP Envy:

Undoubtedly, HP's Envy laptops are the best laptops in 2in1 convertible category as these comes in lower price than Elitebook and Spectre with same features but lower ram (8-16 gb) and high intel core and AMD so there is choice and price is in pocket range and above than the Pavilion. Definitely you can buy. It comes with beautiful design and high end components such as SSDs, high res screens and discrete graphics. In contrast, the metal is usually stamped aluminum rather than the more premium precision milled metal on the Spectre line.



HP Pavilion: 

HP's Pavilion laptops are cheaper and affordable and comes in very range with optional of IR Cameras, Hard derive or SSD, optional discrete graphic and built in B&O speakers. However, it is flexible in 2in1 convertible range but the battery life is lower or near to 9 hrs and I think with battery hrs will decrease. Also, in term of performance it is not bad and it comes with high intel core or AMD. It also support 8 GB RAM.



In addition,

HP Chromebook:

Chromebook developed for kids and chrome lover powered by Google browser-centric operating system. HP's Chromebook do not come in several range as Asus and Acer and also it does not come with high RAM or storage too. It is suitable for kids, painting, design, communication and for fun even on go or travel time.



Suggestions:

1. Elitebook and Spectre are costlier so go for Envy. 

2. If you want to buy for kid or only communication or loved google then go for HP's Chromebook.

3. Fore business purpose, chose either Spectre or Elitebook for security purpose.

4. If you are working on data science then go for Specter because they come with more numbers of cores which helpful in programming.



"Don't waste your money it comes after hard work"  

--Dr. Rajiv Srivastava, 





Thursday, 2 March 2023

Save .pptx in .jpg or .png format in Ubuntu 22.4

 #########How to save .pptx file as .png pr .jpg####################

1. Create your ppt document 


2. Click on upper left 'file' tab



3. Click on 'Export' option for .jpg or .png and if you wan to save .pdf then click 'Export as pdf'


4. Then one window will pop up like this

5. Then click as your desire i.e .png or .jpg or.wmf or many and rename 



6. then click save and new window will pop up and choose scale

7. Now, .pptx saved as .png




Create dataframe in R

#####################How to create dataframe of different variables from .csv############

> install.packages ("tidyverse")

Check this link for installing tidyverse on updated Ubuntu

(https://rajivagriscienceblog.blogspot.com/2023/02/how-to-install-r-library-tidyverse-for.html)

> setwd("/home/rajiv/for_1695_datast_confidential/04_weather")

if it is windows then it should be ("C: //home/rajiv/for_1695_datast_confidential/04_weather")

> library('tidyverse')

> ec1 <- read.csv("ec1_weather_data.csv", header = TRUE, sep = ",")

1. data.frame

ec1weather <- data.frame(ec1$site,

                                      ec1$date,

                                      ec1$temeprarute)


2. Tibble

> ec1weather <- tibble(ec1$site,

                                      ec1$date,

                                      ec1$temeprarute)

3. cbind


> ec1weather <- cbind(ec1$site,

                                      ec1$date,

                                      ec1$temeprarute)

Note: The basic difference between three is that cbind and data.frame convert all variables in character (chr) but tibble convert as it is ie.e date to date, int to int and chr to chr. Remember type of data or class or str of data is necessary before to data analysis.  If date is chr then you can not plot a graph with ggplot. It will show error "error discrete value supplied to continuous scale"

To plot a graph with ggplot, check here:
https://rajivagriscienceblog.blogspot.com/2023/02/plooting-with-common-axis-in-ggarrange.html

Tuesday, 28 February 2023

How to insert date in row in R

 #########Import your file#########

> culti <- read.csv("cultivation2.csv", header = TRUE, sep = ",")

> culti$date <- as.Date(culti$hdate)

> cult2 <- data.frame(culti$date,   culti$site,    culti$code)

> colnames(cult2) <- c("date", "site", "crop")

> cutiec1 <- cult2 %>%

  filter(site == 1)


###########Do not forget to check your structure of data#######

> str(cutiec1) ("It should be character otherwise it would not work")

'data.frame': 11 obs. of  3 variables:

 $ date: Date, format: "2009-12-12" ...

 $ site: int  1 1 1 1 1 1 1 1 1 1 ...

 $ crop: chr  "CC" "SM" "WW" "WR" ...

####Change date to character format all rows

> cutiec1$date <- as.character(cutiec1$date)

> cutiec1$site <- as.character(cutiec1$site)

###option 1#####

> cutiec1[nrow(cutiec1)+ 1, ] <- c("2018-09-29")

but this would create problems like this 

date       site       crop

1  2009-08-02          1       <NA>

2  2009-12-12          1         CC

3  2010-10-14          1         SM

4  2011-07-28          1         WW

5  2012-07-20          1         WR

6  2013-08-04          1         WW

7  2013-12-11          1         CC

8  2014-10-09          1         SM

9  2015-07-22          1         WW

10 2016-11-01          1         GM

11 2017-07-30          1         WW

12 2018-07-09          1         WR

13 2018-09-29 2018-09-29 2018-09-29

Hence follow this ---

############Option 2##########

> cutiec1 <- cutiec1 %>% add_row(date="2009-08-02", site="1", .before = 1)

> cutiec1 <- cutiec1 %>% add_row(date="2018-09-29", site="1", .after = 12)

######then character date to POSIXct date

> cutiec1$date <- as.POSIXct(cutiec1$date, tz = "UTC")

#########Then convert POSIXct date to date format

> cutiec1$date <- as.Date(cutiec1$date)

Then do "pad". It will creat date from 2009-08-02 to 2018-09-29 at interval of day

> cutiec12 <- pad(cutiec1, interval = "day",)


It shows 3346 variables for all 9 years on daily basis.


#############################Done##############################################

Monday, 27 February 2023

Mitigation approaches in agriculture

In my opinion, followings could be the mitigation approaches in agriculture engineering 

1. Reducing N2O emissions

2. Reducing leaching 

3. Carbon captured and storage

4. No tillage

5. Plant breeding

6. Agroforestry

7. Restoration of forest

8. wetland

9. Reducing dryland area

Monday, 20 February 2023

ggarrange: Plotting with common axis in R

##########Import your file####################################

> setwd("/home/rajiv/for_1695_datast_confidential/04_weather")

> ec1w <- read.csv("ec1_weather_data.csv", header = TRUE, sep = ",")

> head(ec1w)

###Convert date to as date with column "Date"

> ec1w$Date <- as.Date(ec1w$date) 

############How to plot graph in ggplot2######################

1. > install.packages("ggplot2")

> library('ggplot2')

###plotting graph with ggplot2

> ggplot2(ec4w)+

  geom_line(aes(x=Date, y=pr))

2. >   install.packages("gtidyverse")

> library('tidyverse')

3. > install.packages("ggpubr",

                 repos = c("https://cran.rediris.org/", "https://cloud.r-project.org/"),

                 dependencies = TRUE)

> library('ggpubr)

##############ploting with ggarrange

> ec1 <- ggplot2(dataframe1)+

  geom_line(aes(x=Date, y=at))+

  geom_col(aes(x=Date, y=pr), color = "red")

> ec2 <- ggplot2(dataframe2)+

  geom_line(aes(x=Date, y=at))+

  geom_col(aes(x=Date, y=pr), color = "red")


> ec3 <- ggplot2(dataframe3)+

  geom_line(aes(x=Date, y=at))+

  geom_col(aes(x=Date, y=pr), color = "red")


> ggpubr::ggarrange(ec1, ec2, ec3,  

          ncol = 1, nrow = 3)

#################Plotting with common axis with ggarrange

> library(grid)

> library(gridExtra)

> ec111 <-   ggpubr::ggarrange(ec1 + rremove("ylab") + rremove("xlab"), 

                             ec2 + rremove("ylab") + rremove("xlab"),

                             ec3 + rremove("ylab") + rremove("xlab"), 

                             labels = c("EC1",

                                        "EC2",

                                        "EC3"),

                             ncol = 1, 

                             nrow = 3,

                             hjust = -15,

                             common.legend = TRUE, 

                             legend = "bottom",

                             align = "hv", 

                             font.label = list(size = 10, color = "black", face = "bold", family = NULL, position = "top"))

then,

> annotate_figure(ec111, left = textGrob("Temperature (black) and Precipitation (red)", rot = 90, vjust = 1, gp = gpar(cex = 1.3)),

                bottom = textGrob("Date", gp = gpar(cex = 1.3)))


          


I made this with my data.


Multidisciplinary Mega‑Journals: Has Their Time Passed?

     Over the past decade, multidisciplinary and so‑called “mega‑journals” became some of the most attractive destinations for researchers u...