jimin

code

......@@ -44,23 +44,18 @@ function DelayNode_2020(item)
xmlToJson = xml2js.xml2json(result, {compact: true, spaces: 4});
xmlToJson2 = JSON.parse(xmlToJson);
if(item == 202002){
console.log("2미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
Feb_Dust_2020 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
}
else if(item == 202003){
console.log("3미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
Mar_Dust_2020 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
}
else if(item == 202004){
console.log("4미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
April_Dust_2020 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
}
else if(item == 202005){
console.log("5미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
May_Dust_2020 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
}
else if(item == 202006){
console.log("6미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
June_Dust_2020 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
}
}
......@@ -94,23 +89,18 @@ function DelayNode_2019(item)
xmlToJson = xml2js.xml2json(result, {compact: true, spaces: 4});
xmlToJson2 = JSON.parse(xmlToJson);
if(item == 201902){
console.log("2미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
Feb_Dust_2019 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
}
else if(item == 201903){
console.log("3미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
Mar_Dust_2019 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
}
else if(item == 201904){
console.log("4미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
April_Dust_2019 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
}
else if(item == 201905){
console.log("5미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
May_Dust_2019 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
}
else if(item == 201906){
console.log("6미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
June_Dust_2019 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
}
}
......@@ -145,23 +135,18 @@ function DelayNode_2018(item)
xmlToJson = xml2js.xml2json(result, {compact: true, spaces: 4});
xmlToJson2 = JSON.parse(xmlToJson);
if(item == 201802){
console.log("2미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
Feb_Dust_2018 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
}
else if(item == 201803){
console.log("3미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
Mar_Dust_2018 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
}
else if(item == 201804){
console.log("4미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
April_Dust_2018 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
}
else if(item == 201805){
console.log("5미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
May_Dust_2018 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
}
else if(item == 201806){
console.log("6미세먼지 농도:", xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"]);
June_Dust_2018 = parseInt(xmlToJson2["MonthlyAverageAirQuality"]["row"]["PM10"]["_text"])
}
}
......