Data Visualisation Using Python

 







Data Visualization with Python

Semester

III

Course Code

BCS358D

CIE Marks

50

Teaching Hours/Week (L:T:P: S)

0: 0: 2: 0

SEE Marks

50

Credits

01

Exam Hours

100

Examination type (SEE)

Practical

Course objectives:

         CLO 1. Demonstrate the use of IDLE or PyCharm IDE to create Python Applications

         CLO 2. Using Python programming language to develop programs for solving real-world problems

         CLO 3. Implementation of Matplotlib for drawing different Plots

         CLO 4. Demonstrate working with Seaborn, Bokeh.

         CLO 5. Working with Plotly for 3D, Time Series and Maps.

 

Experiments

Sl. No.

PART A – List of problems for which student should develop program and execute in theLaboratory

1

a)        Write a python program to find the best of two test average marks out of three test’s marks accepted from the user.

b)       Develop a Python program to check whether a given number is palindrome or not andalso count the number of occurrences of each digit in the input number.

 

Datatypes: https://www.youtube.com/watch?v=gCCVsvgR2KU Operators: https://www.youtube.com/watch?v=v5MR5JnKcZI Flow Control: https://www.youtube.com/watch?v=PqFKRqpHrjwFor loop: https://www.youtube.com/watch?v=0ZvaDa8eT5s While loop: https://www.youtube.com/watch?v=HZARImviDxg Exceptions: https://www.youtube.com/watch?v=6SPDvPK38tw

2

a)        Defined as a function F as Fn = Fn-1 + Fn-2. Write a Python program which accepts a value for N (where N >0) as input and pass this value to the function. Display suitable error message if the condition for input value is not followed.

b)       Develop a python program to convert binary to decimal, octal to hexadecimal using functions.

 

Functions:https://www.youtube.com/watch?v=BVfCWuca9nw Arguments:https://www.youtube.com/watch?v=ijXMGpoMkhQ Return value: https://www.youtube.com/watch?v=nuNXiEDnM44

3

a)         Write a Python program that accepts a sentence and find the number of words, digits, uppercase letters and lowercase letters.

b)        Write a Python program to find the string similarity between two given strings

 

Sample Output:                                                         Sample Output:

Original string:                                                             Original string:

Python Exercises                                                        Python Exercises

Python Exercises                                                        Python Exercise

Similarity between two said strings:                        Similarity between two said strings:1.0

0.967741935483871

Strings: https://www.youtube.com/watch?v=lSItwlnF0eU

String functions: https://www.youtube.com/watch?v=9a3CxJyTq00



4

a)         Write a Python program to Demonstrate how to Draw a Bar Plot using Matplotlib.

b)        Write a Python program to Demonstrate how to Draw a Scatter Plot using Matplotlib.

 

https://www.youtube.com/watch?v=RRHQ6Fs1b8w&list=PLjVLYmrlmjGcC0B_FP3bkJ- JIPkV5GuZR&index=3 https://www.youtube.com/watch?v=7ABCuhWO9II&list=PLjVLYmrlmjGcC0B_FP3bkJ- JIPkV5GuZR&index=4

5

 

a)         Write a Python program to Demonstrate how to Draw a Histogram Plot using Matplotlib.

b)        Write a Python program to Demonstrate how to Draw a Pie Chart using Matplotlib.

 

https://www.youtube.com/watch?v=Qk7caotaQUQ&list=PLjVLYmrlmjGcC0B_FP3bkJ-

JIPkV5GuZR&index=6 https://www.youtube.com/watch?v=PSji21jUNO0&list=PLjVLYmrlmjGcC0B_FP3bkJ-

JIPkV5GuZR&index=7

6

 

 

a)         Write a Python program to illustrate Linear Plotting using Matplotlib.

b)        Write a Python program to illustrate liner plotting with line formatting using Matplotlib.

 

https://www.youtube.com/watch?v=UO98lJQ3QGI&list=PL-osiE80TeTvipOqomVEeZ1HRrcEvtZB_

7

 

Write a Python program which explains uses of customizing seaborn plots with Aesthetic functions. https://www.youtube.com/watch?v=6GUZXDef2U0

8

Write a Python program to explain working with bokeh line graph using Annotations and Legends.

 

a) Write a Python program for plotting different types of plots using Bokeh.

 

