From 7ee3af405d38e1384c14c4401dcef081cf4bcf80 Mon Sep 17 00:00:00 2001
From: Jesse Hasty <134172009+JesseWx2011@users.noreply.github.com>
Date: Mon, 22 Jan 2024 09:11:12 -0500
Subject: [PATCH] Added extra values for weather-dashboard
V1.2.4 (1-22-2024):
Added Snow Depth
Added Solar Radiation
Added Rain Rate
---
scriptcc.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/scriptcc.js b/scriptcc.js
index 27f939f..8d4dd65 100644
--- a/scriptcc.js
+++ b/scriptcc.js
@@ -9,7 +9,6 @@ const api_url = `https://api.aerisapi.com/conditions/${city}?format=json&plimit=
const {response} = data;
console.log(response);
-
document.getElementById('cityname').innerHTML = `Weather for
${response[0].place.name}
, ${response[0].place.state}
, ${response[0].place.country}
`;
document.getElementById('temp').innerHTML = `${response[0].periods[0].tempF}°F (${response[0].periods[0].tempC}°C)`;
document.getElementById('title').innerHTML = `Weather for ${response[0].place.name}, ${response[0].place.state}`
@@ -22,6 +21,9 @@ const api_url = `https://api.aerisapi.com/conditions/${city}?format=json&plimit=
document.getElementById('pressurevalue').innerHTML = `${response[0].periods[0].pressureIN} inHg`;
document.getElementById('dewvalue').innerHTML = `${response[0].periods[0].dewpointF}°F`;
document.getElementById('visibilityvalue').innerHTML = `${response[0].periods[0].visibilityMI} mi`;
+ document.getElementById('snowdepthvalue').innerHTML = `${response[0].periods[0].snowDepthIN} in.`;
+ document.getElementById('rainrvalue').innerHTML = `${response[0].periods[0].precipRateIN} in./hr`;
+ document.getElementById('solarvalue').innerHTML = `${response[0].periods[0].solradWM2} watts/m²`;
// Function to get the UV Value
if (response[0].periods[0].uvi <=1) {