Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add LTC facilities map #1703

Merged
merged 58 commits into from
Feb 18, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
06b06fe
chore: Add LTC map
kevee Dec 24, 2020
7870a10
chore: Move to build step
kevee Dec 25, 2020
71e0def
chore: Add electron dep
kevee Dec 25, 2020
8e2b5fd
chore: Fix mapbox version
kevee Dec 25, 2020
0ad18d8
chore: Set zoom level to 6
kevee Dec 25, 2020
e05a9b4
chore: Add layer toggle
kevee Dec 25, 2020
c814da7
chore: Set facilities regardless of layer
kevee Dec 25, 2020
adfe372
Merge remote-tracking branch 'origin/master' into feature/ltc-facilit…
kevee Jan 6, 2021
89e0fd1
chore: Change no-data background
kevee Jan 6, 2021
26686cf
chore: Darken legend
kevee Jan 6, 2021
f1832d4
Merge branch 'master' into feature/ltc-facilities-map
kevee Jan 6, 2021
51fc2ab
chore: Merge map components between LTC and HHS
kevee Jan 6, 2021
953fc97
Merge branch 'feature/ltc-facilities-map' of https://github.com/COVID…
kevee Jan 6, 2021
fb2924d
Merge remote-tracking branch 'origin/master' into feature/ltc-facilit…
kevee Feb 2, 2021
52e1c70
chore: Sync up legend
kevee Feb 2, 2021
b456e4d
chore: Add cms layer
kevee Feb 5, 2021
bfc3aa0
Merge branch 'master' into feature/ltc-facilities-map
kevee Feb 5, 2021
dd613b4
chore: Add CMS detail view
kevee Feb 5, 2021
36b0c13
chore: Fix infobox
kevee Feb 5, 2021
fa52bf6
chore: Fix sidebar for CMS deaths
kevee Feb 5, 2021
9b99b24
chore: Just use CMS cases
kevee Feb 5, 2021
c8412fb
chore: Remove death layer
kevee Feb 5, 2021
9102899
chore: Change to four-layer map
kevee Feb 9, 2021
5ade573
chore: Change base layers
kevee Feb 10, 2021
d2dce6e
chore: Add outbreak res & staff
kevee Feb 10, 2021
7d82018
chore: Typo U
kevee Feb 10, 2021
eed9f0a
chore: Change to radius for sidebar
kevee Feb 10, 2021
184f6a5
chore: Fix data event
kevee Feb 10, 2021
410657c
chore: Change to total covid-19 in CMS
kevee Feb 10, 2021
d6f2153
chore: Remove federal layer
kevee Feb 10, 2021
9ecf4ef
feat: Add facilities map to state pages
kevee Feb 10, 2021
74d946e
chore: Add legend
kevee Feb 10, 2021
d52e90f
chore: Fix missing state center
kevee Feb 10, 2021
8ec6135
chore: Default zoom
kevee Feb 10, 2021
b8b8308
chore: Add definitions, copy
kevee Feb 11, 2021
bee6771
chore: Tweaks to UI
kevee Feb 11, 2021
fe8bb14
Merge branch 'master' into feature/ltc-facilities-map
kevee Feb 11, 2021
45fff1b
chore: Fix cae
kevee Feb 15, 2021
eb2c2d3
Merge branch 'master' into feature/ltc-facilities-map
kevee Feb 15, 2021
3aaf001
chore: Move definitions
kevee Feb 15, 2021
28a788f
Merge branch 'feature/ltc-facilities-map' of https://github.com/COVID…
kevee Feb 15, 2021
9b7bb51
chore: fix the legend
kevee Feb 15, 2021
daf5c4c
chore: Add map button
kevee Feb 15, 2021
9ac658c
Merge branch 'master' into feature/ltc-facilities-map
kevee Feb 16, 2021
ec2535a
chore: Add state to facility card
kevee Feb 16, 2021
2835847
chore: Hash out states with no data for a certain layer
kevee Feb 16, 2021
e303c9e
fix: Label in infobox
kevee Feb 17, 2021
b175b8b
chore: Fix link to defintiions
kevee Feb 17, 2021
efeaa04
chore: Add assessment level to map
kevee Feb 17, 2021
98ff1f8
chore: Remove alert part
kevee Feb 17, 2021
c09a5b7
chore: Fix staff positive
kevee Feb 17, 2021
e503727
chore: Add state name
kevee Feb 17, 2021
836cd32
chore: Change logic for case/death card
kevee Feb 17, 2021
63b6a60
chore: Add state to infobox
kevee Feb 18, 2021
34f123d
chore: Remove sidebar numbers
kevee Feb 18, 2021
1579c64
Merge branch 'master' into feature/ltc-facilities-map
kevee Feb 18, 2021
581443c
chore: Change order of address
kevee Feb 18, 2021
7e8c47d
Merge branch 'feature/ltc-facilities-map' of https://github.com/COVID…
kevee Feb 18, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: Change to radius for sidebar
  • Loading branch information
