Skip to content

Commit

Permalink
Merge branch 'main' into email-this-building
Browse files Browse the repository at this point in the history
  • Loading branch information
wangbertha committed Dec 4, 2024
2 parents dce554b + 2b7c8cd commit 252e27e
Show file tree
Hide file tree
Showing 8 changed files with 10,543 additions and 9,913 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"dependencies": {
"csv-parse": "^5.3.6",
"d3": "^7.9.0",
"gridsome": "^0.7.0",
"gridsome": "^0.7.23",
"leaflet": "~1.7.0",
"leaflet.gridlayer.googlemutant": "^0.14.0",
"vue-class-component": "^7.2.6",
Expand Down
103 changes: 98 additions & 5 deletions src/constants/buildings-custom-info.constant.vue
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,80 @@ export const BuildingOwners: IBuildingOwners = {
export interface IBuildingCustomInfo {
owner?: string; // key from BuildingOwners
links?: Array <ILink>;
tags?: Array<BuildingTags>;
}
export interface ILink {
url: string;
text: string;
}
/**
* Custom Tags for associating groups of buildings for later retrieval, like those that participated
* in city programs
* */
export enum BuildingTags {
hasRetrofitCaseStudy = 'has-retrofit-case-study'
}
/**
* An object containing our custom details about buildings. These are hand coded based on the
* building ID, which is stable as the data updates (while names can change YoY)
*/
export const BuildingsCustomInfo: { [buildingId: string]: IBuildingCustomInfo } = {
'166134' : {
links: [
{
url : 'https://www.sheddaquarium.org/stories/sustainability-at-shedd',
text : 'Sustainability at Shedd | Shedd Aquarium',
},
]},
/**
* City Retrofit Data (PDFs)
*/
// Rookery Building Retrofit
'103721': {
tags: [ BuildingTags.hasRetrofitCaseStudy ],
links: [
{
url: 'https://www.chicago.gov/content/dam/city/sites/retrofit-chicago-2/pastparticipants/The%20Rookery.pdf',
text: 'Rookery Building Retrofit Report',
},
]},
// Wrigley Building
'101920': {
tags: [ BuildingTags.hasRetrofitCaseStudy ],
links: [
{
url: 'https://www.chicago.gov/content/dam/city/sites/retrofit-chicago-2/pastparticipants/Wrigley.pdf',
text: 'Wrigley Building Retrofit Report',
},
]},
// Institute of Cultural Affairs
'102336' : {
tags: [ BuildingTags.hasRetrofitCaseStudy ],
links: [
{
url: 'https://www.chicago.gov/content/dam/city/sites/retrofit-chicago-2/pastparticipants/ICAGreenRise.pdf',
text: 'Institute of Cultural Affairs Retrofit Report',
},
]},
// Sheraton Chicago Hotel & Towers
// Listed as Sheraton Grand(Retrofit) or Sheraton Grand Chicago Riverwalk (google maps)
'101852': {
tags: [ BuildingTags.hasRetrofitCaseStudy ],
links: [
{
url: 'https://www.chicago.gov/content/dam/city/sites/retrofit-chicago-2/pastparticipants/TheSheraton.pdf',
text: 'Sheraton Grand Chicago Hotel Retrofit Report',
},
]},
/**
* Depaul Buildings
* DePaul Buildings
* Helpful source: https://www.depaul.edu/campus-maps/Pages/default.aspx
*/
// Mc-Gowan-North
Expand Down Expand Up @@ -208,7 +273,14 @@ export const BuildingsCustomInfo: { [buildingId: string]: IBuildingCustomInfo }
// 990 W Fullerton Building
'251322': {owner: BuildingOwners.depaul.key},
// John T. Richardson Library
'251328': {owner: BuildingOwners.depaul.key},
'251328': {owner: BuildingOwners.depaul.key,
tags: [ BuildingTags.hasRetrofitCaseStudy ],
links: [
{
url: 'https://www.chicago.gov/content/dam/city/sites/retrofit-chicago-2/pastparticipants/Richardson%20Library.pdf',
text: 'Richardson Library Retrofit Report',
},
]},
// 1150 W. Fullerton Building
'251321': {owner: BuildingOwners.depaul.key},
// University Center Chicago
Expand Down Expand Up @@ -262,6 +334,15 @@ export const BuildingsCustomInfo: { [buildingId: string]: IBuildingCustomInfo }
* UChicago Buildings
* Helpful source: https://registrar.uchicago.edu/faculty-staff/classroom-scheduling/buildings-directory-2/
*/
//Mansueto Library at UChicago
'252064' : {owner: BuildingOwners.uchicago.key,
tags: [ BuildingTags.hasRetrofitCaseStudy ],
links: [
{
url: 'https://www.chicago.gov/content/dam/city/sites/retrofit-chicago-2/pastparticipants/UChicagoMansueto.pdf',
text: 'Mansueto Library Retrofit Report',
},
]},
// 1155 E 60th St
'136212': {owner: BuildingOwners.uchicago.key},
// 5841 S Maryland Ave M C0985
Expand Down Expand Up @@ -331,8 +412,15 @@ export const BuildingsCustomInfo: { [buildingId: string]: IBuildingCustomInfo }
* Northwestern Buildings
* Helpful source: https://maps.northwestern.edu/chicago
*/
// 303 E Superior Street
'256405': { owner: BuildingOwners.northwestern.key },
// 303 E Superior Street (Lurie Medical Research Center)
'256405': { owner: BuildingOwners.northwestern.key ,
tags: [ BuildingTags.hasRetrofitCaseStudy ],
links: [
{
url: 'https://www.chicago.gov/content/dam/city/sites/retrofit-chicago-2/pastparticipants/Northwestern%20Lurie.pdf',
text: 'Lurie Medical Research Center - 303 E Superior St Retrofit Report',
},
]},
// 320 E Superior Street
'256408': { owner: BuildingOwners.northwestern.key },
// 300 E Superior Street
Expand Down Expand Up @@ -1611,7 +1699,12 @@ export const BuildingsCustomInfo: { [buildingId: string]: IBuildingCustomInfo }
// 162 North State Street
'250167': { owner: BuildingOwners.saic.key },
// 280 Building, 280 S Columbus Dr
'252065': { owner: BuildingOwners.saic.key },
'2tags: [ BuildingTags.hasRetrofitCaseStudy],52065': { owner: BuildingOwners.saic.key ,
links: [
{
url: 'https://www.chicago.gov/content/dam/city/sites/retrofit-chicago-2/pastparticipants/SAIC.pdf',
text: 'SAIC 280 S Columbus Building Retrofit Report',
} ]},
// Alice B. Sharp Building, 37 S Wabash Ave
'134783': { owner: BuildingOwners.saic.key },
Expand Down
51 changes: 29 additions & 22 deletions src/pages/About.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default class About extends Vue {
</script>
<template>
<DefaultLayout>
<div class="layout-constrained">
<div class="about-page layout-constrained">
<h1
id="main-content"
tabindex="-1"
Expand Down Expand Up @@ -122,6 +122,11 @@ export default class About extends Vue {
Biggest Gas Free Buildings
</g-link>
</li>
<li>
<g-link to="/retrofit-chicago-participants">
Retrofit Chicago Case Studies
</g-link>
</li>
</ul>

<h2>Authors</h2>
Expand Down Expand Up @@ -173,32 +178,34 @@ export default class About extends Vue {
</template>

<style lang="scss">
h2 { margin-top: 1.75rem; }
.about-page {
h2 { margin-top: 1.75rem; }
p.our-why {
display: inline-block;
line-height: 1.25;
border-bottom: solid 0.5rem $chicago-blue;
}
p.our-why {
display: inline-block;
line-height: 1.25;
border-bottom: solid 0.5rem $chicago-blue;
}
.power-chart {
float: right;
margin-left: 1rem;
margin-bottom: 1rem;
}
.power-chart {
float: right;
margin-left: 1rem;
margin-bottom: 1rem;
}
.other-pages {
li {
font-size: 1.25rem;
margin-top: 1rem;
font-weight: bold;
.other-pages {
li {
font-size: 1.25rem;
margin-top: 1rem;
font-weight: bold;
}
}
}
@media (max-width: $mobile-max-width) {
.power-chart {
float: none;
margin-left: 0;
@media (max-width: $mobile-max-width) {
.power-chart {
float: none;
margin-left: 0;
}
}
}
</style>
127 changes: 127 additions & 0 deletions src/pages/RetrofitChicagoParticipants.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
import BuildingsTable from '~/components/BuildingsTable.vue';
import DataDisclaimer from '~/components/DataDisclaimer.vue';
import DataSourceFootnote from '~/components/DataSourceFootnote.vue';
import NewTabIcon from '~/components/NewTabIcon.vue';
import { IBuilding } from '../common-functions.vue';
import {
BuildingsCustomInfo, IBuildingCustomInfo,
BuildingTags,
} from '../constants/buildings-custom-info.constant.vue';
interface IBuildingEdge { node: IBuilding; }
// TODO: Figure out a way to get metaInfo working without any
// https://github.com/xerebede/gridsome-starter-typescript/issues/37
@Component<any>({
components: {
BuildingsTable,
DataDisclaimer,
DataSourceFootnote,
NewTabIcon,
},
metaInfo() {
return { title: 'Retrofit Chicago Participant Case Studies' };
},
})
export default class ChicagoRetrofitParticipants extends Vue {
/** Set by Gridsome to results of GraphQL query */
readonly $static: any;
readonly $context: any;
buildingsFiltered: Array<IBuildingEdge> = [];
created(): void {
this.filterBuildings();
}
filterBuildings(): void {
// Loop through BuildingsCustomInfo to get the IDs of buildings we are looking for
const retrofitBuildingSlugs: Array<string> = Object.entries(BuildingsCustomInfo)
.filter(([ , buildingInfo ]: [string, IBuildingCustomInfo]) => {
return buildingInfo.tags?.includes(BuildingTags.hasRetrofitCaseStudy);
}).map(([ buildingID ]: [string, IBuildingCustomInfo]) => buildingID);
this.buildingsFiltered =
this.$static.allBuilding.edges.filter((buildingEdge: IBuildingEdge) => {
return retrofitBuildingSlugs.some((ownedBuildingID) =>
buildingEdge.node.ID === ownedBuildingID);
});
}
}
</script>

<!--
This page grabs all buildings and then filters by owner on the client-side, since that data isn't
baked into the actual building CSV
-->
<static-query>
query {
allBuilding(sortBy: "GHGIntensity") {
edges {
node {
slugSource
ID
DataYear
PropertyName
Address
path
PrimaryPropertyType
GHGIntensity
GHGIntensityRank
GHGIntensityPercentileRank
TotalGHGEmissions
TotalGHGEmissionsRank
TotalGHGEmissionsPercentileRank
ElectricityUse
ElectricityUseRank
ElectricityUsePercentileRank
NaturalGasUse
NaturalGasUseRank
NaturalGasUsePercentileRank
}
}
}
}
</static-query>

<template>
<DefaultLayout>
<div class="retrofit-page">
<h1
id="main-content"
tabindex="-1"
>
Retrofit Chicago Participant Case Studies
</h1>

<p class="constrained -wide">
These buildings participated in the Retrofit Chicago program and have published case
studies, so you can learn more about how they became more efficient!
</p>

<p>
Buildings sourced from
<a href="https://www.chicago.gov/city/en/sites/retrofit-chicago2/home/participant-achievments/past-participants.html#case-studies">
City of Chicago - Retrofit Chicago
</a>.
</p>

<DataDisclaimer />

<BuildingsTable
:buildings="buildingsFiltered"
/>

<DataSourceFootnote />
</div>
</DefaultLayout>
</template>

<style lang="scss">
.retrofit-page {

}
</style>
Loading

0 comments on commit 252e27e

Please sign in to comment.