Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

sorry if this is too much but this is the data i have acquired, im needing help

ID: 3745138 • Letter: S

Question

sorry if this is too much but this is the data i have acquired, im needing help creating code to plot this on a graph shown in picture, with the air_temp and apparent_t adhering to its allocated time step

timestep

air_temp

apparent_t

0

15.2

13.1

1

15.5

13.7

2

15.9

14.1

3

16.4

14.7

4

16.8

15.1

5

16.9

14.8

6

17.1

15.4

7

17.3

15.6

8

17.8

16.3

9

17.5

15.8

10

17.6

15.6

11

17.5

15.4

12

17.7

15.6

13

17.7

15.3

14

17.4

15.3

15

17.3

15.1

16

17

14.6

17

16.8

14.7

18

16.6

12.8

19

16

11.9

20

14.8

11.4

21

13.2

9.8

22

12.5

10

23

12.7

9.9

24

13.6

9.9

25

13.7

10

26

14.2

10.5

27

14.7

10.6

28

14.7

10.8

29

14.8

10.9

30

15

10.7

31

15.3

10.7

32

15.5

10.3

33

15.4

10.4

34

15.5

10.5

35

15.5

9.9

36

15.3

10.2

37

15.6

10.1

38

16

9.4

39

15.8

10.3

40

16

9.8

41

16.2

9.1

42

16.2

9.1

43

16.2

8.7

44

16.4

8.8

45

16.5

9.3

46

16.5

9.3

47

16.6

9.4

48

16.8

9.9

49

17.1

10.2

50

17.3

11.2

51

17.8

11.3

52

18.1

11.2

53

18.5

13.2

54

19.5

14

55

20.4

14.7

56

21.4

15

57

22.1

16.8

58

22.1

16.3

59

21.8

16.2

60

21.9

16.3

61

22

16.6

62

21.8

17.7

63

21.2

16.3

64

20.6

15

65

20

14.8

66

19.4

12.4

67

19.1

12.6

68

18.2

12.6

69

17.6

11.5

70

16.8

13.2

71

15.3

11.9

72

13.8

9.2

73

13.9

8.5

74

12.6

8.3

75

11.4

7.2

76

10.9

6.6

77

10.9

7.4

78

11.1

6.5

79

11.5

6.9

80

11.6

7.8

81

11.6

6.4

82

12.1

7.5

83

12.4

7.5

84

12.8

9.4

85

12.9

10.5

86

12.9

10.7

87

13.3

11.4

88

13.8

11.1

89

12.5

9.6

90

12.4

11.2

91

12.5

10.8

92

12.7

11.1

93

12.5

10.4

94

12.3

10.6

95

12

10.2

96

12.4

11.3

97

12.4

10.7

98

12.6

10.8

99

13.2

11.7

100

14.1

10.6

101

14.2

10.4

102

14.2

10.2

103

14.2

9.9

104

14.2

9.8

105

14.1

9.8

106

14.2

9.3

107

14.3

9.5

108

14.6

9

109

14.6

8.9

110

14.7

9.1

111

14.7

8.8

112

14.6

8.6

113

14.6

10.9

114

13.8

10.3

115

13.2

8.6

116

14.1

8.8

117

13.9

9

118

13

9.8

119

12.9

10.1

120

12.5

9.7

121

12.5

8.7

122

12.1

8.7

123

12.6

7.6

124

11.7

7.8

125

11.4

7.4

126

11.5

7.6

127

11.7

6.5

128

11.4

7.2

129

11.7

7.9

130

11.7

6.4

131

13

7

132

12.6

6.6

133

12.9

5.5

134

12.8

5.8

135

12.5

7.2

136

13

7.5

137

12.5

9.1

138

12.8

9.7

139

13.3

7.8

140

13.3

7.2

141

14.3

8.7

142

14.1

8

143

14.3

8.3

144

14

10.8

145

14.2

12

146

14.2

12.4

147

14.5

11

148

14.6

10.4

149

14.8

13.2

150

14.9

10.8

151

14.9

11.2

152

15.2

12.9

153

15.3

12.8

154

14.4

10.7

155

15.5

14.7

156

15.6

15.2

157

15.5

13.5

NaN

NaN

NaN

can i please get some guidance and some help on coding?.

timestep

air_temp

apparent_t

0

15.2

13.1

1

15.5

13.7

2

15.9

14.1

3

16.4

14.7

4

16.8

15.1

5

16.9

14.8

6

17.1

15.4

7

17.3

15.6

8

17.8

16.3

9

17.5

15.8

10

17.6

15.6

11

17.5

15.4

12

17.7

15.6

13

17.7

15.3

14

17.4

15.3

15

17.3

15.1

16

17

14.6

17

16.8

14.7

18

16.6

12.8

19

16

11.9

20

14.8

11.4

