CT127 3 2 Pfda NP000327
July 20, 2022 | Author: Anonymous | Category: N/A
Short Description
Download CT127 3 2 Pfda NP000327...
Description
INDIVIDUAL ASSIGNMENT TECHNOLOGY PARK MALASIYA CT127-3-2-PFDA PROGRAMMING FOR DATA ANALYSIS NP2F1909IT HAND OUT DATE: - 5 th November 2020 5th HAND IN DATE: - 21th February 2021 WEIGHTAGE: 50%
Submitted By:
Submitted To:
Purushottam Purushotta m Sah (NP000327)
Ram Narayan Thakur
INSTRUCTIONS TO CANDIDATES: 1
Submit your assignment at the administrative counter.
2
Students are advised advised to underpin their answers answers with with the use of references (cited (cited using the Harvard Name System of Referencing).
3
Late submission will be awarded zero (0) (0) unless unless Extenuating Extenuating Circumstances (EC) are upheld.
4
Cases of plagiarism will be penalized.
5
The assignment should be bound bound in an appropriate style (comb bound or stap stapled). led).
6
Where the the assignment assignment should should be submitted in both hardcopy and softcopy, softcopy, the the softcop softcopy y of the written assignment and source code (where appropriate) should be on a CD in an envelope / CD cover and attached to the hardcopy.
7
You must obtain 50% overall to pass this module.
i
Table of Contents 1. Introduction................................... Introduction......................................................... ............................................ ............................................ ............................................. .......................1 1 2. Assumptions:................................... Assumptions:......................................................... ............................................ ............................................ ...........................................2 .....................2 3.Screenshots.................................... 3.Screenshots.............. ............................................ ............................................ ............................................ ..............................................3 ........................3 3.1 Analysis 1:.......................................... 1:................................................................ ............................................ ........................................................3 ..................................3 3.1.1 Output 1:..................................... 1:........................................................... ............................................ ......................................................... ...................................3 3 3.2 Analysis 2:.......................................... 2:................................................................ ............................................ ........................................................4 ..................................4 3.2.2 Output 2:..................................... 2:........................................................... ............................................ ......................................................... ...................................4 4 3.3 Analysis 3:.......................................... 3:................................................................ ............................................ ........................................................5 ..................................5 3.3.3 Output 3:..................................... 3:........................................................... ............................................ ......................................................... ...................................5 5 3.4 Analysis 4:.......................................... 4:................................................................ ............................................ ........................................................6 ..................................6 3.4.4 Output 4:..................................... 4:........................................................... ............................................ ......................................................... ...................................6 6 3.5 Analysis 5:.......................................... 5:................................................................ ............................................ ........................................................7 ..................................7 3.5.5 Output 5:..................................... 5:........................................................... ............................................ ......................................................... ...................................7 7 3.6 Analysis 6:.......................................... 6:................................................................ ............................................ ........................................................8 ..................................8 3.6.6 Output 6:..................................... 6:........................................................... ............................................ ......................................................... ...................................8 8 3.7 Analysis 7:.......................................... 7:................................................................ ............................................ ........................................................9 ..................................9 3.7.7 Output 7:..................................... 7:........................................................... ............................................ ......................................................... ...................................9 9 3.8 Analysis 8:.......................................... 8:................................................................ ............................................ ......................................................10 ................................10 3.8.8 Output 8:..................................... 8:........................................................... ............................................ ...................................................... .................................10 .10 3.9 Analysis 9:.......................................... 9:................................................................ ............................................ ......................................................11 ................................11 3.9.9 Output 9:..................................... 9:........................................................... ............................................ ...................................................... .................................11 .11 3.10 Analysis 10:...................................... 10:............................................................ ............................................ ......................................................12 ................................12 3.10.10 Output 10:...................................... 10:............................................................ ............................................ .......................................... ..........................12 ......12 3.11 Analysis 11:...................................... 11:............................................................ ............................................ ......................................................13 ................................13 3.11.11 Output 10:...................................... 10:............................................................ ............................................ .......................................... ..........................13 ......13 3.12 Analysis 12:...................................... 12:............................................................ ............................................ ......................................................14 ................................14 3.12.12 Output 12:...................................... 12:............................................................ ............................................ .......................................... ..........................14 ......14 3.13 Analysis 13:...................................... 13:............................................................ ............................................ ......................................................15 ................................15 3.13.13 Output 13:...................................... 13:............................................................ ............................................ .......................................... ..........................15 ......15 14. Analysis 14:........................................ 14:.............................................................. ............................................ ......................................................16 ................................16 3.14.14 Output 14:...................................... 14:............................................................ ............................................ .......................................... ..........................16 ......16 4. Conclusion................................. Conclusion....................................................... ............................................ ............................................ ............................................ .........................17 ...17 5. References:................................................ References:...................................................................... ............................................ .....................................................18 ...............................18
ii
iii
1. Introduction R is a programming language intended for factual counts and information plotting. It is util utilize ized d for for in info form rmati ation on inve invest stig igat atio ion, n, fo forr ex exam ampl ple, e, cl clim imate ate in info form rmati ation on,, po popu pula lace ce information, and each information that can be mathematically mathematical ly 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. docu ment. The CSV document document can be traded utilizing Microsoft Excel Spreadsheet. Spreadsheet. This is the power of programming in the R language; Learning on the go is easy enough. All we thatt data. data. The need nee d is data data as well well as a clear clear conc conclus lusion ion to be drawn drawn from from the analys analysis is of tha power of the R programming, it is ssimple imple 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 increas inc reasee then then visibi visibilit lity y become becomess low. low. The given given data data help help to analyz analyzed ed to determ determine ine the relation between them. During the increasing of pressure automatically temperature also increasing.
2
3.Screenshots 3.1 Analysis 1:
Thee co Th comm mmen enta tary ry fo forr th thee an analy alysis sis 1 is show shown n in ab abov ovee di diag agra ram m in whic which h da data ta of wi wind nd 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. r epresentation.
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 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 histo histogr gram am.. Data Data ke kept pt as ho hour ur in whic which h main main ke kept pt as te temp mper erat ature ure hi histo stogr gram am,, xx-lab lab as temperature tempe rature and y-lab y-lab as frequency frequency temp, las as 2. Color 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 histog his togram ram in which humid humid data is plotted plotted..
For For this humid data data las kept kept as 1, x-lab 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 f rom 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 10 th analysis is shown in the above figure in which pressure is plotted in boxplot in each month. Along Along with both airport pressure is plotted of each and every month. 3.10.10 Output 10:
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.
3.11.11 Output 10:
After analysis analysis 11 is done that is shown in above figure figure in which x-axis 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:
Thee scrip Th scriptt for for th thee 11 11an anal alys ysis is is sh show own n in the the ab abov ovee figu figure re in whic which h pl plot otti ting ng is do doin ing g precipitation against visibility in boxplot. If the precipitation is high then the visibility becomes less. 3.12.12 Output 12:
Afte Af terr th thee an anal alys ysis is 12 is do done ne th thee ab abov ovee ou outp tput ut is pr prin inted ted out th that at show showss th thee pl plot ot 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 yaxis 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.
3.13.13 Output 13:
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
3.14.14 Output 14:
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 relationship between different element. After the plotting 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: R-pr -project.org. rg.
2021. R:
What
is
R?.
[o [on nline]
Available
at:
View more...
Comments