-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'codeforboston:main' into main
- Loading branch information
Showing
17 changed files
with
1,558 additions
and
404 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
body { | ||
font-family: 'Inter', sans-serif; | ||
} | ||
|
||
.main-container { | ||
grid-area: main; | ||
overflow-y: auto; | ||
padding: 20px 20px; | ||
margin: 30px 30px; | ||
} | ||
|
||
.page-title { | ||
color: #000; | ||
font-size: 30px; | ||
font-style: normal; | ||
font-weight: 600; | ||
line-height: 36px; | ||
letter-spacing: -0.225px; | ||
text-align: center; | ||
padding-block: 20px; | ||
/*vertical padding */ | ||
} | ||
.section-title { | ||
color: var(--slate-700, #334155); | ||
font-size: 24px; | ||
font-style: normal; | ||
line-height: 32px; | ||
letter-spacing: -0.144px; | ||
padding-block: 20px; | ||
/*vertical padding */ | ||
} | ||
|
||
.item-group-title { | ||
color: var(--slate-900, #0F172A); | ||
/* h2 */ | ||
font-size: 30px; | ||
font-style: normal; | ||
line-height: 36px; | ||
/* 120% */ | ||
letter-spacing: -0.225px; | ||
padding-block: 20px; | ||
/*vertical padding */ | ||
} | ||
.item-title { | ||
color: var(--slate-900, #0F172A); | ||
font-size: 20px; | ||
font-style: normal; | ||
font-weight: 600; | ||
line-height: 28px; | ||
padding-block: 20px; | ||
/*vertical padding */ | ||
} | ||
.item-title-small { | ||
color: var(--slate-900, #0F172A); | ||
font-size: 20px; | ||
font-style: normal; | ||
font-weight: 600; | ||
line-height: 28px; | ||
padding-block: 20px; | ||
/*vertical padding */ | ||
} | ||
|
||
.item-big { | ||
color: var(--slate-900, #0F172A); | ||
font-size: 30px; | ||
font-weight: 300; | ||
font-style: normal; | ||
line-height: 36px; | ||
letter-spacing: -0.225px; | ||
} | ||
.item { | ||
color: var(--slate-900, #0F172A); | ||
font-size: 20px; | ||
font-weight: 300; | ||
font-style: normal; | ||
line-height: 28px; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { CurrentHeatingSystem } from './ui/CaseSummaryComponents/CurrentHeatingSystem.tsx' | ||
import { EnergyUseHistory } from './ui/CaseSummaryComponents/EnergyUseHistory.tsx' | ||
import { Graphs } from './ui/CaseSummaryComponents/Graphs.tsx' | ||
import { HomeInformation } from './ui/CaseSummaryComponents/HomeInformation.tsx' | ||
|
||
export function CaseSummary() { | ||
return ( | ||
<main className="main-container"> | ||
<div> | ||
<h1 className="page-title">Case Summary</h1> | ||
<HomeInformation /> | ||
<CurrentHeatingSystem /> | ||
<EnergyUseHistory /> | ||
<Graphs /> | ||
</div> | ||
</main> | ||
) | ||
} |
39 changes: 39 additions & 0 deletions
39
heat-stack/app/components/ui/CaseSummaryComponents/CurrentHeatingSystem.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
export function CurrentHeatingSystem() { | ||
const fuelType = 'Natural Gas' | ||
const heatingSystemEfficiency = '75' | ||
const setPoint = '70' | ||
const setbackTemperature = '65' | ||
const setbackTime = '7' | ||
|
||
return ( | ||
<div className="section-title"> | ||
Current Heating System | ||
<hr /> | ||
<div className="flex flex-row"> | ||
<div className="basis-1/2"> | ||
<div className="item-title"> | ||
Fuel Type | ||
<br /> | ||
<div className="item-big">{fuelType}</div> <br /> | ||
Heating System Efficiency (%) | ||
<br /> | ||
<div className="item-big">{heatingSystemEfficiency}</div> <br /> | ||
</div> | ||
</div> | ||
|
||
<div className="basis-1/2"> | ||
<div className="item-group-title">Thermostat Settings</div> | ||
<div className="item-title"> | ||
Set Point (°F) <br /> | ||
<div className="item">{setPoint}</div> <br /> | ||
Setback Temperature (°F) | ||
<br /> | ||
<div className="item">{setbackTemperature}</div> <br /> | ||
Setback Time (h) | ||
<div className="item">{setbackTime}</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} |
52 changes: 52 additions & 0 deletions
52
heat-stack/app/components/ui/CaseSummaryComponents/EnergyUseHistory.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { EnergyUseHistoryChart } from './EnergyUseHistoryChart.tsx' | ||
|
||
export function EnergyUseHistory() { | ||
const averageIndoorTemperature = '63.5' | ||
const dailyOtherUsage = '1.07' | ||
const balancePoint = '60.5' | ||
const numPeriodsIncluded = '30 / 36' | ||
const standardDevationUA = '5.52' | ||
const wholeHomeUA = '1,112' | ||
const fileName = '20200930_Eversource.csv' | ||
|
||
return ( | ||
<div className="section-title"> | ||
Energy Use History | ||
<hr /> | ||
<div className="item-group-title"> | ||
Data Source | ||
<br /> | ||
<div className="item">{fileName}</div> <br /> | ||
</div> | ||
<div className="item-group-title">Analysis</div> | ||
<div className="flex flex-row"> | ||
<div className="basis-1/3"> | ||
<div className="item-title-small"> | ||
Average Indoor Temperature (°F) <br /> | ||
<div className="item">{averageIndoorTemperature}</div> <br /> | ||
Daily Other Usage <br /> | ||
<div className="item">{dailyOtherUsage}</div> <br /> | ||
</div> | ||
</div> | ||
<div className="basis-1/3"> | ||
<div className="item-title-small"> | ||
Balance Point (°F) <br /> | ||
<div className="item">{balancePoint}</div> <br /> | ||
No. of Periods Included <br /> | ||
<div className="item">{numPeriodsIncluded}</div> <br /> | ||
</div> | ||
</div> | ||
<div className="basis-1/3"> | ||
<div className="item-title-small"> | ||
Standard Deviation of UA (%) <br /> | ||
<div className="item">{standardDevationUA}</div> <br /> | ||
Whole-home UA (BTU/h-°F) <br /> | ||
<div className="item">{wholeHomeUA}</div> <br /> | ||
</div> | ||
</div> | ||
</div> | ||
<div className="item-title-small">Usage Details</div> | ||
<EnergyUseHistoryChart /> | ||
</div> | ||
) | ||
} |
62 changes: 62 additions & 0 deletions
62
heat-stack/app/components/ui/CaseSummaryComponents/EnergyUseHistoryChart.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import { Checkbox } from '../../../components/ui/checkbox.tsx' | ||
|
||
import { | ||
Table, | ||
TableBody, | ||
TableCell, | ||
TableHead, | ||
TableHeader, | ||
TableRow, | ||
} from '../../../components/ui/table.tsx' | ||
|
||
const months = [ | ||
{ | ||
includeData: true, | ||
startDate: '02/02/2018', | ||
endDate: '02/28/2018', | ||
daysInBill: '27', | ||
usage: 'Yes', | ||
fUA: '10', | ||
}, | ||
{ | ||
includeData: true, | ||
startDate: '03/01/2018', | ||
endDate: '03/31/2018', | ||
daysInBill: '31', | ||
usage: 'Modest', | ||
fUA: '30', | ||
}, | ||
] | ||
|
||
export function EnergyUseHistoryChart() { | ||
return ( | ||
<Table> | ||
<TableHeader> | ||
<TableRow> | ||
<TableHead className="w-[100px]">#</TableHead> | ||
<TableHead>Include Data</TableHead> | ||
<TableHead>Start Date</TableHead> | ||
<TableHead>End Date</TableHead> | ||
<TableHead>Days in Bill</TableHead> | ||
<TableHead>Usage (therms)</TableHead> | ||
<TableHead>60.5 °F UA (BTU/h-F)</TableHead> | ||
</TableRow> | ||
</TableHeader> | ||
<TableBody> | ||
{months.map((month, index) => ( | ||
<TableRow key={index}> | ||
<TableCell className="font-medium">{index + 1}</TableCell> | ||
<TableCell> | ||
<Checkbox checked={month.includeData} /> | ||
</TableCell> | ||
<TableCell>{month.startDate}</TableCell> | ||
<TableCell>{month.endDate}</TableCell> | ||
<TableCell>{month.daysInBill}</TableCell> | ||
<TableCell>{month.usage}</TableCell> | ||
<TableCell>{month.fUA}</TableCell> | ||
</TableRow> | ||
))} | ||
</TableBody> | ||
</Table> | ||
) | ||
} |
15 changes: 15 additions & 0 deletions
15
heat-stack/app/components/ui/CaseSummaryComponents/Graphs.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { HeatLoad } from './Graphs/HeatLoad.tsx' | ||
import { StandardDeviationOfUA } from './Graphs/StandardDeviationOfUA.tsx' | ||
import { WholeHomeUAComparison } from './Graphs/WholeHomeUAComparison.tsx' | ||
|
||
export function Graphs() { | ||
return ( | ||
<div className="section-title"> | ||
Graphs | ||
<hr /> | ||
<HeatLoad /> | ||
<WholeHomeUAComparison /> | ||
<StandardDeviationOfUA /> | ||
</div> | ||
) | ||
} |
48 changes: 48 additions & 0 deletions
48
heat-stack/app/components/ui/CaseSummaryComponents/Graphs/HeatLoad.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { | ||
ScatterChart, | ||
Scatter, | ||
XAxis, | ||
YAxis, | ||
CartesianGrid, | ||
Tooltip, | ||
ResponsiveContainer, | ||
} from 'recharts' | ||
|
||
// data from Karle Heat Load Analysis Beta 7 2023-07-11 | ||
const data = [ | ||
{ x: 0, y: 74015 }, | ||
{ x: 60.5, y: 10045 }, | ||
{ x: 67, y: 3172 }, | ||
{ x: 70, y: 0 }, | ||
{ x: 8.4, y: 65133 }, | ||
] | ||
|
||
export function HeatLoad() { | ||
return ( | ||
<div> | ||
<div className="item-title">Heat Load</div> | ||
|
||
<ResponsiveContainer width="100%" height={400}> | ||
<ScatterChart | ||
margin={{ | ||
top: 20, | ||
right: 20, | ||
bottom: 20, | ||
left: 100, | ||
}} | ||
> | ||
<CartesianGrid /> | ||
<XAxis | ||
type="number" | ||
dataKey="x" | ||
name=" Outdoor Temperature" | ||
unit="°F" | ||
/> | ||
<YAxis type="number" dataKey="y" name=" Heat Load" unit=" BTU/h" /> | ||
<Tooltip cursor={{ strokeDasharray: '3 3' }} /> | ||
<Scatter name="Heat Load" data={data} fill="#8884d8" /> | ||
</ScatterChart> | ||
</ResponsiveContainer> | ||
</div> | ||
) | ||
} |
53 changes: 53 additions & 0 deletions
53
heat-stack/app/components/ui/CaseSummaryComponents/Graphs/StandardDeviationOfUA.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import { | ||
ScatterChart, | ||
Scatter, | ||
XAxis, | ||
YAxis, | ||
CartesianGrid, | ||
Tooltip, | ||
ResponsiveContainer, | ||
} from 'recharts' | ||
|
||
// data from Karle Heat Load Analysis Beta 7 2023-07-11 | ||
const data = [ | ||
{ x: 58.5, y: 0.0534 }, | ||
{ x: 60.5, y: 0.0508 }, | ||
{ x: 62.5, y: 0.0528 }, | ||
] | ||
|
||
export function StandardDeviationOfUA() { | ||
return ( | ||
<div> | ||
<div className="item-title">Standard Deviation of UA</div> | ||
|
||
<ResponsiveContainer width="100%" height={400}> | ||
<ScatterChart | ||
margin={{ | ||
top: 20, | ||
right: 20, | ||
bottom: 20, | ||
left: 100, | ||
}} | ||
> | ||
<CartesianGrid /> | ||
<XAxis | ||
type="number" | ||
dataKey="x" | ||
name=" Balance Point" | ||
unit="°F" | ||
domain={[55, 65]} | ||
/> | ||
<YAxis | ||
type="number" | ||
dataKey="y" | ||
name=" " | ||
unit="" | ||
domain={[0.04, 0.06]} | ||
/> | ||
<Tooltip cursor={{ strokeDasharray: '3 3' }} /> | ||
<Scatter name="Heat Load" data={data} fill="#8884d8" /> | ||
</ScatterChart> | ||
</ResponsiveContainer> | ||
</div> | ||
) | ||
} |
Oops, something went wrong.