🚧 Under construction — VoTechWorks is being built. A free tech program — complimentary, as our commitment to get America working.
voTechWorksGrade 13 · a vocational technology learning center, by urbanicity
newSchoolWorks.com › VoTechWorks › Technology & Design › Data Science & Analytics › Python and R for Data Science & Analytics › Lesson 1
TEC-DATA85-03 · Lesson 1 · 10 clock hours · lab

Environment Setup, Safety, and Programming Fundamentals

Objective. Students install and configure Python (Anaconda/Jupyter) and R (RStudio) on their workstations and demonstrate safe ergonomic and electrical practices at their data workstation.

⚠ Pending professional review

This lesson, its worked examples and its practice questions has not yet been verified by an industry-certified professional or by a certification or approval body. It is a study draft and may contain errors. Do not use it as instructions for work on a job site or on live equipment. Always follow your instructor, your supervising professional, and current official references and regulations.

VoTechWorks program approval and accreditation are still in progress. Credentials are issued only by the certifying bodies named in each program, after their own exams.

Why Your Environment Matters

Before you write a single line of code, your tools and your workspace both need to be set up correctly. A broken environment wastes hours of troubleshooting time. An unsafe workstation causes real physical harm over weeks and months of daily use. This lesson walks you through installing Python and R, configuring the software you will use throughout this program, and auditing your workstation so it supports long, healthy work sessions.

Installing Python with Anaconda

Anaconda is a free, open-source distribution of Python that bundles the interpreter, over 250 scientific packages, and the conda package manager in one installer. Download the current Individual Edition from anaconda.com and choose the installer that matches your operating system (Windows, macOS, or Linux). Accept the default installation path unless your institution specifies otherwise. When the installer finishes, open Anaconda Navigator or launch a terminal and type `conda --version` to confirm the install succeeded. Record the version number in your lab log.

Jupyter Notebook is included with Anaconda. Launch it from Anaconda Navigator or by typing `jupyter notebook` in a terminal. A browser tab should open showing your file system. Create a new notebook, select the Python 3 kernel, and run a test cell — if output appears, Jupyter is working.

Installing R and RStudio

R is a free statistical computing language maintained by the R Foundation. Install R first from cran.r-project.org (the Comprehensive R Archive Network), then install RStudio Desktop from posit.co. RStudio is an integrated development environment (IDE) that makes R much easier to use; it will not run without a working R installation underneath it. After installation, open RStudio and type `R.version.string` in the Console pane, then press Enter. Record the version string in your lab log. Also verify that Jupyter can use an R kernel by installing the IRkernel package inside R (`install.packages("IRkernel")` then `IRkernel::installspec()`).

Workstation Safety — Ergonomics

Data professionals spend most of their working day seated at a computer. Poor ergonomics lead to musculoskeletal disorders including repetitive strain injuries of the hands and wrists, neck and shoulder strain, and lower-back pain. OSHA's Computer Workstation eTool identifies the key adjustment points you must address:

Workstation Safety — Electrical

Data workstations draw meaningful electrical loads. Follow these basic rules:

Your First Scripts

The final activity is writing a simple script in both Python and R. This confirms your environment works end-to-end and introduces the basic syntax of each language. Your script should print your name, today's date, and one sentence describing a data analytics task. In Python, use the `datetime` module for the date. In R, use the `Sys.Date()` function. Both scripts will be pushed to the class repository, giving you your first experience with version control.

Lab Log and Sign-Off

Your lab log is a written record of what you installed, what versions you have, and what you found and fixed during your ergonomics audit. Treat it like a professional technician's work order — clear, dated, and specific. Your instructor will review and sign off on your installation checklist. You must also document at least two ergonomic corrections with before-and-after photographs. Both scripts must run without errors. All three items are required to pass this lab.

Key terms9

AnacondaA free, open-source Python distribution that packages the Python interpreter, scientific libraries, and the conda package manager in a single installer, commonly used in data science work.
Jupyter NotebookAn open-source, browser-based interactive coding environment that allows users to write and execute code in cells alongside narrative text and visualizations; included with Anaconda.
RStudio (Posit)An integrated development environment (IDE) for the R programming language, providing a console, script editor, environment viewer, and plot pane in one application; downloaded from posit.co.
CondaA cross-platform package and environment manager included with Anaconda that installs, updates, and manages Python packages and isolated virtual environments.
Surge ProtectorAn electrical device that absorbs or diverts voltage spikes to protect connected equipment from damage; rated in joules, and required at data workstations in place of plain power strips.
ErgonomicsThe science of designing and arranging a workstation so it fits the worker's body, reducing physical strain and the risk of musculoskeletal injuries during prolonged computer use.
Lockout/Tagout (LOTO)An OSHA-required safety procedure for controlling hazardous energy: equipment is de-energized, then locked and tagged to prevent accidental re-energization before maintenance work begins.
Lab LogA written record maintained by the student during a lab session documenting installed software versions, observations, corrective actions taken, and instructor sign-offs.
IRkernelAn R package that allows Jupyter Notebook to execute R code by registering R as an available kernel, enabling use of R inside the Jupyter interface.
In class: Follow a step-by-step installation checklist to install Anaconda, Jupyter Notebook, R, and RStudio; verify each tool launches without error and record the version numbers in a lab log. · Complete a workstation ergonomics self-audit using an OSHA-referenced checklist covering monitor height, seating posture, cable management, and surge-protector use; correct at least two findings and photograph before/after. · Write and run a 'Hello, Data Science' script in both Python and R that prints the student's name, today's date, and a one-sentence description of a data analytics task; share to the class repository.
Materials: Student laptop or lab desktop, Anaconda installer (anaconda.com), RStudio installer (posit.co), OSHA Computer Workstation eTool reference sheet, institution GitHub or shared drive, lab log template
Check: Installation checklist signed off by instructor with all tools running; ergonomics audit submitted with at least two corrective actions documented; both scripts execute without errors — pass requires all three items complete.

Practice check8

Answer each question, then check it. Nothing is recorded; this is your own practice.

Data tools and environment setup
1. When downloading Anaconda for a new Python installation, what is the correct sequence of steps to verify the installation succeeded?
Data tools and environment setup
2. Which of the following installation sequences is required for RStudio to function correctly?
Data tools and environment setup
3. A student wants to run R code inside Jupyter Notebook. After installing R and RStudio, which additional steps are needed?
Workplace safety and ergonomics
4. According to OSHA's Computer Workstation eTool, where should the top of a monitor be positioned to support safe posture?
Workplace safety and ergonomics
5. A student's power strip is already fully loaded, but they need to plug in one more device. Which action is safest?
Workplace safety and ergonomics
6. Which OSHA standard governs lockout/tagout procedures for the control of hazardous energy in US workplaces?
Python programming fundamentals
7. A student writing their first Python script needs to print today's date. Which standard library module provides date and time functionality in Python?
R programming fundamentals
8. In R, which function returns the current system date as a Date object, suitable for printing in a script?
Record this lesson on my transcript. Sign in with your key and enrollment email to record lessons (enroll free if you have no key). This page stays open to read and practise.