jimin

code

...@@ -44,23 +44,18 @@ function DelayNode_2020(item) ...@@ -44,23 +44,18 @@ function DelayNode_2020(item)
44 xmlToJson = xml2js.xml2json(result, {compact: true, spaces: 4}); 44 xmlToJson = xml2js.xml2json(result, {compact: true, spaces: 4});
45 xmlToJson2 = JSON.parse(xmlToJson); 45 xmlToJson2 = JSON.parse(xmlToJson);
46 if(item == 202002){ 46 if(item == 202002){
47 - console.log("2미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
48 Feb_Dust_2020 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]) 47 Feb_Dust_2020 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
49 } 48 }
50 else if(item == 202003){ 49 else if(item == 202003){
51 - console.log("3미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
52 Mar_Dust_2020 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]) 50 Mar_Dust_2020 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
53 } 51 }
54 else if(item == 202004){ 52 else if(item == 202004){
55 - console.log("4미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
56 April_Dust_2020 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]) 53 April_Dust_2020 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
57 } 54 }
58 else if(item == 202005){ 55 else if(item == 202005){
59 - console.log("5미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
60 May_Dust_2020 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]) 56 May_Dust_2020 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
61 } 57 }
62 else if(item == 202006){ 58 else if(item == 202006){
63 - console.log("6미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
64 June_Dust_2020 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]) 59 June_Dust_2020 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
65 } 60 }
66 } 61 }
...@@ -94,23 +89,18 @@ function DelayNode_2019(item) ...@@ -94,23 +89,18 @@ function DelayNode_2019(item)
94 xmlToJson = xml2js.xml2json(result, {compact: true, spaces: 4}); 89 xmlToJson = xml2js.xml2json(result, {compact: true, spaces: 4});
95 xmlToJson2 = JSON.parse(xmlToJson); 90 xmlToJson2 = JSON.parse(xmlToJson);
96 if(item == 201902){ 91 if(item == 201902){
97 - console.log("2미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
98 Feb_Dust_2019 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]) 92 Feb_Dust_2019 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
99 } 93 }
100 else if(item == 201903){ 94 else if(item == 201903){
101 - console.log("3미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
102 Mar_Dust_2019 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]) 95 Mar_Dust_2019 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
103 } 96 }
104 else if(item == 201904){ 97 else if(item == 201904){
105 - console.log("4미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
106 April_Dust_2019 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]) 98 April_Dust_2019 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
107 } 99 }
108 else if(item == 201905){ 100 else if(item == 201905){
109 - console.log("5미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
110 May_Dust_2019 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]) 101 May_Dust_2019 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
111 } 102 }
112 else if(item == 201906){ 103 else if(item == 201906){
113 - console.log("6미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
114 June_Dust_2019 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]) 104 June_Dust_2019 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
115 } 105 }
116 } 106 }
...@@ -145,23 +135,18 @@ function DelayNode_2018(item) ...@@ -145,23 +135,18 @@ function DelayNode_2018(item)
145 xmlToJson = xml2js.xml2json(result, {compact: true, spaces: 4}); 135 xmlToJson = xml2js.xml2json(result, {compact: true, spaces: 4});
146 xmlToJson2 = JSON.parse(xmlToJson); 136 xmlToJson2 = JSON.parse(xmlToJson);
147 if(item == 201802){ 137 if(item == 201802){
148 - console.log("2미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
149 Feb_Dust_2018 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]) 138 Feb_Dust_2018 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
150 } 139 }
151 else if(item == 201803){ 140 else if(item == 201803){
152 - console.log("3미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
153 Mar_Dust_2018 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]) 141 Mar_Dust_2018 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
154 } 142 }
155 else if(item == 201804){ 143 else if(item == 201804){
156 - console.log("4미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
157 April_Dust_2018 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]) 144 April_Dust_2018 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
158 } 145 }
159 else if(item == 201805){ 146 else if(item == 201805){
160 - console.log("5미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
161 May_Dust_2018 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]) 147 May_Dust_2018 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
162 } 148 }
163 else if(item == 201806){ 149 else if(item == 201806){
164 - console.log("6미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
165 June_Dust_2018 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]) 150 June_Dust_2018 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
166 } 151 }
167 } 152 }
......