Science_blog

Search This Blog

Saturday, 11 March 2023

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.


Sunday, 19 February 2023

Linux Vs Macos: Which is better

 Let's talk about Linux Vs Macos. Something is more interesting and amazing. As, you may have noticed that the data science/engineering people works on either Linux or Macos and most high performance computing systems use Linux version because it allow all programming software while in widows, you need platform and they are slower as much and the reason is that all core are busy in other work and it allow one core only for that software and rest for windows. But, Macos allow you for other software too as linux and it comes with many. Hence, now days it demand has been increased to for data science. However, both (Linux and Macos) share Unix management system. Now the question is which one is strong ?



1. Open source vs Proprietary software

Both Linux and Macos use open source software system Unix. But, Linux distribution is entirely based on free software while part of Macos use of open source and rest are proprietary based for that you have to pay. Since, Linux is based on open source then you edit and modify if you are specialist in software work and still a freely robust distribution.


 2. Desktop environment

At the early stage, Linux did not come with desktop environment instead you have to use access with terminal. But, now a days, it allows many desktop environment i.e. Ubuntu, fedora and then with GNOME, XFCE, KDE, Deepin and many more.

GUI in Macos is standard and same for all customers or users and nothing new. 

3. Hardware  

You can install Linux on computers with any configurations. Even, you can install on Windows and Macos too by sing virtual machine and it require less space than others.

But with Macos, fortunately not after all it paid service.

4. Security

I think there is no any software which is 100% secure even Linux too and reason is very simple. It is free for everyone even for hackers too so they can develop tool to spoil it and may be they are trying but the chances is less in compression too windows and Macos and reason is these two are not free and currently, they are on top to earn money. 

However, with Linux, it is less chance and reason is free so if someone will hack my computer i can format computer and reinstall and another strong which make Linux system strong than others is commend line system (CLI). Hence, to access any files in systems to need permission every time this is reason why auto run type virsus could not affect any more.

And, another advantage, Linux is open source then there is no way to hide malicious or privacy violating code. Any one can remove it out.


5. Professional Carrier

Yes, it can help it to make your carrier in computer science and data science even more. As i said most data company and tech company prefer Linux system than the windows and Macos and if you are familiar with this there is high chance to select you. I have seen most high performance computing system prefer only Linux.

The only good point with macos that it also come with CLI or terminal based hence you can use it for that purpose but if other system don't have.



Conclusions

1. For carrier, Linux is better than Macos
2. Linux is high secure than Macos 
3. Macos allow video editing service than the Linux but you have to pay a lot.
4. In terms of price, Linux dominant as it is free.

Suggestion


Whole thing is depend upon you. Do you like to invest money or learning computer system. If you have money don't think too much buy Macos it gives you privacy but if you are at early stage of professional carrier then go for Linux to learn how to use terminal otherwise you could lost in Macos system and except watching video and internate suffering, you can not do any thing and you will say like my friends "Why Macos is so popular and what Macos does".  Remember, Macos do not allow neither MS office nor like MS office tools so be careful. It don't allow to access and modify word and excel files and  if you want then you have to pay a lot. 

Macos allow you to do video, pic, gif editing and creating apps for Macos beyond of this there is Windows. But Linux allows everything what i wrote above. One another point, In Europe, most people prefer Macos for personal use and for Carrier they choose Linux.







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...