The chunk below was used to plot figure 1 # make a pairplot with seaborn For this case, I used the function pairplot-a pairwise plot that show the relationships of variables present in pandas Dataframe. We then the power of seaborn package from Python to visualize. Then construct pandas data frame from tibble # Note that conversion from tibble to pandas data frame must be done in the Python chunk and not R chunk kgr_df = kgr %>% mutate(month = lubridate::month(time, abbr = T, label = T))%>% select(sst,chl, month) Make a copy of pandas dataframe from tible with the r. Once the tibble file is in the environment, we need to convert from tibble data frame into pandas dataframe. Read the excel file with readxl and manipulate the data with dplyr to the write format kgr = readxl::read_excel("dege.xlsx") We first load the tidyverse require(tidyverse) The outocome after reading the file is the tibble format-a modern data frame from the tidyverse ecosystem (Wickham 2017). The function readxl::read_excel() function is used (Wickham and Bryan 2018). In this section we use function from R to read the dataset from the local machine into R session. Flexible binding to different versions of Python including virtual environments and conda environment.Translation between R and Python objects-for example r_to_py function allows to construct R to Pandas data frame and py_to_r() function convert python object like data frame, matrix and etc to R.Calling Python from R in a variety of ways including rmarkdown, sourcing, Python scripts, importing Python modules and using Python interactively within and R session.The reticulate package provide the following facilities reticulate package provides a comprehensive set of tools that allows to work with R and Python in the same environment. Thanks to Kevin Ushey and his collegues ( 2019) for devloping a reticulate package. Its undeniable truth that there are definitely some high and low points for both languages and if we can utilize the strength of both, we can end up dong a much better job. The questions that always resolute in my mind is whether can we utilize the statistical power of R along with the programming capabilities of Python?.
Our ultimate goal should be to do better analytics and derive better insights and choice of which programming language to use should not hinder us from reaching our goals. Therefore, there is no reason that hold us to stick using this programming language or the other. But majority are committed to only one programming language, but wish they had access to some functions from other language. I believe there are few people in the Data Science community who use both R and Pythhon in their analytical workflow. So, whether you have in R or Python camp, one thing you will notice is that the problem we have in data science is simply that divergence does not lie with the tools but with the people using those tools. Honestly, I do not hold to their opinion, but rather wish I have skills for both languages. Members of both camps believe that their choice of language. There major two camps- R camp and Python camp-and history is the testimony that camps can not livel in harmony. Because data analysts have divided the data science field into camps based on the choice of the programming language they are familiar with. One major reason for such view lies on the experts. Truth be told, R and Python are excellent tools in ther own right but are often conceived as rivals. However, instead of considering them as tools that supplement each other, more often you will find people dealing with data claim one language to be better than the other. Both R and Python are quite robust languages and either one of them is actually sufficient to carry out the data analysis task. If you work with data science, R and Python must be the two programming languages that you use the most.