0% found this document useful (0 votes)
7 views10 pages

CSCI946 Lab 1 Instructions (For WindowsOS) - 2024

The document outlines Lab 1 for CSCI446/946 Big Data Analytics, focusing on installing and using Python and related tools like Anaconda and Spyder. It provides step-by-step instructions for installation and basic exercises to familiarize students with Python for data analytics. Additionally, it mentions the optional installation of Jupyter Notebook for enhanced coding experience.

Uploaded by

Masud Zaman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views10 pages

CSCI946 Lab 1 Instructions (For WindowsOS) - 2024

The document outlines Lab 1 for CSCI446/946 Big Data Analytics, focusing on installing and using Python and related tools like Anaconda and Spyder. It provides step-by-step instructions for installation and basic exercises to familiarize students with Python for data analytics. Additionally, it mentions the optional installation of Jupyter Notebook for enhanced coding experience.

Uploaded by

Masud Zaman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

CSCI446/946 Big Data Analytics - Week 2

Lab 1 - A brief introduction to Data Analytics using Python

Table of Contents
Introduction ..................................................................................................................... 2
Task 1: Install Python........................................................................................................ 3
Task 2: Install Anaconda ................................................................................................... 4
Task 3: Install Spyder ........................................................................................................ 5
Task 4: Exercise with Python ............................................................................................. 7
Task 5: Install Jupyter Notebook/Lab (Optional)................................................................ 9

Lab 1 CSCI446 CSCI946 Spring 202 SCIT UOW Page 1 of 10


Introduction
In Lab1, we will install and run Python on graphical editors. Graphical editors make coding,
debugging, visualizing, results, etc., much more accessible. CSCI446/946 suggests using, but
not limited to, Spyder for Python. Jupyter Notebook or Juptyer Lab are another good tool
for CSCI446/946 labs and assignments (optional). Anaconda is a recommended application
having Spyder, Jupyter and managing packages of Python.

Python is often used in Big Data Analytics though more powerful tools exist (i.e., Hadoop).
We use Python so that you can run lab tasks and exercises and do assignments on your home
computer. All tools we will use are available for a broad spectrum of OSs and are free to use!

You will use Python for CSCI446/946 labs, exercises, and assignments.
 Please complete Task 1, Task 2, Task 3, Task 4, and Task 5 (which is optional) below.
 Note that this instruction is based on Windows OS. Adapt it accordingly to other
operating systems.

Lab 1 CSCI446 CSCI946 Spring 202 SCIT UOW Page 2 of 10


Task 1: Install Python 3.12.4
(Move to the next task if you already have Python 3.12.4 installed on your computer.)

Step1, To download Python, visit: https://www.python.org/downloads/ , click the button


“Download Python 3.12.4” to download.

Step2, find the downloaded file “python-3.12.4-amd64.exe” from your browser’s Downloads
Location (default: Downloads folder) and run installation: agree with default settings, then
“Close” to finish.

Lab 1 CSCI446 CSCI946 Spring 202 SCIT UOW Page 3 of 10


Task 2: Install Anaconda
(Move to the next task if you already have Anaconda installed on your computer.)

Step1, To download Anaconda, visit: https://www.anaconda.com/ and click “Free Download”


button.

Step2, find the downloaded file “Anaconda3-2024.06-1-Windows-x86_64.exe” from your


browser’s Downloads Location (default: Downloads folder) and run installation: multiple
clicks on “Next” & “I Agree”, then “Finish” to complete.

Lab 1 CSCI446 CSCI946 Spring 202 SCIT UOW Page 4 of 10


Task 3: Install Spyder
(Move to the next task if you already have Spyder installed on your computer.)

Step 1, launch Anaconda


Step 2, go to Environments, then create a new environment for python

Installation status bar is at the bottom of the window:

Step3, by selecting bdpython in Environments, go to Home, then install Spyder in latest


version from Anaconda, click > install specific version > 5.5.1 :

Lab 1 CSCI446 CSCI946 Spring 202 SCIT UOW Page 5 of 10


During the installation, there may be a pop-up window to create a new environment for
spyder. Use default environment name, i.e., “spyder”, and create to continue.

Installation status bar is at the bottom of the window:

Once completed, we can launch Spyder from Anaconda every time by selecting the spyder
environment first from Anaconda > Environments.

Step4, install Python packages. There are many packages and toolboxes available for Python.
We can install a particular package when we need it. There are two ways to install packages:
Anaconda -> Environments, or cmd (Windows command console) terminal command. Take
the package pandas for example:
1. Anaconda > Environments > spyder

Lab 1 CSCI446 CSCI946 Spring 202 SCIT UOW Page 6 of 10


2. Terminal command:
Firstly, From Anaconda to open environment spyder in terminal: Environments >
spyder > > Open Terminal

Then, type pip install pandas in terminal

Use either way to install 3 packages: pandas, numpy, sklearn into spyder
environment.

Step 5, change default dictionary to Downloads folder in Spyder: menu-bar > Tools >
PYTHONPATH manager > Add path > select Downloads folder > click Select Folder > OK,
then menu-bar > Consoles > Restart kernel, then menu-bar > File > New file… .

Task 4: Exercise with Python


Let’s do some exercises with Python to gain familiarity.

Lab 1 CSCI446 CSCI946 Spring 202 SCIT UOW Page 7 of 10


[Exercise] Launch Spyder then run each of the following commands.

For preparation, install package matplotlib first.

import pandas as pd
import matplotlib.pyplot as plt

# read the csv file


sales = pd.read_csv('yearly_sales.csv')

# examine the imported dataset


sales.head()
sales.describe()

# plot num_of_orders vs. sales


sales.plot(x='num_of_orders', y='sales_total', style='o')

Lab 1 CSCI446 CSCI946 Spring 202 SCIT UOW Page 8 of 10


Task 5: Install Jupyter Notebook/Lab (Optional)
Step 1, launch Anaconda
Step 2, create a new environment or use spyder or bdpython from Environments.
(Following use spyder)
Step 3, select spyder, then go to Home, then click Install under Jupter Notebook.
Step 4, launch Jupter Notebook from Anaconda. Jupter Notebook is opened in a browser.
Step 5, Select Downloads folder, then create a new notebook.

In the jupyter notebook, run a cell a time and create a new cell after running the
previous cell.
It uses a Code cell to run python command.

It uses Markdown cell to display plain words.

Please apply codes in Task 7 in a jupyter notebook. The formatted notebook is illustrated as
below.

Lab 1 CSCI446 CSCI946 Spring 202 SCIT UOW Page 9 of 10


Single click to rename the jupyter notebook. The file is saved under Downloads.

More info in https://jupyter.org/

Lab 1 CSCI446 CSCI946 Spring 202 SCIT UOW Page 10 of 10

You might also like