21

13.2

9.8

22

12.5

10

23

12.7

9.9

24

13.6

9.9

25

13.7

10

26

14.2

10.5

27

14.7

10.6

28

14.7

10.8

29

14.8

10.9

30

15

10.7

31

15.3

10.7

32

15.5

10.3

33

15.4

10.4

34

15.5

10.5

35

15.5

9.9

36

15.3

10.2

37

15.6

10.1

38

16

9.4

39

15.8

10.3

40

16

9.8

41

16.2

9.1

42

16.2

9.1

43

16.2

8.7

44

16.4

8.8

45

16.5

9.3

46

16.5

9.3

47

16.6

9.4

48

16.8

9.9

49

17.1

10.2

50

17.3

11.2

51

17.8

11.3

52

18.1

11.2

53

18.5

13.2

54

19.5

14

55

20.4

14.7

56

21.4

15

57

22.1

16.8

58

22.1

16.3

59

21.8

16.2

60

21.9

16.3

61

22

16.6

62

21.8

17.7

63

21.2

16.3

64

20.6

15

65

20

14.8

66

19.4

12.4

67

19.1

12.6

68

18.2

12.6

69

17.6

11.5

70

16.8

13.2

71

15.3

11.9

72

13.8

9.2

73

13.9

8.5

74

12.6

8.3

75

11.4

7.2

76

10.9

6.6

77

10.9

7.4

78

11.1

6.5

79

11.5

6.9

80

11.6

7.8

81

11.6

6.4

82

12.1

7.5

83

12.4

7.5

84

12.8

9.4

85

12.9

10.5

86

12.9

10.7

87

13.3

11.4

88

13.8

11.1

89

12.5

9.6

90

12.4

11.2

91

12.5

10.8

92

12.7

11.1

93

12.5

10.4

94

12.3

10.6

95

12

10.2

96

12.4

11.3

97

12.4

10.7

98

12.6

10.8

99

13.2

11.7

100

14.1

10.6

101

14.2

10.4

102

14.2

10.2

103

14.2

9.9

104

14.2

9.8

105

14.1

9.8

106

14.2

9.3

107

14.3

9.5

108

14.6

9

109

14.6

8.9

110

14.7

9.1

111

14.7

8.8

112

14.6

8.6

113

14.6

10.9

114

13.8

10.3

115

13.2

8.6

116

14.1

8.8

117

13.9

9

118

13

9.8

119

12.9

10.1

120

12.5

9.7

121

12.5

8.7

122

12.1

8.7

123

12.6

7.6

124

11.7

7.8

125

11.4

7.4

126

11.5

7.6

127

11.7

6.5

128

11.4

7.2

129

11.7

7.9

130

11.7

6.4

131

13

7

132

12.6

6.6

133

12.9

5.5

134

12.8

5.8

135

12.5

7.2

136

13

7.5

137

12.5

9.1

138

12.8

9.7

139

13.3

7.8

140

13.3

7.2

141

14.3

8.7

142

14.1

8

143

14.3

8.3

144

14

10.8

145

14.2

12

146

14.2

12.4

147

14.5

11

148

14.6

10.4

149

14.8

13.2

150

14.9

10.8

151

14.9

11.2

152

15.2

12.9

153

15.3

12.8

154

14.4

10.7

155

15.5

14.7

156

15.6

15.2

157

15.5

13.5

NaN

NaN

NaN

PART 3-Read in values from a real data source using the Import Tool The Bureau of Meteorology (BOM) store a significant amount of data that scientists can utlise for their research. Much of this data can be downloaded in CSV format For this part, go to the BOM website's lates weather observations for Bellambi and scrol past all the data until you see the section "Other Formats Download the AXF file under Comma delimited format used in spreadsheet applicaions http://www.bom.gov.au/products/IDN60801IDNG0801.94749.shtml Use the built-in tools to import the data into a numeric array. Right click on the AXF file, select Tlmport Data...a Inside the tool, check that only the comma-separated- value rows are selected. Make sure the heading row and any non-data rows at the end of the fle are not selected. Under "imported Data" select Numeric Matrix. This will deal with the columns that are not numeric (highlighted in yellow) by inserting NaN. Once you have your data in a numeric matrix, plot the columns titled air temp and apparent t against the imestep (sort order) to obtain a plot (your plot data values will vary with the date and time of day). Add btle, and a legend as you see in the figure, right

Explanation / Answer

In my opinion using python would be the best way to plot the graph.In this case first:

1.Copy the data(without the first row which gives the title for every column) and then paste it in a spreadsheet.

2.Then save the spreadsheet in csv format.Suppose you save it in your desktop by the name "Weather.csv".Your csv file from inside would look something like this:

