Skip to content

Commit

Permalink
pull mobile data from ACS layer
Browse files Browse the repository at this point in the history
  • Loading branch information
vannizhang committed Apr 12, 2022
1 parent 035cbeb commit eef8574
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/components/InfoPanel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ class InfoPanel extends React.Component {

<PercentBarChart
key={'PercentBarChart-2'}
labelOnLeft={this.props.mobilePhoneData ? 'Has Mobile Phone' : ''}
labelOnLeft={this.props.mobilePhoneData ? 'Has Smartphone' : ''}
labelOnRight={this.props.mobilePhoneData ? this.props.mobilePhoneData.fieldLabel : ''}
value={this.props.mobilePhoneData? (100 - this.props.mobilePhoneData.fieldValue) : 0}
isMobile={this.props.isMobile}
Expand Down
18 changes: 9 additions & 9 deletions src/core/DemographicData.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ const config = {
},
{
title: 'Mobile Phone Availability',
url: 'https://services.arcgis.com/jIL9msH9OI208GCb/arcgis/rest/services/Household_Demographics_HurricaneAware/FeatureServer/0',
url: 'https://services.arcgis.com/P3ePLMYs2RVChkJx/ArcGIS/rest/services/ACS_Highlights_Emergency_Response_Boundaries/FeatureServer/2',
fields: [
{
name: 'E_HHCellPer',
alias: 'Has Mobile Phone',
label: 'Has Mobile Phone'
name: 'B28001_calc_pctNoSPE',
alias: 'No Mobile Phone',
label: 'No Mobile Phone'
}
]
}
Expand Down Expand Up @@ -215,13 +215,13 @@ export default function(){

if(beautifiedData['Mobile Phone Availability']){

const pctHasNoMobilePhone= {
fieldAlias: 'Percent of Household without Mobile Phone',
fieldLabel: 'No Mobile Phone',
fieldValue: (100 - beautifiedData['Mobile Phone Availability'][0].fieldValue)
const pctHasMobilePhone= {
fieldAlias: 'Percent of Household has no Mobile Phone',
fieldLabel: 'No Samrtphone',
fieldValue: (beautifiedData['Mobile Phone Availability'][0].fieldValue)
};

beautifiedData['Mobile Phone Availability'].push(pctHasNoMobilePhone);
beautifiedData['Mobile Phone Availability'].push(pctHasMobilePhone);
}

return beautifiedData;
Expand Down

0 comments on commit eef8574

Please sign in to comment.