Skip to content

Commit

Permalink
Revert "fix: remove duplicate buildings from the catalogue (#779)"
Browse files Browse the repository at this point in the history
This reverts commit 1484b05.
  • Loading branch information
KevinWu098 authored Nov 3, 2023
1 parent 6d9240c commit 91a1ee3
Show file tree
Hide file tree
Showing 2 changed files with 218 additions and 1 deletion.
9 changes: 8 additions & 1 deletion apps/antalmanac/src/components/Map/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,14 @@ export function getCoursesPerBuilding() {
return coursesPerBuilding;
}

const buildings = Object.entries(buildingCatalogue);
/**
* Get unique building names for the MUI Autocomplete.
* A building with a duplicate name will have a higher index then a `findIndex` for another building with the same name.
*/
const buildings = Object.entries(buildingCatalogue).filter(
([_, building], index, array) =>
array.findIndex(([_, otherBuilding]) => otherBuilding.name === building.name) === index
);

/**
* Map of all course locations on UCI campus.
Expand Down
210 changes: 210 additions & 0 deletions apps/antalmanac/src/lib/buildingCatalogue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,12 @@ export default {
lng: -117.838409,
imageURLs: ['463/university-tower-2.jpg'],
},
99610: {
name: 'Interim Classroom Facility (ICF)',
lat: 33.644463,
lng: -117.840012,
imageURLs: ['463/interim-classroom-facility.jpg'],
},
101047: {
name: 'University Hills Community Center',
lat: 33.636307,
Expand Down Expand Up @@ -918,6 +924,12 @@ export default {
lng: -117.838112,
imageURLs: ['463/business-ii.jpg'],
},
114585: {
name: '100 Theory',
lat: 33.644245,
lng: -117.855675,
imageURLs: [],
},
114586: {
name: 'Anteater Instruction & Research Building (AIRB)',
lat: 33.643009,
Expand All @@ -942,6 +954,30 @@ export default {
lng: -117.828911,
imageURLs: ['463/farm-school-red-barn.jpg'],
},
114594: {
name: 'Bonney Research Laboratory (BRL)',
lat: 33.646461,
lng: -117.846169,
imageURLs: ['463/bonney-research-laboratory.jpg'],
},
114595: {
name: 'Qureshey Research Laboratory (QRL)',
lat: 33.646648,
lng: -117.845764,
imageURLs: ['463/qureshey-research-laboratory.jpg'],
},
114596: {
name: 'Center for the Neurobiology of Learning & Memory Annex (CNLM)',
lat: 33.646629,
lng: -117.846428,
imageURLs: ['463/center-for-the-neurobiology-of-learning-and-memory-annex.jpg'],
},
114597: {
name: 'Greenhouse',
lat: 33.64732,
lng: -117.845367,
imageURLs: ['463/greenhouse.jpg'],
},
114598: {
name: 'Merage School of Business (SB1)',
lat: 33.647072,
Expand All @@ -954,18 +990,60 @@ export default {
lng: -117.835861,
imageURLs: ['463/education.jpg'],
},
114600: {
name: 'Engineering Gateway (EG)',
lat: 33.643215,
lng: -117.840157,
imageURLs: ['463/engineering-gateway.jpg'],
},
114601: {
name: 'Engineering Laboratory Facility (ELF)',
lat: 33.643822,
lng: -117.839622,
imageURLs: ['463/engineering-laboratory-facility.jpg'],
},
114602: {
name: 'Little Theatre',
lat: 33.647213,
lng: -117.844063,
imageURLs: ['463/little-theatre.jpg'],
},
114603: {
name: 'Humanities Interim Classroom Facility (HICF) | Studio Art Trailer',
lat: 33.646919,
lng: -117.84687,
imageURLs: ['463/humanities-interim-classroom-facility.jpg'],
},
114604: {
name: 'Multipurpose Academic & Administrative Building (MPAA)',
lat: 33.647156,
lng: -117.837013,
imageURLs: ['463/multipurpose-academic-and-admin-building.jpg'],
},
114605: {
name: 'Beckman Laser Institute (BLI)',
lat: 33.644192,
lng: -117.849915,
imageURLs: ['463/beckman-laser-institute.jpg'],
},
114606: {
name: 'Gillespie Neuroscience Research Facility (GNRF)',
lat: 33.644009,
lng: -117.851265,
imageURLs: ['463/gillespie-neuroscience-research-facility.jpg'],
},
114607: {
name: 'Sue & Bill Gross Hall: A CIRM Institute',
lat: 33.643555,
lng: -117.851501,
imageURLs: ['463/gross-hall.jpg'],
},
114608: {
name: 'Hewitt Research Hall (HRH)',
lat: 33.643505,
lng: -117.851921,
imageURLs: ['463/hewitt-hall.jpg'],
},
114609: {
name: 'Plumwood House (PH)',
lat: 33.644718,
Expand All @@ -978,12 +1056,72 @@ export default {
lng: -117.852249,
imageURLs: ['463/gavin-herbert-eye-institute.jpg'],
},
114611: {
name: 'Steinhaus Hall (SH)',
lat: 33.646347,
lng: -117.844887,
imageURLs: ['463/steinhaus-hall.jpg'],
},
114612: {
name: 'Bison Modular (BIMO)',
lat: 33.643814,
lng: -117.84639,
imageURLs: ['463/bison-modular.jpg'],
},
114613: {
name: 'Multipurpose Science & Technology Building (MSTB)',
lat: 33.64209,
lng: -117.844467,
imageURLs: ['463/multipurpose-science-and-technology.jpg'],
},
114614: {
name: 'Physical Sciences High Bay',
lat: 33.64362,
lng: -117.845291,
imageURLs: ['463/physical-sciences-high-bay.jpg'],
},
114615: {
name: 'Rowland Hall (RH)',
lat: 33.644531,
lng: -117.844162,
imageURLs: ['463/rowland-hall.jpg'],
},
114616: {
name: 'Anteater Instruction & Research Building (AIRB)',
lat: 33.643009,
lng: -117.838013,
imageURLs: ['463/anteater-instruction-and-research-building.jpg'],
},
114618: {
name: 'Sprague Hall (SPH)',
lat: 33.644062,
lng: -117.852066,
imageURLs: ['463/sprague-hall.jpg'],
},
114621: {
name: 'Facilities Management Building',
lat: 33.664715,
lng: -117.854805,
imageURLs: [],
},
114622: {
name: 'Humanities Gateway (HG)',
lat: 33.648266,
lng: -117.844406,
imageURLs: ['463/humanities-gateway.jpg'],
},
114623: {
name: 'Social Ecology I (SE)',
lat: 33.646194,
lng: -117.838844,
imageURLs: ['463/social-ecology-i.jpg'],
},
114624: {
name: 'Student Center (SC)',
lat: 33.649323,
lng: -117.842255,
imageURLs: ['463/student-center_1.jpg'],
},
114626: {
name: 'Student Health Center II',
lat: 33.645878,
Expand Down Expand Up @@ -1014,6 +1152,30 @@ export default {
lng: -117.84079,
imageURLs: ['463/irvine-barclay-theatre.jpg'],
},
114858: {
name: 'Social & Behavioral Sciences Gateway (SBSG)',
lat: 33.647488,
lng: -117.839165,
imageURLs: ['463/social-and-behavioral-sciences-gateway.jpg'],
},
114877: {
name: 'Biological Sciences III (BS3)',
lat: 33.645363,
lng: -117.846222,
imageURLs: ['463/biological-sciences-iii.jpg'],
},
114878: {
name: 'Social Science Tower (SST)',
lat: 33.646591,
lng: -117.840294,
imageURLs: ['463/social-science-tower.jpg'],
},
114879: {
name: 'Gavin Herbert Eye Institute',
lat: 33.641743,
lng: -117.852249,
imageURLs: ['463/gavin-herbert-eye-institute.jpg'],
},
114880: {
name: 'Child Development School (CD)',
lat: 33.662647,
Expand Down Expand Up @@ -1530,6 +1692,12 @@ export default {
lng: -117.844681,
imageURLs: [],
},
364042: {
name: 'Student Services West',
lat: 33.646072,
lng: -117.849152,
imageURLs: [],
},
364043: {
name: 'Student Services West',
lat: 33.646072,
Expand All @@ -1542,6 +1710,12 @@ export default {
lng: -117.837051,
imageURLs: ['463/banning-house.jpg'],
},
407362: {
name: 'Gateway Study Center (GC)',
lat: 33.647388,
lng: -117.841873,
imageURLs: ['463/gateway-study-center.jpg'],
},
444368: {
name: 'Plaza Verde',
lat: 33.648224,
Expand Down Expand Up @@ -1578,6 +1752,12 @@ export default {
lng: -117.848709,
imageURLs: ['463/grounds-maintenance-facility.jpg'],
},
444506: {
name: 'Facilities Management Building',
lat: 33.66478,
lng: -117.854935,
imageURLs: [],
},
444507: {
name: 'Passport Services ',
lat: 33.664795,
Expand Down Expand Up @@ -1632,6 +1812,36 @@ export default {
lng: -117.844414,
imageURLs: [],
},
454486: {
name: 'Medical Surge I (MS1)',
lat: 33.646484,
lng: -117.850174,
imageURLs: ['463/medical-surge-i.jpg'],
},
454487: {
name: 'Donald Bren Hall (DBH)',
lat: 33.643288,
lng: -117.841965,
imageURLs: ['463/donald-bren-hall.jpg'],
},
454488: {
name: 'Engineering Hall (EH)',
lat: 33.643799,
lng: -117.841202,
imageURLs: ['463/engineering-hall.jpg'],
},
454489: {
name: 'Air Pollution Health Effects Laboratory (APHEL)',
lat: 33.664837,
lng: -117.853844,
imageURLs: [],
},
454490: {
name: 'Student Center South',
lat: 33.648724,
lng: -117.842705,
imageURLs: [],
},
454491: {
name: 'Student Center South',
lat: 33.648724,
Expand Down

0 comments on commit 91a1ee3

Please sign in to comment.