1.6 Why Python versus R? (Complete the Practice Google Colab Exercise)
Google Colab
The two most dominant programming languages used by data scientists are the open-source languages of R and Python (both interpreted languages). Conceived in 1992 and initially released in 1995, R was the favorite for many years among statisticians and is still quite prominent and growing.1 It is particularly well known for its fantastic packages and libraries for data visualization and advanced statistics. However, it fell behind Python as the most popular programming language for data science sometime between 2015 and 2016.2
Today, Python is a very highly rated and widely used programming language. It has received the following rankings:
-
#3 for search engine queries (TIOBE)
-
#1 for programming tutorial searches (PYPL)
-
#3 for StackOverflow tags and GitHub projects (Redmonk)
-
#1 for CodeEval challenge submissions
-
#4 in HackerRank’s developer skills report
-
#4 overall and #1 fastest growing language based on StackOverflow’s annual developers survey
-
#3 based on a broad range of Google searches, StackOverflow, Github, Reddit, HackerNews, and job postings on Indeed, CareerBuilder, Dice, and others (IEEE Spectrum)
These rankings are out of all programming languages used for any purpose. Of the languages used for data science (Python, SQL, R, SAS, etc.), Python is ranked number one.3 However, it should be noted that the use of R is not actually shrinking as the rankings might imply. Rather, this shift toward Python is happening because the market of data scientists is growing rapidly, and most new entrants are learning Python.
What has led to this Python popularity? Like R, Python has packages used for advanced statistics that have grown. Python also includes many useful packages for data cleaning and preparation. But perhaps most importantly, the Python language is also commonly used for web application development and the deployment of machine learning models into data-driven software products. In other words, Python allows you to take a data analytics project all the way through a machine learning cycle in one language (although many others will still be needed along the way). Additionally, Python (like R) is very easy to learn and has relatively simple syntax as far as programming languages go.
Python IDEs: Google Colab
To write Python code, we need an A software application (whether installed locally or available on the cloud) that provides comprehensive assistance to computer programmers for software development such as a code editor, build automation tools, and debugging features.. An IDE is a software application that provides comprehensive assistance to computer programmers for software development such as a code editor, build automation tools, and debugging features. An IDE can be installed locally or available on the cloud.
There are many good IDE options for Python, but we will be using A cloud-based data science work space that allows you to create documents containing live code, equations, visualizations, and narrative text.. In order to use Google Colab, you have to have a free Google Account. If you already have a Google account, you are welcome to use your existing account for this course. Follow along with the video below to familiarize yourself with Colab:
If you would like assistance using a screen reader, we recommend using Google Colab with the ChromeVox extension. ChromeVox is specifically designed for the Chrome web browser and works seamlessly with Google Colab, providing auditory feedback and keyboard navigation to enhance your reading experience.
To get started with ChromeVox, you can install it through the Chrome Web Store and enable it on your Chromebook or Chrome browser here: https://chromewebstore.google.com/search/ChromeVox?utm_source=ext_app_menu
For users who do not use the Chrome browser, we recommend the following alternatives:
For macOS users, we suggest using VoiceOver, the built-in screen reader that provides excellent compatibility with most browsers and applications.
For Windows users, NVDA (NonVisual Desktop Access) and JAWS are popular and highly effective screen readers that offer robust features for navigating online content.
While the Google Colab is the IDE we will use in this source, you may find it useful to familiarize yourself with some of the other prominent IDEs available.
Jupyter Notebook: the original .ipynb IDE. It appears to run in the cloud because it uses a web browser (e.g., Chrome, IE, or Safari) as its interface. However, it runs on a virtualized server on your own machine.
Visual Studio Code: a free Microsoft product that allows many types of code editing besides Python.
Getting Started in Colab
Let’s get you used to how the assignments will work in this course by completing a very simple practice assignment below. Complete the tasks requested in each section and upload your .ipynb file at the end. That file will be graded by your instructor using the course auto-grader. Be sure to click the Submit button when you are done, or else the assignment will not be graded. In addition, make sure to read the feedback provided after each question regardless of whether you get it right or wrong. That feedback will guide you on what to expect in this course. Follow along with this video to complete the practice assignment below:
Want to try our built-in assessments?
Use the Request Full Access button to gain access to this assessment.