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:
- Monitor height and distance. The top of the screen should be at or slightly below eye level, roughly an arm's length away. Tilting your head up or down for hours strains the cervical spine.
- Seating and posture. Adjust seat height so your feet rest flat on the floor (or a footrest) and your thighs are roughly parallel to the floor. Your lower back should be supported by the chair's lumbar support. Avoid slumping.
- Keyboard and mouse placement. Keep them at a height that lets your elbows stay close to your body at approximately a 90-degree angle, with wrists in a neutral (straight) position.
- Cable management. Cables on the floor create a trip hazard. Route cables along desk legs, use cable ties, or run them through a cable tray. This is also an electrical safety concern: damaged insulation from cables being stepped on or pinched can cause shock or fire.
- Lighting. Position monitors to avoid glare from windows; use window blinds or monitor hoods as needed to prevent eye strain.
Workstation Safety — Electrical
Data workstations draw meaningful electrical loads. Follow these basic rules:
- Use a surge protector with a joule rating appropriate for your equipment. A surge protector guards against voltage spikes that can destroy hardware and potentially start fires. Do not daisy-chain power strips.
- Do not overload circuits. Know the amperage of the circuit your workstation is on and keep total load within safe limits.
- Inspect cords regularly. Frayed, cracked, or pinched cords must be replaced, not taped. Report damaged equipment to your instructor or facilities staff immediately.
- Lockout/Tagout (LOTO). If you are ever asked to open a computer case or work on powered equipment during this program, follow your institution's LOTO procedure. De-energize, lock, and tag the circuit before touching internal components. OSHA's LOTO standard (29 CFR 1910.147) applies to the control of hazardous energy in workplaces.
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.
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.