Practicing Python and R at the same time

  • Python
  • Thread starter geologist
  • Start date
  • Tags
    Python Time
In summary, the speaker has learned the basics of Python and is also interested in R for data analysis. They have prioritized learning R because it is more applicable to their job, but they also intend to learn Python for open source GIS. The speaker believes that Python may be more useful for automating processes in the long run. They also mention that Python is becoming increasingly popular compared to R. The speaker plans to focus on both languages, with a greater focus on R, but may consider focusing on Python first due to its use in GIS software. They also note that another co-worker already knows R, so it may be more beneficial for them to learn different languages.
  • #1
geologist
19
1
Hello,

I've learned some of the basics of python through the sololearn Python 3 course (I also started the first week of the MIT Intro to computer science and programming on edx.org, but I found it beyond beginner level and decided to go through the sololearn Python 3 first).

My company (environmental consulting/environmental engineering) is interested in how R can be used for some of the basic statistics we perform (groundwater/soil analytical data). Since a co-worker already knew some R (used it in graduate research), I prioritized R since at this time it was more directly applicable to my job. I've gone through the data camp Intro and intermediate R tutorials.

I know it's not generally recommended to start learning both at the same time, but I'm already familiar with the syntax of both and I intend to learn both regardless (python mainly for open source GIS, e.g. GRASS & QGIS, and ArcGIS). Would it be counter productive to practice and continue building on both at the same time (~15 hours/week).
 
Technology news on Phys.org
  • #2
It sounds like R is of immediate benefit to your company, so that part is answered. Python is a very powerful language that will allow you to automate many processes that would otherwise be very tedious. Its benefit on your job may not be immediate, but you may eventually be able to automate things at work that will greatly increase your productivity. If you enjoy scripting processes, you may want to learn Python anyway on your own time.

PS. I tend to believe that Python is a little over-sold and prefer Perl for scripting processes. But there are very good programmers (certainly better than me) who love Python.
 
Last edited:
  • #3
Well obviously R is more important to you, however R is not having a large dynamic [compared to python] as can be seen in the table here: https://usersnap.com/blog/programming-languages-2018/
where python appears with a very strong increasing trend (according to PYPL ranking). The TIOBE ranking also shows an increasing trend for Python: https://www.tiobe.com/tiobe-index/ (compared to R), ranking 4th from 5th it was last year, overpassing C#. Python had an increase of about ~2.4% while R had a decrease of ~0.3%
Since we try to compare R with python, I guess your main target is big data analysis. Python has to offer extremely useful tools both for the data analysis and visualization. So in general I would definitely recommend python to R, given that this won't be bad for your current work [this should always be taken into account]. Afterall there is work for C++ programmers too :biggrin: not that many, but they exist. But I won't be too hard on C++, it has shown some great improvements in terms of usability since C++11.
 
  • Like
Likes geologist
  • #4
FactChecker said:
It sounds like R is of immediate benefit to your company, so that part is answered. Python is a very powerful language that will allow you to automate many processes that would otherwise be very tedious. Its benefit on your job may not be immediate, but you may eventually be able to automate things at work that will greatly increase your productivity. If you enjoy scripting processes, you may want to learn Python anyway on your own time.

PS. I tend to believe that Python is a little over-sold and prefer Perl for scripting processes. But there are very good programmers (certainly better than me) who love Python.

Part of the reason for learning python is because GIS software (namely ArcGIS, QGIS, and GRASS GIS) utilize python for scripting. I'm focusing on R and python this year, but they won't necessarily be the only languages I learn.
 
  • #5
Given the fact you work for a "dirt burning" company :wink: that potentially uses ArcGIS I'd start right there with python and the arcpy libs. With the ArcGIS support and examples available for python scripting, geospatial data analysis and visualization, in my opinion your path to developing competence in scripting to support your things like kriging and plume modeling would be a much easier learning curve with python utilizing the ArcGIS toolbox. Take up R later once you've mastered python.

Plus that other guy uses R, let him to the R and you can do the python. You will program loops around him with python and arcpy.
 
  • Like
Likes geologist
  • #6
Kyle Gonterwitz said:
Given the fact you work for a "dirt burning" company :wink: that potentially uses ArcGIS I'd start right there with python and the arcpy libs. With the ArcGIS support and examples available for python scripting, geospatial data analysis and visualization, in my opinion your path to developing competence in scripting to support your things like kriging and plume modeling would be a much easier learning curve with python utilizing the ArcGIS toolbox. Take up R later once you've mastered python.

Plus that other guy uses R, let him to the R and you can do the python. You will program loops around him with python and arcpy.

My company deals with mainly with environmental contamination assessments (https://en.wikipedia.org/wiki/Environmental_consulting), I assume "dirt burning" implies petroleum?. I was actually learning python first, I only start learning R when I saw my co-worker using it for something, which in hindsight I probably should have got good at python first. We haven't had as heavy a use of GIS as would be expected for an environmental company, but that probably will change.
 
  • #7
geologist said:
My company deals with mainly with environmental contamination assessments (https://en.wikipedia.org/wiki/Environmental_consulting), I assume "dirt burning" implies petroleum?. I was actually learning python first, I only start learning R when I saw my co-worker using it for something, which in hindsight I probably should have got good at python first. We haven't had as heavy a use of GIS as would be expected for an environmental company, but that probably will change.
When you need to work with others at a company, you may have to work in the language that they have done a lot with. There may be a great many R programs there. If so, you should be able to deal with it. R is very well respected and a well established statistical language.
 

FAQ: Practicing Python and R at the same time

How do Python and R compare in terms of popularity among data scientists?

Python and R are both popular programming languages among data scientists, with Python slightly edging out R in recent years. This is likely due to Python's versatility and ease of use for tasks beyond statistical analysis, such as web development and artificial intelligence.

Can I use both Python and R in the same project?

Yes, it is possible to use both Python and R in the same project. Many data scientists choose to use both languages in order to take advantage of their individual strengths and capabilities.

Are there any differences in the learning curve for Python and R?

The learning curve for Python and R can vary depending on the individual and their previous programming experience. However, in general, Python is considered to have a slightly easier learning curve compared to R, as it has a simpler syntax and is more intuitive for beginners.

Are there any resources available for learning both Python and R simultaneously?

Yes, there are many resources available for learning both Python and R at the same time, such as online courses, tutorials, and books. Additionally, there are also hybrid tools and packages, such as RPy2 and reticulate, that allow for seamless integration of Python and R code within the same project.

Is it necessary to learn both Python and R for a career in data science?

No, it is not necessary to learn both Python and R for a career in data science. While it can be beneficial to have knowledge and experience in both languages, many data scientists specialize in one or the other and are still successful in their careers.

Back
Top