From 206c5dde6109a16ae5b3db87d3ac8c81ee5d19d5 Mon Sep 17 00:00:00 2001 From: Brendan Sudol Date: Thu, 1 Jun 2017 13:19:56 -0400 Subject: [PATCH] agency content tweaks --- src/components/AgencyChartContainer.js | 10 ++++++--- src/components/NibrsContainer.js | 28 ++++++++++++-------------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/components/AgencyChartContainer.js b/src/components/AgencyChartContainer.js index ec42801b..5007f093 100644 --- a/src/components/AgencyChartContainer.js +++ b/src/components/AgencyChartContainer.js @@ -32,18 +32,22 @@ const getContent = ({ crime, place, since, summary, until }) => { } const AgencyChartContainer = params => { - const { agency, crime, since, until } = params + const { agency, crime, since, summary, until } = params const content = getContent(params) return ( -
-
+
+

{startCase(crime)} incidents reported by{' '} {agency.display}, {since}-{until}

{content}
+ {!summary.loading && +
+ Source: Reported incident-based (NIBRS) data from {agency.display} +
}
) } diff --git a/src/components/NibrsContainer.js b/src/components/NibrsContainer.js index 6ef18951..a59bd3ad 100644 --- a/src/components/NibrsContainer.js +++ b/src/components/NibrsContainer.js @@ -85,12 +85,15 @@ const NibrsContainer = ({ content = } + const placeDisplay = placeType === 'agency' + ? agency.display + : startCase(place) + return ( -
+

- {startCase(crime)} incident details in{' '} - {placeType === 'agency' ? agency.display : startCase(place)} + {startCase(crime)} incident details reported by {placeDisplay}

{nibrsFirstYear !== since &&

@@ -99,23 +102,18 @@ const NibrsContainer = ({

} {!error && data && -

- There were {formatNumber(totalCount)} individual {crime} incidents - reported to the FBI in {startCase(place)}{' '} - between {nibrsFirstYear} and {until} by agencies reporting{' '} - {nibrsTerm} data. The charts below feature{' '} - unestimated{' '} - data. Learn more about the{' '} +

+ There were {formatNumber(totalCount)} incidents + of {crime} reported to the UCR Program between {nibrsFirstYear}{' '} + and {until}. Learn more about the{' '} FBI’s data collections.

}
{content} {!loading && -
-

- Source: Reported {nibrsTerm} data from {startCase(place)},{' '} - {nibrsFirstYear}–{until}. -

+
+ Source: Reported {nibrsTerm} data from {placeDisplay},{' '} + {nibrsFirstYear}–{until}.
}
)