https://www.youtube.com/watch?v=HDvxYoRadcA

9

Write a Python program to draw 3D Plots using Plotly Libraries.

 

https://www.youtube.com/watch?v=cCck7hCanpw&list=PLE50-dh6JzC4onX- qkv9H3HtPbBVA8M94&index=4


10

a)        Write a Python program to draw Time Series using Plotly Libraries.

b)       Write a Python program for creating Maps using Plotly Libraries.

 

https://www.youtube.com/watch?v=xnJ2TNrGYik&list=PLE50-dh6JzC4onX- qkv9H3HtPbBVA8M94&index=5

 

https://www.youtube.com/watch?v=D35m2CdMhVs&list=PLE50-dh6JzC4onX- qkv9H3HtPbBVA8M94&index=6

Python (Full Course): https://www.youtube.com/watch?v=_uQrJ0TkZlc

Pedagogy

For the above experiments the following pedagogy can be considered. Problem based learning, Active learning, MOOC, Chalk &Talk

Course outcomes (Course Skill Set):

At the end of the course the student will be able to:

CO 1. Demonstrate the use of IDLE or PyCharm IDE to create Python Applications

CO 2. Use Python programming constructs to develop programs for solving real-world problems CO 3. Use  Matplotlib for drawing different Plots

CO 4. Demonstrate working with Seaborn, Bokeh for visualization.

CO 5. Use Plotly for drawing Time Series and Maps.


Introduction: Data Visualization

Program 1a:  Write a python program to find the best of two test average marks out of three test’s marks accepted from the user.
Algorithm:
1. Input marks for test1, test2, and test3 from the user.
2. Calculate the average mark for test1 (avg_test1) as (test1 / 3).
3. Calculate the average mark for test2 (avg_test2) as (test2 / 3).
4. Calculate the average mark for test3 (avg_test3) as (test3 / 3).
5. Calculate the average mark for the first pair (avg_pair1) as (avg_test1 + avg_test2) / 2.
6. Calculate the average mark for the second pair (avg_pair2) as (avg_test1 + avg_test3) / 2.
7. Calculate the average mark for the third pair (avg_pair3) as (avg_test2 + avg_test3) / 2.
8. Find the maximum of avg_pair1, avg_pair2, and avg_pair3 to determine the best average mark.
9. Output the best average mark as the result.

Flowchart







Note: Write Algorithm and Flowchart for all programs



Program 1b:  Develop a Python program to check whether a given number is palindrome or not and also count the number of occurrences of each digit in the input number.





Program 2a:  Defined as a function F as Fn = Fn-1 + Fn-2. Write a Python program which accepts a value for N (where N >0) as input and pass this value to the function. Display suitable error message if the condition for input value is not followed.

Program 2b:  Develop a python program to convert binary to decimal, octal to hexadecimal using functions.

Program 3a:  Write a Python program that accepts a sentence and find the number of words, digits, uppercase letters and lowercase letters.

Program 3b:  Write a Python program that accepts a sentence and find the number of words, digits, uppercase letters and lowercase letters.



4a)  Write a Python program to Demonstrate how to Draw a Bar Plot using Matplotlib.



4b) Write a Python program to Demonstrate how to Draw a Scatter Plot using Matplotlib.


5 a) Write a Python program to Demonstrate how to Draw a Histogram Plot using Matplotlib.

5 b) Write a Python program to Demonstrate how to Draw a Pie Chart using Matplotlib.

6 a) Write a Python program to illustrate Linear Plotting using Matplotlib.


6 b) Write a Python program to illustrate liner plotting with line formatting using Matplotlib.

7. Write a Python program which explains uses of customizing seaborn plots with Aesthetic functions.

8) Write a Python program to explain working with bokeh line graph using Annotations and Legends.

8 a) Write a Python program for plotting different types of plots using Bokeh.

9. Write a Python program to draw 3D Plots using Plotly Libraries.

Updated !!!



10 a) Write a Python program to draw Time Series using Plotly Libraries.

10 b) Write a Python program for creating Maps using Plotly Libraries



ALL Codes

https://drive.google.com/drive/folders/1iQ1BK-nyQinCeTuZ1Oh0Zul-anGtG5u2?usp=drive_link

No comments:

Post a Comment