CT127 3 2 Pfda NP000327
CT127 3 2 Pfda NP000327
INSTRUCTIONS TO CANDIDATES:
i
Table of Contents
1. Introduction............................................................................................................................1
2. Assumptions:..........................................................................................................................2
3.Screenshots..............................................................................................................................3
3.1 Analysis 1:........................................................................................................................3
3.1.1 Output 1:....................................................................................................................3
3.2 Analysis 2:........................................................................................................................4
3.2.2 Output 2:....................................................................................................................4
3.3 Analysis 3:........................................................................................................................5
3.3.3 Output 3:....................................................................................................................5
3.4 Analysis 4:........................................................................................................................6
3.4.4 Output 4:....................................................................................................................6
3.5 Analysis 5:........................................................................................................................7
3.5.5 Output 5:....................................................................................................................7
3.6 Analysis 6:........................................................................................................................8
3.6.6 Output 6:....................................................................................................................8
3.7 Analysis 7:........................................................................................................................9
3.7.7 Output 7:....................................................................................................................9
3.8 Analysis 8:......................................................................................................................10
3.8.8 Output 8:..................................................................................................................10
3.9 Analysis 9:......................................................................................................................11
3.9.9 Output 9:..................................................................................................................11
3.10 Analysis 10:..................................................................................................................12
3.10.10 Output 10:............................................................................................................12
3.11 Analysis 11:..................................................................................................................13
3.11.11 Output 10:............................................................................................................13
3.12 Analysis 12:..................................................................................................................14
3.12.12 Output 12:............................................................................................................14
3.13 Analysis 13:..................................................................................................................15
3.13.13 Output 13:............................................................................................................15
14. Analysis 14:....................................................................................................................16
3.14.14 Output 14:............................................................................................................16
4. Conclusion............................................................................................................................17
5. References:...........................................................................................................................18
ii
iii
1. Introduction
R is a programming language intended for factual counts and information plotting. It is
utilized for information investigation, for example, climate information, populace
information, and each information that can be mathematically determined. Different diagrams
and plots, for example, histogram, box plot, disperse plot can be plotted utilizing different
information. The information can be taken care of to the program utilizing vectors and
records. An immense assortment of information might be taken care of by utilizing a CSV
document. The CSV document can be traded utilizing Microsoft Excel Spreadsheet. This
is the power of programming in the R language; Learning on the go is easy enough. All we
need is data as well as a clear conclusion to be drawn from the analysis of that data. The
power of the R programming, it is simple enough to learn as we know. All you need is data
and a clear intent to draw a conclusion based on analysis on that data.
We were provided with an hourly CSV file of weather data from two airports such are
LaGuardia Airport as well as John F. Kennedy International Airport. The file contains one
year of data on both airports. Useful graphs and graphs need to analyze, process and display
data.
1
2. Assumptions:
Through the R programming language, the given hourly weather data from the two airport
such are John F. Kennedy International as well as LaGuardia is imported then analysis are
done. By installing packages ggplot2 on R-Studio different plots of data is plotted.
The data that is provided in hourly weather data that contains humidity, wind directions,
pressure as well as visibility, wind speed and wind gust, temperature, dew points. All these
given data used to analyze through the records all the effects of variable.
During the increasing of wind gust, increase in wind speed is happened. After wind speed, the
wind gust is suddenly changed.
Both humidity as well as precipitation are linked with each other. If the humidity is more than
the precipitation is also automatically high.
The precipitation and visibility are inversely proportion to each other. When precipitation is
increase then visibility becomes low. The given data help to analyzed to determine the
relation between them.
2
3.Screenshots
3.1 Analysis 1:
The commentary for the analysis 1 is shown in above diagram in which data of wind
direction is plotted in boxplot where data is presented in color format for each data. In this
diagram x-axis is named as wind direction as well as y-axis as temperature.
3.1.1 Output 1:
The output for this analysis is given above where wind direction in x-axis as black and white
color format. It represented the main significance of direction of wind. Every data is attached
in one to another as cex which is not defined.
3
3.2 Analysis 2:
For this second analysis which is shown in above diagram in which wind direction is plotted
in boxplot where data is presented as red, green, cyan, white for each data. In the x-axis wind
direction is plotted that contain from 0 to 330 and y-axis as temperature that contain 2 to 12.
3.2.2 Output 2:
From the above output, where wind direction data is printed out in red, green, cyan, purple.
This wind direction boxplot shows graphical representation.
4
3.3 Analysis 3:
Figure 5
For this third analysis which is shown in above diagram in which wind direction is plotted in
boxplot, x-lab as wind direction as well as y-lab as temperature where horizontal kept as true
and las as 2. The color for each data kept as red, green, violet, sky-blue, gray.
3.3.3 Output 3:
From the above output, where wind direction data is printed out in red, green, violet, sky-
blue, gray which is attached each other. This diagram shows data kept as dewp.
5
3.4 Analysis 4:
For this forth analysis which is shown in above diagram in which temperature is plotted in
histogram. Data kept as hour in which main kept as temperature histogram, x-lab as
temperature and y-lab as frequency temp, las as 2. Color kept for each data as cyan and
orange. The output for this is printed out as bar diagram.
3.4.4 Output 4:
After analysis forth the above output is printed out in which data are attached with each other
with two color such are orange and cyan. Temperature is range between 0 to 20 in x-axis.
Frequency temp is ranges from 0 to 2000 in y-axis.
6
3.5 Analysis 5:
For this fifth analysis which is shown in above diagram in which temperature is plotted in
histogram in which humid data is plotted. For this humid data las kept as 1, x-lab as
temperature and y-lab as frequency temp that is read csv files from weather data.
3.5.5 Output 5:
After analysis fifth the above diagram is obtained that contain two different data in which
temperature kept ranges from 20 to 100 and frequency temp ranges from 0 to 1500 with two
different color that is purple and brown which is attached each other.
7
3.6 Analysis 6:
For this fifth analysis which is shown in above diagram in which temperature is plotted in
histogram in which temp data is imported. For this analysis, x-lab value kept as temperature
and y-lab value kept as density temp, las as 1 lwd as 5.
3.6.6 Output 6:
After analysis sixth the above diagram is obtained that contain two different data in which
temperature x-axis assigned ass temperature that is ranges from 20 to 100 and y-axis as
density temp which is range from 0.000 to 0.020. The data of temperature is printed in red
and green color form. Each data in this diagram is attached to each other as shown in output.
8
3.7 Analysis 7:
The script for analysis 7 is shown in above diagram in which data of both day and temp is
plotted where data is read from weather data. In the above command x-axis is name as day
and y-axis named as temp.
3.7.7 Output 7:
After analysis 7 is done the above output is obtained where data of day is printed ranges from
0 to 30 and data of temp ranges from 20 to 80. This diagram shown as sometimes temperature
is low sometimes temperature is high
9
3.8 Analysis 8:
The script for the analysis is shown in above diagram. In every month, the fluctuation of
temperature is determined in which temperature is plotted in histogram separately for each
month.
3.8.8 Output 8:
After analyzing the above diagram is printed out along with x-axis as temp and y-axis as
count. This histogram shows that each temp and count are separated in each month. In this
output the histogram shows that temperature in January remain very low and increasing
temperature at July and august.
10
3.9 Analysis 9:
The script for the 9th analysis is shown in the above figure in which relationships of both data
humidity as well as precipitation is plotted through point graph.
3.9.9 Output 9:
After analysis the 9th the above output is displayed. In the output data of humidity is more
where precipitation is more. In the x-axis humid is assigned and y-axis precipitation is
assigned. According to the output it shows that high precipitation is occurred at higher
humidity.
11
3.10 Analysis 10:
The script for the 10th analysis is shown in the above figure in which pressure is plotted in
boxplot in each month. Along with both airport pressure is plotted of each and every month.
After analysis 10 is done the above diagram is printed out in which x-axis is assigned as
month and y-axis as pressure. The pressure in both airports increase of decrease almost
similarly through each month.
12
3.11 Analysis 11:
The script for the 11analysis is shown in the above figure in which for the direction of wind
polar plot is plotted. The degree ranges from 0 to 300 in wind direction. From each direction
a greater number of winds is coming out when the bar is high.
After analysis 11 is done that is shown in above figure in which x-axis assigned as wind dir
and y-axis assigned as count. This diagram shows that the fluctuation of wind during airport.
According to the above plot wind is blown at the year from North-West as well as South
direction. The direction of wind is coming from North west when the bar is high.
13
3.12 Analysis 12:
The script for the 11analysis is shown in the above figure in which plotting is doing
precipitation against visibility in boxplot. If the precipitation is high then the visibility
becomes less.
After the analysis 12 is done the above output is printed out that shows the plot of
precipitation against months in graph. Graphs explains that increase in visibility, precipitation
is low. Precipitation data display at high, and visibility display at bottom in the graph. The
boxplot of precipitation against visibility shows that x-axis assigned as visible (Miles) and y-
axis assigned as precipitation(inch) as per data rate.
14
3.13 Analysis 13:
The script for the 11 analysis is shown in the above figure in which from the both LaGuardia
Airport as well as John F. Kennedy International Airport precipitation in each and every
month is plotted.
After the analysis 12 is done the above output is printed out. The above graphs precipitation
against month shows that precipitation was increased in the month of September in both
airports. The precipitation on the months of September becomes 0.8 of one airport.
15
14. Analysis 14:
The script for the 14 analysis is shown in the above figure in point graph, wind speed as well
as wind gust is plotted that is shown the relationship of both. All the null value is removed by
using na.rm=true
After the analysis 14 is done then the above output is printed out that show scatterplot of
wind against wind. The relation of both wind gust as well as wind speed is linear. If wind
speed is increased then the wind gust also increased. When the speed of wind is high then
automatically wind gust also become high.
16
4. Conclusion
This module taught me that how a real data is presented in real world. The assignment
attached with this module was very helpful in understanding the concept of packages and
libraries in R programming language. The given hour weather data is plotted that helps to
show the relationship between different element. After the plotting all the given data thus it
concluded that in both airports having similar weather. The plotted data shows the relation of
different elements.
17
5. References:
Holtz, Y., 2021. The R Graph Gallery – Help and inspiration for R charts. [online] The R
Graph Gallery. Available at: <https://www.r-graph-gallery.com/> [Accessed 20 January
2021].
18