Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
riteshahlawat committed Apr 26, 2020
1 parent 38d5b04 commit dae86cd
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ function yesClick() {
})
.then(res => {
data = res.data;
console.log(data);
// per month
let kWhmSquared = getEnergyConsumptionPerMetersSquared(data.size);
let kWh = kWhmSquared * data.size;
Expand All @@ -70,16 +69,9 @@ function yesClick() {
let yearlyEnergyProduced = monthlyEnergyProduced * 12;
let monthlySavingsAfterSP = monthlyEnergyProduced * ontarioCostPerkWh;
let yearlySavingsAfterSP = monthlySavingsAfterSP * 12;
console.log("Total Monthly Energy Consumption (kWh/m^2): " + kWh);
console.log("Total Monthly Energy Costs (kW): $" + monthlyCosts)
console.log("Total Yearly Energy Costs (kW): $" + yearlyCosts);
console.log("Amount of Solar Panels: " + sPAmount);
console.log("Monthly Energy Produced (kW): " + monthlyEnergyProduced);
console.log("Yearly Energy Produced (kW): " + yearlyEnergyProduced);
console.log("Monthly Savings After SP: $" + monthlySavingsAfterSP);
console.log("Yearly Savings After SP: $" + yearlySavingsAfterSP);

document.getElementById("energy-produced").innerHTML = `${Math.trunc(monthlyEnergyProduced)}`;
document.getElementById("savings").innerHTML = `$${Math.trunc(yearlySavingsAfterSP*25)}`;
document.getElementById("savings").innerHTML = `${Math.trunc(yearlySavingsAfterSP*25)}`;
document.getElementById("consumption").innerHTML = `${Math.trunc(kWh)}`;

var costYearlySavingsChart = new Chart(costYearlySavings, {
Expand Down Expand Up @@ -205,7 +197,6 @@ function initMap() {
// Zoom change
google.maps.event.addDomListener(map, "zoom_changed", () => {
let zoomLevel = map.getZoom();
console.log(zoomLevel);
// Making area more visible
if (zoomLevel >= 15 && zoomLevel < 17) {
map.data.forEach((feature) => {
Expand Down

0 comments on commit dae86cd

Please sign in to comment.