Programs to Try Analysis and Visualization Dataset- Assignment 13
Problem Statements
1. Analysis and Visualization of the mtcars Dataset
Using the built-in mtcars dataset, perform the following tasks:
- Display the first few records and the structure of the dataset.
- Calculate the average mileage (mpg) and horsepower (hp).
- Identify the car with the highest mileage and the car with the highest horsepower.
- Classify cars based on the number of cylinders.
- Create appropriate visualizations such as bar charts, histograms, scatter plots, and box plots to study the relationships among variables.
2. Analysis and Visualization of Student Data from a CSV File
A file stud.csv contains the fields:
Rno, Name, M1, M2, M3
Perform the following tasks:
- Read the CSV file into R.
- Calculate the total marks and average marks of each student.
- Identify the topper and students scoring above 80 average marks.
- Sort the students in descending order of total marks.
- Create suitable visualizations including bar plots, histograms, box plots, pie charts, and scatter plots.
- Write the sorted list to a new CSV file named ranklist.csv.
3. Analysis and Visualization of Employee Salary Data from an Excel File
An Excel file employee.xlsx contains the fields:
EmpID, Name, Department, Experience, Salary
Perform the following tasks:
- Read the Excel file into R.
- Find the average salary of employees in each department.
- Identify the employee receiving the highest salary.
- Display employees having more than 10 years of experience.
- Create suitable visualizations to study salary distribution and department-wise salary variations.
- Write the department-wise sorted employee list to a new Excel file named salary_report.xlsx.
4. Analysis and Visualization of Sales Data from a CSV or Excel File
A file sales.csv (or sales.xlsx) contains the following fields:
ProductID, ProductName, Category, QuantitySold, UnitPrice
Perform the following tasks:
- Read the file into R.
- Calculate the sales amount of each product.
- Find the product generating the maximum revenue.
- Compute category-wise total sales.
- Sort products in descending order of revenue.
- Create suitable visualizations such as bar plots, pie charts, histograms, box plots, and scatter plots to analyze sales patterns.
- Export the sorted data to a new file named sales_report.csv (or sales_report.xlsx).
5.Analysis and Visualization of the Air Quality Dataset
Using the built-in airquality dataset in R, perform the following tasks:
- Load the dataset and display its structure and summary statistics.
- Determine the number of missing values present in each column.
- Calculate the average values of Ozone, Solar Radiation, Wind, and Temperature.
- Identify the day with the maximum temperature and the day with the highest ozone concentration.
- Find the month having the highest average temperature.
-
Create suitable visualizations such as:
- Histogram of temperature values.
- Box plot of ozone levels.
- Scatter plot showing the relationship between temperature and ozone concentration.
- Bar chart showing the average temperature for each month.
- Pie chart representing the proportion of observations belonging to different months.
- Remove records containing missing values and compare the summary statistics before and after cleaning.
- Identify days where temperature exceeds 90°F and ozone concentration exceeds the overall average ozone level.
- Write the cleaned and processed data to a new CSV file named airquality_cleaned.csv.
- Interpret the results obtained from the statistical analysis and visualizations
Comments
Post a Comment