Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

NATIONAL INSTITUTE OF FASHION TECHNOLOGY

SEMESTER-VI (2021-2025)

DS - Data Analytics and R

Jury Assignment

Submitted To -
Nilima R. Topno, Associate Professor
National Institute of Fashion Technology, Patna

Submitted By -
Anushka Chaudhary (BFT/21/805)
Kumar Keshav (BFT/21/491)
Shreya Mondal BFT/21/857)
Contents
Acknowledgement ................................................................................................................................. 3
Introduction ........................................................................................................................................... 4
Data set & Analysis ............................................................................................................................... 5
Names of Elements in R Programming:.............................................................................................. 5
Google from survey Data...................................................................................................................... 6
Pie charts in R Studio: .......................................................................................................................... 7
Plot Bar in R Studio:........................................................................................................................... 10
Horizontal Bar graph in R Studio ..................................................................................................... 12
Regression Line in R Studio ............................................................................................................... 13
Conclusions .......................................................................................................................................... 14

2
Acknowledgement

We like to thank National Institute of Fashion Technology for giving us the opportunity to take
this assignment. Foremost, we would like to thank our subject faculty at NIFT, Miss. Nilima
Topno for giving her valuable feedback and the guidance on this assignment throughout the
classes. This could not have been achieved without her support.
Lastly, we take the opportunity to thank all the people who guided us through the entire process,
and fellow students at NIFT who have imparted the necessary knowledge and skills that we
required to complete this document.

Anushka Chaudhary
Kumar Keshav
Shreya Mondal

3
Introduction

Data analytics:
Data analytics involves the process of examining large datasets to uncover patterns, trends,
correlations, and other insights that can inform decision-making and drive actions. It
encompasses a range of techniques and methodologies, including statistical analysis, machine
learning, data mining, and data visualization. Data analytics is employed across various
industries and domains, from business and finance to healthcare and marketing, to extract
actionable intelligence from raw data and gain a competitive edge.
R:
R, on the other hand, is a programming language and environment specifically designed for
statistical computing and graphics. It provides a wide array of tools and libraries for data
analysis, manipulation, visualization, and modelling. R is renowned for its versatility and
flexibility, making it a popular choice among data analysts and statisticians for performing
complex statistical analyses and generating high-quality visualizations.
Data analytics and R:
When combined, data analytics and R form a powerful synergy, allowing analysts to leverage
the robust statistical capabilities of R to extract insights from data and inform data-driven
decisions. Analysts can use R to preprocess, analyse, and visualize data, uncovering
meaningful patterns and relationships that drive actionable insights. The integration of R into
the data analytics workflow enhances efficiency, reproducibility, and scalability, enabling
organizations to derive maximum value from their data assets.

4
Data set & Analysis

Get or Set names of Elements of an Object in R Programming of BFT FACULTY – names()


Function.

Names of Elements in R Programming:


Input:
# R program to assign name to an object of BFT FACULTY

# Creating a vector
x <- c(1, 2, 3, 4, 5,6)

# Assigning names using names() function


names(x) <- c("Navanendra sir", "Omkar sir", "Nilima Mam", "Abhilasha Mam", "Jayant
Sir", "Vinoth Sir")

# Printing name vector that is assigned


names(x)

# Printing updated vector


print(x)

Output:

5
Google from survey Data

We done a survey on Junk Food through google from in this survey we got 32 responses.
Here we are using our survey data for Data analysis & R. We are using the same data and the
Programming in R studio Create Pie chart, Plot Bar, Horizontal bar graph.

Pie charts: Google from responses

1.

2.

6
Pie charts in R Studio:

Programming and Output of Pie chart 1.


Do you check the nutrient fact label in the junk food?
Input:

# Create data for the graph.


geeks<- c(15.6, 25, 18.8, 40.6)
labels <- c("No I don’t check ", "Sometime I do check", "Don’t know", "Yes I Would check")

# Plot the chart.


pie(geeks, labels)

Output:

7
Programming and Output of Pie chart 2.
What is your fav Junk Food?

Input:

# Create data for the graph.


geeks<- c(18.8, 9.4, 18.8, 53.1)
labels <- c("Soft Drinks ", "Candies", "Any other", "Snacks")

# Plot the chart.


pie(geeks, labels)

Output:

8
Plot Bar: Google from responses

1.

2.

9
Plot Bar in R Studio:

Programming and Output of Plot Bar 1.


Do you enjoy Junk Food?
Input:

# Create the data for the chart


A <- c(6, 6, 8, 5, 6)
B <- c("1", "2", "3", "4", "5")

# Plot the bar chart with text features


barplot(A, names.arg = B, xlab = "number",
ylab = "Article", col = "steelblue",
main = "GeeksforGeeks - Article Chart",
cex.main = 1.5, cex.lab = 1.2, cex.axis = 1.1)

# Add data labels on top of each bar


text(
x = barplot(A, names.arg = B, col = "steelblue", ylim = c(0, max(A) * 1.2)),
y = A + 1, labels = A, pos = 3, cex = 1.2, col = "black"
)

Output:

10
Programming and Output of Plot Bar 2.
Do you check the Junk Food Quality?
Input:

# Create the data for the chart


A <- c(9, 5, 11, 2, 5)
B <- c("1", "2", "3", "4", "5")

# Plot the bar chart with text features


barplot(A, names.arg = B, xlab = "number",
ylab = "Article", col = "steelblue",
main = "GeeksforGeeks - Article Chart",
cex.main = 1.5, cex.lab = 1.2, cex.axis = 1.1)

# Add data labels on top of each bar


text(
x = barplot(A, names.arg = B, col = "steelblue", ylim = c(0, max(A) * 1.2)),
y = A + 1, labels = A, pos = 3, cex = 1.2, col = "black"
)

Output:

11
Horizontal Bar graph: Google from responses

Horizontal Bar graph in R Studio

Number of times in a week you Consume Junk Food?


Input:

# Sample data
categories <- c("5", "3-4", "1-2", "0")
counts <- c(5, 9, 13, 5)
data <- data.frame(Category = categories, Count = counts)
# Plotting horizontally
barplot(data$Count, horiz = TRUE, names.arg = data$Category, col = "skyblue",
main = "Horizontal Bar Plot of Counts by Category",
xlab = "Count", ylab = "Category")

Output:

12
Regression Line in R Studio

Input:

# Step 1: Inspect the data


head(mtcars)

# Step 2: Fit a linear model


# Let's predict mpg (miles per gallon) using wt (weight of the car)
model <- lm(mpg ~ wt, data = mtcars)

# Plot the chart.


plot(y,x,col = "blue",main = "Keshav's car miles in Regression line",
abline(lm(x~y)),cex = 1.3,pch = 16,xlab = "Hour",ylab = "Speed")

Output:

13
Conclusions

In summary, data analytics has become an indispensable tool for organizations looking to thrive
in today's data-driven world. By embracing data analytics and cultivating a culture of data-
driven decision-making, businesses can unlock new opportunities, mitigate risks, and stay
ahead of the competition. At its core, data analytics serves as the compass guiding strategic
decision-making, illuminating paths toward efficiency, innovation, and growth. However, these
challenges are not insurmountable. With a steadfast commitment to data integrity, technological
innovation, and continuous learning, organizations can harness the power of data analytics to
chart a course toward success. As we stand at the nexus of data and decision-making, the
imperative is clear: embrace the data-driven revolution, for therein lies the key to unlocking
unprecedented value and shaping a future defined by insight, resilience, and prosperity.

14

You might also like