0,15.2,13.1
1,15.5,13.7
2,15.9,14.1
3,16.4,14.7
4,16.8,15.1
5,16.9,14.8
6,17.1,15.4
7,17.3,15.6
8,17.8,16.3
9,17.5,15.8
10,17.6,15.6
11,17.5,15.4
12,17.7,15.6
13,17.7,15.3
14,17.4,15.3
15,17.3,15.1
16,17,14.6
17,16.8,14.7
18,16.6,12.8
19,16,11.9
20,14.8,11.4
21,13.2,9.8
22,12.5,10
23,12.7,9.9
24,13.6,9.9
25,13.7,10
26,14.2,10.5
27,14.7,10.6
28,14.7,10.8
29,14.8,10.9
30,15,10.7
31,15.3,10.7
32,15.5,10.3
33,15.4,10.4
34,15.5,10.5
35,15.5,9.9
36,15.3,10.2
37,15.6,10.1
38,16,9.4
39,15.8,10.3
40,16,9.8
41,16.2,9.1
42,16.2,9.1
43,16.2,8.7
44,16.4,8.8
45,16.5,9.3
46,16.5,9.3
47,16.6,9.4
48,16.8,9.9
49,17.1,10.2
50,17.3,11.2
51,17.8,11.3
52,18.1,11.2
53,18.5,13.2
54,19.5,14
55,20.4,14.7
56,21.4,15
57,22.1,16.8
58,22.1,16.3
59,21.8,16.2
60,21.9,16.3
61,22,16.6
62,21.8,17.7
63,21.2,16.3
64,20.6,15
65,20,14.8
66,19.4,12.4
67,19.1,12.6
68,18.2,12.6
69,17.6,11.5
70,16.8,13.2
71,15.3,11.9
72,13.8,9.2
73,13.9,8.5
74,12.6,8.3
75,11.4,7.2
76,10.9,6.6
77,10.9,7.4
78,11.1,6.5
79,11.5,6.9
80,11.6,7.8
81,11.6,6.4
82,12.1,7.5
83,12.4,7.5
84,12.8,9.4
85,12.9,10.5
86,12.9,10.7
87,13.3,11.4
88,13.8,11.1
89,12.5,9.6
90,12.4,11.2
91,12.5,10.8
92,12.7,11.1
93,12.5,10.4
94,12.3,10.6
95,12,10.2
96,12.4,11.3
97,12.4,10.7
98,12.6,10.8
99,13.2,11.7
100,14.1,10.6
101,14.2,10.4
102,14.2,10.2
103,14.2,9.9
104,14.2,9.8
105,14.1,9.8
106,14.2,9.3
107,14.3,9.5
108,14.6,9
109,14.6,8.9
110,14.7,9.1
111,14.7,8.8
112,14.6,8.6
113,14.6,10.9
114,13.8,10.3
115,13.2,8.6
116,14.1,8.8
117,13.9,9
118,13,9.8
119,12.9,10.1
120,12.5,9.7
121,12.5,8.7
122,12.1,8.7
123,12.6,7.6
124,11.7,7.8
125,11.4,7.4
126,11.5,7.6
127,11.7,6.5
128,11.4,7.2
129,11.7,7.9
130,11.7,6.4
131,13,7
132,12.6,6.6
133,12.9,5.5
134,12.8,5.8
135,12.5,7.2
136,13,7.5
137,12.5,9.1
138,12.8,9.7
139,13.3,7.8
140,13.3,7.2
141,14.3,8.7
142,14.1,8
143,14.3,8.3
144,14,10.8
145,14.2,12
146,14.2,12.4
147,14.5,11
148,14.6,10.4
149,14.8,13.2
150,14.9,10.8
151,14.9,11.2
152,15.2,12.9
153,15.3,12.8
154,14.4,10.7
155,15.5,14.7
156,15.6,15.2
157,15.5,13.5
NaN,NaN,NaN

3.Write a python script in a text editor.It is preferable to open the text editor in the same directory in which you saved the csv file.The following code should save your day(I have explained the code in the form of comments which start with #):

from matplotlib import pyplot as plt
import numpy as np
timestep,air_temp,apparent_t=np.loadtxt('Weather.csv',unpack=True,delimiter=',')
plt.plot(timestep,air_temp)
plt.plot(timestep,apparent_t)

plt.show()

4.

Let`s see what exactly we did in the last step.

5.All you need to do now is save(suppose we save it as 'Weather.py' ,note that the .py extension is necessary as it tells us that it is a python script) and run the python file.In linux open the terminal (from your directory) and type python Weather.py or python3 Weather.py.In windows ,do the same by opening the command prompt ,going tothe required directory using the cd command and then writing the same command as linux.

Here is the folder containing all the files I created in case you want to view them:

https://drive.google.com/drive/folders/1r0AhUjbFDWfU3tCsc9hlSuVN7TkQgQQX

Hope this helps!