kevee committed Feb 10, 2021
commit eed9f0a22c5f8a41699e7a711ed926b2f1259884
24 changes: 16 additions & 8 deletions src/components/pages/data/long-term-care/map/facility-details.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@ const fields = {
title: 'Resident deaths',
field: 'resident_deaths',
},
{
title: 'Staff cases',
field: 'staff_positives',
},
{
title: 'Staff deaths',
field: 'staff_deaths',
},
{
title: 'Resident & staff cases',
field: 'resident_staff_positives',
},
{
title: 'Resident & staff deaths',
field: 'resident_staff_deaths',
},
{
title: 'Outbreak resident positives',
field: 'outbreak_resident_positives',
Expand All @@ -27,14 +43,6 @@ const fields = {
title: 'Outbreak resident & staff deaths',
field: 'outbreak_resident_staff_deaths',
},
{
title: 'Staff cases',
field: 'staff_positives',
},
{
title: 'Staff deaths',
field: 'staff_deaths',
},
],
cms: [
{
Expand Down
23 changes: 15 additions & 8 deletions src/components/pages/data/long-term-care/map/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ const LTCFacilitiesMap = ({ center, zoom, state = false }) => {
selectFacility(event, true)
})

map.on('data', () => {
console.log('data')
})

mapRef.current = map
}, [])

Expand Down Expand Up @@ -184,7 +188,7 @@ const LTCFacilitiesMap = ({ center, zoom, state = false }) => {
<thead>
<tr>
<Th alignLeft>Name</Th>
<Th>Resident cases</Th>
<Th>{mapLayer === 'deaths' ? 'Deaths' : 'Cases'}</Th>
</tr>
</thead>
</Table>
Expand All @@ -194,7 +198,7 @@ const LTCFacilitiesMap = ({ center, zoom, state = false }) => {
<thead className="a11y-only">
<tr>
<Th alignLeft>Name</Th>
<Th>Resident cases</Th>
<Th>{mapLayer === 'deaths' ? 'Deaths' : 'Cases'}</Th>
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -228,14 +232,17 @@ const LTCFacilitiesMap = ({ center, zoom, state = false }) => {
</button>
</Td>
<Td>
{mapLayer === 'cms-cases'
? facility.properties[
'residents-total-confirmed-covid-19'
] +
{mapLayer === 'cms-cases' &&
facility.properties[
'residents-total-confirmed-covid-19'
] +
facility.properties[
'residents-total-suspected-covid-19'
]
: facility.properties.resident_positives}
]}
{(mapLayer === 'cases' || mapLayer === 'facilities') &&
facility.properties.radius_positive}
{mapLayer === 'deaths' &&
facility.properties.radius_deaths}
</Td>
</tr>
))}
Expand Down
2 changes: 1 addition & 1 deletion src/components/pages/data/long-term-care/map/infobox.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const LtcInfobox = ({ layer, facility, x, y }) => {
value={facility.outbreak_resident_staff_positives}
/>
<Item
title="OUtbreak resident&amp; staff positives"
title="Outbreak resident&amp; staff positives"
value={facility.outbreak_resident_staff_deaths}
/>
</>
Expand Down