A time series graph of the
+ (up to five) highest volume complaints for the selected date
+ range. However, you can view all of your selections in the
+ bar chart, below. Hover on the chart to see the count for
+ each date interval. Your filter selections will update
+ what you see on the graph.
+
+ Complaints by sub-products, by date received by the CFPB
+
+
+ A time series graph of the (up to five) highest volume complaints for the selected date range. However, you can view all of your selections in the bar chart, below. Hover on the chart to see the count for each date interval. Your filter selections will update what you see on the graph.
+
+
+
+
+
+
+
+ Complaints
+
+
+
+ Date received by the CFPB
+
+
+
+
+
+
+ Sub-products, by product from 01/01/2018 to 01/01/2020
+
+
+ Sub-products the consumer identified in the complaint
+
+
+
+
+`;
+
+exports[`component:TrendsPanel Snapshots renders area without crashing 1`] = `
+
+
+
+
+
+ Showing
+
+ 1,000
+
+ matches out of
+
+ 10,000
+
+ total complaints
+
+ A time series graph of the (up to five) highest volume complaints for the selected date range. However, you can view all of your selections in the bar chart, below. Hover on the chart to see the count for each date interval. Your filter selections will update what you see on the graph.
+
+
+
+
+
+
+
+ Complaints
+
+
+
+ Date received by the CFPB
+
+
+
+
+
+
+
+ Sub-products
+
+
+ Issues
+
+
+
+
+
+ Sub-products, by product from 01/01/2018 to 01/01/2020
+
+
+ Product and sub-product the consumer identified in the complaint. Click on a product to expand sub-products.
+
+
+
+
+`;
+
+exports[`component:TrendsPanel Snapshots renders company Overlay without crashing 1`] = `
+
+
+
+
+
+ Showing
+
+ 1,000
+
+ matches out of
+
+ 10,000
+
+ total complaints
+
+ A time series graph of the (up to five) highest volume complaints for the selected date range. However, you can view all of your selections in the bar chart, below. Hover on the chart to see the count for each date interval. Your filter selections will update what you see on the graph.
+
+
+
+
+
+
+
+ Complaints
+
+
+
+ Date received by the CFPB
+
+
+
+
+
+
+ Product by highest complaint volume 01/01/2018 to 01/01/2020
+
+
+ Product and sub-product the consumer identified in the complaint. Click on a product to expand sub-products.
+
+ A time series graph of the (up to five) highest volume complaints for the selected date range. However, you can view all of your selections in the bar chart, below. Hover on the chart to see the count for each date interval. Your filter selections will update what you see on the graph.
+
+
+
+
+
+
+
+ Complaints
+
+
+
+ Date received by the CFPB
+
+
+
+
+
+
+
+ Sub-products
+
+
+ Issues
+
+
+
+
+
+ Sub-products, by product from 01/01/2018 to 01/01/2020
+
+
+ Product and sub-product the consumer identified in the complaint. Click on a product to expand sub-products.
+
+ A time series graph of the (up to five) highest volume complaints for the selected date range. However, you can view all of your selections in the bar chart, below. Hover on the chart to see the count for each date interval. Your filter selections will update what you see on the graph.
+
+
+
+
+
+
+
+ Complaints
+
+
+
+ Date received by the CFPB
+
+
+
+
+
+
+ Product by highest complaint volume 01/01/2018 to 01/01/2020
+
+
+ Product and sub-product the consumer identified in the complaint. Click on a product to expand sub-products.
+
+
+
+
+`;
+
+exports[`component:TrendsPanel Snapshots renders mobile filters without crashing 1`] = `
+
+
+
+
+
+ Showing
+
+ 1,000
+
+ matches out of
+
+ 10,000
+
+ total complaints
+
+ A time series graph of the (up to five) highest volume complaints for the selected date range. However, you can view all of your selections in the bar chart, below. Hover on the chart to see the count for each date interval. Your filter selections will update what you see on the graph.
+
+
+
+
+
+
+
+ Complaints
+
+
+
+ Date received by the CFPB
+
+
+
+
+
+
+ Product by highest complaint volume 01/01/2018 to 01/01/2020
+
+
+ Product and sub-product the consumer identified in the complaint. Click on a product to expand sub-products.
+
+ A time series graph of the (up to five) highest volume complaints for the selected date range. However, you can view all of your selections in the bar chart, below. Hover on the chart to see the count for each date interval. Your filter selections will update what you see on the graph.
+
+
+
+
+
+
+
+ Complaints
+
+
+
+ Date received by the CFPB
+
+
+
+
+
+
+ Product by highest complaint volume 01/01/2018 to 01/01/2020
+
+
+ Product and sub-product the consumer identified in the complaint. Click on a product to expand sub-products.
+
+
+
+
+`;
diff --git a/src/components/iconMap.jsx b/src/components/iconMap.jsx
index 858e495b1..49ea9ffb3 100644
--- a/src/components/iconMap.jsx
+++ b/src/components/iconMap.jsx
@@ -18,7 +18,9 @@ const iconMap = {
'search': ,
'updating': ,
'up': ,
- 'warning-round':
+ 'warning-round': ,
+ 'line-chart': ,
+ 'area-chart':
}
/**
@@ -28,9 +30,9 @@ const iconMap = {
* @returns {Object} An SVG icon markup.
*/
function getIcon( name, customClass ) {
- let Icon = iconMap[name];
+ let Icon = iconMap[name]
if ( typeof Icon === 'undefined' ) {
- throw new Error( 'Icon not found!' );
+ throw new Error( 'Icon not found!' )
}
if ( typeof customClass !== 'undefined' ) {
@@ -39,7 +41,7 @@ function getIcon( name, customClass ) {
} )
}
- return Icon;
+ return Icon
}
export default {
diff --git a/src/constants/colors.jsx b/src/constants/colors.jsx
new file mode 100644
index 000000000..bf21373e4
--- /dev/null
+++ b/src/constants/colors.jsx
@@ -0,0 +1,21 @@
+/* eslint-disable no-inline-comments, camelcase */
+module.exports = Object.freeze( {
+ BriteCharts: {
+ regular: '#20aa3f',
+ medium: '#ADDC91',
+ light: '#C7E5B3'
+ },
+ DataLens: {
+ 0: '#2cb34a',
+ 1: '#addc91',
+ 2: '#257675',
+ 3: '#9ec4c3',
+ 4: '#0072ce',
+ 5: '#96c4ed',
+ 6: '#254b87',
+ 7: '#9daecc',
+ 8: '#b4267a',
+ 9: '#dc9cbf',
+ 10: '#a2a3a4'
+ }
+} )
diff --git a/src/constants/index.jsx b/src/constants/index.jsx
index e1ed8c276..028e1e3d0 100644
--- a/src/constants/index.jsx
+++ b/src/constants/index.jsx
@@ -56,13 +56,32 @@ export const dateRanges = [ '3m', '6m', '1y', '3y', 'All' ]
export const excludeFields = [
'enablePer1000',
'mapWarningEnabled',
- 'totalPages'
+ 'totalPages',
+ 'trendsDateWarningEnabled'
]
export const flagFilters = [
'has_narrative'
]
+export const sizes = {
+ 10: '10 results',
+ 25: '25 results',
+ 50: '50 results',
+ 100: '100 results'
+}
+
+/* eslint-disable camelcase */
+
+export const sorts = {
+ created_date_desc: 'Newest to oldest',
+ created_date_asc: 'Oldest to newest',
+ relevance_desc: 'Relevance',
+ relevance_asc: 'Relevance (asc)'
+}
+
+/* eslint-enable camelcase */
+
export const SLUG_SEPARATOR = '•'
// Keyboard
diff --git a/src/css/App.less b/src/css/App.less
index bc9f497fa..a34d7ceb1 100644
--- a/src/css/App.less
+++ b/src/css/App.less
@@ -11,6 +11,9 @@
@import (less) "./base.less";
@import (less) "../css/notification.less";
+.wrapper {
+ max-width: none;
+}
// Fix Webpack not packing "approved.svg"
diff --git a/src/reducers/__fixtures__/trendsAggs.jsx b/src/reducers/__fixtures__/trendsAggs.jsx
new file mode 100644
index 000000000..acfcf1ea5
--- /dev/null
+++ b/src/reducers/__fixtures__/trendsAggs.jsx
@@ -0,0 +1 @@
+export default { "dateRangeBrush": { "doc_count": 532, "dateRangeBrush": { "buckets": [ { "key_as_string": "2020-03-01T00:00:00.000Z", "key": 1583020800000, "doc_count": 106 }, { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 374 }, { "key_as_string": "2020-05-01T00:00:00.000Z", "key": 1588291200000, "doc_count": 52 } ] } }, "product": { "doc_count": 532, "product": { "doc_count_error_upper_bound": 0, "sum_other_doc_count": 50, "buckets": [ { "key": "Mortgage", "doc_count": 185, "product": { "doc_count_error_upper_bound": 0, "sum_other_doc_count": 0, "buckets": [ { "key": "Conventional home mortgage", "doc_count": 108, "trend_period": { "buckets": [ { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 72, "interval_diff": { "value": 47 } } ] } }, { "key": "FHA mortgage", "doc_count": 44, "trend_period": { "buckets": [ { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 36, "interval_diff": { "value": 31 } } ] } }, { "key": "VA mortgage", "doc_count": 19, "trend_period": { "buckets": [ { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 14, "interval_diff": { "value": 11 } } ] } }, { "key": "Other type of mortgage", "doc_count": 9, "trend_period": { "buckets": [ { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 4, "interval_diff": { "value": 2 } } ] } }, { "key": "Home equity loan or line of credit (HELOC)", "doc_count": 5, "trend_period": { "buckets": [] } } ] }, "trend_period": { "buckets": [ { "key_as_string": "2020-05-01T00:00:00.000Z", "key": 1588291200000, "doc_count": 19, "interval_diff": { "value": -112 } }, { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 131, "interval_diff": { "value": 96 } }, { "key_as_string": "2020-03-01T00:00:00.000Z", "key": 1583020800000, "doc_count": 35 } ] } }, { "key": "Credit card or prepaid card", "doc_count": 129, "product": { "doc_count_error_upper_bound": 0, "sum_other_doc_count": 0, "buckets": [ { "key": "General-purpose credit card or charge card", "doc_count": 98, "trend_period": { "buckets": [ { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 68, "interval_diff": { "value": 46 } } ] } }, { "key": "Store credit card", "doc_count": 23, "trend_period": { "buckets": [ { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 17, "interval_diff": { "value": 12 } } ] } }, { "key": "Government benefit card", "doc_count": 6, "trend_period": { "buckets": [ { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 5 } ] } }, { "key": "General-purpose prepaid card", "doc_count": 2, "trend_period": { "buckets": [] } } ] }, "trend_period": { "buckets": [ { "key_as_string": "2020-05-01T00:00:00.000Z", "key": 1588291200000, "doc_count": 12, "interval_diff": { "value": -78 } }, { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 90, "interval_diff": { "value": 63 } }, { "key_as_string": "2020-03-01T00:00:00.000Z", "key": 1583020800000, "doc_count": 27 } ] } }, { "key": "Credit reporting, credit repair services, or other personal consumer reports", "doc_count": 87, "product": { "doc_count_error_upper_bound": 0, "sum_other_doc_count": 0, "buckets": [ { "key": "Credit reporting", "doc_count": 84, "trend_period": { "buckets": [ { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 62, "interval_diff": { "value": 48 } } ] } }, { "key": "Credit repair services", "doc_count": 2, "trend_period": { "buckets": [ { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 1 } ] } }, { "key": "Other personal consumer report", "doc_count": 1, "trend_period": { "buckets": [] } } ] }, "trend_period": { "buckets": [ { "key_as_string": "2020-05-01T00:00:00.000Z", "key": 1588291200000, "doc_count": 9, "interval_diff": { "value": -55 } }, { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 64, "interval_diff": { "value": 50 } }, { "key_as_string": "2020-03-01T00:00:00.000Z", "key": 1583020800000, "doc_count": 14 } ] } }, { "key": "Checking or savings account", "doc_count": 43, "product": { "doc_count_error_upper_bound": 0, "sum_other_doc_count": 0, "buckets": [ { "key": "Checking account", "doc_count": 34, "trend_period": { "buckets": [ { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 27, "interval_diff": { "value": 24 } } ] } }, { "key": "Savings account", "doc_count": 5, "trend_period": { "buckets": [ { "key_as_string": "2020-03-01T00:00:00.000Z", "key": 1583020800000, "doc_count": 2 } ] } }, { "key": "Other banking product or service", "doc_count": 3, "trend_period": { "buckets": [] } }, { "key": "CD (Certificate of Deposit)", "doc_count": 1, "trend_period": { "buckets": [] } } ] }, "trend_period": { "buckets": [ { "key_as_string": "2020-05-01T00:00:00.000Z", "key": 1588291200000, "doc_count": 4, "interval_diff": { "value": -30 } }, { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 34, "interval_diff": { "value": 29 } }, { "key_as_string": "2020-03-01T00:00:00.000Z", "key": 1583020800000, "doc_count": 5 } ] } }, { "key": "Debt collection", "doc_count": 38, "product": { "doc_count_error_upper_bound": 0, "sum_other_doc_count": 0, "buckets": [ { "key": "Other debt", "doc_count": 12, "trend_period": { "buckets": [ { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 6, "interval_diff": { "value": 3 } } ] } }, { "key": "I do not know", "doc_count": 8, "trend_period": { "buckets": [ { "key_as_string": "2020-03-01T00:00:00.000Z", "key": 1583020800000, "doc_count": 5 } ] } }, { "key": "Medical debt", "doc_count": 8, "trend_period": { "buckets": [ { "key_as_string": "2020-03-01T00:00:00.000Z", "key": 1583020800000, "doc_count": 1 } ] } }, { "key": "Auto debt", "doc_count": 4, "trend_period": { "buckets": [] } }, { "key": "Credit card debt", "doc_count": 4, "trend_period": { "buckets": [ { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 2, "interval_diff": { "value": 1 } } ] } }, { "key": "Federal student loan debt", "doc_count": 1, "trend_period": { "buckets": [] } }, { "key": "Private student loan debt", "doc_count": 1, "trend_period": { "buckets": [] } } ] }, "trend_period": { "buckets": [ { "key_as_string": "2020-05-01T00:00:00.000Z", "key": 1588291200000, "doc_count": 4, "interval_diff": { "value": -20 } }, { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 24, "interval_diff": { "value": 14 } }, { "key_as_string": "2020-03-01T00:00:00.000Z", "key": 1583020800000, "doc_count": 10 } ] } } ] } }, "max_date": { "value": 1589216400000, "value_as_string": "2020-05-11T12:00:00-05:00" }, "issue": { "doc_count": 532, "issue": { "doc_count_error_upper_bound": 5, "sum_other_doc_count": 257, "buckets": [ { "key": "Struggling to pay mortgage", "doc_count": 116, "trend_period": { "buckets": [ { "key_as_string": "2020-05-01T00:00:00.000Z", "key": 1588291200000, "doc_count": 8, "interval_diff": { "value": -75 } }, { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 83, "interval_diff": { "value": 58 } }, { "key_as_string": "2020-03-01T00:00:00.000Z", "key": 1583020800000, "doc_count": 25 } ] }, "issue": { "doc_count_error_upper_bound": 0, "sum_other_doc_count": 0, "buckets": [] } }, { "key": "Incorrect information on your report", "doc_count": 54, "trend_period": { "buckets": [ { "key_as_string": "2020-05-01T00:00:00.000Z", "key": 1588291200000, "doc_count": 5, "interval_diff": { "value": -40 } }, { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 45, "interval_diff": { "value": 41 } }, { "key_as_string": "2020-03-01T00:00:00.000Z", "key": 1583020800000, "doc_count": 4 } ] }, "issue": { "doc_count_error_upper_bound": 0, "sum_other_doc_count": 0, "buckets": [ { "key": "Account status incorrect", "doc_count": 16, "trend_period": { "buckets": [ { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 15 } ] } }, { "key": "Account information incorrect", "doc_count": 14, "trend_period": { "buckets": [ { "key_as_string": "2020-03-01T00:00:00.000Z", "key": 1583020800000, "doc_count": 2 } ] } }, { "key": "Information belongs to someone else", "doc_count": 13, "trend_period": { "buckets": [ { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 11 } ] } }, { "key": "Old information reappears or never goes away", "doc_count": 4, "trend_period": { "buckets": [ { "key_as_string": "2020-03-01T00:00:00.000Z", "key": 1583020800000, "doc_count": 2 } ] } }, { "key": "Personal information incorrect", "doc_count": 2, "trend_period": { "buckets": [] } }, { "key": "Information is missing that should be on the report", "doc_count": 1, "trend_period": { "buckets": [] } }, { "key": "Public record information inaccurate", "doc_count": 1, "trend_period": { "buckets": [] } } ] } }, { "key": "Trouble during payment process", "doc_count": 49, "trend_period": { "buckets": [ { "key_as_string": "2020-05-01T00:00:00.000Z", "key": 1588291200000, "doc_count": 6, "interval_diff": { "value": -29 } }, { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 35, "interval_diff": { "value": 27 } }, { "key_as_string": "2020-03-01T00:00:00.000Z", "key": 1583020800000, "doc_count": 8 } ] }, "issue": { "doc_count_error_upper_bound": 0, "sum_other_doc_count": 0, "buckets": [] } }, { "key": "Managing an account", "doc_count": 29, "trend_period": { "buckets": [ { "key_as_string": "2020-05-01T00:00:00.000Z", "key": 1588291200000, "doc_count": 2, "interval_diff": { "value": -22 } }, { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 24, "interval_diff": { "value": 21 } }, { "key_as_string": "2020-03-01T00:00:00.000Z", "key": 1583020800000, "doc_count": 3 } ] }, "issue": { "doc_count_error_upper_bound": 0, "sum_other_doc_count": 0, "buckets": [ { "key": "Deposits and withdrawals", "doc_count": 10, "trend_period": { "buckets": [ { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 7, "interval_diff": { "value": 5 } } ] } }, { "key": "Problem using a debit or ATM card", "doc_count": 7, "trend_period": { "buckets": [ { "key_as_string": "2020-03-01T00:00:00.000Z", "key": 1583020800000, "doc_count": 1 } ] } }, { "key": "Funds not handled or disbursed as instructed", "doc_count": 4, "trend_period": { "buckets": [ { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 3 } ] } }, { "key": "Fee problem", "doc_count": 3, "trend_period": { "buckets": [] } }, { "key": "Problem accessing account", "doc_count": 2, "trend_period": { "buckets": [] } }, { "key": "Problem making or receiving payments", "doc_count": 2, "trend_period": { "buckets": [] } }, { "key": "Cashing a check", "doc_count": 1, "trend_period": { "buckets": [] } } ] } }, { "key": "Fees or interest", "doc_count": 27, "trend_period": { "buckets": [ { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 20, "interval_diff": { "value": 13 } }, { "key_as_string": "2020-03-01T00:00:00.000Z", "key": 1583020800000, "doc_count": 7 } ] }, "issue": { "doc_count_error_upper_bound": 0, "sum_other_doc_count": 0, "buckets": [ { "key": "Problem with fees", "doc_count": 17, "trend_period": { "buckets": [ { "key_as_string": "2020-03-01T00:00:00.000Z", "key": 1583020800000, "doc_count": 4 } ] } }, { "key": "Charged too much interest", "doc_count": 6, "trend_period": { "buckets": [ { "key_as_string": "2020-03-01T00:00:00.000Z", "key": 1583020800000, "doc_count": 2 } ] } }, { "key": "Unexpected increase in interest rate", "doc_count": 4, "trend_period": { "buckets": [ { "key_as_string": "2020-03-01T00:00:00.000Z", "key": 1583020800000, "doc_count": 1 } ] } } ] } } ] } }, "min_date": { "value": 1584032400000, "value_as_string": "2020-03-12T12:00:00-05:00" }, "dateRangeArea": { "doc_count": 532, "dateRangeArea": { "buckets": [ { "key_as_string": "2020-03-01T00:00:00.000Z", "key": 1583020800000, "doc_count": 106 }, { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 374 }, { "key_as_string": "2020-05-01T00:00:00.000Z", "key": 1588291200000, "doc_count": 52 } ] } }, "tags": { "doc_count": 532, "tags": { "doc_count_error_upper_bound": 0, "sum_other_doc_count": 0, "buckets": [ { "key": "Servicemember", "doc_count": 70, "trend_period": { "buckets": [ { "key_as_string": "2020-05-01T00:00:00.000Z", "key": 1588291200000, "doc_count": 7, "interval_diff": { "value": -43 } }, { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 50, "interval_diff": { "value": 37 } }, { "key_as_string": "2020-03-01T00:00:00.000Z", "key": 1583020800000, "doc_count": 13 } ] } }, { "key": "Older American", "doc_count": 30, "trend_period": { "buckets": [ { "key_as_string": "2020-05-01T00:00:00.000Z", "key": 1588291200000, "doc_count": 1, "interval_diff": { "value": -21 } }, { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 22, "interval_diff": { "value": 15 } }, { "key_as_string": "2020-03-01T00:00:00.000Z", "key": 1583020800000, "doc_count": 7 } ] } }, { "key": "Older American, Servicemember", "doc_count": 7, "trend_period": { "buckets": [ { "key_as_string": "2020-05-01T00:00:00.000Z", "key": 1588291200000, "doc_count": 1, "interval_diff": { "value": -4 } }, { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 5, "interval_diff": { "value": 4 } }, { "key_as_string": "2020-03-01T00:00:00.000Z", "key": 1583020800000, "doc_count": 1 } ] } } ] } }, "dateRangeBuckets": { "doc_count": 121054, "dateRangeBuckets": { "buckets": [ { "key_as_string": "2020-01-01T00:00:00.000Z", "key": 1577836800000, "doc_count": 21519 }, { "key_as_string": "2020-02-01T00:00:00.000Z", "key": 1580515200000, "doc_count": 25096 }, { "key_as_string": "2020-03-01T00:00:00.000Z", "key": 1583020800000, "doc_count": 29506 }, { "key_as_string": "2020-04-01T00:00:00.000Z", "key": 1585699200000, "doc_count": 35112 }, { "key_as_string": "2020-05-01T00:00:00.000Z", "key": 1588291200000, "doc_count": 9821 } ] } } }
diff --git a/src/reducers/__fixtures__/trendsAggsDupes.jsx b/src/reducers/__fixtures__/trendsAggsDupes.jsx
new file mode 100644
index 000000000..d3277e38c
--- /dev/null
+++ b/src/reducers/__fixtures__/trendsAggsDupes.jsx
@@ -0,0 +1,3 @@
+export const trendsAggsDupes = {"dateRangeBrush":{"doc_count":1599733,"dateRangeBrush":{"buckets":[{"key_as_string":"2011-12-01T00:00:00.000Z","key":1322697600000,"doc_count":2536},{"key_as_string":"2012-01-01T00:00:00.000Z","key":1325376000000,"doc_count":3230},{"key_as_string":"2012-02-01T00:00:00.000Z","key":1328054400000,"doc_count":3509},{"key_as_string":"2012-03-01T00:00:00.000Z","key":1330560000000,"doc_count":6230},{"key_as_string":"2012-04-01T00:00:00.000Z","key":1333238400000,"doc_count":5703},{"key_as_string":"2012-05-01T00:00:00.000Z","key":1335830400000,"doc_count":7617},{"key_as_string":"2012-06-01T00:00:00.000Z","key":1338508800000,"doc_count":7841},{"key_as_string":"2012-07-01T00:00:00.000Z","key":1341100800000,"doc_count":6755},{"key_as_string":"2012-08-01T00:00:00.000Z","key":1343779200000,"doc_count":6877},{"key_as_string":"2012-09-01T00:00:00.000Z","key":1346457600000,"doc_count":5493},{"key_as_string":"2012-10-01T00:00:00.000Z","key":1349049600000,"doc_count":6741},{"key_as_string":"2012-11-01T00:00:00.000Z","key":1351728000000,"doc_count":6139},{"key_as_string":"2012-12-01T00:00:00.000Z","key":1354320000000,"doc_count":6238},{"key_as_string":"2013-01-01T00:00:00.000Z","key":1356998400000,"doc_count":9741},{"key_as_string":"2013-02-01T00:00:00.000Z","key":1359676800000,"doc_count":8349},{"key_as_string":"2013-03-01T00:00:00.000Z","key":1362096000000,"doc_count":8784},{"key_as_string":"2013-04-01T00:00:00.000Z","key":1364774400000,"doc_count":8632},{"key_as_string":"2013-05-01T00:00:00.000Z","key":1367366400000,"doc_count":8170},{"key_as_string":"2013-06-01T00:00:00.000Z","key":1370044800000,"doc_count":8035},{"key_as_string":"2013-07-01T00:00:00.000Z","key":1372636800000,"doc_count":9271},{"key_as_string":"2013-08-01T00:00:00.000Z","key":1375315200000,"doc_count":9565},{"key_as_string":"2013-09-01T00:00:00.000Z","key":1377993600000,"doc_count":9636},{"key_as_string":"2013-10-01T00:00:00.000Z","key":1380585600000,"doc_count":9241},{"key_as_string":"2013-11-01T00:00:00.000Z","key":1383264000000,"doc_count":9319},{"key_as_string":"2013-12-01T00:00:00.000Z","key":1385856000000,"doc_count":9474},{"key_as_string":"2014-01-01T00:00:00.000Z","key":1388534400000,"doc_count":12617},{"key_as_string":"2014-02-01T00:00:00.000Z","key":1391212800000,"doc_count":13048},{"key_as_string":"2014-03-01T00:00:00.000Z","key":1393632000000,"doc_count":13943},{"key_as_string":"2014-04-01T00:00:00.000Z","key":1396310400000,"doc_count":13840},{"key_as_string":"2014-05-01T00:00:00.000Z","key":1398902400000,"doc_count":12167},{"key_as_string":"2014-06-01T00:00:00.000Z","key":1401580800000,"doc_count":12520},{"key_as_string":"2014-07-01T00:00:00.000Z","key":1404172800000,"doc_count":13415},{"key_as_string":"2014-08-01T00:00:00.000Z","key":1406851200000,"doc_count":13186},{"key_as_string":"2014-09-01T00:00:00.000Z","key":1409529600000,"doc_count":12465},{"key_as_string":"2014-10-01T00:00:00.000Z","key":1412121600000,"doc_count":12901},{"key_as_string":"2014-11-01T00:00:00.000Z","key":1414800000000,"doc_count":11257},{"key_as_string":"2014-12-01T00:00:00.000Z","key":1417392000000,"doc_count":11684},{"key_as_string":"2015-01-01T00:00:00.000Z","key":1420070400000,"doc_count":12627},{"key_as_string":"2015-02-01T00:00:00.000Z","key":1422748800000,"doc_count":12680},{"key_as_string":"2015-03-01T00:00:00.000Z","key":1425168000000,"doc_count":14514},{"key_as_string":"2015-04-01T00:00:00.000Z","key":1427846400000,"doc_count":13753},{"key_as_string":"2015-05-01T00:00:00.000Z","key":1430438400000,"doc_count":13682},{"key_as_string":"2015-06-01T00:00:00.000Z","key":1433116800000,"doc_count":14517},{"key_as_string":"2015-07-01T00:00:00.000Z","key":1435708800000,"doc_count":15920},{"key_as_string":"2015-08-01T00:00:00.000Z","key":1438387200000,"doc_count":15766},{"key_as_string":"2015-09-01T00:00:00.000Z","key":1441065600000,"doc_count":14336},{"key_as_string":"2015-10-01T00:00:00.000Z","key":1443657600000,"doc_count":14899},{"key_as_string":"2015-11-01T00:00:00.000Z","key":1446336000000,"doc_count":12897},{"key_as_string":"2015-12-01T00:00:00.000Z","key":1448928000000,"doc_count":12884},{"key_as_string":"2016-01-01T00:00:00.000Z","key":1451606400000,"doc_count":13840},{"key_as_string":"2016-02-01T00:00:00.000Z","key":1454284800000,"doc_count":14140},{"key_as_string":"2016-03-01T00:00:00.000Z","key":1456790400000,"doc_count":16611},{"key_as_string":"2016-04-01T00:00:00.000Z","key":1459468800000,"doc_count":15608},{"key_as_string":"2016-05-01T00:00:00.000Z","key":1462060800000,"doc_count":15517},{"key_as_string":"2016-06-01T00:00:00.000Z","key":1464739200000,"doc_count":16063},{"key_as_string":"2016-07-01T00:00:00.000Z","key":1467331200000,"doc_count":16043},{"key_as_string":"2016-08-01T00:00:00.000Z","key":1470009600000,"doc_count":17694},{"key_as_string":"2016-09-01T00:00:00.000Z","key":1472688000000,"doc_count":17584},{"key_as_string":"2016-10-01T00:00:00.000Z","key":1475280000000,"doc_count":17820},{"key_as_string":"2016-11-01T00:00:00.000Z","key":1477958400000,"doc_count":15207},{"key_as_string":"2016-12-01T00:00:00.000Z","key":1480550400000,"doc_count":15341},{"key_as_string":"2017-01-01T00:00:00.000Z","key":1483228800000,"doc_count":21006},{"key_as_string":"2017-02-01T00:00:00.000Z","key":1485907200000,"doc_count":18110},{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":19762},{"key_as_string":"2017-04-01T00:00:00.000Z","key":1491004800000,"doc_count":18544},{"key_as_string":"2017-05-01T00:00:00.000Z","key":1493596800000,"doc_count":19305},{"key_as_string":"2017-06-01T00:00:00.000Z","key":1496275200000,"doc_count":18567},{"key_as_string":"2017-07-01T00:00:00.000Z","key":1498867200000,"doc_count":20433},{"key_as_string":"2017-08-01T00:00:00.000Z","key":1501545600000,"doc_count":21402},{"key_as_string":"2017-09-01T00:00:00.000Z","key":1504224000000,"doc_count":27357},{"key_as_string":"2017-10-01T00:00:00.000Z","key":1506816000000,"doc_count":20456},{"key_as_string":"2017-11-01T00:00:00.000Z","key":1509494400000,"doc_count":18990},{"key_as_string":"2017-12-01T00:00:00.000Z","key":1512086400000,"doc_count":19034},{"key_as_string":"2018-01-01T00:00:00.000Z","key":1514764800000,"doc_count":23651},{"key_as_string":"2018-02-01T00:00:00.000Z","key":1517443200000,"doc_count":21978},{"key_as_string":"2018-03-01T00:00:00.000Z","key":1519862400000,"doc_count":23640},{"key_as_string":"2018-04-01T00:00:00.000Z","key":1522540800000,"doc_count":24327},{"key_as_string":"2018-05-01T00:00:00.000Z","key":1525132800000,"doc_count":22339},{"key_as_string":"2018-06-01T00:00:00.000Z","key":1527811200000,"doc_count":20111},{"key_as_string":"2018-07-01T00:00:00.000Z","key":1530403200000,"doc_count":20963},{"key_as_string":"2018-08-01T00:00:00.000Z","key":1533081600000,"doc_count":21726},{"key_as_string":"2018-09-01T00:00:00.000Z","key":1535760000000,"doc_count":19072},{"key_as_string":"2018-10-01T00:00:00.000Z","key":1538352000000,"doc_count":21903},{"key_as_string":"2018-11-01T00:00:00.000Z","key":1541030400000,"doc_count":19053},{"key_as_string":"2018-12-01T00:00:00.000Z","key":1543622400000,"doc_count":18552},{"key_as_string":"2019-01-01T00:00:00.000Z","key":1546300800000,"doc_count":18934},{"key_as_string":"2019-02-01T00:00:00.000Z","key":1548979200000,"doc_count":20206},{"key_as_string":"2019-03-01T00:00:00.000Z","key":1551398400000,"doc_count":23412},{"key_as_string":"2019-04-01T00:00:00.000Z","key":1554076800000,"doc_count":22915},{"key_as_string":"2019-05-01T00:00:00.000Z","key":1556668800000,"doc_count":23850},{"key_as_string":"2019-06-01T00:00:00.000Z","key":1559347200000,"doc_count":23352},{"key_as_string":"2019-07-01T00:00:00.000Z","key":1561939200000,"doc_count":25090},{"key_as_string":"2019-08-01T00:00:00.000Z","key":1564617600000,"doc_count":26059},{"key_as_string":"2019-09-01T00:00:00.000Z","key":1567296000000,"doc_count":23575},{"key_as_string":"2019-10-01T00:00:00.000Z","key":1569888000000,"doc_count":25636},{"key_as_string":"2019-11-01T00:00:00.000Z","key":1572566400000,"doc_count":22659},{"key_as_string":"2019-12-01T00:00:00.000Z","key":1575158400000,"doc_count":21704},{"key_as_string":"2020-01-01T00:00:00.000Z","key":1577836800000,"doc_count":26413},{"key_as_string":"2020-02-01T00:00:00.000Z","key":1580515200000,"doc_count":25096},{"key_as_string":"2020-03-01T00:00:00.000Z","key":1583020800000,"doc_count":29506},{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":35112},{"key_as_string":"2020-05-01T00:00:00.000Z","key":1588291200000,"doc_count":9821}]}},"product":{"doc_count":1599733,"product":{"doc_count_error_upper_bound":0,"sum_other_doc_count":377545,"buckets":[{"key":"Credit reporting, credit repair services, or other personal consumer reports","doc_count":397342,"product":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[{"key":"Credit reporting","doc_count":390818,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":20988,"interval_diff":{"value":3914}}]}},{"key":"Other personal consumer report","doc_count":5220,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":150,"interval_diff":{"value":28}}]}},{"key":"Credit repair services","doc_count":1303,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":41,"interval_diff":{"value":6}}]}},{"key":"Conventional home mortgage","doc_count":1,"trend_period":{"buckets":[]}}]},"trend_period":{"buckets":[{"key_as_string":"2020-05-01T00:00:00.000Z","key":1588291200000,"doc_count":6868,"interval_diff":{"value":-14311}},{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":21179,"interval_diff":{"value":3948}},{"key_as_string":"2020-03-01T00:00:00.000Z","key":1583020800000,"doc_count":17231,"interval_diff":{"value":3629}},{"key_as_string":"2020-02-01T00:00:00.000Z","key":1580515200000,"doc_count":13602,"interval_diff":{"value":-1246}},{"key_as_string":"2020-01-01T00:00:00.000Z","key":1577836800000,"doc_count":14848,"interval_diff":{"value":3540}},{"key_as_string":"2019-12-01T00:00:00.000Z","key":1575158400000,"doc_count":11308,"interval_diff":{"value":-541}},{"key_as_string":"2019-11-01T00:00:00.000Z","key":1572566400000,"doc_count":11849,"interval_diff":{"value":-1363}},{"key_as_string":"2019-10-01T00:00:00.000Z","key":1569888000000,"doc_count":13212,"interval_diff":{"value":1116}},{"key_as_string":"2019-09-01T00:00:00.000Z","key":1567296000000,"doc_count":12096,"interval_diff":{"value":-1425}},{"key_as_string":"2019-08-01T00:00:00.000Z","key":1564617600000,"doc_count":13521,"interval_diff":{"value":515}},{"key_as_string":"2019-07-01T00:00:00.000Z","key":1561939200000,"doc_count":13006,"interval_diff":{"value":1264}},{"key_as_string":"2019-06-01T00:00:00.000Z","key":1559347200000,"doc_count":11742,"interval_diff":{"value":-179}},{"key_as_string":"2019-05-01T00:00:00.000Z","key":1556668800000,"doc_count":11921,"interval_diff":{"value":863}},{"key_as_string":"2019-04-01T00:00:00.000Z","key":1554076800000,"doc_count":11058,"interval_diff":{"value":57}},{"key_as_string":"2019-03-01T00:00:00.000Z","key":1551398400000,"doc_count":11001,"interval_diff":{"value":1634}},{"key_as_string":"2019-02-01T00:00:00.000Z","key":1548979200000,"doc_count":9367,"interval_diff":{"value":853}},{"key_as_string":"2019-01-01T00:00:00.000Z","key":1546300800000,"doc_count":8514,"interval_diff":{"value":149}},{"key_as_string":"2018-12-01T00:00:00.000Z","key":1543622400000,"doc_count":8365,"interval_diff":{"value":-562}},{"key_as_string":"2018-11-01T00:00:00.000Z","key":1541030400000,"doc_count":8927,"interval_diff":{"value":-923}},{"key_as_string":"2018-10-01T00:00:00.000Z","key":1538352000000,"doc_count":9850,"interval_diff":{"value":1447}},{"key_as_string":"2018-09-01T00:00:00.000Z","key":1535760000000,"doc_count":8403,"interval_diff":{"value":-1046}},{"key_as_string":"2018-08-01T00:00:00.000Z","key":1533081600000,"doc_count":9449,"interval_diff":{"value":309}},{"key_as_string":"2018-07-01T00:00:00.000Z","key":1530403200000,"doc_count":9140,"interval_diff":{"value":645}},{"key_as_string":"2018-06-01T00:00:00.000Z","key":1527811200000,"doc_count":8495,"interval_diff":{"value":-980}},{"key_as_string":"2018-05-01T00:00:00.000Z","key":1525132800000,"doc_count":9475,"interval_diff":{"value":-863}},{"key_as_string":"2018-04-01T00:00:00.000Z","key":1522540800000,"doc_count":10338,"interval_diff":{"value":463}},{"key_as_string":"2018-03-01T00:00:00.000Z","key":1519862400000,"doc_count":9875,"interval_diff":{"value":189}},{"key_as_string":"2018-02-01T00:00:00.000Z","key":1517443200000,"doc_count":9686,"interval_diff":{"value":64}},{"key_as_string":"2018-01-01T00:00:00.000Z","key":1514764800000,"doc_count":9622,"interval_diff":{"value":1926}},{"key_as_string":"2017-12-01T00:00:00.000Z","key":1512086400000,"doc_count":7696,"interval_diff":{"value":-204}},{"key_as_string":"2017-11-01T00:00:00.000Z","key":1509494400000,"doc_count":7900,"interval_diff":{"value":-835}},{"key_as_string":"2017-10-01T00:00:00.000Z","key":1506816000000,"doc_count":8735,"interval_diff":{"value":-7360}},{"key_as_string":"2017-09-01T00:00:00.000Z","key":1504224000000,"doc_count":16095,"interval_diff":{"value":7306}},{"key_as_string":"2017-08-01T00:00:00.000Z","key":1501545600000,"doc_count":8789,"interval_diff":{"value":604}},{"key_as_string":"2017-07-01T00:00:00.000Z","key":1498867200000,"doc_count":8185,"interval_diff":{"value":1261}},{"key_as_string":"2017-06-01T00:00:00.000Z","key":1496275200000,"doc_count":6924,"interval_diff":{"value":-184}},{"key_as_string":"2017-05-01T00:00:00.000Z","key":1493596800000,"doc_count":7108,"interval_diff":{"value":5146}},{"key_as_string":"2017-04-01T00:00:00.000Z","key":1491004800000,"doc_count":1962}]}},{"key":"Mortgage","doc_count":301753,"product":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[{"key":"Other mortgage","doc_count":86635,"trend_period":{"buckets":[{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":1006,"interval_diff":{"value":145}}]}},{"key":"Conventional fixed mortgage","doc_count":70613,"trend_period":{"buckets":[{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":1012,"interval_diff":{"value":16}}]}},{"key":"Conventional home mortgage","doc_count":43738,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":1382,"interval_diff":{"value":18}}]}},{"key":"FHA mortgage","doc_count":35293,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":370,"interval_diff":{"value":19}}]}},{"key":"Conventional adjustable mortgage (ARM)","doc_count":25380,"trend_period":{"buckets":[{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":359,"interval_diff":{"value":60}}]}},{"key":"Home equity loan or line of credit","doc_count":11624,"trend_period":{"buckets":[{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":235,"interval_diff":{"value":61}}]}},{"key":"Other type of mortgage","doc_count":10608,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":115,"interval_diff":{"value":-26}}]}},{"key":"VA mortgage","doc_count":9079,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":170,"interval_diff":{"value":19}}]}},{"key":"Home equity loan or line of credit (HELOC)","doc_count":4905,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":123,"interval_diff":{"value":21}}]}},{"key":"Reverse mortgage","doc_count":3216,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":19,"interval_diff":{"value":-4}}]}},{"key":"Second mortgage","doc_count":662,"trend_period":{"buckets":[{"key_as_string":"2016-02-01T00:00:00.000Z","key":1454284800000,"doc_count":0,"interval_diff":{"value":0}}]}}]},"trend_period":{"buckets":[{"key_as_string":"2020-05-01T00:00:00.000Z","key":1588291200000,"doc_count":365,"interval_diff":{"value":-1814}},{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":2179,"interval_diff":{"value":47}},{"key_as_string":"2020-03-01T00:00:00.000Z","key":1583020800000,"doc_count":2132,"interval_diff":{"value":307}},{"key_as_string":"2020-02-01T00:00:00.000Z","key":1580515200000,"doc_count":1825,"interval_diff":{"value":-9}},{"key_as_string":"2020-01-01T00:00:00.000Z","key":1577836800000,"doc_count":1834,"interval_diff":{"value":147}},{"key_as_string":"2019-12-01T00:00:00.000Z","key":1575158400000,"doc_count":1687,"interval_diff":{"value":-30}},{"key_as_string":"2019-11-01T00:00:00.000Z","key":1572566400000,"doc_count":1717,"interval_diff":{"value":-354}},{"key_as_string":"2019-10-01T00:00:00.000Z","key":1569888000000,"doc_count":2071,"interval_diff":{"value":215}},{"key_as_string":"2019-09-01T00:00:00.000Z","key":1567296000000,"doc_count":1856,"interval_diff":{"value":-179}},{"key_as_string":"2019-08-01T00:00:00.000Z","key":1564617600000,"doc_count":2035,"interval_diff":{"value":23}},{"key_as_string":"2019-07-01T00:00:00.000Z","key":1561939200000,"doc_count":2012,"interval_diff":{"value":154}},{"key_as_string":"2019-06-01T00:00:00.000Z","key":1559347200000,"doc_count":1858,"interval_diff":{"value":-87}},{"key_as_string":"2019-05-01T00:00:00.000Z","key":1556668800000,"doc_count":1945,"interval_diff":{"value":-48}},{"key_as_string":"2019-04-01T00:00:00.000Z","key":1554076800000,"doc_count":1993,"interval_diff":{"value":-12}},{"key_as_string":"2019-03-01T00:00:00.000Z","key":1551398400000,"doc_count":2005,"interval_diff":{"value":256}},{"key_as_string":"2019-02-01T00:00:00.000Z","key":1548979200000,"doc_count":1749,"interval_diff":{"value":-31}},{"key_as_string":"2019-01-01T00:00:00.000Z","key":1546300800000,"doc_count":1780,"interval_diff":{"value":162}},{"key_as_string":"2018-12-01T00:00:00.000Z","key":1543622400000,"doc_count":1618,"interval_diff":{"value":-16}},{"key_as_string":"2018-11-01T00:00:00.000Z","key":1541030400000,"doc_count":1634,"interval_diff":{"value":-332}},{"key_as_string":"2018-10-01T00:00:00.000Z","key":1538352000000,"doc_count":1966,"interval_diff":{"value":186}},{"key_as_string":"2018-09-01T00:00:00.000Z","key":1535760000000,"doc_count":1780,"interval_diff":{"value":-305}},{"key_as_string":"2018-08-01T00:00:00.000Z","key":1533081600000,"doc_count":2085,"interval_diff":{"value":69}},{"key_as_string":"2018-07-01T00:00:00.000Z","key":1530403200000,"doc_count":2016,"interval_diff":{"value":132}},{"key_as_string":"2018-06-01T00:00:00.000Z","key":1527811200000,"doc_count":1884,"interval_diff":{"value":-337}},{"key_as_string":"2018-05-01T00:00:00.000Z","key":1525132800000,"doc_count":2221,"interval_diff":{"value":-504}},{"key_as_string":"2018-04-01T00:00:00.000Z","key":1522540800000,"doc_count":2725,"interval_diff":{"value":303}},{"key_as_string":"2018-03-01T00:00:00.000Z","key":1519862400000,"doc_count":2422,"interval_diff":{"value":323}},{"key_as_string":"2018-02-01T00:00:00.000Z","key":1517443200000,"doc_count":2099,"interval_diff":{"value":-27}},{"key_as_string":"2018-01-01T00:00:00.000Z","key":1514764800000,"doc_count":2126,"interval_diff":{"value":91}},{"key_as_string":"2017-12-01T00:00:00.000Z","key":1512086400000,"doc_count":2035,"interval_diff":{"value":-134}},{"key_as_string":"2017-11-01T00:00:00.000Z","key":1509494400000,"doc_count":2169,"interval_diff":{"value":-135}},{"key_as_string":"2017-10-01T00:00:00.000Z","key":1506816000000,"doc_count":2304,"interval_diff":{"value":39}},{"key_as_string":"2017-09-01T00:00:00.000Z","key":1504224000000,"doc_count":2265,"interval_diff":{"value":-183}},{"key_as_string":"2017-08-01T00:00:00.000Z","key":1501545600000,"doc_count":2448,"interval_diff":{"value":154}},{"key_as_string":"2017-07-01T00:00:00.000Z","key":1498867200000,"doc_count":2294,"interval_diff":{"value":-56}},{"key_as_string":"2017-06-01T00:00:00.000Z","key":1496275200000,"doc_count":2350,"interval_diff":{"value":-316}},{"key_as_string":"2017-05-01T00:00:00.000Z","key":1493596800000,"doc_count":2666,"interval_diff":{"value":95}},{"key_as_string":"2017-04-01T00:00:00.000Z","key":1491004800000,"doc_count":2571,"interval_diff":{"value":-677}},{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":3248,"interval_diff":{"value":325}},{"key_as_string":"2017-02-01T00:00:00.000Z","key":1485907200000,"doc_count":2923,"interval_diff":{"value":-381}},{"key_as_string":"2017-01-01T00:00:00.000Z","key":1483228800000,"doc_count":3304,"interval_diff":{"value":251}},{"key_as_string":"2016-12-01T00:00:00.000Z","key":1480550400000,"doc_count":3053,"interval_diff":{"value":-138}},{"key_as_string":"2016-11-01T00:00:00.000Z","key":1477958400000,"doc_count":3191,"interval_diff":{"value":-352}},{"key_as_string":"2016-10-01T00:00:00.000Z","key":1475280000000,"doc_count":3543,"interval_diff":{"value":-137}},{"key_as_string":"2016-09-01T00:00:00.000Z","key":1472688000000,"doc_count":3680,"interval_diff":{"value":192}},{"key_as_string":"2016-08-01T00:00:00.000Z","key":1470009600000,"doc_count":3488,"interval_diff":{"value":302}},{"key_as_string":"2016-07-01T00:00:00.000Z","key":1467331200000,"doc_count":3186,"interval_diff":{"value":-324}},{"key_as_string":"2016-06-01T00:00:00.000Z","key":1464739200000,"doc_count":3510,"interval_diff":{"value":30}},{"key_as_string":"2016-05-01T00:00:00.000Z","key":1462060800000,"doc_count":3480,"interval_diff":{"value":-37}},{"key_as_string":"2016-04-01T00:00:00.000Z","key":1459468800000,"doc_count":3517,"interval_diff":{"value":-376}},{"key_as_string":"2016-03-01T00:00:00.000Z","key":1456790400000,"doc_count":3893,"interval_diff":{"value":454}},{"key_as_string":"2016-02-01T00:00:00.000Z","key":1454284800000,"doc_count":3439,"interval_diff":{"value":-47}},{"key_as_string":"2016-01-01T00:00:00.000Z","key":1451606400000,"doc_count":3486,"interval_diff":{"value":399}},{"key_as_string":"2015-12-01T00:00:00.000Z","key":1448928000000,"doc_count":3087,"interval_diff":{"value":-54}},{"key_as_string":"2015-11-01T00:00:00.000Z","key":1446336000000,"doc_count":3141,"interval_diff":{"value":-511}},{"key_as_string":"2015-10-01T00:00:00.000Z","key":1443657600000,"doc_count":3652,"interval_diff":{"value":-145}},{"key_as_string":"2015-09-01T00:00:00.000Z","key":1441065600000,"doc_count":3797,"interval_diff":{"value":-335}},{"key_as_string":"2015-08-01T00:00:00.000Z","key":1438387200000,"doc_count":4132,"interval_diff":{"value":385}},{"key_as_string":"2015-07-01T00:00:00.000Z","key":1435708800000,"doc_count":3747,"interval_diff":{"value":-215}},{"key_as_string":"2015-06-01T00:00:00.000Z","key":1433116800000,"doc_count":3962,"interval_diff":{"value":372}},{"key_as_string":"2015-05-01T00:00:00.000Z","key":1430438400000,"doc_count":3590,"interval_diff":{"value":-28}},{"key_as_string":"2015-04-01T00:00:00.000Z","key":1427846400000,"doc_count":3618,"interval_diff":{"value":61}},{"key_as_string":"2015-03-01T00:00:00.000Z","key":1425168000000,"doc_count":3557,"interval_diff":{"value":505}},{"key_as_string":"2015-02-01T00:00:00.000Z","key":1422748800000,"doc_count":3052,"interval_diff":{"value":42}},{"key_as_string":"2015-01-01T00:00:00.000Z","key":1420070400000,"doc_count":3010,"interval_diff":{"value":-5}},{"key_as_string":"2014-12-01T00:00:00.000Z","key":1417392000000,"doc_count":3015,"interval_diff":{"value":42}},{"key_as_string":"2014-11-01T00:00:00.000Z","key":1414800000000,"doc_count":2973,"interval_diff":{"value":-774}},{"key_as_string":"2014-10-01T00:00:00.000Z","key":1412121600000,"doc_count":3747,"interval_diff":{"value":310}},{"key_as_string":"2014-09-01T00:00:00.000Z","key":1409529600000,"doc_count":3437,"interval_diff":{"value":-164}},{"key_as_string":"2014-08-01T00:00:00.000Z","key":1406851200000,"doc_count":3601,"interval_diff":{"value":-36}},{"key_as_string":"2014-07-01T00:00:00.000Z","key":1404172800000,"doc_count":3637,"interval_diff":{"value":211}},{"key_as_string":"2014-06-01T00:00:00.000Z","key":1401580800000,"doc_count":3426,"interval_diff":{"value":-31}},{"key_as_string":"2014-05-01T00:00:00.000Z","key":1398902400000,"doc_count":3457,"interval_diff":{"value":-573}},{"key_as_string":"2014-04-01T00:00:00.000Z","key":1396310400000,"doc_count":4030,"interval_diff":{"value":-149}},{"key_as_string":"2014-03-01T00:00:00.000Z","key":1393632000000,"doc_count":4179,"interval_diff":{"value":319}},{"key_as_string":"2014-02-01T00:00:00.000Z","key":1391212800000,"doc_count":3860,"interval_diff":{"value":261}},{"key_as_string":"2014-01-01T00:00:00.000Z","key":1388534400000,"doc_count":3599,"interval_diff":{"value":739}},{"key_as_string":"2013-12-01T00:00:00.000Z","key":1385856000000,"doc_count":2860,"interval_diff":{"value":-24}},{"key_as_string":"2013-11-01T00:00:00.000Z","key":1383264000000,"doc_count":2884,"interval_diff":{"value":-309}},{"key_as_string":"2013-10-01T00:00:00.000Z","key":1380585600000,"doc_count":3193,"interval_diff":{"value":-175}},{"key_as_string":"2013-09-01T00:00:00.000Z","key":1377993600000,"doc_count":3368,"interval_diff":{"value":-669}},{"key_as_string":"2013-08-01T00:00:00.000Z","key":1375315200000,"doc_count":4037,"interval_diff":{"value":-315}},{"key_as_string":"2013-07-01T00:00:00.000Z","key":1372636800000,"doc_count":4352,"interval_diff":{"value":-15}},{"key_as_string":"2013-06-01T00:00:00.000Z","key":1370044800000,"doc_count":4367,"interval_diff":{"value":-5}},{"key_as_string":"2013-05-01T00:00:00.000Z","key":1367366400000,"doc_count":4372,"interval_diff":{"value":-348}},{"key_as_string":"2013-04-01T00:00:00.000Z","key":1364774400000,"doc_count":4720,"interval_diff":{"value":28}},{"key_as_string":"2013-03-01T00:00:00.000Z","key":1362096000000,"doc_count":4692,"interval_diff":{"value":68}},{"key_as_string":"2013-02-01T00:00:00.000Z","key":1359676800000,"doc_count":4624,"interval_diff":{"value":-1307}},{"key_as_string":"2013-01-01T00:00:00.000Z","key":1356998400000,"doc_count":5931,"interval_diff":{"value":2754}},{"key_as_string":"2012-12-01T00:00:00.000Z","key":1354320000000,"doc_count":3177,"interval_diff":{"value":246}},{"key_as_string":"2012-11-01T00:00:00.000Z","key":1351728000000,"doc_count":2931,"interval_diff":{"value":-388}},{"key_as_string":"2012-10-01T00:00:00.000Z","key":1349049600000,"doc_count":3319,"interval_diff":{"value":266}},{"key_as_string":"2012-09-01T00:00:00.000Z","key":1346457600000,"doc_count":3053,"interval_diff":{"value":-845}},{"key_as_string":"2012-08-01T00:00:00.000Z","key":1343779200000,"doc_count":3898,"interval_diff":{"value":384}},{"key_as_string":"2012-07-01T00:00:00.000Z","key":1341100800000,"doc_count":3514,"interval_diff":{"value":-447}},{"key_as_string":"2012-06-01T00:00:00.000Z","key":1338508800000,"doc_count":3961,"interval_diff":{"value":-87}},{"key_as_string":"2012-05-01T00:00:00.000Z","key":1335830400000,"doc_count":4048,"interval_diff":{"value":1196}},{"key_as_string":"2012-04-01T00:00:00.000Z","key":1333238400000,"doc_count":2852,"interval_diff":{"value":-144}},{"key_as_string":"2012-03-01T00:00:00.000Z","key":1330560000000,"doc_count":2996,"interval_diff":{"value":699}},{"key_as_string":"2012-02-01T00:00:00.000Z","key":1328054400000,"doc_count":2297,"interval_diff":{"value":234}},{"key_as_string":"2012-01-01T00:00:00.000Z","key":1325376000000,"doc_count":2063,"interval_diff":{"value":787}},{"key_as_string":"2011-12-01T00:00:00.000Z","key":1322697600000,"doc_count":1276}]}},{"key":"Debt collection","doc_count":293471,"product":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[{"key":"I do not know","doc_count":61275,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":1184,"interval_diff":{"value":170}}]}},{"key":"Other (i.e. phone, health club, etc.)","doc_count":44543,"trend_period":{"buckets":[{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":1565,"interval_diff":{"value":204}}]}},{"key":"Other debt","doc_count":43673,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":1129,"interval_diff":{"value":-128}}]}},{"key":"Credit card debt","doc_count":31457,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":1113,"interval_diff":{"value":187}}]}},{"key":"Credit card","doc_count":28698,"trend_period":{"buckets":[{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":834,"interval_diff":{"value":177}}]}},{"key":"Medical debt","doc_count":23742,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":666,"interval_diff":{"value":116}}]}},{"key":"Medical","doc_count":21187,"trend_period":{"buckets":[{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":892,"interval_diff":{"value":183}}]}},{"key":"Payday loan","doc_count":7562,"trend_period":{"buckets":[{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":155,"interval_diff":{"value":6}}]}},{"key":"Mortgage","doc_count":4809,"trend_period":{"buckets":[{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":94,"interval_diff":{"value":0}}]}},{"key":"Auto debt","doc_count":4802,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":137,"interval_diff":{"value":2}}]}},{"key":"Payday loan debt","doc_count":4534,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":115,"interval_diff":{"value":-19}}]}},{"key":"Auto","doc_count":3755,"trend_period":{"buckets":[{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":133,"interval_diff":{"value":24}}]}},{"key":"Mortgage debt","doc_count":3334,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":83,"interval_diff":{"value":2}}]}},{"key":"Non-federal student loan","doc_count":2881,"trend_period":{"buckets":[{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":91,"interval_diff":{"value":34}}]}},{"key":"Federal student loan debt","doc_count":2491,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":42,"interval_diff":{"value":-17}}]}},{"key":"Federal student loan","doc_count":2475,"trend_period":{"buckets":[{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":69,"interval_diff":{"value":-8}}]}},{"key":"Private student loan debt","doc_count":2253,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":39,"interval_diff":{"value":-11}}]}}]},"trend_period":{"buckets":[{"key_as_string":"2020-05-01T00:00:00.000Z","key":1588291200000,"doc_count":1068,"interval_diff":{"value":-3440}},{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":4508,"interval_diff":{"value":302}},{"key_as_string":"2020-03-01T00:00:00.000Z","key":1583020800000,"doc_count":4206,"interval_diff":{"value":225}},{"key_as_string":"2020-02-01T00:00:00.000Z","key":1580515200000,"doc_count":3981,"interval_diff":{"value":213}},{"key_as_string":"2020-01-01T00:00:00.000Z","key":1577836800000,"doc_count":3768,"interval_diff":{"value":444}},{"key_as_string":"2019-12-01T00:00:00.000Z","key":1575158400000,"doc_count":3324,"interval_diff":{"value":-203}},{"key_as_string":"2019-11-01T00:00:00.000Z","key":1572566400000,"doc_count":3527,"interval_diff":{"value":-495}},{"key_as_string":"2019-10-01T00:00:00.000Z","key":1569888000000,"doc_count":4022,"interval_diff":{"value":46}},{"key_as_string":"2019-09-01T00:00:00.000Z","key":1567296000000,"doc_count":3976,"interval_diff":{"value":-255}},{"key_as_string":"2019-08-01T00:00:00.000Z","key":1564617600000,"doc_count":4231,"interval_diff":{"value":217}},{"key_as_string":"2019-07-01T00:00:00.000Z","key":1561939200000,"doc_count":4014,"interval_diff":{"value":-37}},{"key_as_string":"2019-06-01T00:00:00.000Z","key":1559347200000,"doc_count":4051,"interval_diff":{"value":-84}},{"key_as_string":"2019-05-01T00:00:00.000Z","key":1556668800000,"doc_count":4135,"interval_diff":{"value":152}},{"key_as_string":"2019-04-01T00:00:00.000Z","key":1554076800000,"doc_count":3983,"interval_diff":{"value":-244}},{"key_as_string":"2019-03-01T00:00:00.000Z","key":1551398400000,"doc_count":4227,"interval_diff":{"value":440}},{"key_as_string":"2019-02-01T00:00:00.000Z","key":1548979200000,"doc_count":3787,"interval_diff":{"value":660}},{"key_as_string":"2019-01-01T00:00:00.000Z","key":1546300800000,"doc_count":3127,"interval_diff":{"value":-132}},{"key_as_string":"2018-12-01T00:00:00.000Z","key":1543622400000,"doc_count":3259,"interval_diff":{"value":-89}},{"key_as_string":"2018-11-01T00:00:00.000Z","key":1541030400000,"doc_count":3348,"interval_diff":{"value":-739}},{"key_as_string":"2018-10-01T00:00:00.000Z","key":1538352000000,"doc_count":4087,"interval_diff":{"value":406}},{"key_as_string":"2018-09-01T00:00:00.000Z","key":1535760000000,"doc_count":3681,"interval_diff":{"value":-732}},{"key_as_string":"2018-08-01T00:00:00.000Z","key":1533081600000,"doc_count":4413,"interval_diff":{"value":414}},{"key_as_string":"2018-07-01T00:00:00.000Z","key":1530403200000,"doc_count":3999,"interval_diff":{"value":-257}},{"key_as_string":"2018-06-01T00:00:00.000Z","key":1527811200000,"doc_count":4256,"interval_diff":{"value":-480}},{"key_as_string":"2018-05-01T00:00:00.000Z","key":1525132800000,"doc_count":4736,"interval_diff":{"value":-21}},{"key_as_string":"2018-04-01T00:00:00.000Z","key":1522540800000,"doc_count":4757,"interval_diff":{"value":-510}},{"key_as_string":"2018-03-01T00:00:00.000Z","key":1519862400000,"doc_count":5267,"interval_diff":{"value":793}},{"key_as_string":"2018-02-01T00:00:00.000Z","key":1517443200000,"doc_count":4474,"interval_diff":{"value":-434}},{"key_as_string":"2018-01-01T00:00:00.000Z","key":1514764800000,"doc_count":4908,"interval_diff":{"value":1024}},{"key_as_string":"2017-12-01T00:00:00.000Z","key":1512086400000,"doc_count":3884,"interval_diff":{"value":320}},{"key_as_string":"2017-11-01T00:00:00.000Z","key":1509494400000,"doc_count":3564,"interval_diff":{"value":-468}},{"key_as_string":"2017-10-01T00:00:00.000Z","key":1506816000000,"doc_count":4032,"interval_diff":{"value":491}},{"key_as_string":"2017-09-01T00:00:00.000Z","key":1504224000000,"doc_count":3541,"interval_diff":{"value":-835}},{"key_as_string":"2017-08-01T00:00:00.000Z","key":1501545600000,"doc_count":4376,"interval_diff":{"value":153}},{"key_as_string":"2017-07-01T00:00:00.000Z","key":1498867200000,"doc_count":4223,"interval_diff":{"value":510}},{"key_as_string":"2017-06-01T00:00:00.000Z","key":1496275200000,"doc_count":3713,"interval_diff":{"value":-450}},{"key_as_string":"2017-05-01T00:00:00.000Z","key":1493596800000,"doc_count":4163,"interval_diff":{"value":-10}},{"key_as_string":"2017-04-01T00:00:00.000Z","key":1491004800000,"doc_count":4173,"interval_diff":{"value":-432}},{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":4605,"interval_diff":{"value":656}},{"key_as_string":"2017-02-01T00:00:00.000Z","key":1485907200000,"doc_count":3949,"interval_diff":{"value":219}},{"key_as_string":"2017-01-01T00:00:00.000Z","key":1483228800000,"doc_count":3730,"interval_diff":{"value":62}},{"key_as_string":"2016-12-01T00:00:00.000Z","key":1480550400000,"doc_count":3668,"interval_diff":{"value":380}},{"key_as_string":"2016-11-01T00:00:00.000Z","key":1477958400000,"doc_count":3288,"interval_diff":{"value":-291}},{"key_as_string":"2016-10-01T00:00:00.000Z","key":1475280000000,"doc_count":3579,"interval_diff":{"value":42}},{"key_as_string":"2016-09-01T00:00:00.000Z","key":1472688000000,"doc_count":3537,"interval_diff":{"value":-626}},{"key_as_string":"2016-08-01T00:00:00.000Z","key":1470009600000,"doc_count":4163,"interval_diff":{"value":1143}},{"key_as_string":"2016-07-01T00:00:00.000Z","key":1467331200000,"doc_count":3020,"interval_diff":{"value":-213}},{"key_as_string":"2016-06-01T00:00:00.000Z","key":1464739200000,"doc_count":3233,"interval_diff":{"value":169}},{"key_as_string":"2016-05-01T00:00:00.000Z","key":1462060800000,"doc_count":3064,"interval_diff":{"value":-179}},{"key_as_string":"2016-04-01T00:00:00.000Z","key":1459468800000,"doc_count":3243,"interval_diff":{"value":-282}},{"key_as_string":"2016-03-01T00:00:00.000Z","key":1456790400000,"doc_count":3525,"interval_diff":{"value":303}},{"key_as_string":"2016-02-01T00:00:00.000Z","key":1454284800000,"doc_count":3222,"interval_diff":{"value":298}},{"key_as_string":"2016-01-01T00:00:00.000Z","key":1451606400000,"doc_count":2924,"interval_diff":{"value":62}},{"key_as_string":"2015-12-01T00:00:00.000Z","key":1448928000000,"doc_count":2862,"interval_diff":{"value":241}},{"key_as_string":"2015-11-01T00:00:00.000Z","key":1446336000000,"doc_count":2621,"interval_diff":{"value":-394}},{"key_as_string":"2015-10-01T00:00:00.000Z","key":1443657600000,"doc_count":3015,"interval_diff":{"value":-135}},{"key_as_string":"2015-09-01T00:00:00.000Z","key":1441065600000,"doc_count":3150,"interval_diff":{"value":-416}},{"key_as_string":"2015-08-01T00:00:00.000Z","key":1438387200000,"doc_count":3566,"interval_diff":{"value":-216}},{"key_as_string":"2015-07-01T00:00:00.000Z","key":1435708800000,"doc_count":3782,"interval_diff":{"value":303}},{"key_as_string":"2015-06-01T00:00:00.000Z","key":1433116800000,"doc_count":3479,"interval_diff":{"value":145}},{"key_as_string":"2015-05-01T00:00:00.000Z","key":1430438400000,"doc_count":3334,"interval_diff":{"value":-34}},{"key_as_string":"2015-04-01T00:00:00.000Z","key":1427846400000,"doc_count":3368,"interval_diff":{"value":-511}},{"key_as_string":"2015-03-01T00:00:00.000Z","key":1425168000000,"doc_count":3879,"interval_diff":{"value":467}},{"key_as_string":"2015-02-01T00:00:00.000Z","key":1422748800000,"doc_count":3412,"interval_diff":{"value":156}},{"key_as_string":"2015-01-01T00:00:00.000Z","key":1420070400000,"doc_count":3256,"interval_diff":{"value":282}},{"key_as_string":"2014-12-01T00:00:00.000Z","key":1417392000000,"doc_count":2974,"interval_diff":{"value":158}},{"key_as_string":"2014-11-01T00:00:00.000Z","key":1414800000000,"doc_count":2816,"interval_diff":{"value":-406}},{"key_as_string":"2014-10-01T00:00:00.000Z","key":1412121600000,"doc_count":3222,"interval_diff":{"value":332}},{"key_as_string":"2014-09-01T00:00:00.000Z","key":1409529600000,"doc_count":2890,"interval_diff":{"value":-343}},{"key_as_string":"2014-08-01T00:00:00.000Z","key":1406851200000,"doc_count":3233,"interval_diff":{"value":-247}},{"key_as_string":"2014-07-01T00:00:00.000Z","key":1404172800000,"doc_count":3480,"interval_diff":{"value":83}},{"key_as_string":"2014-06-01T00:00:00.000Z","key":1401580800000,"doc_count":3397,"interval_diff":{"value":193}},{"key_as_string":"2014-05-01T00:00:00.000Z","key":1398902400000,"doc_count":3204,"interval_diff":{"value":-491}},{"key_as_string":"2014-04-01T00:00:00.000Z","key":1396310400000,"doc_count":3695,"interval_diff":{"value":105}},{"key_as_string":"2014-03-01T00:00:00.000Z","key":1393632000000,"doc_count":3590,"interval_diff":{"value":220}},{"key_as_string":"2014-02-01T00:00:00.000Z","key":1391212800000,"doc_count":3370,"interval_diff":{"value":102}},{"key_as_string":"2014-01-01T00:00:00.000Z","key":1388534400000,"doc_count":3268,"interval_diff":{"value":837}},{"key_as_string":"2013-12-01T00:00:00.000Z","key":1385856000000,"doc_count":2431,"interval_diff":{"value":-17}},{"key_as_string":"2013-11-01T00:00:00.000Z","key":1383264000000,"doc_count":2448,"interval_diff":{"value":655}},{"key_as_string":"2013-10-01T00:00:00.000Z","key":1380585600000,"doc_count":1793,"interval_diff":{"value":-210}},{"key_as_string":"2013-09-01T00:00:00.000Z","key":1377993600000,"doc_count":2003,"interval_diff":{"value":509}},{"key_as_string":"2013-08-01T00:00:00.000Z","key":1375315200000,"doc_count":1494,"interval_diff":{"value":594}},{"key_as_string":"2013-07-01T00:00:00.000Z","key":1372636800000,"doc_count":900}]}},{"key":"Credit reporting","doc_count":140432,"product":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[]},"trend_period":{"buckets":[{"key_as_string":"2017-04-01T00:00:00.000Z","key":1491004800000,"doc_count":3756,"interval_diff":{"value":-950}},{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":4706,"interval_diff":{"value":561}},{"key_as_string":"2017-02-01T00:00:00.000Z","key":1485907200000,"doc_count":4145,"interval_diff":{"value":165}},{"key_as_string":"2017-01-01T00:00:00.000Z","key":1483228800000,"doc_count":3980,"interval_diff":{"value":803}},{"key_as_string":"2016-12-01T00:00:00.000Z","key":1480550400000,"doc_count":3177,"interval_diff":{"value":-100}},{"key_as_string":"2016-11-01T00:00:00.000Z","key":1477958400000,"doc_count":3277,"interval_diff":{"value":-1056}},{"key_as_string":"2016-10-01T00:00:00.000Z","key":1475280000000,"doc_count":4333,"interval_diff":{"value":712}},{"key_as_string":"2016-09-01T00:00:00.000Z","key":1472688000000,"doc_count":3621,"interval_diff":{"value":-325}},{"key_as_string":"2016-08-01T00:00:00.000Z","key":1470009600000,"doc_count":3946,"interval_diff":{"value":-450}},{"key_as_string":"2016-07-01T00:00:00.000Z","key":1467331200000,"doc_count":4396,"interval_diff":{"value":494}},{"key_as_string":"2016-06-01T00:00:00.000Z","key":1464739200000,"doc_count":3902,"interval_diff":{"value":77}},{"key_as_string":"2016-05-01T00:00:00.000Z","key":1462060800000,"doc_count":3825,"interval_diff":{"value":60}},{"key_as_string":"2016-04-01T00:00:00.000Z","key":1459468800000,"doc_count":3765,"interval_diff":{"value":-277}},{"key_as_string":"2016-03-01T00:00:00.000Z","key":1456790400000,"doc_count":4042,"interval_diff":{"value":1003}},{"key_as_string":"2016-02-01T00:00:00.000Z","key":1454284800000,"doc_count":3039,"interval_diff":{"value":281}},{"key_as_string":"2016-01-01T00:00:00.000Z","key":1451606400000,"doc_count":2758,"interval_diff":{"value":80}},{"key_as_string":"2015-12-01T00:00:00.000Z","key":1448928000000,"doc_count":2678,"interval_diff":{"value":-164}},{"key_as_string":"2015-11-01T00:00:00.000Z","key":1446336000000,"doc_count":2842,"interval_diff":{"value":33}},{"key_as_string":"2015-10-01T00:00:00.000Z","key":1443657600000,"doc_count":2809,"interval_diff":{"value":-80}},{"key_as_string":"2015-09-01T00:00:00.000Z","key":1441065600000,"doc_count":2889,"interval_diff":{"value":-540}},{"key_as_string":"2015-08-01T00:00:00.000Z","key":1438387200000,"doc_count":3429,"interval_diff":{"value":-258}},{"key_as_string":"2015-07-01T00:00:00.000Z","key":1435708800000,"doc_count":3687,"interval_diff":{"value":978}},{"key_as_string":"2015-06-01T00:00:00.000Z","key":1433116800000,"doc_count":2709,"interval_diff":{"value":53}},{"key_as_string":"2015-05-01T00:00:00.000Z","key":1430438400000,"doc_count":2656,"interval_diff":{"value":-32}},{"key_as_string":"2015-04-01T00:00:00.000Z","key":1427846400000,"doc_count":2688,"interval_diff":{"value":-139}},{"key_as_string":"2015-03-01T00:00:00.000Z","key":1425168000000,"doc_count":2827,"interval_diff":{"value":445}},{"key_as_string":"2015-02-01T00:00:00.000Z","key":1422748800000,"doc_count":2382,"interval_diff":{"value":-294}},{"key_as_string":"2015-01-01T00:00:00.000Z","key":1420070400000,"doc_count":2676,"interval_diff":{"value":486}},{"key_as_string":"2014-12-01T00:00:00.000Z","key":1417392000000,"doc_count":2190,"interval_diff":{"value":11}},{"key_as_string":"2014-11-01T00:00:00.000Z","key":1414800000000,"doc_count":2179,"interval_diff":{"value":-84}},{"key_as_string":"2014-10-01T00:00:00.000Z","key":1412121600000,"doc_count":2263,"interval_diff":{"value":-219}},{"key_as_string":"2014-09-01T00:00:00.000Z","key":1409529600000,"doc_count":2482,"interval_diff":{"value":-186}},{"key_as_string":"2014-08-01T00:00:00.000Z","key":1406851200000,"doc_count":2668,"interval_diff":{"value":9}},{"key_as_string":"2014-07-01T00:00:00.000Z","key":1404172800000,"doc_count":2659,"interval_diff":{"value":194}},{"key_as_string":"2014-06-01T00:00:00.000Z","key":1401580800000,"doc_count":2465,"interval_diff":{"value":165}},{"key_as_string":"2014-05-01T00:00:00.000Z","key":1398902400000,"doc_count":2300,"interval_diff":{"value":-249}},{"key_as_string":"2014-04-01T00:00:00.000Z","key":1396310400000,"doc_count":2549,"interval_diff":{"value":-40}},{"key_as_string":"2014-03-01T00:00:00.000Z","key":1393632000000,"doc_count":2589,"interval_diff":{"value":51}},{"key_as_string":"2014-02-01T00:00:00.000Z","key":1391212800000,"doc_count":2538,"interval_diff":{"value":181}},{"key_as_string":"2014-01-01T00:00:00.000Z","key":1388534400000,"doc_count":2357,"interval_diff":{"value":1060}},{"key_as_string":"2013-12-01T00:00:00.000Z","key":1385856000000,"doc_count":1297,"interval_diff":{"value":-3}},{"key_as_string":"2013-11-01T00:00:00.000Z","key":1383264000000,"doc_count":1300,"interval_diff":{"value":10}},{"key_as_string":"2013-10-01T00:00:00.000Z","key":1380585600000,"doc_count":1290,"interval_diff":{"value":-157}},{"key_as_string":"2013-09-01T00:00:00.000Z","key":1377993600000,"doc_count":1447,"interval_diff":{"value":194}},{"key_as_string":"2013-08-01T00:00:00.000Z","key":1375315200000,"doc_count":1253,"interval_diff":{"value":4}},{"key_as_string":"2013-07-01T00:00:00.000Z","key":1372636800000,"doc_count":1249,"interval_diff":{"value":137}},{"key_as_string":"2013-06-01T00:00:00.000Z","key":1370044800000,"doc_count":1112,"interval_diff":{"value":-95}},{"key_as_string":"2013-05-01T00:00:00.000Z","key":1367366400000,"doc_count":1207,"interval_diff":{"value":56}},{"key_as_string":"2013-04-01T00:00:00.000Z","key":1364774400000,"doc_count":1151,"interval_diff":{"value":53}},{"key_as_string":"2013-03-01T00:00:00.000Z","key":1362096000000,"doc_count":1098,"interval_diff":{"value":33}},{"key_as_string":"2013-02-01T00:00:00.000Z","key":1359676800000,"doc_count":1065,"interval_diff":{"value":154}},{"key_as_string":"2013-01-01T00:00:00.000Z","key":1356998400000,"doc_count":911,"interval_diff":{"value":180}},{"key_as_string":"2012-12-01T00:00:00.000Z","key":1354320000000,"doc_count":731,"interval_diff":{"value":-51}},{"key_as_string":"2012-11-01T00:00:00.000Z","key":1351728000000,"doc_count":782,"interval_diff":{"value":422}},{"key_as_string":"2012-10-01T00:00:00.000Z","key":1349049600000,"doc_count":360}]}},{"key":"Credit card","doc_count":89190,"product":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[]},"trend_period":{"buckets":[{"key_as_string":"2017-04-01T00:00:00.000Z","key":1491004800000,"doc_count":1326,"interval_diff":{"value":-760}},{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":2086,"interval_diff":{"value":257}},{"key_as_string":"2017-02-01T00:00:00.000Z","key":1485907200000,"doc_count":1829,"interval_diff":{"value":-63}},{"key_as_string":"2017-01-01T00:00:00.000Z","key":1483228800000,"doc_count":1892,"interval_diff":{"value":69}},{"key_as_string":"2016-12-01T00:00:00.000Z","key":1480550400000,"doc_count":1823,"interval_diff":{"value":92}},{"key_as_string":"2016-11-01T00:00:00.000Z","key":1477958400000,"doc_count":1731,"interval_diff":{"value":-333}},{"key_as_string":"2016-10-01T00:00:00.000Z","key":1475280000000,"doc_count":2064,"interval_diff":{"value":-124}},{"key_as_string":"2016-09-01T00:00:00.000Z","key":1472688000000,"doc_count":2188,"interval_diff":{"value":167}},{"key_as_string":"2016-08-01T00:00:00.000Z","key":1470009600000,"doc_count":2021,"interval_diff":{"value":261}},{"key_as_string":"2016-07-01T00:00:00.000Z","key":1467331200000,"doc_count":1760,"interval_diff":{"value":194}},{"key_as_string":"2016-06-01T00:00:00.000Z","key":1464739200000,"doc_count":1566,"interval_diff":{"value":-7}},{"key_as_string":"2016-05-01T00:00:00.000Z","key":1462060800000,"doc_count":1573,"interval_diff":{"value":-11}},{"key_as_string":"2016-04-01T00:00:00.000Z","key":1459468800000,"doc_count":1584,"interval_diff":{"value":-36}},{"key_as_string":"2016-03-01T00:00:00.000Z","key":1456790400000,"doc_count":1620,"interval_diff":{"value":57}},{"key_as_string":"2016-02-01T00:00:00.000Z","key":1454284800000,"doc_count":1563,"interval_diff":{"value":-9}},{"key_as_string":"2016-01-01T00:00:00.000Z","key":1451606400000,"doc_count":1572,"interval_diff":{"value":113}},{"key_as_string":"2015-12-01T00:00:00.000Z","key":1448928000000,"doc_count":1459,"interval_diff":{"value":16}},{"key_as_string":"2015-11-01T00:00:00.000Z","key":1446336000000,"doc_count":1443,"interval_diff":{"value":-87}},{"key_as_string":"2015-10-01T00:00:00.000Z","key":1443657600000,"doc_count":1530,"interval_diff":{"value":10}},{"key_as_string":"2015-09-01T00:00:00.000Z","key":1441065600000,"doc_count":1520,"interval_diff":{"value":6}},{"key_as_string":"2015-08-01T00:00:00.000Z","key":1438387200000,"doc_count":1514,"interval_diff":{"value":-21}},{"key_as_string":"2015-07-01T00:00:00.000Z","key":1435708800000,"doc_count":1535,"interval_diff":{"value":90}},{"key_as_string":"2015-06-01T00:00:00.000Z","key":1433116800000,"doc_count":1445,"interval_diff":{"value":-11}},{"key_as_string":"2015-05-01T00:00:00.000Z","key":1430438400000,"doc_count":1456,"interval_diff":{"value":53}},{"key_as_string":"2015-04-01T00:00:00.000Z","key":1427846400000,"doc_count":1403,"interval_diff":{"value":-58}},{"key_as_string":"2015-03-01T00:00:00.000Z","key":1425168000000,"doc_count":1461,"interval_diff":{"value":69}},{"key_as_string":"2015-02-01T00:00:00.000Z","key":1422748800000,"doc_count":1392,"interval_diff":{"value":250}},{"key_as_string":"2015-01-01T00:00:00.000Z","key":1420070400000,"doc_count":1142,"interval_diff":{"value":39}},{"key_as_string":"2014-12-01T00:00:00.000Z","key":1417392000000,"doc_count":1103,"interval_diff":{"value":45}},{"key_as_string":"2014-11-01T00:00:00.000Z","key":1414800000000,"doc_count":1058,"interval_diff":{"value":-36}},{"key_as_string":"2014-10-01T00:00:00.000Z","key":1412121600000,"doc_count":1094,"interval_diff":{"value":-79}},{"key_as_string":"2014-09-01T00:00:00.000Z","key":1409529600000,"doc_count":1173,"interval_diff":{"value":-56}},{"key_as_string":"2014-08-01T00:00:00.000Z","key":1406851200000,"doc_count":1229,"interval_diff":{"value":70}},{"key_as_string":"2014-07-01T00:00:00.000Z","key":1404172800000,"doc_count":1159,"interval_diff":{"value":89}},{"key_as_string":"2014-06-01T00:00:00.000Z","key":1401580800000,"doc_count":1070,"interval_diff":{"value":-31}},{"key_as_string":"2014-05-01T00:00:00.000Z","key":1398902400000,"doc_count":1101,"interval_diff":{"value":-196}},{"key_as_string":"2014-04-01T00:00:00.000Z","key":1396310400000,"doc_count":1297,"interval_diff":{"value":34}},{"key_as_string":"2014-03-01T00:00:00.000Z","key":1393632000000,"doc_count":1263,"interval_diff":{"value":26}},{"key_as_string":"2014-02-01T00:00:00.000Z","key":1391212800000,"doc_count":1237,"interval_diff":{"value":47}},{"key_as_string":"2014-01-01T00:00:00.000Z","key":1388534400000,"doc_count":1190,"interval_diff":{"value":188}},{"key_as_string":"2013-12-01T00:00:00.000Z","key":1385856000000,"doc_count":1002,"interval_diff":{"value":52}},{"key_as_string":"2013-11-01T00:00:00.000Z","key":1383264000000,"doc_count":950,"interval_diff":{"value":-112}},{"key_as_string":"2013-10-01T00:00:00.000Z","key":1380585600000,"doc_count":1062,"interval_diff":{"value":-23}},{"key_as_string":"2013-09-01T00:00:00.000Z","key":1377993600000,"doc_count":1085,"interval_diff":{"value":9}},{"key_as_string":"2013-08-01T00:00:00.000Z","key":1375315200000,"doc_count":1076,"interval_diff":{"value":40}},{"key_as_string":"2013-07-01T00:00:00.000Z","key":1372636800000,"doc_count":1036,"interval_diff":{"value":14}},{"key_as_string":"2013-06-01T00:00:00.000Z","key":1370044800000,"doc_count":1022,"interval_diff":{"value":-50}},{"key_as_string":"2013-05-01T00:00:00.000Z","key":1367366400000,"doc_count":1072,"interval_diff":{"value":-144}},{"key_as_string":"2013-04-01T00:00:00.000Z","key":1364774400000,"doc_count":1216,"interval_diff":{"value":-64}},{"key_as_string":"2013-03-01T00:00:00.000Z","key":1362096000000,"doc_count":1280,"interval_diff":{"value":138}},{"key_as_string":"2013-02-01T00:00:00.000Z","key":1359676800000,"doc_count":1142,"interval_diff":{"value":-20}},{"key_as_string":"2013-01-01T00:00:00.000Z","key":1356998400000,"doc_count":1162,"interval_diff":{"value":130}},{"key_as_string":"2012-12-01T00:00:00.000Z","key":1354320000000,"doc_count":1032,"interval_diff":{"value":-54}},{"key_as_string":"2012-11-01T00:00:00.000Z","key":1351728000000,"doc_count":1086,"interval_diff":{"value":-272}},{"key_as_string":"2012-10-01T00:00:00.000Z","key":1349049600000,"doc_count":1358,"interval_diff":{"value":364}},{"key_as_string":"2012-09-01T00:00:00.000Z","key":1346457600000,"doc_count":994,"interval_diff":{"value":-287}},{"key_as_string":"2012-08-01T00:00:00.000Z","key":1343779200000,"doc_count":1281,"interval_diff":{"value":-224}},{"key_as_string":"2012-07-01T00:00:00.000Z","key":1341100800000,"doc_count":1505,"interval_diff":{"value":-194}},{"key_as_string":"2012-06-01T00:00:00.000Z","key":1338508800000,"doc_count":1699,"interval_diff":{"value":231}},{"key_as_string":"2012-05-01T00:00:00.000Z","key":1335830400000,"doc_count":1468,"interval_diff":{"value":295}},{"key_as_string":"2012-04-01T00:00:00.000Z","key":1333238400000,"doc_count":1173,"interval_diff":{"value":-205}},{"key_as_string":"2012-03-01T00:00:00.000Z","key":1330560000000,"doc_count":1378,"interval_diff":{"value":166}},{"key_as_string":"2012-02-01T00:00:00.000Z","key":1328054400000,"doc_count":1212,"interval_diff":{"value":45}},{"key_as_string":"2012-01-01T00:00:00.000Z","key":1325376000000,"doc_count":1167,"interval_diff":{"value":-93}},{"key_as_string":"2011-12-01T00:00:00.000Z","key":1322697600000,"doc_count":1260}]}}]}},"max_date":{"value":1589821200000,"value_as_string":"2020-05-18T12:00:00-05:00"},"issue":{"doc_count":1599733,"issue":{"doc_count_error_upper_bound":14722,"sum_other_doc_count":966302,"buckets":[{"key":"Incorrect information on your report","doc_count":252147,"trend_period":{"buckets":[{"key_as_string":"2020-05-01T00:00:00.000Z","key":1588291200000,"doc_count":5095,"interval_diff":{"value":-10364}},{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":15459,"interval_diff":{"value":2996}},{"key_as_string":"2020-03-01T00:00:00.000Z","key":1583020800000,"doc_count":12463,"interval_diff":{"value":2832}},{"key_as_string":"2020-02-01T00:00:00.000Z","key":1580515200000,"doc_count":9631,"interval_diff":{"value":-699}},{"key_as_string":"2020-01-01T00:00:00.000Z","key":1577836800000,"doc_count":10330,"interval_diff":{"value":2790}},{"key_as_string":"2019-12-01T00:00:00.000Z","key":1575158400000,"doc_count":7540,"interval_diff":{"value":-621}},{"key_as_string":"2019-11-01T00:00:00.000Z","key":1572566400000,"doc_count":8161,"interval_diff":{"value":-701}},{"key_as_string":"2019-10-01T00:00:00.000Z","key":1569888000000,"doc_count":8862,"interval_diff":{"value":443}},{"key_as_string":"2019-09-01T00:00:00.000Z","key":1567296000000,"doc_count":8419,"interval_diff":{"value":-492}},{"key_as_string":"2019-08-01T00:00:00.000Z","key":1564617600000,"doc_count":8911,"interval_diff":{"value":598}},{"key_as_string":"2019-07-01T00:00:00.000Z","key":1561939200000,"doc_count":8313,"interval_diff":{"value":671}},{"key_as_string":"2019-06-01T00:00:00.000Z","key":1559347200000,"doc_count":7642,"interval_diff":{"value":-37}},{"key_as_string":"2019-05-01T00:00:00.000Z","key":1556668800000,"doc_count":7679,"interval_diff":{"value":706}},{"key_as_string":"2019-04-01T00:00:00.000Z","key":1554076800000,"doc_count":6973,"interval_diff":{"value":-47}},{"key_as_string":"2019-03-01T00:00:00.000Z","key":1551398400000,"doc_count":7020,"interval_diff":{"value":1193}},{"key_as_string":"2019-02-01T00:00:00.000Z","key":1548979200000,"doc_count":5827,"interval_diff":{"value":224}},{"key_as_string":"2019-01-01T00:00:00.000Z","key":1546300800000,"doc_count":5603,"interval_diff":{"value":424}},{"key_as_string":"2018-12-01T00:00:00.000Z","key":1543622400000,"doc_count":5179,"interval_diff":{"value":-670}},{"key_as_string":"2018-11-01T00:00:00.000Z","key":1541030400000,"doc_count":5849,"interval_diff":{"value":-502}},{"key_as_string":"2018-10-01T00:00:00.000Z","key":1538352000000,"doc_count":6351,"interval_diff":{"value":931}},{"key_as_string":"2018-09-01T00:00:00.000Z","key":1535760000000,"doc_count":5420,"interval_diff":{"value":-672}},{"key_as_string":"2018-08-01T00:00:00.000Z","key":1533081600000,"doc_count":6092,"interval_diff":{"value":328}},{"key_as_string":"2018-07-01T00:00:00.000Z","key":1530403200000,"doc_count":5764,"interval_diff":{"value":418}},{"key_as_string":"2018-06-01T00:00:00.000Z","key":1527811200000,"doc_count":5346,"interval_diff":{"value":-632}},{"key_as_string":"2018-05-01T00:00:00.000Z","key":1525132800000,"doc_count":5978,"interval_diff":{"value":-481}},{"key_as_string":"2018-04-01T00:00:00.000Z","key":1522540800000,"doc_count":6459,"interval_diff":{"value":363}},{"key_as_string":"2018-03-01T00:00:00.000Z","key":1519862400000,"doc_count":6096,"interval_diff":{"value":342}},{"key_as_string":"2018-02-01T00:00:00.000Z","key":1517443200000,"doc_count":5754,"interval_diff":{"value":-202}},{"key_as_string":"2018-01-01T00:00:00.000Z","key":1514764800000,"doc_count":5956,"interval_diff":{"value":1279}},{"key_as_string":"2017-12-01T00:00:00.000Z","key":1512086400000,"doc_count":4677,"interval_diff":{"value":201}},{"key_as_string":"2017-11-01T00:00:00.000Z","key":1509494400000,"doc_count":4476,"interval_diff":{"value":-431}},{"key_as_string":"2017-10-01T00:00:00.000Z","key":1506816000000,"doc_count":4907,"interval_diff":{"value":416}},{"key_as_string":"2017-09-01T00:00:00.000Z","key":1504224000000,"doc_count":4491,"interval_diff":{"value":-745}},{"key_as_string":"2017-08-01T00:00:00.000Z","key":1501545600000,"doc_count":5236,"interval_diff":{"value":559}},{"key_as_string":"2017-07-01T00:00:00.000Z","key":1498867200000,"doc_count":4677,"interval_diff":{"value":587}},{"key_as_string":"2017-06-01T00:00:00.000Z","key":1496275200000,"doc_count":4090,"interval_diff":{"value":-186}},{"key_as_string":"2017-05-01T00:00:00.000Z","key":1493596800000,"doc_count":4276,"interval_diff":{"value":3131}},{"key_as_string":"2017-04-01T00:00:00.000Z","key":1491004800000,"doc_count":1145}]},"issue":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[{"key":"Information belongs to someone else","doc_count":139188,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":11481,"interval_diff":{"value":2458}}]}},{"key":"Account status incorrect","doc_count":39546,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":1363,"interval_diff":{"value":34}}]}},{"key":"Account information incorrect","doc_count":36142,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":1328,"interval_diff":{"value":271}}]}},{"key":"Personal information incorrect","doc_count":11775,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":507,"interval_diff":{"value":98}}]}},{"key":"Old information reappears or never goes away","doc_count":9345,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":278,"interval_diff":{"value":52}}]}},{"key":"Public record information inaccurate","doc_count":9331,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":260,"interval_diff":{"value":14}}]}},{"key":"Information is missing that should be on the report","doc_count":4538,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":175,"interval_diff":{"value":62}}]}},{"key":"Information is incorrect","doc_count":688,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":16,"interval_diff":{"value":1}}]}},{"key":"Information that should be on the report is missing","doc_count":117,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":5,"interval_diff":{"value":3}}]}},{"key":"Incorrect information on your report","doc_count":1,"trend_period":{"buckets":[]}}]}},{"key":"Loan modification,collection,foreclosure","doc_count":112309,"trend_period":{"buckets":[{"key_as_string":"2017-04-01T00:00:00.000Z","key":1491004800000,"doc_count":630,"interval_diff":{"value":-537}},{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":1167,"interval_diff":{"value":127}},{"key_as_string":"2017-02-01T00:00:00.000Z","key":1485907200000,"doc_count":1040,"interval_diff":{"value":-149}},{"key_as_string":"2017-01-01T00:00:00.000Z","key":1483228800000,"doc_count":1189,"interval_diff":{"value":91}},{"key_as_string":"2016-12-01T00:00:00.000Z","key":1480550400000,"doc_count":1098,"interval_diff":{"value":-48}},{"key_as_string":"2016-11-01T00:00:00.000Z","key":1477958400000,"doc_count":1146,"interval_diff":{"value":-214}},{"key_as_string":"2016-10-01T00:00:00.000Z","key":1475280000000,"doc_count":1360,"interval_diff":{"value":-59}},{"key_as_string":"2016-09-01T00:00:00.000Z","key":1472688000000,"doc_count":1419,"interval_diff":{"value":26}},{"key_as_string":"2016-08-01T00:00:00.000Z","key":1470009600000,"doc_count":1393,"interval_diff":{"value":187}},{"key_as_string":"2016-07-01T00:00:00.000Z","key":1467331200000,"doc_count":1206,"interval_diff":{"value":-144}},{"key_as_string":"2016-06-01T00:00:00.000Z","key":1464739200000,"doc_count":1350,"interval_diff":{"value":-22}},{"key_as_string":"2016-05-01T00:00:00.000Z","key":1462060800000,"doc_count":1372,"interval_diff":{"value":-49}},{"key_as_string":"2016-04-01T00:00:00.000Z","key":1459468800000,"doc_count":1421,"interval_diff":{"value":-213}},{"key_as_string":"2016-03-01T00:00:00.000Z","key":1456790400000,"doc_count":1634,"interval_diff":{"value":229}},{"key_as_string":"2016-02-01T00:00:00.000Z","key":1454284800000,"doc_count":1405,"interval_diff":{"value":-39}},{"key_as_string":"2016-01-01T00:00:00.000Z","key":1451606400000,"doc_count":1444,"interval_diff":{"value":166}},{"key_as_string":"2015-12-01T00:00:00.000Z","key":1448928000000,"doc_count":1278,"interval_diff":{"value":-59}},{"key_as_string":"2015-11-01T00:00:00.000Z","key":1446336000000,"doc_count":1337,"interval_diff":{"value":-254}},{"key_as_string":"2015-10-01T00:00:00.000Z","key":1443657600000,"doc_count":1591,"interval_diff":{"value":-4}},{"key_as_string":"2015-09-01T00:00:00.000Z","key":1441065600000,"doc_count":1595,"interval_diff":{"value":-259}},{"key_as_string":"2015-08-01T00:00:00.000Z","key":1438387200000,"doc_count":1854,"interval_diff":{"value":292}},{"key_as_string":"2015-07-01T00:00:00.000Z","key":1435708800000,"doc_count":1562,"interval_diff":{"value":-125}},{"key_as_string":"2015-06-01T00:00:00.000Z","key":1433116800000,"doc_count":1687,"interval_diff":{"value":43}},{"key_as_string":"2015-05-01T00:00:00.000Z","key":1430438400000,"doc_count":1644,"interval_diff":{"value":-37}},{"key_as_string":"2015-04-01T00:00:00.000Z","key":1427846400000,"doc_count":1681,"interval_diff":{"value":86}},{"key_as_string":"2015-03-01T00:00:00.000Z","key":1425168000000,"doc_count":1595,"interval_diff":{"value":217}},{"key_as_string":"2015-02-01T00:00:00.000Z","key":1422748800000,"doc_count":1378,"interval_diff":{"value":-53}},{"key_as_string":"2015-01-01T00:00:00.000Z","key":1420070400000,"doc_count":1431,"interval_diff":{"value":-36}},{"key_as_string":"2014-12-01T00:00:00.000Z","key":1417392000000,"doc_count":1467,"interval_diff":{"value":36}},{"key_as_string":"2014-11-01T00:00:00.000Z","key":1414800000000,"doc_count":1431,"interval_diff":{"value":-478}},{"key_as_string":"2014-10-01T00:00:00.000Z","key":1412121600000,"doc_count":1909,"interval_diff":{"value":224}},{"key_as_string":"2014-09-01T00:00:00.000Z","key":1409529600000,"doc_count":1685,"interval_diff":{"value":-160}},{"key_as_string":"2014-08-01T00:00:00.000Z","key":1406851200000,"doc_count":1845,"interval_diff":{"value":-17}},{"key_as_string":"2014-07-01T00:00:00.000Z","key":1404172800000,"doc_count":1862,"interval_diff":{"value":85}},{"key_as_string":"2014-06-01T00:00:00.000Z","key":1401580800000,"doc_count":1777,"interval_diff":{"value":6}},{"key_as_string":"2014-05-01T00:00:00.000Z","key":1398902400000,"doc_count":1771,"interval_diff":{"value":-203}},{"key_as_string":"2014-04-01T00:00:00.000Z","key":1396310400000,"doc_count":1974,"interval_diff":{"value":-69}},{"key_as_string":"2014-03-01T00:00:00.000Z","key":1393632000000,"doc_count":2043,"interval_diff":{"value":138}},{"key_as_string":"2014-02-01T00:00:00.000Z","key":1391212800000,"doc_count":1905,"interval_diff":{"value":96}},{"key_as_string":"2014-01-01T00:00:00.000Z","key":1388534400000,"doc_count":1809,"interval_diff":{"value":442}},{"key_as_string":"2013-12-01T00:00:00.000Z","key":1385856000000,"doc_count":1367,"interval_diff":{"value":-103}},{"key_as_string":"2013-11-01T00:00:00.000Z","key":1383264000000,"doc_count":1470,"interval_diff":{"value":-81}},{"key_as_string":"2013-10-01T00:00:00.000Z","key":1380585600000,"doc_count":1551,"interval_diff":{"value":-204}},{"key_as_string":"2013-09-01T00:00:00.000Z","key":1377993600000,"doc_count":1755,"interval_diff":{"value":-444}},{"key_as_string":"2013-08-01T00:00:00.000Z","key":1375315200000,"doc_count":2199,"interval_diff":{"value":-269}},{"key_as_string":"2013-07-01T00:00:00.000Z","key":1372636800000,"doc_count":2468,"interval_diff":{"value":-182}},{"key_as_string":"2013-06-01T00:00:00.000Z","key":1370044800000,"doc_count":2650,"interval_diff":{"value":-110}},{"key_as_string":"2013-05-01T00:00:00.000Z","key":1367366400000,"doc_count":2760,"interval_diff":{"value":-89}},{"key_as_string":"2013-04-01T00:00:00.000Z","key":1364774400000,"doc_count":2849,"interval_diff":{"value":-28}},{"key_as_string":"2013-03-01T00:00:00.000Z","key":1362096000000,"doc_count":2877,"interval_diff":{"value":-167}},{"key_as_string":"2013-02-01T00:00:00.000Z","key":1359676800000,"doc_count":3044,"interval_diff":{"value":-1105}},{"key_as_string":"2013-01-01T00:00:00.000Z","key":1356998400000,"doc_count":4149,"interval_diff":{"value":2256}},{"key_as_string":"2012-12-01T00:00:00.000Z","key":1354320000000,"doc_count":1893,"interval_diff":{"value":103}},{"key_as_string":"2012-11-01T00:00:00.000Z","key":1351728000000,"doc_count":1790,"interval_diff":{"value":-236}},{"key_as_string":"2012-10-01T00:00:00.000Z","key":1349049600000,"doc_count":2026,"interval_diff":{"value":204}},{"key_as_string":"2012-09-01T00:00:00.000Z","key":1346457600000,"doc_count":1822,"interval_diff":{"value":-576}},{"key_as_string":"2012-08-01T00:00:00.000Z","key":1343779200000,"doc_count":2398,"interval_diff":{"value":297}},{"key_as_string":"2012-07-01T00:00:00.000Z","key":1341100800000,"doc_count":2101,"interval_diff":{"value":155}},{"key_as_string":"2012-06-01T00:00:00.000Z","key":1338508800000,"doc_count":1946,"interval_diff":{"value":-482}},{"key_as_string":"2012-05-01T00:00:00.000Z","key":1335830400000,"doc_count":2428,"interval_diff":{"value":769}},{"key_as_string":"2012-04-01T00:00:00.000Z","key":1333238400000,"doc_count":1659,"interval_diff":{"value":-39}},{"key_as_string":"2012-03-01T00:00:00.000Z","key":1330560000000,"doc_count":1698,"interval_diff":{"value":429}},{"key_as_string":"2012-02-01T00:00:00.000Z","key":1328054400000,"doc_count":1269,"interval_diff":{"value":158}},{"key_as_string":"2012-01-01T00:00:00.000Z","key":1325376000000,"doc_count":1111,"interval_diff":{"value":467}},{"key_as_string":"2011-12-01T00:00:00.000Z","key":1322697600000,"doc_count":644}]},"issue":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[]}},{"key":"Incorrect information on credit report","doc_count":102686,"trend_period":{"buckets":[{"key_as_string":"2017-04-01T00:00:00.000Z","key":1491004800000,"doc_count":2819,"interval_diff":{"value":-585}},{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":3404,"interval_diff":{"value":286}},{"key_as_string":"2017-02-01T00:00:00.000Z","key":1485907200000,"doc_count":3118,"interval_diff":{"value":153}},{"key_as_string":"2017-01-01T00:00:00.000Z","key":1483228800000,"doc_count":2965,"interval_diff":{"value":585}},{"key_as_string":"2016-12-01T00:00:00.000Z","key":1480550400000,"doc_count":2380,"interval_diff":{"value":-92}},{"key_as_string":"2016-11-01T00:00:00.000Z","key":1477958400000,"doc_count":2472,"interval_diff":{"value":-851}},{"key_as_string":"2016-10-01T00:00:00.000Z","key":1475280000000,"doc_count":3323,"interval_diff":{"value":605}},{"key_as_string":"2016-09-01T00:00:00.000Z","key":1472688000000,"doc_count":2718,"interval_diff":{"value":-105}},{"key_as_string":"2016-08-01T00:00:00.000Z","key":1470009600000,"doc_count":2823,"interval_diff":{"value":-384}},{"key_as_string":"2016-07-01T00:00:00.000Z","key":1467331200000,"doc_count":3207,"interval_diff":{"value":316}},{"key_as_string":"2016-06-01T00:00:00.000Z","key":1464739200000,"doc_count":2891,"interval_diff":{"value":124}},{"key_as_string":"2016-05-01T00:00:00.000Z","key":1462060800000,"doc_count":2767,"interval_diff":{"value":83}},{"key_as_string":"2016-04-01T00:00:00.000Z","key":1459468800000,"doc_count":2684,"interval_diff":{"value":-307}},{"key_as_string":"2016-03-01T00:00:00.000Z","key":1456790400000,"doc_count":2991,"interval_diff":{"value":670}},{"key_as_string":"2016-02-01T00:00:00.000Z","key":1454284800000,"doc_count":2321,"interval_diff":{"value":328}},{"key_as_string":"2016-01-01T00:00:00.000Z","key":1451606400000,"doc_count":1993,"interval_diff":{"value":49}},{"key_as_string":"2015-12-01T00:00:00.000Z","key":1448928000000,"doc_count":1944,"interval_diff":{"value":-136}},{"key_as_string":"2015-11-01T00:00:00.000Z","key":1446336000000,"doc_count":2080,"interval_diff":{"value":36}},{"key_as_string":"2015-10-01T00:00:00.000Z","key":1443657600000,"doc_count":2044,"interval_diff":{"value":-113}},{"key_as_string":"2015-09-01T00:00:00.000Z","key":1441065600000,"doc_count":2157,"interval_diff":{"value":-340}},{"key_as_string":"2015-08-01T00:00:00.000Z","key":1438387200000,"doc_count":2497,"interval_diff":{"value":-419}},{"key_as_string":"2015-07-01T00:00:00.000Z","key":1435708800000,"doc_count":2916,"interval_diff":{"value":946}},{"key_as_string":"2015-06-01T00:00:00.000Z","key":1433116800000,"doc_count":1970,"interval_diff":{"value":-50}},{"key_as_string":"2015-05-01T00:00:00.000Z","key":1430438400000,"doc_count":2020,"interval_diff":{"value":41}},{"key_as_string":"2015-04-01T00:00:00.000Z","key":1427846400000,"doc_count":1979,"interval_diff":{"value":-105}},{"key_as_string":"2015-03-01T00:00:00.000Z","key":1425168000000,"doc_count":2084,"interval_diff":{"value":322}},{"key_as_string":"2015-02-01T00:00:00.000Z","key":1422748800000,"doc_count":1762,"interval_diff":{"value":-245}},{"key_as_string":"2015-01-01T00:00:00.000Z","key":1420070400000,"doc_count":2007,"interval_diff":{"value":371}},{"key_as_string":"2014-12-01T00:00:00.000Z","key":1417392000000,"doc_count":1636,"interval_diff":{"value":-8}},{"key_as_string":"2014-11-01T00:00:00.000Z","key":1414800000000,"doc_count":1644,"interval_diff":{"value":2}},{"key_as_string":"2014-10-01T00:00:00.000Z","key":1412121600000,"doc_count":1642,"interval_diff":{"value":-293}},{"key_as_string":"2014-09-01T00:00:00.000Z","key":1409529600000,"doc_count":1935,"interval_diff":{"value":-62}},{"key_as_string":"2014-08-01T00:00:00.000Z","key":1406851200000,"doc_count":1997,"interval_diff":{"value":22}},{"key_as_string":"2014-07-01T00:00:00.000Z","key":1404172800000,"doc_count":1975,"interval_diff":{"value":74}},{"key_as_string":"2014-06-01T00:00:00.000Z","key":1401580800000,"doc_count":1901,"interval_diff":{"value":226}},{"key_as_string":"2014-05-01T00:00:00.000Z","key":1398902400000,"doc_count":1675,"interval_diff":{"value":-200}},{"key_as_string":"2014-04-01T00:00:00.000Z","key":1396310400000,"doc_count":1875,"interval_diff":{"value":65}},{"key_as_string":"2014-03-01T00:00:00.000Z","key":1393632000000,"doc_count":1810,"interval_diff":{"value":-26}},{"key_as_string":"2014-02-01T00:00:00.000Z","key":1391212800000,"doc_count":1836,"interval_diff":{"value":170}},{"key_as_string":"2014-01-01T00:00:00.000Z","key":1388534400000,"doc_count":1666,"interval_diff":{"value":813}},{"key_as_string":"2013-12-01T00:00:00.000Z","key":1385856000000,"doc_count":853,"interval_diff":{"value":-41}},{"key_as_string":"2013-11-01T00:00:00.000Z","key":1383264000000,"doc_count":894,"interval_diff":{"value":5}},{"key_as_string":"2013-10-01T00:00:00.000Z","key":1380585600000,"doc_count":889,"interval_diff":{"value":-69}},{"key_as_string":"2013-09-01T00:00:00.000Z","key":1377993600000,"doc_count":958,"interval_diff":{"value":111}},{"key_as_string":"2013-08-01T00:00:00.000Z","key":1375315200000,"doc_count":847,"interval_diff":{"value":70}},{"key_as_string":"2013-07-01T00:00:00.000Z","key":1372636800000,"doc_count":777,"interval_diff":{"value":67}},{"key_as_string":"2013-06-01T00:00:00.000Z","key":1370044800000,"doc_count":710,"interval_diff":{"value":-57}},{"key_as_string":"2013-05-01T00:00:00.000Z","key":1367366400000,"doc_count":767,"interval_diff":{"value":22}},{"key_as_string":"2013-04-01T00:00:00.000Z","key":1364774400000,"doc_count":745,"interval_diff":{"value":38}},{"key_as_string":"2013-03-01T00:00:00.000Z","key":1362096000000,"doc_count":707,"interval_diff":{"value":-30}},{"key_as_string":"2013-02-01T00:00:00.000Z","key":1359676800000,"doc_count":737,"interval_diff":{"value":122}},{"key_as_string":"2013-01-01T00:00:00.000Z","key":1356998400000,"doc_count":615,"interval_diff":{"value":135}},{"key_as_string":"2012-12-01T00:00:00.000Z","key":1354320000000,"doc_count":480,"interval_diff":{"value":-68}},{"key_as_string":"2012-11-01T00:00:00.000Z","key":1351728000000,"doc_count":548,"interval_diff":{"value":317}},{"key_as_string":"2012-10-01T00:00:00.000Z","key":1349049600000,"doc_count":231}]},"issue":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[{"key":"Account status","doc_count":37057,"trend_period":{"buckets":[{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":1005,"interval_diff":{"value":87}}]}},{"key":"Information is not mine","doc_count":32384,"trend_period":{"buckets":[{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":1182,"interval_diff":{"value":220}}]}},{"key":"Account terms","doc_count":10995,"trend_period":{"buckets":[{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":324,"interval_diff":{"value":-88}}]}},{"key":"Public record","doc_count":8876,"trend_period":{"buckets":[{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":328,"interval_diff":{"value":27}}]}},{"key":"Personal information","doc_count":7529,"trend_period":{"buckets":[{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":258,"interval_diff":{"value":4}}]}},{"key":"Reinserted previously deleted info","doc_count":5845,"trend_period":{"buckets":[{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":307,"interval_diff":{"value":36}}]}}]}},{"key":"Problem with a credit reporting company's investigation into an existing problem","doc_count":88956,"trend_period":{"buckets":[{"key_as_string":"2020-05-01T00:00:00.000Z","key":1588291200000,"doc_count":1354,"interval_diff":{"value":-3091}},{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":4445,"interval_diff":{"value":937}},{"key_as_string":"2020-03-01T00:00:00.000Z","key":1583020800000,"doc_count":3508,"interval_diff":{"value":714}},{"key_as_string":"2020-02-01T00:00:00.000Z","key":1580515200000,"doc_count":2794,"interval_diff":{"value":-489}},{"key_as_string":"2020-01-01T00:00:00.000Z","key":1577836800000,"doc_count":3283,"interval_diff":{"value":462}},{"key_as_string":"2019-12-01T00:00:00.000Z","key":1575158400000,"doc_count":2821,"interval_diff":{"value":203}},{"key_as_string":"2019-11-01T00:00:00.000Z","key":1572566400000,"doc_count":2618,"interval_diff":{"value":-517}},{"key_as_string":"2019-10-01T00:00:00.000Z","key":1569888000000,"doc_count":3135,"interval_diff":{"value":664}},{"key_as_string":"2019-09-01T00:00:00.000Z","key":1567296000000,"doc_count":2471,"interval_diff":{"value":-381}},{"key_as_string":"2019-08-01T00:00:00.000Z","key":1564617600000,"doc_count":2852,"interval_diff":{"value":-142}},{"key_as_string":"2019-07-01T00:00:00.000Z","key":1561939200000,"doc_count":2994,"interval_diff":{"value":107}},{"key_as_string":"2019-06-01T00:00:00.000Z","key":1559347200000,"doc_count":2887,"interval_diff":{"value":195}},{"key_as_string":"2019-05-01T00:00:00.000Z","key":1556668800000,"doc_count":2692,"interval_diff":{"value":39}},{"key_as_string":"2019-04-01T00:00:00.000Z","key":1554076800000,"doc_count":2653,"interval_diff":{"value":79}},{"key_as_string":"2019-03-01T00:00:00.000Z","key":1551398400000,"doc_count":2574,"interval_diff":{"value":275}},{"key_as_string":"2019-02-01T00:00:00.000Z","key":1548979200000,"doc_count":2299,"interval_diff":{"value":418}},{"key_as_string":"2019-01-01T00:00:00.000Z","key":1546300800000,"doc_count":1881,"interval_diff":{"value":-222}},{"key_as_string":"2018-12-01T00:00:00.000Z","key":1543622400000,"doc_count":2103,"interval_diff":{"value":178}},{"key_as_string":"2018-11-01T00:00:00.000Z","key":1541030400000,"doc_count":1925,"interval_diff":{"value":-100}},{"key_as_string":"2018-10-01T00:00:00.000Z","key":1538352000000,"doc_count":2025,"interval_diff":{"value":142}},{"key_as_string":"2018-09-01T00:00:00.000Z","key":1535760000000,"doc_count":1883,"interval_diff":{"value":-277}},{"key_as_string":"2018-08-01T00:00:00.000Z","key":1533081600000,"doc_count":2160,"interval_diff":{"value":3}},{"key_as_string":"2018-07-01T00:00:00.000Z","key":1530403200000,"doc_count":2157,"interval_diff":{"value":-70}},{"key_as_string":"2018-06-01T00:00:00.000Z","key":1527811200000,"doc_count":2227,"interval_diff":{"value":-90}},{"key_as_string":"2018-05-01T00:00:00.000Z","key":1525132800000,"doc_count":2317,"interval_diff":{"value":-100}},{"key_as_string":"2018-04-01T00:00:00.000Z","key":1522540800000,"doc_count":2417,"interval_diff":{"value":217}},{"key_as_string":"2018-03-01T00:00:00.000Z","key":1519862400000,"doc_count":2200,"interval_diff":{"value":-70}},{"key_as_string":"2018-02-01T00:00:00.000Z","key":1517443200000,"doc_count":2270,"interval_diff":{"value":111}},{"key_as_string":"2018-01-01T00:00:00.000Z","key":1514764800000,"doc_count":2159,"interval_diff":{"value":541}},{"key_as_string":"2017-12-01T00:00:00.000Z","key":1512086400000,"doc_count":1618,"interval_diff":{"value":-248}},{"key_as_string":"2017-11-01T00:00:00.000Z","key":1509494400000,"doc_count":1866,"interval_diff":{"value":-199}},{"key_as_string":"2017-10-01T00:00:00.000Z","key":1506816000000,"doc_count":2065,"interval_diff":{"value":38}},{"key_as_string":"2017-09-01T00:00:00.000Z","key":1504224000000,"doc_count":2027,"interval_diff":{"value":-244}},{"key_as_string":"2017-08-01T00:00:00.000Z","key":1501545600000,"doc_count":2271,"interval_diff":{"value":270}},{"key_as_string":"2017-07-01T00:00:00.000Z","key":1498867200000,"doc_count":2001,"interval_diff":{"value":281}},{"key_as_string":"2017-06-01T00:00:00.000Z","key":1496275200000,"doc_count":1720,"interval_diff":{"value":-76}},{"key_as_string":"2017-05-01T00:00:00.000Z","key":1493596800000,"doc_count":1796,"interval_diff":{"value":1308}},{"key_as_string":"2017-04-01T00:00:00.000Z","key":1491004800000,"doc_count":488}]},"issue":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[{"key":"Their investigation did not fix an error on your report","doc_count":63723,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":2738,"interval_diff":{"value":401}}]}},{"key":"Investigation took more than 30 days","doc_count":7536,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":689,"interval_diff":{"value":149}}]}},{"key":"Was not notified of investigation status or results","doc_count":6830,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":578,"interval_diff":{"value":255}}]}},{"key":"Difficulty submitting a dispute or getting information about a dispute over the phone","doc_count":6051,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":275,"interval_diff":{"value":118}}]}},{"key":"Problem with personal statement of dispute","doc_count":4407,"trend_period":{"buckets":[{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":151,"interval_diff":{"value":14}}]}}]}},{"key":"Loan servicing, payments, escrow account","doc_count":77333,"trend_period":{"buckets":[{"key_as_string":"2017-04-01T00:00:00.000Z","key":1491004800000,"doc_count":852,"interval_diff":{"value":-607}},{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":1459,"interval_diff":{"value":208}},{"key_as_string":"2017-02-01T00:00:00.000Z","key":1485907200000,"doc_count":1251,"interval_diff":{"value":-146}},{"key_as_string":"2017-01-01T00:00:00.000Z","key":1483228800000,"doc_count":1397,"interval_diff":{"value":152}},{"key_as_string":"2016-12-01T00:00:00.000Z","key":1480550400000,"doc_count":1245,"interval_diff":{"value":-100}},{"key_as_string":"2016-11-01T00:00:00.000Z","key":1477958400000,"doc_count":1345,"interval_diff":{"value":-100}},{"key_as_string":"2016-10-01T00:00:00.000Z","key":1475280000000,"doc_count":1445,"interval_diff":{"value":-44}},{"key_as_string":"2016-09-01T00:00:00.000Z","key":1472688000000,"doc_count":1489,"interval_diff":{"value":97}},{"key_as_string":"2016-08-01T00:00:00.000Z","key":1470009600000,"doc_count":1392,"interval_diff":{"value":75}},{"key_as_string":"2016-07-01T00:00:00.000Z","key":1467331200000,"doc_count":1317,"interval_diff":{"value":-154}},{"key_as_string":"2016-06-01T00:00:00.000Z","key":1464739200000,"doc_count":1471,"interval_diff":{"value":2}},{"key_as_string":"2016-05-01T00:00:00.000Z","key":1462060800000,"doc_count":1469,"interval_diff":{"value":14}},{"key_as_string":"2016-04-01T00:00:00.000Z","key":1459468800000,"doc_count":1455,"interval_diff":{"value":-109}},{"key_as_string":"2016-03-01T00:00:00.000Z","key":1456790400000,"doc_count":1564,"interval_diff":{"value":141}},{"key_as_string":"2016-02-01T00:00:00.000Z","key":1454284800000,"doc_count":1423,"interval_diff":{"value":4}},{"key_as_string":"2016-01-01T00:00:00.000Z","key":1451606400000,"doc_count":1419,"interval_diff":{"value":184}},{"key_as_string":"2015-12-01T00:00:00.000Z","key":1448928000000,"doc_count":1235,"interval_diff":{"value":89}},{"key_as_string":"2015-11-01T00:00:00.000Z","key":1446336000000,"doc_count":1146,"interval_diff":{"value":-260}},{"key_as_string":"2015-10-01T00:00:00.000Z","key":1443657600000,"doc_count":1406,"interval_diff":{"value":-89}},{"key_as_string":"2015-09-01T00:00:00.000Z","key":1441065600000,"doc_count":1495,"interval_diff":{"value":-3}},{"key_as_string":"2015-08-01T00:00:00.000Z","key":1438387200000,"doc_count":1498,"interval_diff":{"value":62}},{"key_as_string":"2015-07-01T00:00:00.000Z","key":1435708800000,"doc_count":1436,"interval_diff":{"value":-67}},{"key_as_string":"2015-06-01T00:00:00.000Z","key":1433116800000,"doc_count":1503,"interval_diff":{"value":160}},{"key_as_string":"2015-05-01T00:00:00.000Z","key":1430438400000,"doc_count":1343,"interval_diff":{"value":-69}},{"key_as_string":"2015-04-01T00:00:00.000Z","key":1427846400000,"doc_count":1412,"interval_diff":{"value":20}},{"key_as_string":"2015-03-01T00:00:00.000Z","key":1425168000000,"doc_count":1392,"interval_diff":{"value":157}},{"key_as_string":"2015-02-01T00:00:00.000Z","key":1422748800000,"doc_count":1235,"interval_diff":{"value":62}},{"key_as_string":"2015-01-01T00:00:00.000Z","key":1420070400000,"doc_count":1173,"interval_diff":{"value":8}},{"key_as_string":"2014-12-01T00:00:00.000Z","key":1417392000000,"doc_count":1165,"interval_diff":{"value":17}},{"key_as_string":"2014-11-01T00:00:00.000Z","key":1414800000000,"doc_count":1148,"interval_diff":{"value":-218}},{"key_as_string":"2014-10-01T00:00:00.000Z","key":1412121600000,"doc_count":1366,"interval_diff":{"value":94}},{"key_as_string":"2014-09-01T00:00:00.000Z","key":1409529600000,"doc_count":1272,"interval_diff":{"value":26}},{"key_as_string":"2014-08-01T00:00:00.000Z","key":1406851200000,"doc_count":1246,"interval_diff":{"value":-21}},{"key_as_string":"2014-07-01T00:00:00.000Z","key":1404172800000,"doc_count":1267,"interval_diff":{"value":69}},{"key_as_string":"2014-06-01T00:00:00.000Z","key":1401580800000,"doc_count":1198,"interval_diff":{"value":-26}},{"key_as_string":"2014-05-01T00:00:00.000Z","key":1398902400000,"doc_count":1224,"interval_diff":{"value":-298}},{"key_as_string":"2014-04-01T00:00:00.000Z","key":1396310400000,"doc_count":1522,"interval_diff":{"value":-79}},{"key_as_string":"2014-03-01T00:00:00.000Z","key":1393632000000,"doc_count":1601,"interval_diff":{"value":134}},{"key_as_string":"2014-02-01T00:00:00.000Z","key":1391212800000,"doc_count":1467,"interval_diff":{"value":177}},{"key_as_string":"2014-01-01T00:00:00.000Z","key":1388534400000,"doc_count":1290,"interval_diff":{"value":306}},{"key_as_string":"2013-12-01T00:00:00.000Z","key":1385856000000,"doc_count":984,"interval_diff":{"value":15}},{"key_as_string":"2013-11-01T00:00:00.000Z","key":1383264000000,"doc_count":969,"interval_diff":{"value":-189}},{"key_as_string":"2013-10-01T00:00:00.000Z","key":1380585600000,"doc_count":1158,"interval_diff":{"value":51}},{"key_as_string":"2013-09-01T00:00:00.000Z","key":1377993600000,"doc_count":1107,"interval_diff":{"value":-100}},{"key_as_string":"2013-08-01T00:00:00.000Z","key":1375315200000,"doc_count":1207,"interval_diff":{"value":53}},{"key_as_string":"2013-07-01T00:00:00.000Z","key":1372636800000,"doc_count":1154,"interval_diff":{"value":90}},{"key_as_string":"2013-06-01T00:00:00.000Z","key":1370044800000,"doc_count":1064,"interval_diff":{"value":2}},{"key_as_string":"2013-05-01T00:00:00.000Z","key":1367366400000,"doc_count":1062,"interval_diff":{"value":-160}},{"key_as_string":"2013-04-01T00:00:00.000Z","key":1364774400000,"doc_count":1222,"interval_diff":{"value":25}},{"key_as_string":"2013-03-01T00:00:00.000Z","key":1362096000000,"doc_count":1197,"interval_diff":{"value":198}},{"key_as_string":"2013-02-01T00:00:00.000Z","key":1359676800000,"doc_count":999,"interval_diff":{"value":-125}},{"key_as_string":"2013-01-01T00:00:00.000Z","key":1356998400000,"doc_count":1124,"interval_diff":{"value":313}},{"key_as_string":"2012-12-01T00:00:00.000Z","key":1354320000000,"doc_count":811,"interval_diff":{"value":126}},{"key_as_string":"2012-11-01T00:00:00.000Z","key":1351728000000,"doc_count":685,"interval_diff":{"value":-80}},{"key_as_string":"2012-10-01T00:00:00.000Z","key":1349049600000,"doc_count":765,"interval_diff":{"value":14}},{"key_as_string":"2012-09-01T00:00:00.000Z","key":1346457600000,"doc_count":751,"interval_diff":{"value":-219}},{"key_as_string":"2012-08-01T00:00:00.000Z","key":1343779200000,"doc_count":970,"interval_diff":{"value":92}},{"key_as_string":"2012-07-01T00:00:00.000Z","key":1341100800000,"doc_count":878,"interval_diff":{"value":5}},{"key_as_string":"2012-06-01T00:00:00.000Z","key":1338508800000,"doc_count":873,"interval_diff":{"value":-133}},{"key_as_string":"2012-05-01T00:00:00.000Z","key":1335830400000,"doc_count":1006,"interval_diff":{"value":205}},{"key_as_string":"2012-04-01T00:00:00.000Z","key":1333238400000,"doc_count":801,"interval_diff":{"value":-82}},{"key_as_string":"2012-03-01T00:00:00.000Z","key":1330560000000,"doc_count":883,"interval_diff":{"value":229}},{"key_as_string":"2012-02-01T00:00:00.000Z","key":1328054400000,"doc_count":654,"interval_diff":{"value":55}},{"key_as_string":"2012-01-01T00:00:00.000Z","key":1325376000000,"doc_count":599,"interval_diff":{"value":222}},{"key_as_string":"2011-12-01T00:00:00.000Z","key":1322697600000,"doc_count":377}]},"issue":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[]}}]}},"min_date":{"value":1322758800000,"value_as_string":"2011-12-01T12:00:00-05:00"},"dateRangeArea":{"doc_count":1599733,"dateRangeArea":{"buckets":[{"key_as_string":"2011-12-01T00:00:00.000Z","key":1322697600000,"doc_count":2536},{"key_as_string":"2012-01-01T00:00:00.000Z","key":1325376000000,"doc_count":3230},{"key_as_string":"2012-02-01T00:00:00.000Z","key":1328054400000,"doc_count":3509},{"key_as_string":"2012-03-01T00:00:00.000Z","key":1330560000000,"doc_count":6230},{"key_as_string":"2012-04-01T00:00:00.000Z","key":1333238400000,"doc_count":5703},{"key_as_string":"2012-05-01T00:00:00.000Z","key":1335830400000,"doc_count":7617},{"key_as_string":"2012-06-01T00:00:00.000Z","key":1338508800000,"doc_count":7841},{"key_as_string":"2012-07-01T00:00:00.000Z","key":1341100800000,"doc_count":6755},{"key_as_string":"2012-08-01T00:00:00.000Z","key":1343779200000,"doc_count":6877},{"key_as_string":"2012-09-01T00:00:00.000Z","key":1346457600000,"doc_count":5493},{"key_as_string":"2012-10-01T00:00:00.000Z","key":1349049600000,"doc_count":6741},{"key_as_string":"2012-11-01T00:00:00.000Z","key":1351728000000,"doc_count":6139},{"key_as_string":"2012-12-01T00:00:00.000Z","key":1354320000000,"doc_count":6238},{"key_as_string":"2013-01-01T00:00:00.000Z","key":1356998400000,"doc_count":9741},{"key_as_string":"2013-02-01T00:00:00.000Z","key":1359676800000,"doc_count":8349},{"key_as_string":"2013-03-01T00:00:00.000Z","key":1362096000000,"doc_count":8784},{"key_as_string":"2013-04-01T00:00:00.000Z","key":1364774400000,"doc_count":8632},{"key_as_string":"2013-05-01T00:00:00.000Z","key":1367366400000,"doc_count":8170},{"key_as_string":"2013-06-01T00:00:00.000Z","key":1370044800000,"doc_count":8035},{"key_as_string":"2013-07-01T00:00:00.000Z","key":1372636800000,"doc_count":9271},{"key_as_string":"2013-08-01T00:00:00.000Z","key":1375315200000,"doc_count":9565},{"key_as_string":"2013-09-01T00:00:00.000Z","key":1377993600000,"doc_count":9636},{"key_as_string":"2013-10-01T00:00:00.000Z","key":1380585600000,"doc_count":9241},{"key_as_string":"2013-11-01T00:00:00.000Z","key":1383264000000,"doc_count":9319},{"key_as_string":"2013-12-01T00:00:00.000Z","key":1385856000000,"doc_count":9474},{"key_as_string":"2014-01-01T00:00:00.000Z","key":1388534400000,"doc_count":12617},{"key_as_string":"2014-02-01T00:00:00.000Z","key":1391212800000,"doc_count":13048},{"key_as_string":"2014-03-01T00:00:00.000Z","key":1393632000000,"doc_count":13943},{"key_as_string":"2014-04-01T00:00:00.000Z","key":1396310400000,"doc_count":13840},{"key_as_string":"2014-05-01T00:00:00.000Z","key":1398902400000,"doc_count":12167},{"key_as_string":"2014-06-01T00:00:00.000Z","key":1401580800000,"doc_count":12520},{"key_as_string":"2014-07-01T00:00:00.000Z","key":1404172800000,"doc_count":13415},{"key_as_string":"2014-08-01T00:00:00.000Z","key":1406851200000,"doc_count":13186},{"key_as_string":"2014-09-01T00:00:00.000Z","key":1409529600000,"doc_count":12465},{"key_as_string":"2014-10-01T00:00:00.000Z","key":1412121600000,"doc_count":12901},{"key_as_string":"2014-11-01T00:00:00.000Z","key":1414800000000,"doc_count":11257},{"key_as_string":"2014-12-01T00:00:00.000Z","key":1417392000000,"doc_count":11684},{"key_as_string":"2015-01-01T00:00:00.000Z","key":1420070400000,"doc_count":12627},{"key_as_string":"2015-02-01T00:00:00.000Z","key":1422748800000,"doc_count":12680},{"key_as_string":"2015-03-01T00:00:00.000Z","key":1425168000000,"doc_count":14514},{"key_as_string":"2015-04-01T00:00:00.000Z","key":1427846400000,"doc_count":13753},{"key_as_string":"2015-05-01T00:00:00.000Z","key":1430438400000,"doc_count":13682},{"key_as_string":"2015-06-01T00:00:00.000Z","key":1433116800000,"doc_count":14517},{"key_as_string":"2015-07-01T00:00:00.000Z","key":1435708800000,"doc_count":15920},{"key_as_string":"2015-08-01T00:00:00.000Z","key":1438387200000,"doc_count":15766},{"key_as_string":"2015-09-01T00:00:00.000Z","key":1441065600000,"doc_count":14336},{"key_as_string":"2015-10-01T00:00:00.000Z","key":1443657600000,"doc_count":14899},{"key_as_string":"2015-11-01T00:00:00.000Z","key":1446336000000,"doc_count":12897},{"key_as_string":"2015-12-01T00:00:00.000Z","key":1448928000000,"doc_count":12884},{"key_as_string":"2016-01-01T00:00:00.000Z","key":1451606400000,"doc_count":13840},{"key_as_string":"2016-02-01T00:00:00.000Z","key":1454284800000,"doc_count":14140},{"key_as_string":"2016-03-01T00:00:00.000Z","key":1456790400000,"doc_count":16611},{"key_as_string":"2016-04-01T00:00:00.000Z","key":1459468800000,"doc_count":15608},{"key_as_string":"2016-05-01T00:00:00.000Z","key":1462060800000,"doc_count":15517},{"key_as_string":"2016-06-01T00:00:00.000Z","key":1464739200000,"doc_count":16063},{"key_as_string":"2016-07-01T00:00:00.000Z","key":1467331200000,"doc_count":16043},{"key_as_string":"2016-08-01T00:00:00.000Z","key":1470009600000,"doc_count":17694},{"key_as_string":"2016-09-01T00:00:00.000Z","key":1472688000000,"doc_count":17584},{"key_as_string":"2016-10-01T00:00:00.000Z","key":1475280000000,"doc_count":17820},{"key_as_string":"2016-11-01T00:00:00.000Z","key":1477958400000,"doc_count":15207},{"key_as_string":"2016-12-01T00:00:00.000Z","key":1480550400000,"doc_count":15341},{"key_as_string":"2017-01-01T00:00:00.000Z","key":1483228800000,"doc_count":21006},{"key_as_string":"2017-02-01T00:00:00.000Z","key":1485907200000,"doc_count":18110},{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":19762},{"key_as_string":"2017-04-01T00:00:00.000Z","key":1491004800000,"doc_count":18544},{"key_as_string":"2017-05-01T00:00:00.000Z","key":1493596800000,"doc_count":19305},{"key_as_string":"2017-06-01T00:00:00.000Z","key":1496275200000,"doc_count":18567},{"key_as_string":"2017-07-01T00:00:00.000Z","key":1498867200000,"doc_count":20433},{"key_as_string":"2017-08-01T00:00:00.000Z","key":1501545600000,"doc_count":21402},{"key_as_string":"2017-09-01T00:00:00.000Z","key":1504224000000,"doc_count":27357},{"key_as_string":"2017-10-01T00:00:00.000Z","key":1506816000000,"doc_count":20456},{"key_as_string":"2017-11-01T00:00:00.000Z","key":1509494400000,"doc_count":18990},{"key_as_string":"2017-12-01T00:00:00.000Z","key":1512086400000,"doc_count":19034},{"key_as_string":"2018-01-01T00:00:00.000Z","key":1514764800000,"doc_count":23651},{"key_as_string":"2018-02-01T00:00:00.000Z","key":1517443200000,"doc_count":21978},{"key_as_string":"2018-03-01T00:00:00.000Z","key":1519862400000,"doc_count":23640},{"key_as_string":"2018-04-01T00:00:00.000Z","key":1522540800000,"doc_count":24327},{"key_as_string":"2018-05-01T00:00:00.000Z","key":1525132800000,"doc_count":22339},{"key_as_string":"2018-06-01T00:00:00.000Z","key":1527811200000,"doc_count":20111},{"key_as_string":"2018-07-01T00:00:00.000Z","key":1530403200000,"doc_count":20963},{"key_as_string":"2018-08-01T00:00:00.000Z","key":1533081600000,"doc_count":21726},{"key_as_string":"2018-09-01T00:00:00.000Z","key":1535760000000,"doc_count":19072},{"key_as_string":"2018-10-01T00:00:00.000Z","key":1538352000000,"doc_count":21903},{"key_as_string":"2018-11-01T00:00:00.000Z","key":1541030400000,"doc_count":19053},{"key_as_string":"2018-12-01T00:00:00.000Z","key":1543622400000,"doc_count":18552},{"key_as_string":"2019-01-01T00:00:00.000Z","key":1546300800000,"doc_count":18934},{"key_as_string":"2019-02-01T00:00:00.000Z","key":1548979200000,"doc_count":20206},{"key_as_string":"2019-03-01T00:00:00.000Z","key":1551398400000,"doc_count":23412},{"key_as_string":"2019-04-01T00:00:00.000Z","key":1554076800000,"doc_count":22915},{"key_as_string":"2019-05-01T00:00:00.000Z","key":1556668800000,"doc_count":23850},{"key_as_string":"2019-06-01T00:00:00.000Z","key":1559347200000,"doc_count":23352},{"key_as_string":"2019-07-01T00:00:00.000Z","key":1561939200000,"doc_count":25090},{"key_as_string":"2019-08-01T00:00:00.000Z","key":1564617600000,"doc_count":26059},{"key_as_string":"2019-09-01T00:00:00.000Z","key":1567296000000,"doc_count":23575},{"key_as_string":"2019-10-01T00:00:00.000Z","key":1569888000000,"doc_count":25636},{"key_as_string":"2019-11-01T00:00:00.000Z","key":1572566400000,"doc_count":22659},{"key_as_string":"2019-12-01T00:00:00.000Z","key":1575158400000,"doc_count":21704},{"key_as_string":"2020-01-01T00:00:00.000Z","key":1577836800000,"doc_count":26413},{"key_as_string":"2020-02-01T00:00:00.000Z","key":1580515200000,"doc_count":25096},{"key_as_string":"2020-03-01T00:00:00.000Z","key":1583020800000,"doc_count":29506},{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":35112},{"key_as_string":"2020-05-01T00:00:00.000Z","key":1588291200000,"doc_count":9821}]}},"tags":{"doc_count":1599733,"tags":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[{"key":"Servicemember","doc_count":111248,"trend_period":{"buckets":[{"key_as_string":"2020-05-01T00:00:00.000Z","key":1588291200000,"doc_count":621,"interval_diff":{"value":-1844}},{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":2465,"interval_diff":{"value":379}},{"key_as_string":"2020-03-01T00:00:00.000Z","key":1583020800000,"doc_count":2086,"interval_diff":{"value":125}},{"key_as_string":"2020-02-01T00:00:00.000Z","key":1580515200000,"doc_count":1961,"interval_diff":{"value":-84}},{"key_as_string":"2020-01-01T00:00:00.000Z","key":1577836800000,"doc_count":2045,"interval_diff":{"value":320}},{"key_as_string":"2019-12-01T00:00:00.000Z","key":1575158400000,"doc_count":1725,"interval_diff":{"value":-206}},{"key_as_string":"2019-11-01T00:00:00.000Z","key":1572566400000,"doc_count":1931,"interval_diff":{"value":-155}},{"key_as_string":"2019-10-01T00:00:00.000Z","key":1569888000000,"doc_count":2086,"interval_diff":{"value":-6}},{"key_as_string":"2019-09-01T00:00:00.000Z","key":1567296000000,"doc_count":2092,"interval_diff":{"value":91}},{"key_as_string":"2019-08-01T00:00:00.000Z","key":1564617600000,"doc_count":2001,"interval_diff":{"value":115}},{"key_as_string":"2019-07-01T00:00:00.000Z","key":1561939200000,"doc_count":1886,"interval_diff":{"value":-120}},{"key_as_string":"2019-06-01T00:00:00.000Z","key":1559347200000,"doc_count":2006,"interval_diff":{"value":69}},{"key_as_string":"2019-05-01T00:00:00.000Z","key":1556668800000,"doc_count":1937,"interval_diff":{"value":-34}},{"key_as_string":"2019-04-01T00:00:00.000Z","key":1554076800000,"doc_count":1971,"interval_diff":{"value":-188}},{"key_as_string":"2019-03-01T00:00:00.000Z","key":1551398400000,"doc_count":2159,"interval_diff":{"value":240}},{"key_as_string":"2019-02-01T00:00:00.000Z","key":1548979200000,"doc_count":1919,"interval_diff":{"value":251}},{"key_as_string":"2019-01-01T00:00:00.000Z","key":1546300800000,"doc_count":1668,"interval_diff":{"value":20}},{"key_as_string":"2018-12-01T00:00:00.000Z","key":1543622400000,"doc_count":1648,"interval_diff":{"value":-95}},{"key_as_string":"2018-11-01T00:00:00.000Z","key":1541030400000,"doc_count":1743,"interval_diff":{"value":-170}},{"key_as_string":"2018-10-01T00:00:00.000Z","key":1538352000000,"doc_count":1913,"interval_diff":{"value":206}},{"key_as_string":"2018-09-01T00:00:00.000Z","key":1535760000000,"doc_count":1707,"interval_diff":{"value":-470}},{"key_as_string":"2018-08-01T00:00:00.000Z","key":1533081600000,"doc_count":2177,"interval_diff":{"value":208}},{"key_as_string":"2018-07-01T00:00:00.000Z","key":1530403200000,"doc_count":1969,"interval_diff":{"value":100}},{"key_as_string":"2018-06-01T00:00:00.000Z","key":1527811200000,"doc_count":1869,"interval_diff":{"value":-177}},{"key_as_string":"2018-05-01T00:00:00.000Z","key":1525132800000,"doc_count":2046,"interval_diff":{"value":-1}},{"key_as_string":"2018-04-01T00:00:00.000Z","key":1522540800000,"doc_count":2047,"interval_diff":{"value":-241}},{"key_as_string":"2018-03-01T00:00:00.000Z","key":1519862400000,"doc_count":2288,"interval_diff":{"value":-7}},{"key_as_string":"2018-02-01T00:00:00.000Z","key":1517443200000,"doc_count":2295,"interval_diff":{"value":87}},{"key_as_string":"2018-01-01T00:00:00.000Z","key":1514764800000,"doc_count":2208,"interval_diff":{"value":342}},{"key_as_string":"2017-12-01T00:00:00.000Z","key":1512086400000,"doc_count":1866,"interval_diff":{"value":-90}},{"key_as_string":"2017-11-01T00:00:00.000Z","key":1509494400000,"doc_count":1956,"interval_diff":{"value":-88}},{"key_as_string":"2017-10-01T00:00:00.000Z","key":1506816000000,"doc_count":2044,"interval_diff":{"value":-400}},{"key_as_string":"2017-09-01T00:00:00.000Z","key":1504224000000,"doc_count":2444,"interval_diff":{"value":346}},{"key_as_string":"2017-08-01T00:00:00.000Z","key":1501545600000,"doc_count":2098,"interval_diff":{"value":105}},{"key_as_string":"2017-07-01T00:00:00.000Z","key":1498867200000,"doc_count":1993,"interval_diff":{"value":99}},{"key_as_string":"2017-06-01T00:00:00.000Z","key":1496275200000,"doc_count":1894,"interval_diff":{"value":-76}},{"key_as_string":"2017-05-01T00:00:00.000Z","key":1493596800000,"doc_count":1970,"interval_diff":{"value":566}},{"key_as_string":"2017-04-01T00:00:00.000Z","key":1491004800000,"doc_count":1404,"interval_diff":{"value":389}},{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":1015,"interval_diff":{"value":63}},{"key_as_string":"2017-02-01T00:00:00.000Z","key":1485907200000,"doc_count":952,"interval_diff":{"value":-104}},{"key_as_string":"2017-01-01T00:00:00.000Z","key":1483228800000,"doc_count":1056,"interval_diff":{"value":252}},{"key_as_string":"2016-12-01T00:00:00.000Z","key":1480550400000,"doc_count":804,"interval_diff":{"value":3}},{"key_as_string":"2016-11-01T00:00:00.000Z","key":1477958400000,"doc_count":801,"interval_diff":{"value":-260}},{"key_as_string":"2016-10-01T00:00:00.000Z","key":1475280000000,"doc_count":1061,"interval_diff":{"value":177}},{"key_as_string":"2016-09-01T00:00:00.000Z","key":1472688000000,"doc_count":884,"interval_diff":{"value":0}},{"key_as_string":"2016-08-01T00:00:00.000Z","key":1470009600000,"doc_count":884,"interval_diff":{"value":128}},{"key_as_string":"2016-07-01T00:00:00.000Z","key":1467331200000,"doc_count":756,"interval_diff":{"value":-136}},{"key_as_string":"2016-06-01T00:00:00.000Z","key":1464739200000,"doc_count":892,"interval_diff":{"value":114}},{"key_as_string":"2016-05-01T00:00:00.000Z","key":1462060800000,"doc_count":778,"interval_diff":{"value":1}},{"key_as_string":"2016-04-01T00:00:00.000Z","key":1459468800000,"doc_count":777,"interval_diff":{"value":-143}},{"key_as_string":"2016-03-01T00:00:00.000Z","key":1456790400000,"doc_count":920,"interval_diff":{"value":140}},{"key_as_string":"2016-02-01T00:00:00.000Z","key":1454284800000,"doc_count":780,"interval_diff":{"value":83}},{"key_as_string":"2016-01-01T00:00:00.000Z","key":1451606400000,"doc_count":697,"interval_diff":{"value":-37}},{"key_as_string":"2015-12-01T00:00:00.000Z","key":1448928000000,"doc_count":734,"interval_diff":{"value":70}},{"key_as_string":"2015-11-01T00:00:00.000Z","key":1446336000000,"doc_count":664,"interval_diff":{"value":-195}},{"key_as_string":"2015-10-01T00:00:00.000Z","key":1443657600000,"doc_count":859,"interval_diff":{"value":21}},{"key_as_string":"2015-09-01T00:00:00.000Z","key":1441065600000,"doc_count":838,"interval_diff":{"value":-36}},{"key_as_string":"2015-08-01T00:00:00.000Z","key":1438387200000,"doc_count":874,"interval_diff":{"value":70}},{"key_as_string":"2015-07-01T00:00:00.000Z","key":1435708800000,"doc_count":804,"interval_diff":{"value":97}},{"key_as_string":"2015-06-01T00:00:00.000Z","key":1433116800000,"doc_count":707,"interval_diff":{"value":-5}},{"key_as_string":"2015-05-01T00:00:00.000Z","key":1430438400000,"doc_count":712,"interval_diff":{"value":-91}},{"key_as_string":"2015-04-01T00:00:00.000Z","key":1427846400000,"doc_count":803,"interval_diff":{"value":-32}},{"key_as_string":"2015-03-01T00:00:00.000Z","key":1425168000000,"doc_count":835,"interval_diff":{"value":120}},{"key_as_string":"2015-02-01T00:00:00.000Z","key":1422748800000,"doc_count":715,"interval_diff":{"value":41}},{"key_as_string":"2015-01-01T00:00:00.000Z","key":1420070400000,"doc_count":674,"interval_diff":{"value":48}},{"key_as_string":"2014-12-01T00:00:00.000Z","key":1417392000000,"doc_count":626,"interval_diff":{"value":30}},{"key_as_string":"2014-11-01T00:00:00.000Z","key":1414800000000,"doc_count":596,"interval_diff":{"value":-121}},{"key_as_string":"2014-10-01T00:00:00.000Z","key":1412121600000,"doc_count":717,"interval_diff":{"value":10}},{"key_as_string":"2014-09-01T00:00:00.000Z","key":1409529600000,"doc_count":707,"interval_diff":{"value":10}},{"key_as_string":"2014-08-01T00:00:00.000Z","key":1406851200000,"doc_count":697,"interval_diff":{"value":-12}},{"key_as_string":"2014-07-01T00:00:00.000Z","key":1404172800000,"doc_count":709,"interval_diff":{"value":57}},{"key_as_string":"2014-06-01T00:00:00.000Z","key":1401580800000,"doc_count":652,"interval_diff":{"value":24}},{"key_as_string":"2014-05-01T00:00:00.000Z","key":1398902400000,"doc_count":628,"interval_diff":{"value":-53}},{"key_as_string":"2014-04-01T00:00:00.000Z","key":1396310400000,"doc_count":681,"interval_diff":{"value":-34}},{"key_as_string":"2014-03-01T00:00:00.000Z","key":1393632000000,"doc_count":715,"interval_diff":{"value":34}},{"key_as_string":"2014-02-01T00:00:00.000Z","key":1391212800000,"doc_count":681,"interval_diff":{"value":19}},{"key_as_string":"2014-01-01T00:00:00.000Z","key":1388534400000,"doc_count":662,"interval_diff":{"value":207}},{"key_as_string":"2013-12-01T00:00:00.000Z","key":1385856000000,"doc_count":455,"interval_diff":{"value":-3}},{"key_as_string":"2013-11-01T00:00:00.000Z","key":1383264000000,"doc_count":458,"interval_diff":{"value":61}},{"key_as_string":"2013-10-01T00:00:00.000Z","key":1380585600000,"doc_count":397,"interval_diff":{"value":-56}},{"key_as_string":"2013-09-01T00:00:00.000Z","key":1377993600000,"doc_count":453,"interval_diff":{"value":12}},{"key_as_string":"2013-08-01T00:00:00.000Z","key":1375315200000,"doc_count":441,"interval_diff":{"value":67}},{"key_as_string":"2013-07-01T00:00:00.000Z","key":1372636800000,"doc_count":374,"interval_diff":{"value":40}},{"key_as_string":"2013-06-01T00:00:00.000Z","key":1370044800000,"doc_count":334,"interval_diff":{"value":3}},{"key_as_string":"2013-05-01T00:00:00.000Z","key":1367366400000,"doc_count":331,"interval_diff":{"value":-10}},{"key_as_string":"2013-04-01T00:00:00.000Z","key":1364774400000,"doc_count":341,"interval_diff":{"value":57}},{"key_as_string":"2013-03-01T00:00:00.000Z","key":1362096000000,"doc_count":284,"interval_diff":{"value":12}},{"key_as_string":"2013-02-01T00:00:00.000Z","key":1359676800000,"doc_count":272,"interval_diff":{"value":17}},{"key_as_string":"2013-01-01T00:00:00.000Z","key":1356998400000,"doc_count":255,"interval_diff":{"value":40}},{"key_as_string":"2012-12-01T00:00:00.000Z","key":1354320000000,"doc_count":215,"interval_diff":{"value":-8}},{"key_as_string":"2012-11-01T00:00:00.000Z","key":1351728000000,"doc_count":223,"interval_diff":{"value":-29}},{"key_as_string":"2012-10-01T00:00:00.000Z","key":1349049600000,"doc_count":252,"interval_diff":{"value":103}},{"key_as_string":"2012-09-01T00:00:00.000Z","key":1346457600000,"doc_count":149,"interval_diff":{"value":-60}},{"key_as_string":"2012-08-01T00:00:00.000Z","key":1343779200000,"doc_count":209,"interval_diff":{"value":-32}},{"key_as_string":"2012-07-01T00:00:00.000Z","key":1341100800000,"doc_count":241,"interval_diff":{"value":26}},{"key_as_string":"2012-06-01T00:00:00.000Z","key":1338508800000,"doc_count":215,"interval_diff":{"value":37}},{"key_as_string":"2012-05-01T00:00:00.000Z","key":1335830400000,"doc_count":178,"interval_diff":{"value":-11}},{"key_as_string":"2012-04-01T00:00:00.000Z","key":1333238400000,"doc_count":189,"interval_diff":{"value":-1}},{"key_as_string":"2012-03-01T00:00:00.000Z","key":1330560000000,"doc_count":190,"interval_diff":{"value":96}},{"key_as_string":"2012-02-01T00:00:00.000Z","key":1328054400000,"doc_count":94,"interval_diff":{"value":-27}},{"key_as_string":"2012-01-01T00:00:00.000Z","key":1325376000000,"doc_count":121,"interval_diff":{"value":29}},{"key_as_string":"2011-12-01T00:00:00.000Z","key":1322697600000,"doc_count":92}]}},{"key":"Older American","doc_count":88223,"trend_period":{"buckets":[{"key_as_string":"2020-05-01T00:00:00.000Z","key":1588291200000,"doc_count":219,"interval_diff":{"value":-815}},{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":1034,"interval_diff":{"value":-65}},{"key_as_string":"2020-03-01T00:00:00.000Z","key":1583020800000,"doc_count":1099,"interval_diff":{"value":104}},{"key_as_string":"2020-02-01T00:00:00.000Z","key":1580515200000,"doc_count":995,"interval_diff":{"value":67}},{"key_as_string":"2020-01-01T00:00:00.000Z","key":1577836800000,"doc_count":928,"interval_diff":{"value":113}},{"key_as_string":"2019-12-01T00:00:00.000Z","key":1575158400000,"doc_count":815,"interval_diff":{"value":-11}},{"key_as_string":"2019-11-01T00:00:00.000Z","key":1572566400000,"doc_count":826,"interval_diff":{"value":-133}},{"key_as_string":"2019-10-01T00:00:00.000Z","key":1569888000000,"doc_count":959,"interval_diff":{"value":11}},{"key_as_string":"2019-09-01T00:00:00.000Z","key":1567296000000,"doc_count":948,"interval_diff":{"value":-90}},{"key_as_string":"2019-08-01T00:00:00.000Z","key":1564617600000,"doc_count":1038,"interval_diff":{"value":108}},{"key_as_string":"2019-07-01T00:00:00.000Z","key":1561939200000,"doc_count":930,"interval_diff":{"value":-1}},{"key_as_string":"2019-06-01T00:00:00.000Z","key":1559347200000,"doc_count":931,"interval_diff":{"value":-24}},{"key_as_string":"2019-05-01T00:00:00.000Z","key":1556668800000,"doc_count":955,"interval_diff":{"value":-52}},{"key_as_string":"2019-04-01T00:00:00.000Z","key":1554076800000,"doc_count":1007,"interval_diff":{"value":6}},{"key_as_string":"2019-03-01T00:00:00.000Z","key":1551398400000,"doc_count":1001,"interval_diff":{"value":224}},{"key_as_string":"2019-02-01T00:00:00.000Z","key":1548979200000,"doc_count":777,"interval_diff":{"value":83}},{"key_as_string":"2019-01-01T00:00:00.000Z","key":1546300800000,"doc_count":694,"interval_diff":{"value":131}},{"key_as_string":"2018-12-01T00:00:00.000Z","key":1543622400000,"doc_count":563,"interval_diff":{"value":18}},{"key_as_string":"2018-11-01T00:00:00.000Z","key":1541030400000,"doc_count":545,"interval_diff":{"value":-49}},{"key_as_string":"2018-10-01T00:00:00.000Z","key":1538352000000,"doc_count":594,"interval_diff":{"value":58}},{"key_as_string":"2018-09-01T00:00:00.000Z","key":1535760000000,"doc_count":536,"interval_diff":{"value":-82}},{"key_as_string":"2018-08-01T00:00:00.000Z","key":1533081600000,"doc_count":618,"interval_diff":{"value":45}},{"key_as_string":"2018-07-01T00:00:00.000Z","key":1530403200000,"doc_count":573,"interval_diff":{"value":21}},{"key_as_string":"2018-06-01T00:00:00.000Z","key":1527811200000,"doc_count":552,"interval_diff":{"value":-45}},{"key_as_string":"2018-05-01T00:00:00.000Z","key":1525132800000,"doc_count":597,"interval_diff":{"value":87}},{"key_as_string":"2018-04-01T00:00:00.000Z","key":1522540800000,"doc_count":510,"interval_diff":{"value":-81}},{"key_as_string":"2018-03-01T00:00:00.000Z","key":1519862400000,"doc_count":591,"interval_diff":{"value":36}},{"key_as_string":"2018-02-01T00:00:00.000Z","key":1517443200000,"doc_count":555,"interval_diff":{"value":-31}},{"key_as_string":"2018-01-01T00:00:00.000Z","key":1514764800000,"doc_count":586,"interval_diff":{"value":106}},{"key_as_string":"2017-12-01T00:00:00.000Z","key":1512086400000,"doc_count":480,"interval_diff":{"value":-28}},{"key_as_string":"2017-11-01T00:00:00.000Z","key":1509494400000,"doc_count":508,"interval_diff":{"value":-135}},{"key_as_string":"2017-10-01T00:00:00.000Z","key":1506816000000,"doc_count":643,"interval_diff":{"value":-34}},{"key_as_string":"2017-09-01T00:00:00.000Z","key":1504224000000,"doc_count":677,"interval_diff":{"value":72}},{"key_as_string":"2017-08-01T00:00:00.000Z","key":1501545600000,"doc_count":605,"interval_diff":{"value":37}},{"key_as_string":"2017-07-01T00:00:00.000Z","key":1498867200000,"doc_count":568,"interval_diff":{"value":13}},{"key_as_string":"2017-06-01T00:00:00.000Z","key":1496275200000,"doc_count":555,"interval_diff":{"value":-34}},{"key_as_string":"2017-05-01T00:00:00.000Z","key":1493596800000,"doc_count":589,"interval_diff":{"value":-417}},{"key_as_string":"2017-04-01T00:00:00.000Z","key":1491004800000,"doc_count":1006,"interval_diff":{"value":-355}},{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":1361,"interval_diff":{"value":9}},{"key_as_string":"2017-02-01T00:00:00.000Z","key":1485907200000,"doc_count":1352,"interval_diff":{"value":-52}},{"key_as_string":"2017-01-01T00:00:00.000Z","key":1483228800000,"doc_count":1404,"interval_diff":{"value":224}},{"key_as_string":"2016-12-01T00:00:00.000Z","key":1480550400000,"doc_count":1180,"interval_diff":{"value":-104}},{"key_as_string":"2016-11-01T00:00:00.000Z","key":1477958400000,"doc_count":1284,"interval_diff":{"value":-184}},{"key_as_string":"2016-10-01T00:00:00.000Z","key":1475280000000,"doc_count":1468,"interval_diff":{"value":-149}},{"key_as_string":"2016-09-01T00:00:00.000Z","key":1472688000000,"doc_count":1617,"interval_diff":{"value":195}},{"key_as_string":"2016-08-01T00:00:00.000Z","key":1470009600000,"doc_count":1422,"interval_diff":{"value":172}},{"key_as_string":"2016-07-01T00:00:00.000Z","key":1467331200000,"doc_count":1250,"interval_diff":{"value":-70}},{"key_as_string":"2016-06-01T00:00:00.000Z","key":1464739200000,"doc_count":1320,"interval_diff":{"value":-6}},{"key_as_string":"2016-05-01T00:00:00.000Z","key":1462060800000,"doc_count":1326,"interval_diff":{"value":19}},{"key_as_string":"2016-04-01T00:00:00.000Z","key":1459468800000,"doc_count":1307,"interval_diff":{"value":-55}},{"key_as_string":"2016-03-01T00:00:00.000Z","key":1456790400000,"doc_count":1362,"interval_diff":{"value":163}},{"key_as_string":"2016-02-01T00:00:00.000Z","key":1454284800000,"doc_count":1199,"interval_diff":{"value":-57}},{"key_as_string":"2016-01-01T00:00:00.000Z","key":1451606400000,"doc_count":1256,"interval_diff":{"value":116}},{"key_as_string":"2015-12-01T00:00:00.000Z","key":1448928000000,"doc_count":1140,"interval_diff":{"value":-65}},{"key_as_string":"2015-11-01T00:00:00.000Z","key":1446336000000,"doc_count":1205,"interval_diff":{"value":-38}},{"key_as_string":"2015-10-01T00:00:00.000Z","key":1443657600000,"doc_count":1243,"interval_diff":{"value":-114}},{"key_as_string":"2015-09-01T00:00:00.000Z","key":1441065600000,"doc_count":1357,"interval_diff":{"value":-82}},{"key_as_string":"2015-08-01T00:00:00.000Z","key":1438387200000,"doc_count":1439,"interval_diff":{"value":-3}},{"key_as_string":"2015-07-01T00:00:00.000Z","key":1435708800000,"doc_count":1442,"interval_diff":{"value":271}},{"key_as_string":"2015-06-01T00:00:00.000Z","key":1433116800000,"doc_count":1171,"interval_diff":{"value":77}},{"key_as_string":"2015-05-01T00:00:00.000Z","key":1430438400000,"doc_count":1094,"interval_diff":{"value":-67}},{"key_as_string":"2015-04-01T00:00:00.000Z","key":1427846400000,"doc_count":1161,"interval_diff":{"value":-74}},{"key_as_string":"2015-03-01T00:00:00.000Z","key":1425168000000,"doc_count":1235,"interval_diff":{"value":199}},{"key_as_string":"2015-02-01T00:00:00.000Z","key":1422748800000,"doc_count":1036,"interval_diff":{"value":6}},{"key_as_string":"2015-01-01T00:00:00.000Z","key":1420070400000,"doc_count":1030,"interval_diff":{"value":77}},{"key_as_string":"2014-12-01T00:00:00.000Z","key":1417392000000,"doc_count":953,"interval_diff":{"value":52}},{"key_as_string":"2014-11-01T00:00:00.000Z","key":1414800000000,"doc_count":901,"interval_diff":{"value":-154}},{"key_as_string":"2014-10-01T00:00:00.000Z","key":1412121600000,"doc_count":1055,"interval_diff":{"value":38}},{"key_as_string":"2014-09-01T00:00:00.000Z","key":1409529600000,"doc_count":1017,"interval_diff":{"value":-88}},{"key_as_string":"2014-08-01T00:00:00.000Z","key":1406851200000,"doc_count":1105,"interval_diff":{"value":-31}},{"key_as_string":"2014-07-01T00:00:00.000Z","key":1404172800000,"doc_count":1136,"interval_diff":{"value":142}},{"key_as_string":"2014-06-01T00:00:00.000Z","key":1401580800000,"doc_count":994,"interval_diff":{"value":-29}},{"key_as_string":"2014-05-01T00:00:00.000Z","key":1398902400000,"doc_count":1023,"interval_diff":{"value":-96}},{"key_as_string":"2014-04-01T00:00:00.000Z","key":1396310400000,"doc_count":1119,"interval_diff":{"value":-82}},{"key_as_string":"2014-03-01T00:00:00.000Z","key":1393632000000,"doc_count":1201,"interval_diff":{"value":118}},{"key_as_string":"2014-02-01T00:00:00.000Z","key":1391212800000,"doc_count":1083,"interval_diff":{"value":-16}},{"key_as_string":"2014-01-01T00:00:00.000Z","key":1388534400000,"doc_count":1099,"interval_diff":{"value":453}},{"key_as_string":"2013-12-01T00:00:00.000Z","key":1385856000000,"doc_count":646,"interval_diff":{"value":-160}},{"key_as_string":"2013-11-01T00:00:00.000Z","key":1383264000000,"doc_count":806,"interval_diff":{"value":22}},{"key_as_string":"2013-10-01T00:00:00.000Z","key":1380585600000,"doc_count":784,"interval_diff":{"value":-30}},{"key_as_string":"2013-09-01T00:00:00.000Z","key":1377993600000,"doc_count":814,"interval_diff":{"value":-13}},{"key_as_string":"2013-08-01T00:00:00.000Z","key":1375315200000,"doc_count":827,"interval_diff":{"value":11}},{"key_as_string":"2013-07-01T00:00:00.000Z","key":1372636800000,"doc_count":816,"interval_diff":{"value":185}},{"key_as_string":"2013-06-01T00:00:00.000Z","key":1370044800000,"doc_count":631,"interval_diff":{"value":-4}},{"key_as_string":"2013-05-01T00:00:00.000Z","key":1367366400000,"doc_count":635,"interval_diff":{"value":-88}},{"key_as_string":"2013-04-01T00:00:00.000Z","key":1364774400000,"doc_count":723,"interval_diff":{"value":101}},{"key_as_string":"2013-03-01T00:00:00.000Z","key":1362096000000,"doc_count":622,"interval_diff":{"value":97}},{"key_as_string":"2013-02-01T00:00:00.000Z","key":1359676800000,"doc_count":525,"interval_diff":{"value":-87}},{"key_as_string":"2013-01-01T00:00:00.000Z","key":1356998400000,"doc_count":612,"interval_diff":{"value":258}},{"key_as_string":"2012-12-01T00:00:00.000Z","key":1354320000000,"doc_count":354,"interval_diff":{"value":-27}},{"key_as_string":"2012-11-01T00:00:00.000Z","key":1351728000000,"doc_count":381,"interval_diff":{"value":-70}},{"key_as_string":"2012-10-01T00:00:00.000Z","key":1349049600000,"doc_count":451,"interval_diff":{"value":111}},{"key_as_string":"2012-09-01T00:00:00.000Z","key":1346457600000,"doc_count":340,"interval_diff":{"value":-101}},{"key_as_string":"2012-08-01T00:00:00.000Z","key":1343779200000,"doc_count":441,"interval_diff":{"value":-1}},{"key_as_string":"2012-07-01T00:00:00.000Z","key":1341100800000,"doc_count":442,"interval_diff":{"value":26}},{"key_as_string":"2012-06-01T00:00:00.000Z","key":1338508800000,"doc_count":416,"interval_diff":{"value":55}},{"key_as_string":"2012-05-01T00:00:00.000Z","key":1335830400000,"doc_count":361,"interval_diff":{"value":38}},{"key_as_string":"2012-04-01T00:00:00.000Z","key":1333238400000,"doc_count":323,"interval_diff":{"value":-110}},{"key_as_string":"2012-03-01T00:00:00.000Z","key":1330560000000,"doc_count":433,"interval_diff":{"value":177}},{"key_as_string":"2012-02-01T00:00:00.000Z","key":1328054400000,"doc_count":256,"interval_diff":{"value":-114}},{"key_as_string":"2012-01-01T00:00:00.000Z","key":1325376000000,"doc_count":370,"interval_diff":{"value":110}},{"key_as_string":"2011-12-01T00:00:00.000Z","key":1322697600000,"doc_count":260}]}},{"key":"Older American, Servicemember","doc_count":18173,"trend_period":{"buckets":[{"key_as_string":"2020-05-01T00:00:00.000Z","key":1588291200000,"doc_count":59,"interval_diff":{"value":-215}},{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":274,"interval_diff":{"value":-33}},{"key_as_string":"2020-03-01T00:00:00.000Z","key":1583020800000,"doc_count":307,"interval_diff":{"value":-20}},{"key_as_string":"2020-02-01T00:00:00.000Z","key":1580515200000,"doc_count":327,"interval_diff":{"value":8}},{"key_as_string":"2020-01-01T00:00:00.000Z","key":1577836800000,"doc_count":319,"interval_diff":{"value":73}},{"key_as_string":"2019-12-01T00:00:00.000Z","key":1575158400000,"doc_count":246,"interval_diff":{"value":-23}},{"key_as_string":"2019-11-01T00:00:00.000Z","key":1572566400000,"doc_count":269,"interval_diff":{"value":-68}},{"key_as_string":"2019-10-01T00:00:00.000Z","key":1569888000000,"doc_count":337,"interval_diff":{"value":45}},{"key_as_string":"2019-09-01T00:00:00.000Z","key":1567296000000,"doc_count":292,"interval_diff":{"value":-32}},{"key_as_string":"2019-08-01T00:00:00.000Z","key":1564617600000,"doc_count":324,"interval_diff":{"value":-2}},{"key_as_string":"2019-07-01T00:00:00.000Z","key":1561939200000,"doc_count":326,"interval_diff":{"value":14}},{"key_as_string":"2019-06-01T00:00:00.000Z","key":1559347200000,"doc_count":312,"interval_diff":{"value":-3}},{"key_as_string":"2019-05-01T00:00:00.000Z","key":1556668800000,"doc_count":315,"interval_diff":{"value":16}},{"key_as_string":"2019-04-01T00:00:00.000Z","key":1554076800000,"doc_count":299,"interval_diff":{"value":7}},{"key_as_string":"2019-03-01T00:00:00.000Z","key":1551398400000,"doc_count":292,"interval_diff":{"value":-8}},{"key_as_string":"2019-02-01T00:00:00.000Z","key":1548979200000,"doc_count":300,"interval_diff":{"value":98}},{"key_as_string":"2019-01-01T00:00:00.000Z","key":1546300800000,"doc_count":202,"interval_diff":{"value":2}},{"key_as_string":"2018-12-01T00:00:00.000Z","key":1543622400000,"doc_count":200,"interval_diff":{"value":30}},{"key_as_string":"2018-11-01T00:00:00.000Z","key":1541030400000,"doc_count":170,"interval_diff":{"value":-41}},{"key_as_string":"2018-10-01T00:00:00.000Z","key":1538352000000,"doc_count":211,"interval_diff":{"value":-14}},{"key_as_string":"2018-09-01T00:00:00.000Z","key":1535760000000,"doc_count":225,"interval_diff":{"value":6}},{"key_as_string":"2018-08-01T00:00:00.000Z","key":1533081600000,"doc_count":219,"interval_diff":{"value":-10}},{"key_as_string":"2018-07-01T00:00:00.000Z","key":1530403200000,"doc_count":229,"interval_diff":{"value":26}},{"key_as_string":"2018-06-01T00:00:00.000Z","key":1527811200000,"doc_count":203,"interval_diff":{"value":-3}},{"key_as_string":"2018-05-01T00:00:00.000Z","key":1525132800000,"doc_count":206,"interval_diff":{"value":-11}},{"key_as_string":"2018-04-01T00:00:00.000Z","key":1522540800000,"doc_count":217,"interval_diff":{"value":-3}},{"key_as_string":"2018-03-01T00:00:00.000Z","key":1519862400000,"doc_count":220,"interval_diff":{"value":20}},{"key_as_string":"2018-02-01T00:00:00.000Z","key":1517443200000,"doc_count":200,"interval_diff":{"value":0}},{"key_as_string":"2018-01-01T00:00:00.000Z","key":1514764800000,"doc_count":200,"interval_diff":{"value":-14}},{"key_as_string":"2017-12-01T00:00:00.000Z","key":1512086400000,"doc_count":214,"interval_diff":{"value":2}},{"key_as_string":"2017-11-01T00:00:00.000Z","key":1509494400000,"doc_count":212,"interval_diff":{"value":-36}},{"key_as_string":"2017-10-01T00:00:00.000Z","key":1506816000000,"doc_count":248,"interval_diff":{"value":-10}},{"key_as_string":"2017-09-01T00:00:00.000Z","key":1504224000000,"doc_count":258,"interval_diff":{"value":26}},{"key_as_string":"2017-08-01T00:00:00.000Z","key":1501545600000,"doc_count":232,"interval_diff":{"value":3}},{"key_as_string":"2017-07-01T00:00:00.000Z","key":1498867200000,"doc_count":229,"interval_diff":{"value":6}},{"key_as_string":"2017-06-01T00:00:00.000Z","key":1496275200000,"doc_count":223,"interval_diff":{"value":34}},{"key_as_string":"2017-05-01T00:00:00.000Z","key":1493596800000,"doc_count":189,"interval_diff":{"value":6}},{"key_as_string":"2017-04-01T00:00:00.000Z","key":1491004800000,"doc_count":183,"interval_diff":{"value":-3}},{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":186,"interval_diff":{"value":22}},{"key_as_string":"2017-02-01T00:00:00.000Z","key":1485907200000,"doc_count":164,"interval_diff":{"value":-14}},{"key_as_string":"2017-01-01T00:00:00.000Z","key":1483228800000,"doc_count":178,"interval_diff":{"value":18}},{"key_as_string":"2016-12-01T00:00:00.000Z","key":1480550400000,"doc_count":160,"interval_diff":{"value":-17}},{"key_as_string":"2016-11-01T00:00:00.000Z","key":1477958400000,"doc_count":177,"interval_diff":{"value":-13}},{"key_as_string":"2016-10-01T00:00:00.000Z","key":1475280000000,"doc_count":190,"interval_diff":{"value":-29}},{"key_as_string":"2016-09-01T00:00:00.000Z","key":1472688000000,"doc_count":219,"interval_diff":{"value":-13}},{"key_as_string":"2016-08-01T00:00:00.000Z","key":1470009600000,"doc_count":232,"interval_diff":{"value":53}},{"key_as_string":"2016-07-01T00:00:00.000Z","key":1467331200000,"doc_count":179,"interval_diff":{"value":-6}},{"key_as_string":"2016-06-01T00:00:00.000Z","key":1464739200000,"doc_count":185,"interval_diff":{"value":-16}},{"key_as_string":"2016-05-01T00:00:00.000Z","key":1462060800000,"doc_count":201,"interval_diff":{"value":0}},{"key_as_string":"2016-04-01T00:00:00.000Z","key":1459468800000,"doc_count":201,"interval_diff":{"value":-27}},{"key_as_string":"2016-03-01T00:00:00.000Z","key":1456790400000,"doc_count":228,"interval_diff":{"value":19}},{"key_as_string":"2016-02-01T00:00:00.000Z","key":1454284800000,"doc_count":209,"interval_diff":{"value":0}},{"key_as_string":"2016-01-01T00:00:00.000Z","key":1451606400000,"doc_count":209,"interval_diff":{"value":18}},{"key_as_string":"2015-12-01T00:00:00.000Z","key":1448928000000,"doc_count":191,"interval_diff":{"value":5}},{"key_as_string":"2015-11-01T00:00:00.000Z","key":1446336000000,"doc_count":186,"interval_diff":{"value":-23}},{"key_as_string":"2015-10-01T00:00:00.000Z","key":1443657600000,"doc_count":209,"interval_diff":{"value":-22}},{"key_as_string":"2015-09-01T00:00:00.000Z","key":1441065600000,"doc_count":231,"interval_diff":{"value":45}},{"key_as_string":"2015-08-01T00:00:00.000Z","key":1438387200000,"doc_count":186,"interval_diff":{"value":-28}},{"key_as_string":"2015-07-01T00:00:00.000Z","key":1435708800000,"doc_count":214,"interval_diff":{"value":28}},{"key_as_string":"2015-06-01T00:00:00.000Z","key":1433116800000,"doc_count":186,"interval_diff":{"value":26}},{"key_as_string":"2015-05-01T00:00:00.000Z","key":1430438400000,"doc_count":160,"interval_diff":{"value":-28}},{"key_as_string":"2015-04-01T00:00:00.000Z","key":1427846400000,"doc_count":188,"interval_diff":{"value":3}},{"key_as_string":"2015-03-01T00:00:00.000Z","key":1425168000000,"doc_count":185,"interval_diff":{"value":11}},{"key_as_string":"2015-02-01T00:00:00.000Z","key":1422748800000,"doc_count":174,"interval_diff":{"value":34}},{"key_as_string":"2015-01-01T00:00:00.000Z","key":1420070400000,"doc_count":140,"interval_diff":{"value":-30}},{"key_as_string":"2014-12-01T00:00:00.000Z","key":1417392000000,"doc_count":170,"interval_diff":{"value":24}},{"key_as_string":"2014-11-01T00:00:00.000Z","key":1414800000000,"doc_count":146,"interval_diff":{"value":-15}},{"key_as_string":"2014-10-01T00:00:00.000Z","key":1412121600000,"doc_count":161,"interval_diff":{"value":-9}},{"key_as_string":"2014-09-01T00:00:00.000Z","key":1409529600000,"doc_count":170,"interval_diff":{"value":20}},{"key_as_string":"2014-08-01T00:00:00.000Z","key":1406851200000,"doc_count":150,"interval_diff":{"value":-41}},{"key_as_string":"2014-07-01T00:00:00.000Z","key":1404172800000,"doc_count":191,"interval_diff":{"value":59}},{"key_as_string":"2014-06-01T00:00:00.000Z","key":1401580800000,"doc_count":132,"interval_diff":{"value":-31}},{"key_as_string":"2014-05-01T00:00:00.000Z","key":1398902400000,"doc_count":163,"interval_diff":{"value":-18}},{"key_as_string":"2014-04-01T00:00:00.000Z","key":1396310400000,"doc_count":181,"interval_diff":{"value":25}},{"key_as_string":"2014-03-01T00:00:00.000Z","key":1393632000000,"doc_count":156,"interval_diff":{"value":15}},{"key_as_string":"2014-02-01T00:00:00.000Z","key":1391212800000,"doc_count":141,"interval_diff":{"value":-29}},{"key_as_string":"2014-01-01T00:00:00.000Z","key":1388534400000,"doc_count":170,"interval_diff":{"value":25}},{"key_as_string":"2013-12-01T00:00:00.000Z","key":1385856000000,"doc_count":145,"interval_diff":{"value":11}},{"key_as_string":"2013-11-01T00:00:00.000Z","key":1383264000000,"doc_count":134,"interval_diff":{"value":31}},{"key_as_string":"2013-10-01T00:00:00.000Z","key":1380585600000,"doc_count":103,"interval_diff":{"value":-27}},{"key_as_string":"2013-09-01T00:00:00.000Z","key":1377993600000,"doc_count":130,"interval_diff":{"value":-15}},{"key_as_string":"2013-08-01T00:00:00.000Z","key":1375315200000,"doc_count":145,"interval_diff":{"value":37}},{"key_as_string":"2013-07-01T00:00:00.000Z","key":1372636800000,"doc_count":108,"interval_diff":{"value":31}},{"key_as_string":"2013-06-01T00:00:00.000Z","key":1370044800000,"doc_count":77,"interval_diff":{"value":3}},{"key_as_string":"2013-05-01T00:00:00.000Z","key":1367366400000,"doc_count":74,"interval_diff":{"value":-26}},{"key_as_string":"2013-04-01T00:00:00.000Z","key":1364774400000,"doc_count":100,"interval_diff":{"value":32}},{"key_as_string":"2013-03-01T00:00:00.000Z","key":1362096000000,"doc_count":68,"interval_diff":{"value":9}},{"key_as_string":"2013-02-01T00:00:00.000Z","key":1359676800000,"doc_count":59,"interval_diff":{"value":-16}},{"key_as_string":"2013-01-01T00:00:00.000Z","key":1356998400000,"doc_count":75,"interval_diff":{"value":25}},{"key_as_string":"2012-12-01T00:00:00.000Z","key":1354320000000,"doc_count":50,"interval_diff":{"value":3}},{"key_as_string":"2012-11-01T00:00:00.000Z","key":1351728000000,"doc_count":47,"interval_diff":{"value":9}},{"key_as_string":"2012-10-01T00:00:00.000Z","key":1349049600000,"doc_count":38,"interval_diff":{"value":7}},{"key_as_string":"2012-09-01T00:00:00.000Z","key":1346457600000,"doc_count":31,"interval_diff":{"value":-16}},{"key_as_string":"2012-08-01T00:00:00.000Z","key":1343779200000,"doc_count":47,"interval_diff":{"value":-14}},{"key_as_string":"2012-07-01T00:00:00.000Z","key":1341100800000,"doc_count":61,"interval_diff":{"value":12}},{"key_as_string":"2012-06-01T00:00:00.000Z","key":1338508800000,"doc_count":49,"interval_diff":{"value":-4}},{"key_as_string":"2012-05-01T00:00:00.000Z","key":1335830400000,"doc_count":53,"interval_diff":{"value":-9}},{"key_as_string":"2012-04-01T00:00:00.000Z","key":1333238400000,"doc_count":62,"interval_diff":{"value":23}},{"key_as_string":"2012-03-01T00:00:00.000Z","key":1330560000000,"doc_count":39,"interval_diff":{"value":13}},{"key_as_string":"2012-02-01T00:00:00.000Z","key":1328054400000,"doc_count":26,"interval_diff":{"value":-10}},{"key_as_string":"2012-01-01T00:00:00.000Z","key":1325376000000,"doc_count":36,"interval_diff":{"value":7}},{"key_as_string":"2011-12-01T00:00:00.000Z","key":1322697600000,"doc_count":29}]}}]}},"dateRangeBuckets":{"doc_count":1599733,"dateRangeBuckets":{"buckets":[{"key_as_string":"2011-12-01T00:00:00.000Z","key":1322697600000,"doc_count":2536},{"key_as_string":"2012-01-01T00:00:00.000Z","key":1325376000000,"doc_count":3230},{"key_as_string":"2012-02-01T00:00:00.000Z","key":1328054400000,"doc_count":3509},{"key_as_string":"2012-03-01T00:00:00.000Z","key":1330560000000,"doc_count":6230},{"key_as_string":"2012-04-01T00:00:00.000Z","key":1333238400000,"doc_count":5703},{"key_as_string":"2012-05-01T00:00:00.000Z","key":1335830400000,"doc_count":7617},{"key_as_string":"2012-06-01T00:00:00.000Z","key":1338508800000,"doc_count":7841},{"key_as_string":"2012-07-01T00:00:00.000Z","key":1341100800000,"doc_count":6755},{"key_as_string":"2012-08-01T00:00:00.000Z","key":1343779200000,"doc_count":6877},{"key_as_string":"2012-09-01T00:00:00.000Z","key":1346457600000,"doc_count":5493},{"key_as_string":"2012-10-01T00:00:00.000Z","key":1349049600000,"doc_count":6741},{"key_as_string":"2012-11-01T00:00:00.000Z","key":1351728000000,"doc_count":6139},{"key_as_string":"2012-12-01T00:00:00.000Z","key":1354320000000,"doc_count":6238},{"key_as_string":"2013-01-01T00:00:00.000Z","key":1356998400000,"doc_count":9741},{"key_as_string":"2013-02-01T00:00:00.000Z","key":1359676800000,"doc_count":8349},{"key_as_string":"2013-03-01T00:00:00.000Z","key":1362096000000,"doc_count":8784},{"key_as_string":"2013-04-01T00:00:00.000Z","key":1364774400000,"doc_count":8632},{"key_as_string":"2013-05-01T00:00:00.000Z","key":1367366400000,"doc_count":8170},{"key_as_string":"2013-06-01T00:00:00.000Z","key":1370044800000,"doc_count":8035},{"key_as_string":"2013-07-01T00:00:00.000Z","key":1372636800000,"doc_count":9271},{"key_as_string":"2013-08-01T00:00:00.000Z","key":1375315200000,"doc_count":9565},{"key_as_string":"2013-09-01T00:00:00.000Z","key":1377993600000,"doc_count":9636},{"key_as_string":"2013-10-01T00:00:00.000Z","key":1380585600000,"doc_count":9241},{"key_as_string":"2013-11-01T00:00:00.000Z","key":1383264000000,"doc_count":9319},{"key_as_string":"2013-12-01T00:00:00.000Z","key":1385856000000,"doc_count":9474},{"key_as_string":"2014-01-01T00:00:00.000Z","key":1388534400000,"doc_count":12617},{"key_as_string":"2014-02-01T00:00:00.000Z","key":1391212800000,"doc_count":13048},{"key_as_string":"2014-03-01T00:00:00.000Z","key":1393632000000,"doc_count":13943},{"key_as_string":"2014-04-01T00:00:00.000Z","key":1396310400000,"doc_count":13840},{"key_as_string":"2014-05-01T00:00:00.000Z","key":1398902400000,"doc_count":12167},{"key_as_string":"2014-06-01T00:00:00.000Z","key":1401580800000,"doc_count":12520},{"key_as_string":"2014-07-01T00:00:00.000Z","key":1404172800000,"doc_count":13415},{"key_as_string":"2014-08-01T00:00:00.000Z","key":1406851200000,"doc_count":13186},{"key_as_string":"2014-09-01T00:00:00.000Z","key":1409529600000,"doc_count":12465},{"key_as_string":"2014-10-01T00:00:00.000Z","key":1412121600000,"doc_count":12901},{"key_as_string":"2014-11-01T00:00:00.000Z","key":1414800000000,"doc_count":11257},{"key_as_string":"2014-12-01T00:00:00.000Z","key":1417392000000,"doc_count":11684},{"key_as_string":"2015-01-01T00:00:00.000Z","key":1420070400000,"doc_count":12627},{"key_as_string":"2015-02-01T00:00:00.000Z","key":1422748800000,"doc_count":12680},{"key_as_string":"2015-03-01T00:00:00.000Z","key":1425168000000,"doc_count":14514},{"key_as_string":"2015-04-01T00:00:00.000Z","key":1427846400000,"doc_count":13753},{"key_as_string":"2015-05-01T00:00:00.000Z","key":1430438400000,"doc_count":13682},{"key_as_string":"2015-06-01T00:00:00.000Z","key":1433116800000,"doc_count":14517},{"key_as_string":"2015-07-01T00:00:00.000Z","key":1435708800000,"doc_count":15920},{"key_as_string":"2015-08-01T00:00:00.000Z","key":1438387200000,"doc_count":15766},{"key_as_string":"2015-09-01T00:00:00.000Z","key":1441065600000,"doc_count":14336},{"key_as_string":"2015-10-01T00:00:00.000Z","key":1443657600000,"doc_count":14899},{"key_as_string":"2015-11-01T00:00:00.000Z","key":1446336000000,"doc_count":12897},{"key_as_string":"2015-12-01T00:00:00.000Z","key":1448928000000,"doc_count":12884},{"key_as_string":"2016-01-01T00:00:00.000Z","key":1451606400000,"doc_count":13840},{"key_as_string":"2016-02-01T00:00:00.000Z","key":1454284800000,"doc_count":14140},{"key_as_string":"2016-03-01T00:00:00.000Z","key":1456790400000,"doc_count":16611},{"key_as_string":"2016-04-01T00:00:00.000Z","key":1459468800000,"doc_count":15608},{"key_as_string":"2016-05-01T00:00:00.000Z","key":1462060800000,"doc_count":15517},{"key_as_string":"2016-06-01T00:00:00.000Z","key":1464739200000,"doc_count":16063},{"key_as_string":"2016-07-01T00:00:00.000Z","key":1467331200000,"doc_count":16043},{"key_as_string":"2016-08-01T00:00:00.000Z","key":1470009600000,"doc_count":17694},{"key_as_string":"2016-09-01T00:00:00.000Z","key":1472688000000,"doc_count":17584},{"key_as_string":"2016-10-01T00:00:00.000Z","key":1475280000000,"doc_count":17820},{"key_as_string":"2016-11-01T00:00:00.000Z","key":1477958400000,"doc_count":15207},{"key_as_string":"2016-12-01T00:00:00.000Z","key":1480550400000,"doc_count":15341},{"key_as_string":"2017-01-01T00:00:00.000Z","key":1483228800000,"doc_count":21006},{"key_as_string":"2017-02-01T00:00:00.000Z","key":1485907200000,"doc_count":18110},{"key_as_string":"2017-03-01T00:00:00.000Z","key":1488326400000,"doc_count":19762},{"key_as_string":"2017-04-01T00:00:00.000Z","key":1491004800000,"doc_count":18544},{"key_as_string":"2017-05-01T00:00:00.000Z","key":1493596800000,"doc_count":19305},{"key_as_string":"2017-06-01T00:00:00.000Z","key":1496275200000,"doc_count":18567},{"key_as_string":"2017-07-01T00:00:00.000Z","key":1498867200000,"doc_count":20433},{"key_as_string":"2017-08-01T00:00:00.000Z","key":1501545600000,"doc_count":21402},{"key_as_string":"2017-09-01T00:00:00.000Z","key":1504224000000,"doc_count":27357},{"key_as_string":"2017-10-01T00:00:00.000Z","key":1506816000000,"doc_count":20456},{"key_as_string":"2017-11-01T00:00:00.000Z","key":1509494400000,"doc_count":18990},{"key_as_string":"2017-12-01T00:00:00.000Z","key":1512086400000,"doc_count":19034},{"key_as_string":"2018-01-01T00:00:00.000Z","key":1514764800000,"doc_count":23651},{"key_as_string":"2018-02-01T00:00:00.000Z","key":1517443200000,"doc_count":21978},{"key_as_string":"2018-03-01T00:00:00.000Z","key":1519862400000,"doc_count":23640},{"key_as_string":"2018-04-01T00:00:00.000Z","key":1522540800000,"doc_count":24327},{"key_as_string":"2018-05-01T00:00:00.000Z","key":1525132800000,"doc_count":22339},{"key_as_string":"2018-06-01T00:00:00.000Z","key":1527811200000,"doc_count":20111},{"key_as_string":"2018-07-01T00:00:00.000Z","key":1530403200000,"doc_count":20963},{"key_as_string":"2018-08-01T00:00:00.000Z","key":1533081600000,"doc_count":21726},{"key_as_string":"2018-09-01T00:00:00.000Z","key":1535760000000,"doc_count":19072},{"key_as_string":"2018-10-01T00:00:00.000Z","key":1538352000000,"doc_count":21903},{"key_as_string":"2018-11-01T00:00:00.000Z","key":1541030400000,"doc_count":19053},{"key_as_string":"2018-12-01T00:00:00.000Z","key":1543622400000,"doc_count":18552},{"key_as_string":"2019-01-01T00:00:00.000Z","key":1546300800000,"doc_count":18934},{"key_as_string":"2019-02-01T00:00:00.000Z","key":1548979200000,"doc_count":20206},{"key_as_string":"2019-03-01T00:00:00.000Z","key":1551398400000,"doc_count":23412},{"key_as_string":"2019-04-01T00:00:00.000Z","key":1554076800000,"doc_count":22915},{"key_as_string":"2019-05-01T00:00:00.000Z","key":1556668800000,"doc_count":23850},{"key_as_string":"2019-06-01T00:00:00.000Z","key":1559347200000,"doc_count":23352},{"key_as_string":"2019-07-01T00:00:00.000Z","key":1561939200000,"doc_count":25090},{"key_as_string":"2019-08-01T00:00:00.000Z","key":1564617600000,"doc_count":26059},{"key_as_string":"2019-09-01T00:00:00.000Z","key":1567296000000,"doc_count":23575},{"key_as_string":"2019-10-01T00:00:00.000Z","key":1569888000000,"doc_count":25636},{"key_as_string":"2019-11-01T00:00:00.000Z","key":1572566400000,"doc_count":22659},{"key_as_string":"2019-12-01T00:00:00.000Z","key":1575158400000,"doc_count":21704},{"key_as_string":"2020-01-01T00:00:00.000Z","key":1577836800000,"doc_count":26413},{"key_as_string":"2020-02-01T00:00:00.000Z","key":1580515200000,"doc_count":25096},{"key_as_string":"2020-03-01T00:00:00.000Z","key":1583020800000,"doc_count":29506},{"key_as_string":"2020-04-01T00:00:00.000Z","key":1585699200000,"doc_count":35112},{"key_as_string":"2020-05-01T00:00:00.000Z","key":1588291200000,"doc_count":9821}]}}}
+
+export const trendsAggsDupeResults = {"activeCall":"","chartType":"line","colorMap":{"Complaints":"#ADDC91","Other":"#a2a3a4","All other products":"#a2a3a4","All other companies":"#a2a3a4","All other values":"#a2a3a4"},"error":false,"expandedTrends":[],"expandableRows":["Mortgage","Credit card or prepaid card","Credit reporting, credit repair services, or other personal consumer reports","Checking or savings account","Debt collection"],"focus":"","isLoading":false,"lastDate":"2020-05-01T00:00:00.000Z","lens":"Overview","results":{"company":[],"dateRangeArea":[],"dateRangeLine":{"dataByTopic":[{"topic":"Complaints","topicName":"Complaints","dashed":false,"show":true,"dates":[{"date":"2011-12-01T00:00:00.000Z","value":2536},{"date":"2012-01-01T00:00:00.000Z","value":3230},{"date":"2012-02-01T00:00:00.000Z","value":3509},{"date":"2012-03-01T00:00:00.000Z","value":6230},{"date":"2012-04-01T00:00:00.000Z","value":5703},{"date":"2012-05-01T00:00:00.000Z","value":7617},{"date":"2012-06-01T00:00:00.000Z","value":7841},{"date":"2012-07-01T00:00:00.000Z","value":6755},{"date":"2012-08-01T00:00:00.000Z","value":6877},{"date":"2012-09-01T00:00:00.000Z","value":5493},{"date":"2012-10-01T00:00:00.000Z","value":6741},{"date":"2012-11-01T00:00:00.000Z","value":6139},{"date":"2012-12-01T00:00:00.000Z","value":6238},{"date":"2013-01-01T00:00:00.000Z","value":9741},{"date":"2013-02-01T00:00:00.000Z","value":8349},{"date":"2013-03-01T00:00:00.000Z","value":8784},{"date":"2013-04-01T00:00:00.000Z","value":8632},{"date":"2013-05-01T00:00:00.000Z","value":8170},{"date":"2013-06-01T00:00:00.000Z","value":8035},{"date":"2013-07-01T00:00:00.000Z","value":9271},{"date":"2013-08-01T00:00:00.000Z","value":9565},{"date":"2013-09-01T00:00:00.000Z","value":9636},{"date":"2013-10-01T00:00:00.000Z","value":9241},{"date":"2013-11-01T00:00:00.000Z","value":9319},{"date":"2013-12-01T00:00:00.000Z","value":9474},{"date":"2014-01-01T00:00:00.000Z","value":12617},{"date":"2014-02-01T00:00:00.000Z","value":13048},{"date":"2014-03-01T00:00:00.000Z","value":13943},{"date":"2014-04-01T00:00:00.000Z","value":13840},{"date":"2014-05-01T00:00:00.000Z","value":12167},{"date":"2014-06-01T00:00:00.000Z","value":12520},{"date":"2014-07-01T00:00:00.000Z","value":13415},{"date":"2014-08-01T00:00:00.000Z","value":13186},{"date":"2014-09-01T00:00:00.000Z","value":12465},{"date":"2014-10-01T00:00:00.000Z","value":12901},{"date":"2014-11-01T00:00:00.000Z","value":11257},{"date":"2014-12-01T00:00:00.000Z","value":11684},{"date":"2015-01-01T00:00:00.000Z","value":12627},{"date":"2015-02-01T00:00:00.000Z","value":12680},{"date":"2015-03-01T00:00:00.000Z","value":14514},{"date":"2015-04-01T00:00:00.000Z","value":13753},{"date":"2015-05-01T00:00:00.000Z","value":13682},{"date":"2015-06-01T00:00:00.000Z","value":14517},{"date":"2015-07-01T00:00:00.000Z","value":15920},{"date":"2015-08-01T00:00:00.000Z","value":15766},{"date":"2015-09-01T00:00:00.000Z","value":14336},{"date":"2015-10-01T00:00:00.000Z","value":14899},{"date":"2015-11-01T00:00:00.000Z","value":12897},{"date":"2015-12-01T00:00:00.000Z","value":12884},{"date":"2016-01-01T00:00:00.000Z","value":13840},{"date":"2016-02-01T00:00:00.000Z","value":14140},{"date":"2016-03-01T00:00:00.000Z","value":16611},{"date":"2016-04-01T00:00:00.000Z","value":15608},{"date":"2016-05-01T00:00:00.000Z","value":15517},{"date":"2016-06-01T00:00:00.000Z","value":16063},{"date":"2016-07-01T00:00:00.000Z","value":16043},{"date":"2016-08-01T00:00:00.000Z","value":17694},{"date":"2016-09-01T00:00:00.000Z","value":17584},{"date":"2016-10-01T00:00:00.000Z","value":17820},{"date":"2016-11-01T00:00:00.000Z","value":15207},{"date":"2016-12-01T00:00:00.000Z","value":15341},{"date":"2017-01-01T00:00:00.000Z","value":21006},{"date":"2017-02-01T00:00:00.000Z","value":18110},{"date":"2017-03-01T00:00:00.000Z","value":19762},{"date":"2017-04-01T00:00:00.000Z","value":18544},{"date":"2017-05-01T00:00:00.000Z","value":19305},{"date":"2017-06-01T00:00:00.000Z","value":18567},{"date":"2017-07-01T00:00:00.000Z","value":20433},{"date":"2017-08-01T00:00:00.000Z","value":21402},{"date":"2017-09-01T00:00:00.000Z","value":27357},{"date":"2017-10-01T00:00:00.000Z","value":20456},{"date":"2017-11-01T00:00:00.000Z","value":18990},{"date":"2017-12-01T00:00:00.000Z","value":19034},{"date":"2018-01-01T00:00:00.000Z","value":23651},{"date":"2018-02-01T00:00:00.000Z","value":21978},{"date":"2018-03-01T00:00:00.000Z","value":23640},{"date":"2018-04-01T00:00:00.000Z","value":24327},{"date":"2018-05-01T00:00:00.000Z","value":22339},{"date":"2018-06-01T00:00:00.000Z","value":20111},{"date":"2018-07-01T00:00:00.000Z","value":20963},{"date":"2018-08-01T00:00:00.000Z","value":21726},{"date":"2018-09-01T00:00:00.000Z","value":19072},{"date":"2018-10-01T00:00:00.000Z","value":21903},{"date":"2018-11-01T00:00:00.000Z","value":19053},{"date":"2018-12-01T00:00:00.000Z","value":18552},{"date":"2019-01-01T00:00:00.000Z","value":18934},{"date":"2019-02-01T00:00:00.000Z","value":20206},{"date":"2019-03-01T00:00:00.000Z","value":23412},{"date":"2019-04-01T00:00:00.000Z","value":22915},{"date":"2019-05-01T00:00:00.000Z","value":23850},{"date":"2019-06-01T00:00:00.000Z","value":23352},{"date":"2019-07-01T00:00:00.000Z","value":25090},{"date":"2019-08-01T00:00:00.000Z","value":26059},{"date":"2019-09-01T00:00:00.000Z","value":23575},{"date":"2019-10-01T00:00:00.000Z","value":25636},{"date":"2019-11-01T00:00:00.000Z","value":22659},{"date":"2019-12-01T00:00:00.000Z","value":21704},{"date":"2020-01-01T00:00:00.000Z","value":26413},{"date":"2020-02-01T00:00:00.000Z","value":25096},{"date":"2020-03-01T00:00:00.000Z","value":29506},{"date":"2020-04-01T00:00:00.000Z","value":35112},{"date":"2020-05-01T00:00:00.000Z","value":9821}]}]},"product":[{"hasChildren":true,"isNotFilter":false,"isParent":true,"name":"Credit reporting, credit repair services, or other personal consumer reports","value":397342,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Credit reporting","value":390818,"parent":"Credit reporting, credit repair services, or other personal consumer reports","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Other personal consumer report","value":5220,"parent":"Credit reporting, credit repair services, or other personal consumer reports","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Credit repair services","value":1303,"parent":"Credit reporting, credit repair services, or other personal consumer reports","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Conventional home mortgage","value":1,"parent":"Credit reporting, credit repair services, or other personal consumer reports","visible":false,"width":0.4},{"hasChildren":false,"isParent":false,"key":"Visualize trends for Credit reporting, credit repair services, or other personal consumer reports","name":"Visualize trends for Credit reporting, credit repair services, or other personal consumer reports","splitterText":"Visualize trends for Credit reporting, credit repair services, or other personal consumer reports","value":"","parent":"Credit reporting, credit repair services, or other personal consumer reports","width":0.3,"visible":false},{"hasChildren":true,"isNotFilter":false,"isParent":true,"name":"Mortgage","value":301753,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Other mortgage","value":86635,"parent":"Mortgage","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Conventional fixed mortgage","value":70613,"parent":"Mortgage","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Conventional home mortgage ","value":43738,"parent":"Mortgage","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"FHA mortgage","value":35293,"parent":"Mortgage","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Conventional adjustable mortgage (ARM)","value":25380,"parent":"Mortgage","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Home equity loan or line of credit","value":11624,"parent":"Mortgage","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Other type of mortgage","value":10608,"parent":"Mortgage","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"VA mortgage","value":9079,"parent":"Mortgage","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Home equity loan or line of credit (HELOC)","value":4905,"parent":"Mortgage","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Reverse mortgage","value":3216,"parent":"Mortgage","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Second mortgage","value":662,"parent":"Mortgage","visible":false,"width":0.4},{"hasChildren":false,"isParent":false,"key":"Visualize trends for Mortgage","name":"Visualize trends for Mortgage","splitterText":"Visualize trends for Mortgage","value":"","parent":"Mortgage","width":0.3,"visible":false},{"hasChildren":true,"isNotFilter":false,"isParent":true,"name":"Debt collection","value":293471,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"I do not know","value":61275,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Other (i.e. phone, health club, etc.)","value":44543,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Other debt","value":43673,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Credit card debt","value":31457,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Credit card","value":28698,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Medical debt","value":23742,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Medical","value":21187,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Payday loan","value":7562,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Mortgage ","value":4809,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Auto debt","value":4802,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Payday loan debt","value":4534,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Auto","value":3755,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Mortgage debt","value":3334,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Non-federal student loan","value":2881,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Federal student loan debt","value":2491,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Federal student loan","value":2475,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Private student loan debt","value":2253,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isParent":false,"key":"Visualize trends for Debt collection","name":"Visualize trends for Debt collection","splitterText":"Visualize trends for Debt collection","value":"","parent":"Debt collection","width":0.3,"visible":false},{"hasChildren":false,"isNotFilter":false,"isParent":true,"name":"Credit reporting ","value":140432,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":true,"name":"Credit card ","value":89190,"parent":false,"visible":true,"width":0.5}]},"subLens":"","tooltip":false,"total":1599733}
diff --git a/src/reducers/__fixtures__/trendsAggsMissingBuckets.jsx b/src/reducers/__fixtures__/trendsAggsMissingBuckets.jsx
new file mode 100644
index 000000000..699f57cb8
--- /dev/null
+++ b/src/reducers/__fixtures__/trendsAggsMissingBuckets.jsx
@@ -0,0 +1,2 @@
+export const trendsAggsMissingBuckets = {"dateRangeBrush":{"doc_count":1599733,"dateRangeBrush":{"buckets":[{"key_as_string":"2011-11-28T00:00:00.000Z","key":1322438400000,"doc_count":306},{"key_as_string":"2011-12-05T00:00:00.000Z","key":1323043200000,"doc_count":763},{"key_as_string":"2011-12-12T00:00:00.000Z","key":1323648000000,"doc_count":598},{"key_as_string":"2011-12-19T00:00:00.000Z","key":1324252800000,"doc_count":493},{"key_as_string":"2011-12-26T00:00:00.000Z","key":1324857600000,"doc_count":390},{"key_as_string":"2012-01-02T00:00:00.000Z","key":1325462400000,"doc_count":729},{"key_as_string":"2012-01-09T00:00:00.000Z","key":1326067200000,"doc_count":743},{"key_as_string":"2012-01-16T00:00:00.000Z","key":1326672000000,"doc_count":629},{"key_as_string":"2012-01-23T00:00:00.000Z","key":1327276800000,"doc_count":826},{"key_as_string":"2012-01-30T00:00:00.000Z","key":1327881600000,"doc_count":827},{"key_as_string":"2012-02-06T00:00:00.000Z","key":1328486400000,"doc_count":858},{"key_as_string":"2012-02-13T00:00:00.000Z","key":1329091200000,"doc_count":879},{"key_as_string":"2012-02-20T00:00:00.000Z","key":1329696000000,"doc_count":768},{"key_as_string":"2012-02-27T00:00:00.000Z","key":1330300800000,"doc_count":994},{"key_as_string":"2012-03-05T00:00:00.000Z","key":1330905600000,"doc_count":1842},{"key_as_string":"2012-03-12T00:00:00.000Z","key":1331510400000,"doc_count":1288},{"key_as_string":"2012-03-19T00:00:00.000Z","key":1332115200000,"doc_count":1241},{"key_as_string":"2012-03-26T00:00:00.000Z","key":1332720000000,"doc_count":1374},{"key_as_string":"2012-04-02T00:00:00.000Z","key":1333324800000,"doc_count":1230},{"key_as_string":"2012-04-09T00:00:00.000Z","key":1333929600000,"doc_count":1510},{"key_as_string":"2012-04-16T00:00:00.000Z","key":1334534400000,"doc_count":1372},{"key_as_string":"2012-04-23T00:00:00.000Z","key":1335139200000,"doc_count":1309},{"key_as_string":"2012-04-30T00:00:00.000Z","key":1335744000000,"doc_count":1342},{"key_as_string":"2012-05-07T00:00:00.000Z","key":1336348800000,"doc_count":1278},{"key_as_string":"2012-05-14T00:00:00.000Z","key":1336953600000,"doc_count":2838},{"key_as_string":"2012-05-21T00:00:00.000Z","key":1337558400000,"doc_count":1248},{"key_as_string":"2012-05-28T00:00:00.000Z","key":1338163200000,"doc_count":1768},{"key_as_string":"2012-06-04T00:00:00.000Z","key":1338768000000,"doc_count":2261},{"key_as_string":"2012-06-11T00:00:00.000Z","key":1339372800000,"doc_count":1783},{"key_as_string":"2012-06-18T00:00:00.000Z","key":1339977600000,"doc_count":1859},{"key_as_string":"2012-06-25T00:00:00.000Z","key":1340582400000,"doc_count":1350},{"key_as_string":"2012-07-02T00:00:00.000Z","key":1341187200000,"doc_count":1159},{"key_as_string":"2012-07-09T00:00:00.000Z","key":1341792000000,"doc_count":1589},{"key_as_string":"2012-07-16T00:00:00.000Z","key":1342396800000,"doc_count":1703},{"key_as_string":"2012-07-23T00:00:00.000Z","key":1343001600000,"doc_count":1601},{"key_as_string":"2012-07-30T00:00:00.000Z","key":1343606400000,"doc_count":1680},{"key_as_string":"2012-08-06T00:00:00.000Z","key":1344211200000,"doc_count":1691},{"key_as_string":"2012-08-13T00:00:00.000Z","key":1344816000000,"doc_count":1425},{"key_as_string":"2012-08-20T00:00:00.000Z","key":1345420800000,"doc_count":1447},{"key_as_string":"2012-08-27T00:00:00.000Z","key":1346025600000,"doc_count":1365},{"key_as_string":"2012-09-03T00:00:00.000Z","key":1346630400000,"doc_count":1080},{"key_as_string":"2012-09-10T00:00:00.000Z","key":1347235200000,"doc_count":1492},{"key_as_string":"2012-09-17T00:00:00.000Z","key":1347840000000,"doc_count":1399},{"key_as_string":"2012-09-24T00:00:00.000Z","key":1348444800000,"doc_count":1464},{"key_as_string":"2012-10-01T00:00:00.000Z","key":1349049600000,"doc_count":1414},{"key_as_string":"2012-10-08T00:00:00.000Z","key":1349654400000,"doc_count":1275},{"key_as_string":"2012-10-15T00:00:00.000Z","key":1350259200000,"doc_count":1477},{"key_as_string":"2012-10-22T00:00:00.000Z","key":1350864000000,"doc_count":1732},{"key_as_string":"2012-10-29T00:00:00.000Z","key":1351468800000,"doc_count":1523},{"key_as_string":"2012-11-05T00:00:00.000Z","key":1352073600000,"doc_count":1406},{"key_as_string":"2012-11-12T00:00:00.000Z","key":1352678400000,"doc_count":1417},{"key_as_string":"2012-11-19T00:00:00.000Z","key":1353283200000,"doc_count":1195},{"key_as_string":"2012-11-26T00:00:00.000Z","key":1353888000000,"doc_count":1529},{"key_as_string":"2012-12-03T00:00:00.000Z","key":1354492800000,"doc_count":1298},{"key_as_string":"2012-12-10T00:00:00.000Z","key":1355097600000,"doc_count":1420},{"key_as_string":"2012-12-17T00:00:00.000Z","key":1355702400000,"doc_count":1961},{"key_as_string":"2012-12-24T00:00:00.000Z","key":1356307200000,"doc_count":1250},{"key_as_string":"2012-12-31T00:00:00.000Z","key":1356912000000,"doc_count":1309},{"key_as_string":"2013-01-07T00:00:00.000Z","key":1357516800000,"doc_count":2457},{"key_as_string":"2013-01-14T00:00:00.000Z","key":1358121600000,"doc_count":2637},{"key_as_string":"2013-01-21T00:00:00.000Z","key":1358726400000,"doc_count":2000},{"key_as_string":"2013-01-28T00:00:00.000Z","key":1359331200000,"doc_count":2206},{"key_as_string":"2013-02-04T00:00:00.000Z","key":1359936000000,"doc_count":2409},{"key_as_string":"2013-02-11T00:00:00.000Z","key":1360540800000,"doc_count":2193},{"key_as_string":"2013-02-18T00:00:00.000Z","key":1361145600000,"doc_count":1865},{"key_as_string":"2013-02-25T00:00:00.000Z","key":1361750400000,"doc_count":1793},{"key_as_string":"2013-03-04T00:00:00.000Z","key":1362355200000,"doc_count":2207},{"key_as_string":"2013-03-11T00:00:00.000Z","key":1362960000000,"doc_count":1883},{"key_as_string":"2013-03-18T00:00:00.000Z","key":1363564800000,"doc_count":1994},{"key_as_string":"2013-03-25T00:00:00.000Z","key":1364169600000,"doc_count":2142},{"key_as_string":"2013-04-01T00:00:00.000Z","key":1364774400000,"doc_count":1925},{"key_as_string":"2013-04-08T00:00:00.000Z","key":1365379200000,"doc_count":2067},{"key_as_string":"2013-04-15T00:00:00.000Z","key":1365984000000,"doc_count":1925},{"key_as_string":"2013-04-22T00:00:00.000Z","key":1366588800000,"doc_count":2001},{"key_as_string":"2013-04-29T00:00:00.000Z","key":1367193600000,"doc_count":1796},{"key_as_string":"2013-05-06T00:00:00.000Z","key":1367798400000,"doc_count":2013},{"key_as_string":"2013-05-13T00:00:00.000Z","key":1368403200000,"doc_count":1804},{"key_as_string":"2013-05-20T00:00:00.000Z","key":1369008000000,"doc_count":1917},{"key_as_string":"2013-05-27T00:00:00.000Z","key":1369612800000,"doc_count":1557},{"key_as_string":"2013-06-03T00:00:00.000Z","key":1370217600000,"doc_count":1879},{"key_as_string":"2013-06-10T00:00:00.000Z","key":1370822400000,"doc_count":1890},{"key_as_string":"2013-06-17T00:00:00.000Z","key":1371427200000,"doc_count":2068},{"key_as_string":"2013-06-24T00:00:00.000Z","key":1372032000000,"doc_count":1995},{"key_as_string":"2013-07-01T00:00:00.000Z","key":1372636800000,"doc_count":1264},{"key_as_string":"2013-07-08T00:00:00.000Z","key":1373241600000,"doc_count":2330},{"key_as_string":"2013-07-15T00:00:00.000Z","key":1373846400000,"doc_count":2329},{"key_as_string":"2013-07-22T00:00:00.000Z","key":1374451200000,"doc_count":2118},{"key_as_string":"2013-07-29T00:00:00.000Z","key":1375056000000,"doc_count":2185},{"key_as_string":"2013-08-05T00:00:00.000Z","key":1375660800000,"doc_count":2274},{"key_as_string":"2013-08-12T00:00:00.000Z","key":1376265600000,"doc_count":2136},{"key_as_string":"2013-08-19T00:00:00.000Z","key":1376870400000,"doc_count":2109},{"key_as_string":"2013-08-26T00:00:00.000Z","key":1377475200000,"doc_count":2167},{"key_as_string":"2013-09-02T00:00:00.000Z","key":1378080000000,"doc_count":1922},{"key_as_string":"2013-09-09T00:00:00.000Z","key":1378684800000,"doc_count":2318},{"key_as_string":"2013-09-16T00:00:00.000Z","key":1379289600000,"doc_count":2492},{"key_as_string":"2013-09-23T00:00:00.000Z","key":1379894400000,"doc_count":2377},{"key_as_string":"2013-09-30T00:00:00.000Z","key":1380499200000,"doc_count":1990},{"key_as_string":"2013-10-07T00:00:00.000Z","key":1381104000000,"doc_count":1679},{"key_as_string":"2013-10-14T00:00:00.000Z","key":1381708800000,"doc_count":1794},{"key_as_string":"2013-10-21T00:00:00.000Z","key":1382313600000,"doc_count":2327},{"key_as_string":"2013-10-28T00:00:00.000Z","key":1382918400000,"doc_count":2591},{"key_as_string":"2013-11-04T00:00:00.000Z","key":1383523200000,"doc_count":2447},{"key_as_string":"2013-11-11T00:00:00.000Z","key":1384128000000,"doc_count":2250},{"key_as_string":"2013-11-18T00:00:00.000Z","key":1384732800000,"doc_count":2282},{"key_as_string":"2013-11-25T00:00:00.000Z","key":1385337600000,"doc_count":1738},{"key_as_string":"2013-12-02T00:00:00.000Z","key":1385942400000,"doc_count":2196},{"key_as_string":"2013-12-09T00:00:00.000Z","key":1386547200000,"doc_count":2281},{"key_as_string":"2013-12-16T00:00:00.000Z","key":1387152000000,"doc_count":2344},{"key_as_string":"2013-12-23T00:00:00.000Z","key":1387756800000,"doc_count":1769},{"key_as_string":"2013-12-30T00:00:00.000Z","key":1388361600000,"doc_count":1953},{"key_as_string":"2014-01-06T00:00:00.000Z","key":1388966400000,"doc_count":2959},{"key_as_string":"2014-01-13T00:00:00.000Z","key":1389571200000,"doc_count":2960},{"key_as_string":"2014-01-20T00:00:00.000Z","key":1390176000000,"doc_count":2975},{"key_as_string":"2014-01-27T00:00:00.000Z","key":1390780800000,"doc_count":2880},{"key_as_string":"2014-02-03T00:00:00.000Z","key":1391385600000,"doc_count":3187},{"key_as_string":"2014-02-10T00:00:00.000Z","key":1391990400000,"doc_count":3311},{"key_as_string":"2014-02-17T00:00:00.000Z","key":1392595200000,"doc_count":3125},{"key_as_string":"2014-02-24T00:00:00.000Z","key":1393200000000,"doc_count":3481},{"key_as_string":"2014-03-03T00:00:00.000Z","key":1393804800000,"doc_count":3085},{"key_as_string":"2014-03-10T00:00:00.000Z","key":1394409600000,"doc_count":3381},{"key_as_string":"2014-03-17T00:00:00.000Z","key":1395014400000,"doc_count":3231},{"key_as_string":"2014-03-24T00:00:00.000Z","key":1395619200000,"doc_count":3340},{"key_as_string":"2014-03-31T00:00:00.000Z","key":1396224000000,"doc_count":3163},{"key_as_string":"2014-04-07T00:00:00.000Z","key":1396828800000,"doc_count":3238},{"key_as_string":"2014-04-14T00:00:00.000Z","key":1397433600000,"doc_count":2886},{"key_as_string":"2014-04-21T00:00:00.000Z","key":1398038400000,"doc_count":3236},{"key_as_string":"2014-04-28T00:00:00.000Z","key":1398643200000,"doc_count":3079},{"key_as_string":"2014-05-05T00:00:00.000Z","key":1399248000000,"doc_count":2846},{"key_as_string":"2014-05-12T00:00:00.000Z","key":1399852800000,"doc_count":2987},{"key_as_string":"2014-05-19T00:00:00.000Z","key":1400457600000,"doc_count":2785},{"key_as_string":"2014-05-26T00:00:00.000Z","key":1401062400000,"doc_count":2461},{"key_as_string":"2014-06-02T00:00:00.000Z","key":1401667200000,"doc_count":2788},{"key_as_string":"2014-06-09T00:00:00.000Z","key":1402272000000,"doc_count":2933},{"key_as_string":"2014-06-16T00:00:00.000Z","key":1402876800000,"doc_count":2948},{"key_as_string":"2014-06-23T00:00:00.000Z","key":1403481600000,"doc_count":3184},{"key_as_string":"2014-06-30T00:00:00.000Z","key":1404086400000,"doc_count":2500},{"key_as_string":"2014-07-07T00:00:00.000Z","key":1404691200000,"doc_count":3075},{"key_as_string":"2014-07-14T00:00:00.000Z","key":1405296000000,"doc_count":3060},{"key_as_string":"2014-07-21T00:00:00.000Z","key":1405900800000,"doc_count":3056},{"key_as_string":"2014-07-28T00:00:00.000Z","key":1406505600000,"doc_count":3054},{"key_as_string":"2014-08-04T00:00:00.000Z","key":1407110400000,"doc_count":3246},{"key_as_string":"2014-08-11T00:00:00.000Z","key":1407715200000,"doc_count":3109},{"key_as_string":"2014-08-18T00:00:00.000Z","key":1408320000000,"doc_count":3225},{"key_as_string":"2014-08-25T00:00:00.000Z","key":1408924800000,"doc_count":2806},{"key_as_string":"2014-09-01T00:00:00.000Z","key":1409529600000,"doc_count":2525},{"key_as_string":"2014-09-08T00:00:00.000Z","key":1410134400000,"doc_count":2969},{"key_as_string":"2014-09-15T00:00:00.000Z","key":1410739200000,"doc_count":2822},{"key_as_string":"2014-09-22T00:00:00.000Z","key":1411344000000,"doc_count":3051},{"key_as_string":"2014-09-29T00:00:00.000Z","key":1411948800000,"doc_count":3058},{"key_as_string":"2014-10-06T00:00:00.000Z","key":1412553600000,"doc_count":2848},{"key_as_string":"2014-10-13T00:00:00.000Z","key":1413158400000,"doc_count":2707},{"key_as_string":"2014-10-20T00:00:00.000Z","key":1413763200000,"doc_count":2958},{"key_as_string":"2014-10-27T00:00:00.000Z","key":1414368000000,"doc_count":2709},{"key_as_string":"2014-11-03T00:00:00.000Z","key":1414972800000,"doc_count":2933},{"key_as_string":"2014-11-10T00:00:00.000Z","key":1415577600000,"doc_count":2739},{"key_as_string":"2014-11-17T00:00:00.000Z","key":1416182400000,"doc_count":3146},{"key_as_string":"2014-11-24T00:00:00.000Z","key":1416787200000,"doc_count":2158},{"key_as_string":"2014-12-01T00:00:00.000Z","key":1417392000000,"doc_count":2744},{"key_as_string":"2014-12-08T00:00:00.000Z","key":1417996800000,"doc_count":2802},{"key_as_string":"2014-12-15T00:00:00.000Z","key":1418601600000,"doc_count":2697},{"key_as_string":"2014-12-22T00:00:00.000Z","key":1419206400000,"doc_count":1937},{"key_as_string":"2014-12-29T00:00:00.000Z","key":1419811200000,"doc_count":2383},{"key_as_string":"2015-01-05T00:00:00.000Z","key":1420416000000,"doc_count":2837},{"key_as_string":"2015-01-12T00:00:00.000Z","key":1421020800000,"doc_count":2788},{"key_as_string":"2015-01-19T00:00:00.000Z","key":1421625600000,"doc_count":3016},{"key_as_string":"2015-01-26T00:00:00.000Z","key":1422230400000,"doc_count":3230},{"key_as_string":"2015-02-02T00:00:00.000Z","key":1422835200000,"doc_count":3295},{"key_as_string":"2015-02-09T00:00:00.000Z","key":1423440000000,"doc_count":3170},{"key_as_string":"2015-02-16T00:00:00.000Z","key":1424044800000,"doc_count":3033},{"key_as_string":"2015-02-23T00:00:00.000Z","key":1424649600000,"doc_count":3232},{"key_as_string":"2015-03-02T00:00:00.000Z","key":1425254400000,"doc_count":3090},{"key_as_string":"2015-03-09T00:00:00.000Z","key":1425859200000,"doc_count":3224},{"key_as_string":"2015-03-16T00:00:00.000Z","key":1426464000000,"doc_count":3462},{"key_as_string":"2015-03-23T00:00:00.000Z","key":1427068800000,"doc_count":3419},{"key_as_string":"2015-03-30T00:00:00.000Z","key":1427673600000,"doc_count":3028},{"key_as_string":"2015-04-06T00:00:00.000Z","key":1428278400000,"doc_count":3085},{"key_as_string":"2015-04-13T00:00:00.000Z","key":1428883200000,"doc_count":3014},{"key_as_string":"2015-04-20T00:00:00.000Z","key":1429488000000,"doc_count":3367},{"key_as_string":"2015-04-27T00:00:00.000Z","key":1430092800000,"doc_count":3305},{"key_as_string":"2015-05-04T00:00:00.000Z","key":1430697600000,"doc_count":3175},{"key_as_string":"2015-05-11T00:00:00.000Z","key":1431302400000,"doc_count":3436},{"key_as_string":"2015-05-18T00:00:00.000Z","key":1431907200000,"doc_count":3333},{"key_as_string":"2015-05-25T00:00:00.000Z","key":1432512000000,"doc_count":2838},{"key_as_string":"2015-06-01T00:00:00.000Z","key":1433116800000,"doc_count":3285},{"key_as_string":"2015-06-08T00:00:00.000Z","key":1433721600000,"doc_count":3339},{"key_as_string":"2015-06-15T00:00:00.000Z","key":1434326400000,"doc_count":3268},{"key_as_string":"2015-06-22T00:00:00.000Z","key":1434931200000,"doc_count":3326},{"key_as_string":"2015-06-29T00:00:00.000Z","key":1435536000000,"doc_count":2920},{"key_as_string":"2015-07-06T00:00:00.000Z","key":1436140800000,"doc_count":4048},{"key_as_string":"2015-07-13T00:00:00.000Z","key":1436745600000,"doc_count":3633},{"key_as_string":"2015-07-20T00:00:00.000Z","key":1437350400000,"doc_count":3546},{"key_as_string":"2015-07-27T00:00:00.000Z","key":1437955200000,"doc_count":3497},{"key_as_string":"2015-08-03T00:00:00.000Z","key":1438560000000,"doc_count":3690},{"key_as_string":"2015-08-10T00:00:00.000Z","key":1439164800000,"doc_count":3395},{"key_as_string":"2015-08-17T00:00:00.000Z","key":1439769600000,"doc_count":3434},{"key_as_string":"2015-08-24T00:00:00.000Z","key":1440374400000,"doc_count":4221},{"key_as_string":"2015-08-31T00:00:00.000Z","key":1440979200000,"doc_count":3252},{"key_as_string":"2015-09-07T00:00:00.000Z","key":1441584000000,"doc_count":3124},{"key_as_string":"2015-09-14T00:00:00.000Z","key":1442188800000,"doc_count":3282},{"key_as_string":"2015-09-21T00:00:00.000Z","key":1442793600000,"doc_count":3516},{"key_as_string":"2015-09-28T00:00:00.000Z","key":1443398400000,"doc_count":3205},{"key_as_string":"2015-10-05T00:00:00.000Z","key":1444003200000,"doc_count":3251},{"key_as_string":"2015-10-12T00:00:00.000Z","key":1444608000000,"doc_count":3268},{"key_as_string":"2015-10-19T00:00:00.000Z","key":1445212800000,"doc_count":3646},{"key_as_string":"2015-10-26T00:00:00.000Z","key":1445817600000,"doc_count":3431},{"key_as_string":"2015-11-02T00:00:00.000Z","key":1446422400000,"doc_count":3297},{"key_as_string":"2015-11-09T00:00:00.000Z","key":1447027200000,"doc_count":3205},{"key_as_string":"2015-11-16T00:00:00.000Z","key":1447632000000,"doc_count":3279},{"key_as_string":"2015-11-23T00:00:00.000Z","key":1448236800000,"doc_count":2470},{"key_as_string":"2015-11-30T00:00:00.000Z","key":1448841600000,"doc_count":3066},{"key_as_string":"2015-12-07T00:00:00.000Z","key":1449446400000,"doc_count":3106},{"key_as_string":"2015-12-14T00:00:00.000Z","key":1450051200000,"doc_count":2867},{"key_as_string":"2015-12-21T00:00:00.000Z","key":1450656000000,"doc_count":2155},{"key_as_string":"2015-12-28T00:00:00.000Z","key":1451260800000,"doc_count":2661},{"key_as_string":"2016-01-04T00:00:00.000Z","key":1451865600000,"doc_count":3117},{"key_as_string":"2016-01-11T00:00:00.000Z","key":1452470400000,"doc_count":3695},{"key_as_string":"2016-01-18T00:00:00.000Z","key":1453075200000,"doc_count":3116},{"key_as_string":"2016-01-25T00:00:00.000Z","key":1453680000000,"doc_count":3448},{"key_as_string":"2016-02-01T00:00:00.000Z","key":1454284800000,"doc_count":3318},{"key_as_string":"2016-02-08T00:00:00.000Z","key":1454889600000,"doc_count":3486},{"key_as_string":"2016-02-15T00:00:00.000Z","key":1455494400000,"doc_count":3288},{"key_as_string":"2016-02-22T00:00:00.000Z","key":1456099200000,"doc_count":3505},{"key_as_string":"2016-02-29T00:00:00.000Z","key":1456704000000,"doc_count":3637},{"key_as_string":"2016-03-07T00:00:00.000Z","key":1457308800000,"doc_count":3449},{"key_as_string":"2016-03-14T00:00:00.000Z","key":1457913600000,"doc_count":3797},{"key_as_string":"2016-03-21T00:00:00.000Z","key":1458518400000,"doc_count":3561},{"key_as_string":"2016-03-28T00:00:00.000Z","key":1459123200000,"doc_count":3669},{"key_as_string":"2016-04-04T00:00:00.000Z","key":1459728000000,"doc_count":3699},{"key_as_string":"2016-04-11T00:00:00.000Z","key":1460332800000,"doc_count":3873},{"key_as_string":"2016-04-18T00:00:00.000Z","key":1460937600000,"doc_count":3551},{"key_as_string":"2016-04-25T00:00:00.000Z","key":1461542400000,"doc_count":3707},{"key_as_string":"2016-05-02T00:00:00.000Z","key":1462147200000,"doc_count":3670},{"key_as_string":"2016-05-09T00:00:00.000Z","key":1462752000000,"doc_count":3707},{"key_as_string":"2016-05-16T00:00:00.000Z","key":1463356800000,"doc_count":3578},{"key_as_string":"2016-05-23T00:00:00.000Z","key":1463961600000,"doc_count":3626},{"key_as_string":"2016-05-30T00:00:00.000Z","key":1464566400000,"doc_count":3098},{"key_as_string":"2016-06-06T00:00:00.000Z","key":1465171200000,"doc_count":3808},{"key_as_string":"2016-06-13T00:00:00.000Z","key":1465776000000,"doc_count":3494},{"key_as_string":"2016-06-20T00:00:00.000Z","key":1466380800000,"doc_count":3688},{"key_as_string":"2016-06-27T00:00:00.000Z","key":1466985600000,"doc_count":3657},{"key_as_string":"2016-07-04T00:00:00.000Z","key":1467590400000,"doc_count":3451},{"key_as_string":"2016-07-11T00:00:00.000Z","key":1468195200000,"doc_count":3766},{"key_as_string":"2016-07-18T00:00:00.000Z","key":1468800000000,"doc_count":3653},{"key_as_string":"2016-07-25T00:00:00.000Z","key":1469404800000,"doc_count":4246},{"key_as_string":"2016-08-01T00:00:00.000Z","key":1470009600000,"doc_count":3857},{"key_as_string":"2016-08-08T00:00:00.000Z","key":1470614400000,"doc_count":4017},{"key_as_string":"2016-08-15T00:00:00.000Z","key":1471219200000,"doc_count":3861},{"key_as_string":"2016-08-22T00:00:00.000Z","key":1471824000000,"doc_count":3727},{"key_as_string":"2016-08-29T00:00:00.000Z","key":1472428800000,"doc_count":3661},{"key_as_string":"2016-09-05T00:00:00.000Z","key":1473033600000,"doc_count":3618},{"key_as_string":"2016-09-12T00:00:00.000Z","key":1473638400000,"doc_count":4173},{"key_as_string":"2016-09-19T00:00:00.000Z","key":1474243200000,"doc_count":4455},{"key_as_string":"2016-09-26T00:00:00.000Z","key":1474848000000,"doc_count":4412},{"key_as_string":"2016-10-03T00:00:00.000Z","key":1475452800000,"doc_count":4322},{"key_as_string":"2016-10-10T00:00:00.000Z","key":1476057600000,"doc_count":4120},{"key_as_string":"2016-10-17T00:00:00.000Z","key":1476662400000,"doc_count":4075},{"key_as_string":"2016-10-24T00:00:00.000Z","key":1477267200000,"doc_count":4091},{"key_as_string":"2016-10-31T00:00:00.000Z","key":1477872000000,"doc_count":4090},{"key_as_string":"2016-11-07T00:00:00.000Z","key":1478476800000,"doc_count":3449},{"key_as_string":"2016-11-14T00:00:00.000Z","key":1479081600000,"doc_count":3707},{"key_as_string":"2016-11-21T00:00:00.000Z","key":1479686400000,"doc_count":2748},{"key_as_string":"2016-11-28T00:00:00.000Z","key":1480291200000,"doc_count":3680},{"key_as_string":"2016-12-05T00:00:00.000Z","key":1480896000000,"doc_count":3702},{"key_as_string":"2016-12-12T00:00:00.000Z","key":1481500800000,"doc_count":3913},{"key_as_string":"2016-12-19T00:00:00.000Z","key":1482105600000,"doc_count":3327},{"key_as_string":"2016-12-26T00:00:00.000Z","key":1482710400000,"doc_count":2746},{"key_as_string":"2017-01-02T00:00:00.000Z","key":1483315200000,"doc_count":3555},{"key_as_string":"2017-01-09T00:00:00.000Z","key":1483920000000,"doc_count":3883},{"key_as_string":"2017-01-16T00:00:00.000Z","key":1484524800000,"doc_count":6479},{"key_as_string":"2017-01-23T00:00:00.000Z","key":1485129600000,"doc_count":5375},{"key_as_string":"2017-01-30T00:00:00.000Z","key":1485734400000,"doc_count":4932},{"key_as_string":"2017-02-06T00:00:00.000Z","key":1486339200000,"doc_count":4854},{"key_as_string":"2017-02-13T00:00:00.000Z","key":1486944000000,"doc_count":4433},{"key_as_string":"2017-02-20T00:00:00.000Z","key":1487548800000,"doc_count":4045},{"key_as_string":"2017-02-27T00:00:00.000Z","key":1488153600000,"doc_count":4147},{"key_as_string":"2017-03-06T00:00:00.000Z","key":1488758400000,"doc_count":4308},{"key_as_string":"2017-03-13T00:00:00.000Z","key":1489363200000,"doc_count":4524},{"key_as_string":"2017-03-20T00:00:00.000Z","key":1489968000000,"doc_count":4358},{"key_as_string":"2017-03-27T00:00:00.000Z","key":1490572800000,"doc_count":4384},{"key_as_string":"2017-04-03T00:00:00.000Z","key":1491177600000,"doc_count":4613},{"key_as_string":"2017-04-10T00:00:00.000Z","key":1491782400000,"doc_count":4398},{"key_as_string":"2017-04-17T00:00:00.000Z","key":1492387200000,"doc_count":3972},{"key_as_string":"2017-04-24T00:00:00.000Z","key":1492992000000,"doc_count":5057},{"key_as_string":"2017-05-01T00:00:00.000Z","key":1493596800000,"doc_count":4735},{"key_as_string":"2017-05-08T00:00:00.000Z","key":1494201600000,"doc_count":4250},{"key_as_string":"2017-05-15T00:00:00.000Z","key":1494806400000,"doc_count":4364},{"key_as_string":"2017-05-22T00:00:00.000Z","key":1495411200000,"doc_count":4190},{"key_as_string":"2017-05-29T00:00:00.000Z","key":1496016000000,"doc_count":3843},{"key_as_string":"2017-06-05T00:00:00.000Z","key":1496620800000,"doc_count":4081},{"key_as_string":"2017-06-12T00:00:00.000Z","key":1497225600000,"doc_count":4102},{"key_as_string":"2017-06-19T00:00:00.000Z","key":1497830400000,"doc_count":4572},{"key_as_string":"2017-06-26T00:00:00.000Z","key":1498435200000,"doc_count":4297},{"key_as_string":"2017-07-03T00:00:00.000Z","key":1499040000000,"doc_count":3951},{"key_as_string":"2017-07-10T00:00:00.000Z","key":1499644800000,"doc_count":5026},{"key_as_string":"2017-07-17T00:00:00.000Z","key":1500249600000,"doc_count":4979},{"key_as_string":"2017-07-24T00:00:00.000Z","key":1500854400000,"doc_count":5126},{"key_as_string":"2017-07-31T00:00:00.000Z","key":1501459200000,"doc_count":4930},{"key_as_string":"2017-08-07T00:00:00.000Z","key":1502064000000,"doc_count":5049},{"key_as_string":"2017-08-14T00:00:00.000Z","key":1502668800000,"doc_count":4686},{"key_as_string":"2017-08-21T00:00:00.000Z","key":1503273600000,"doc_count":4380},{"key_as_string":"2017-08-28T00:00:00.000Z","key":1503878400000,"doc_count":4272},{"key_as_string":"2017-09-04T00:00:00.000Z","key":1504483200000,"doc_count":9382},{"key_as_string":"2017-09-11T00:00:00.000Z","key":1505088000000,"doc_count":6921},{"key_as_string":"2017-09-18T00:00:00.000Z","key":1505692800000,"doc_count":5209},{"key_as_string":"2017-09-25T00:00:00.000Z","key":1506297600000,"doc_count":5042},{"key_as_string":"2017-10-02T00:00:00.000Z","key":1506902400000,"doc_count":4797},{"key_as_string":"2017-10-09T00:00:00.000Z","key":1507507200000,"doc_count":4439},{"key_as_string":"2017-10-16T00:00:00.000Z","key":1508112000000,"doc_count":4661},{"key_as_string":"2017-10-23T00:00:00.000Z","key":1508716800000,"doc_count":4666},{"key_as_string":"2017-10-30T00:00:00.000Z","key":1509321600000,"doc_count":4447},{"key_as_string":"2017-11-06T00:00:00.000Z","key":1509926400000,"doc_count":4578},{"key_as_string":"2017-11-13T00:00:00.000Z","key":1510531200000,"doc_count":4737},{"key_as_string":"2017-11-20T00:00:00.000Z","key":1511136000000,"doc_count":3266},{"key_as_string":"2017-11-27T00:00:00.000Z","key":1511740800000,"doc_count":4879},{"key_as_string":"2017-12-04T00:00:00.000Z","key":1512345600000,"doc_count":4789},{"key_as_string":"2017-12-11T00:00:00.000Z","key":1512950400000,"doc_count":4830},{"key_as_string":"2017-12-18T00:00:00.000Z","key":1513555200000,"doc_count":4308},{"key_as_string":"2017-12-25T00:00:00.000Z","key":1514160000000,"doc_count":3760},{"key_as_string":"2018-01-01T00:00:00.000Z","key":1514764800000,"doc_count":4501},{"key_as_string":"2018-01-08T00:00:00.000Z","key":1515369600000,"doc_count":5537},{"key_as_string":"2018-01-15T00:00:00.000Z","key":1515974400000,"doc_count":5403},{"key_as_string":"2018-01-22T00:00:00.000Z","key":1516579200000,"doc_count":5309},{"key_as_string":"2018-01-29T00:00:00.000Z","key":1517184000000,"doc_count":5514},{"key_as_string":"2018-02-05T00:00:00.000Z","key":1517788800000,"doc_count":5602},{"key_as_string":"2018-02-12T00:00:00.000Z","key":1518393600000,"doc_count":5440},{"key_as_string":"2018-02-19T00:00:00.000Z","key":1518998400000,"doc_count":5498},{"key_as_string":"2018-02-26T00:00:00.000Z","key":1519603200000,"doc_count":5443},{"key_as_string":"2018-03-05T00:00:00.000Z","key":1520208000000,"doc_count":5348},{"key_as_string":"2018-03-12T00:00:00.000Z","key":1520812800000,"doc_count":5133},{"key_as_string":"2018-03-19T00:00:00.000Z","key":1521417600000,"doc_count":5716},{"key_as_string":"2018-03-26T00:00:00.000Z","key":1522022400000,"doc_count":5145},{"key_as_string":"2018-04-02T00:00:00.000Z","key":1522627200000,"doc_count":6346},{"key_as_string":"2018-04-09T00:00:00.000Z","key":1523232000000,"doc_count":5782},{"key_as_string":"2018-04-16T00:00:00.000Z","key":1523836800000,"doc_count":5472},{"key_as_string":"2018-04-23T00:00:00.000Z","key":1524441600000,"doc_count":5571},{"key_as_string":"2018-04-30T00:00:00.000Z","key":1525046400000,"doc_count":5290},{"key_as_string":"2018-05-07T00:00:00.000Z","key":1525651200000,"doc_count":5048},{"key_as_string":"2018-05-14T00:00:00.000Z","key":1526256000000,"doc_count":5226},{"key_as_string":"2018-05-21T00:00:00.000Z","key":1526860800000,"doc_count":4757},{"key_as_string":"2018-05-28T00:00:00.000Z","key":1527465600000,"doc_count":4253},{"key_as_string":"2018-06-04T00:00:00.000Z","key":1528070400000,"doc_count":5032},{"key_as_string":"2018-06-11T00:00:00.000Z","key":1528675200000,"doc_count":4754},{"key_as_string":"2018-06-18T00:00:00.000Z","key":1529280000000,"doc_count":4506},{"key_as_string":"2018-06-25T00:00:00.000Z","key":1529884800000,"doc_count":4741},{"key_as_string":"2018-07-02T00:00:00.000Z","key":1530489600000,"doc_count":4480},{"key_as_string":"2018-07-09T00:00:00.000Z","key":1531094400000,"doc_count":4911},{"key_as_string":"2018-07-16T00:00:00.000Z","key":1531699200000,"doc_count":4798},{"key_as_string":"2018-07-23T00:00:00.000Z","key":1532304000000,"doc_count":4775},{"key_as_string":"2018-07-30T00:00:00.000Z","key":1532908800000,"doc_count":4951},{"key_as_string":"2018-08-06T00:00:00.000Z","key":1533513600000,"doc_count":4908},{"key_as_string":"2018-08-13T00:00:00.000Z","key":1534118400000,"doc_count":4708},{"key_as_string":"2018-08-20T00:00:00.000Z","key":1534723200000,"doc_count":4816},{"key_as_string":"2018-08-27T00:00:00.000Z","key":1535328000000,"doc_count":4544},{"key_as_string":"2018-09-03T00:00:00.000Z","key":1535932800000,"doc_count":4341},{"key_as_string":"2018-09-10T00:00:00.000Z","key":1536537600000,"doc_count":4763},{"key_as_string":"2018-09-17T00:00:00.000Z","key":1537142400000,"doc_count":4900},{"key_as_string":"2018-09-24T00:00:00.000Z","key":1537747200000,"doc_count":4545},{"key_as_string":"2018-10-01T00:00:00.000Z","key":1538352000000,"doc_count":4755},{"key_as_string":"2018-10-08T00:00:00.000Z","key":1538956800000,"doc_count":4566},{"key_as_string":"2018-10-15T00:00:00.000Z","key":1539561600000,"doc_count":5175},{"key_as_string":"2018-10-22T00:00:00.000Z","key":1540166400000,"doc_count":4812},{"key_as_string":"2018-10-29T00:00:00.000Z","key":1540771200000,"doc_count":4866},{"key_as_string":"2018-11-05T00:00:00.000Z","key":1541376000000,"doc_count":4591},{"key_as_string":"2018-11-12T00:00:00.000Z","key":1541980800000,"doc_count":4504},{"key_as_string":"2018-11-19T00:00:00.000Z","key":1542585600000,"doc_count":3462},{"key_as_string":"2018-11-26T00:00:00.000Z","key":1543190400000,"doc_count":4904},{"key_as_string":"2018-12-03T00:00:00.000Z","key":1543795200000,"doc_count":4510},{"key_as_string":"2018-12-10T00:00:00.000Z","key":1544400000000,"doc_count":4665},{"key_as_string":"2018-12-17T00:00:00.000Z","key":1545004800000,"doc_count":4556},{"key_as_string":"2018-12-24T00:00:00.000Z","key":1545609600000,"doc_count":3629},{"key_as_string":"2018-12-31T00:00:00.000Z","key":1546214400000,"doc_count":3571},{"key_as_string":"2019-01-07T00:00:00.000Z","key":1546819200000,"doc_count":4306},{"key_as_string":"2019-01-14T00:00:00.000Z","key":1547424000000,"doc_count":4282},{"key_as_string":"2019-01-21T00:00:00.000Z","key":1548028800000,"doc_count":3882},{"key_as_string":"2019-01-28T00:00:00.000Z","key":1548633600000,"doc_count":4938},{"key_as_string":"2019-02-04T00:00:00.000Z","key":1549238400000,"doc_count":5085},{"key_as_string":"2019-02-11T00:00:00.000Z","key":1549843200000,"doc_count":4995},{"key_as_string":"2019-02-18T00:00:00.000Z","key":1550448000000,"doc_count":5141},{"key_as_string":"2019-02-25T00:00:00.000Z","key":1551052800000,"doc_count":5017},{"key_as_string":"2019-03-04T00:00:00.000Z","key":1551657600000,"doc_count":5601},{"key_as_string":"2019-03-11T00:00:00.000Z","key":1552262400000,"doc_count":5344},{"key_as_string":"2019-03-18T00:00:00.000Z","key":1552867200000,"doc_count":5414},{"key_as_string":"2019-03-25T00:00:00.000Z","key":1553472000000,"doc_count":5489},{"key_as_string":"2019-04-01T00:00:00.000Z","key":1554076800000,"doc_count":5520},{"key_as_string":"2019-04-08T00:00:00.000Z","key":1554681600000,"doc_count":5484},{"key_as_string":"2019-04-15T00:00:00.000Z","key":1555286400000,"doc_count":5032},{"key_as_string":"2019-04-22T00:00:00.000Z","key":1555891200000,"doc_count":5156},{"key_as_string":"2019-04-29T00:00:00.000Z","key":1556496000000,"doc_count":5263},{"key_as_string":"2019-05-06T00:00:00.000Z","key":1557100800000,"doc_count":5235},{"key_as_string":"2019-05-13T00:00:00.000Z","key":1557705600000,"doc_count":5435},{"key_as_string":"2019-05-20T00:00:00.000Z","key":1558310400000,"doc_count":5302},{"key_as_string":"2019-05-27T00:00:00.000Z","key":1558915200000,"doc_count":5131},{"key_as_string":"2019-06-03T00:00:00.000Z","key":1559520000000,"doc_count":5387},{"key_as_string":"2019-06-10T00:00:00.000Z","key":1560124800000,"doc_count":5695},{"key_as_string":"2019-06-17T00:00:00.000Z","key":1560729600000,"doc_count":5731},{"key_as_string":"2019-06-24T00:00:00.000Z","key":1561334400000,"doc_count":5746},{"key_as_string":"2019-07-01T00:00:00.000Z","key":1561939200000,"doc_count":4791},{"key_as_string":"2019-07-08T00:00:00.000Z","key":1562544000000,"doc_count":5681},{"key_as_string":"2019-07-15T00:00:00.000Z","key":1563148800000,"doc_count":5588},{"key_as_string":"2019-07-22T00:00:00.000Z","key":1563753600000,"doc_count":5755},{"key_as_string":"2019-07-29T00:00:00.000Z","key":1564358400000,"doc_count":6063},{"key_as_string":"2019-08-05T00:00:00.000Z","key":1564963200000,"doc_count":5920},{"key_as_string":"2019-08-12T00:00:00.000Z","key":1565568000000,"doc_count":6258},{"key_as_string":"2019-08-19T00:00:00.000Z","key":1566172800000,"doc_count":5858},{"key_as_string":"2019-08-26T00:00:00.000Z","key":1566777600000,"doc_count":5601},{"key_as_string":"2019-09-02T00:00:00.000Z","key":1567382400000,"doc_count":5092},{"key_as_string":"2019-09-09T00:00:00.000Z","key":1567987200000,"doc_count":5919},{"key_as_string":"2019-09-16T00:00:00.000Z","key":1568592000000,"doc_count":5656},{"key_as_string":"2019-09-23T00:00:00.000Z","key":1569196800000,"doc_count":5664},{"key_as_string":"2019-09-30T00:00:00.000Z","key":1569801600000,"doc_count":5654},{"key_as_string":"2019-10-07T00:00:00.000Z","key":1570406400000,"doc_count":5339},{"key_as_string":"2019-10-14T00:00:00.000Z","key":1571011200000,"doc_count":5584},{"key_as_string":"2019-10-21T00:00:00.000Z","key":1571616000000,"doc_count":5845},{"key_as_string":"2019-10-28T00:00:00.000Z","key":1572220800000,"doc_count":5758},{"key_as_string":"2019-11-04T00:00:00.000Z","key":1572825600000,"doc_count":5739},{"key_as_string":"2019-11-11T00:00:00.000Z","key":1573430400000,"doc_count":5186},{"key_as_string":"2019-11-18T00:00:00.000Z","key":1574035200000,"doc_count":6035},{"key_as_string":"2019-11-25T00:00:00.000Z","key":1574640000000,"doc_count":4400},{"key_as_string":"2019-12-02T00:00:00.000Z","key":1575244800000,"doc_count":5602},{"key_as_string":"2019-12-09T00:00:00.000Z","key":1575849600000,"doc_count":5196},{"key_as_string":"2019-12-16T00:00:00.000Z","key":1576454400000,"doc_count":5193},{"key_as_string":"2019-12-23T00:00:00.000Z","key":1577059200000,"doc_count":3623},{"key_as_string":"2019-12-30T00:00:00.000Z","key":1577664000000,"doc_count":4630},{"key_as_string":"2020-01-06T00:00:00.000Z","key":1578268800000,"doc_count":5889},{"key_as_string":"2020-01-13T00:00:00.000Z","key":1578873600000,"doc_count":6482},{"key_as_string":"2020-01-20T00:00:00.000Z","key":1579478400000,"doc_count":5933},{"key_as_string":"2020-01-27T00:00:00.000Z","key":1580083200000,"doc_count":5999},{"key_as_string":"2020-02-03T00:00:00.000Z","key":1580688000000,"doc_count":6438},{"key_as_string":"2020-02-10T00:00:00.000Z","key":1581292800000,"doc_count":6093},{"key_as_string":"2020-02-17T00:00:00.000Z","key":1581897600000,"doc_count":5816},{"key_as_string":"2020-02-24T00:00:00.000Z","key":1582502400000,"doc_count":6390},{"key_as_string":"2020-03-02T00:00:00.000Z","key":1583107200000,"doc_count":6592},{"key_as_string":"2020-03-09T00:00:00.000Z","key":1583712000000,"doc_count":6660},{"key_as_string":"2020-03-16T00:00:00.000Z","key":1584316800000,"doc_count":6479},{"key_as_string":"2020-03-23T00:00:00.000Z","key":1584921600000,"doc_count":6991},{"key_as_string":"2020-03-30T00:00:00.000Z","key":1585526400000,"doc_count":7327},{"key_as_string":"2020-04-06T00:00:00.000Z","key":1586131200000,"doc_count":7521},{"key_as_string":"2020-04-13T00:00:00.000Z","key":1586736000000,"doc_count":7832},{"key_as_string":"2020-04-20T00:00:00.000Z","key":1587340800000,"doc_count":8759},{"key_as_string":"2020-04-27T00:00:00.000Z","key":1587945600000,"doc_count":8727},{"key_as_string":"2020-05-04T00:00:00.000Z","key":1588550400000,"doc_count":4339},{"key_as_string":"2020-05-11T00:00:00.000Z","key":1589155200000,"doc_count":2757},{"key_as_string":"2020-05-18T00:00:00.000Z","key":1589760000000,"doc_count":17}]}},"product":{"doc_count":75777,"product":{"doc_count_error_upper_bound":0,"sum_other_doc_count":18820,"buckets":[{"key":"Credit reporting, credit repair services, or other personal consumer reports","doc_count":17582,"product":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[{"key":"Credit reporting","doc_count":17207,"trend_period":{"buckets":[{"key_as_string":"2017-06-26T00:00:00.000Z","key":1498435200000,"doc_count":1607,"interval_diff":{"value":-203}}]}},{"key":"Other personal consumer report","doc_count":312,"trend_period":{"buckets":[{"key_as_string":"2017-06-26T00:00:00.000Z","key":1498435200000,"doc_count":27,"interval_diff":{"value":-13}}]}},{"key":"Credit repair services","doc_count":63,"trend_period":{"buckets":[{"key_as_string":"2017-06-26T00:00:00.000Z","key":1498435200000,"doc_count":8,"interval_diff":{"value":4}}]}}]},"trend_period":{"buckets":[{"key_as_string":"2017-07-03T00:00:00.000Z","key":1499040000000,"doc_count":1296,"interval_diff":{"value":-346}},{"key_as_string":"2017-06-26T00:00:00.000Z","key":1498435200000,"doc_count":1642,"interval_diff":{"value":-212}},{"key_as_string":"2017-06-19T00:00:00.000Z","key":1497830400000,"doc_count":1854,"interval_diff":{"value":404}},{"key_as_string":"2017-06-12T00:00:00.000Z","key":1497225600000,"doc_count":1450,"interval_diff":{"value":-30}},{"key_as_string":"2017-06-05T00:00:00.000Z","key":1496620800000,"doc_count":1480,"interval_diff":{"value":19}},{"key_as_string":"2017-05-29T00:00:00.000Z","key":1496016000000,"doc_count":1461,"interval_diff":{"value":-128}},{"key_as_string":"2017-05-22T00:00:00.000Z","key":1495411200000,"doc_count":1589,"interval_diff":{"value":15}},{"key_as_string":"2017-05-15T00:00:00.000Z","key":1494806400000,"doc_count":1574,"interval_diff":{"value":8}},{"key_as_string":"2017-05-08T00:00:00.000Z","key":1494201600000,"doc_count":1566,"interval_diff":{"value":-142}},{"key_as_string":"2017-05-01T00:00:00.000Z","key":1493596800000,"doc_count":1708,"interval_diff":{"value":-254}},{"key_as_string":"2017-04-24T00:00:00.000Z","key":1492992000000,"doc_count":1962}]}},{"key":"Debt collection","doc_count":16518,"product":{"doc_count_error_upper_bound":0,"sum_other_doc_count":4657,"buckets":[{"key":"I do not know","doc_count":3034,"trend_period":{"buckets":[{"key_as_string":"2017-06-26T00:00:00.000Z","key":1498435200000,"doc_count":183,"interval_diff":{"value":52}}]}},{"key":"Other debt","doc_count":2937,"trend_period":{"buckets":[{"key_as_string":"2017-06-26T00:00:00.000Z","key":1498435200000,"doc_count":270,"interval_diff":{"value":0}}]}},{"key":"Other (i.e. phone, health club, etc.)","doc_count":2343,"trend_period":{"buckets":[{"key_as_string":"2017-04-10T00:00:00.000Z","key":1491782400000,"doc_count":314,"interval_diff":{"value":-82}}]}},{"key":"Credit card debt","doc_count":1845,"trend_period":{"buckets":[{"key_as_string":"2017-06-26T00:00:00.000Z","key":1498435200000,"doc_count":171,"interval_diff":{"value":16}}]}},{"key":"Medical debt","doc_count":1702,"trend_period":{"buckets":[{"key_as_string":"2017-06-26T00:00:00.000Z","key":1498435200000,"doc_count":138,"interval_diff":{"value":1}}]}}]},"trend_period":{"buckets":[{"key_as_string":"2017-07-03T00:00:00.000Z","key":1499040000000,"doc_count":663,"interval_diff":{"value":-241}},{"key_as_string":"2017-06-26T00:00:00.000Z","key":1498435200000,"doc_count":904,"interval_diff":{"value":101}},{"key_as_string":"2017-06-19T00:00:00.000Z","key":1497830400000,"doc_count":803,"interval_diff":{"value":5}},{"key_as_string":"2017-06-12T00:00:00.000Z","key":1497225600000,"doc_count":798,"interval_diff":{"value":-116}},{"key_as_string":"2017-06-05T00:00:00.000Z","key":1496620800000,"doc_count":914,"interval_diff":{"value":97}},{"key_as_string":"2017-05-29T00:00:00.000Z","key":1496016000000,"doc_count":817,"interval_diff":{"value":4}},{"key_as_string":"2017-05-22T00:00:00.000Z","key":1495411200000,"doc_count":813,"interval_diff":{"value":-189}},{"key_as_string":"2017-05-15T00:00:00.000Z","key":1494806400000,"doc_count":1002,"interval_diff":{"value":55}},{"key_as_string":"2017-05-08T00:00:00.000Z","key":1494201600000,"doc_count":947,"interval_diff":{"value":-56}},{"key_as_string":"2017-05-01T00:00:00.000Z","key":1493596800000,"doc_count":1003,"interval_diff":{"value":-37}},{"key_as_string":"2017-04-24T00:00:00.000Z","key":1492992000000,"doc_count":1040,"interval_diff":{"value":73}},{"key_as_string":"2017-04-17T00:00:00.000Z","key":1492387200000,"doc_count":967,"interval_diff":{"value":23}},{"key_as_string":"2017-04-10T00:00:00.000Z","key":1491782400000,"doc_count":944,"interval_diff":{"value":-142}},{"key_as_string":"2017-04-03T00:00:00.000Z","key":1491177600000,"doc_count":1086,"interval_diff":{"value":23}},{"key_as_string":"2017-03-27T00:00:00.000Z","key":1490572800000,"doc_count":1063,"interval_diff":{"value":0}},{"key_as_string":"2017-03-20T00:00:00.000Z","key":1489968000000,"doc_count":1063,"interval_diff":{"value":4}},{"key_as_string":"2017-03-13T00:00:00.000Z","key":1489363200000,"doc_count":1059,"interval_diff":{"value":427}},{"key_as_string":"2017-03-06T00:00:00.000Z","key":1488758400000,"doc_count":632}]}},{"key":"Mortgage","doc_count":10498,"product":{"doc_count_error_upper_bound":0,"sum_other_doc_count":1759,"buckets":[{"key":"Conventional home mortgage","doc_count":3221,"trend_period":{"buckets":[{"key_as_string":"2017-06-26T00:00:00.000Z","key":1498435200000,"doc_count":283,"interval_diff":{"value":26}}]}},{"key":"Other type of mortgage","doc_count":1439,"trend_period":{"buckets":[{"key_as_string":"2017-06-26T00:00:00.000Z","key":1498435200000,"doc_count":126,"interval_diff":{"value":9}}]}},{"key":"Conventional fixed mortgage","doc_count":1433,"trend_period":{"buckets":[{"key_as_string":"2017-04-10T00:00:00.000Z","key":1491782400000,"doc_count":190,"interval_diff":{"value":-34}}]}},{"key":"FHA mortgage","doc_count":1378,"trend_period":{"buckets":[{"key_as_string":"2017-06-26T00:00:00.000Z","key":1498435200000,"doc_count":69,"interval_diff":{"value":1}}]}},{"key":"Other mortgage","doc_count":1268,"trend_period":{"buckets":[{"key_as_string":"2017-04-10T00:00:00.000Z","key":1491782400000,"doc_count":160,"interval_diff":{"value":-4}}]}}]},"trend_period":{"buckets":[{"key_as_string":"2017-07-03T00:00:00.000Z","key":1499040000000,"doc_count":391,"interval_diff":{"value":-148}},{"key_as_string":"2017-06-26T00:00:00.000Z","key":1498435200000,"doc_count":539,"interval_diff":{"value":15}},{"key_as_string":"2017-06-19T00:00:00.000Z","key":1497830400000,"doc_count":524,"interval_diff":{"value":6}},{"key_as_string":"2017-06-12T00:00:00.000Z","key":1497225600000,"doc_count":518,"interval_diff":{"value":-24}},{"key_as_string":"2017-06-05T00:00:00.000Z","key":1496620800000,"doc_count":542,"interval_diff":{"value":57}},{"key_as_string":"2017-05-29T00:00:00.000Z","key":1496016000000,"doc_count":485,"interval_diff":{"value":-113}},{"key_as_string":"2017-05-22T00:00:00.000Z","key":1495411200000,"doc_count":598,"interval_diff":{"value":-52}},{"key_as_string":"2017-05-15T00:00:00.000Z","key":1494806400000,"doc_count":650,"interval_diff":{"value":103}},{"key_as_string":"2017-05-08T00:00:00.000Z","key":1494201600000,"doc_count":547,"interval_diff":{"value":-104}},{"key_as_string":"2017-05-01T00:00:00.000Z","key":1493596800000,"doc_count":651,"interval_diff":{"value":-55}},{"key_as_string":"2017-04-24T00:00:00.000Z","key":1492992000000,"doc_count":706,"interval_diff":{"value":76}},{"key_as_string":"2017-04-17T00:00:00.000Z","key":1492387200000,"doc_count":630,"interval_diff":{"value":46}},{"key_as_string":"2017-04-10T00:00:00.000Z","key":1491782400000,"doc_count":584,"interval_diff":{"value":-15}},{"key_as_string":"2017-04-03T00:00:00.000Z","key":1491177600000,"doc_count":599,"interval_diff":{"value":-90}},{"key_as_string":"2017-03-27T00:00:00.000Z","key":1490572800000,"doc_count":689,"interval_diff":{"value":16}},{"key_as_string":"2017-03-20T00:00:00.000Z","key":1489968000000,"doc_count":673,"interval_diff":{"value":-52}},{"key_as_string":"2017-03-13T00:00:00.000Z","key":1489363200000,"doc_count":725,"interval_diff":{"value":278}},{"key_as_string":"2017-03-06T00:00:00.000Z","key":1488758400000,"doc_count":447}]}},{"key":"Credit reporting","doc_count":7502,"product":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[]},"trend_period":{"buckets":[{"key_as_string":"2017-04-17T00:00:00.000Z","key":1492387200000,"doc_count":1017,"interval_diff":{"value":-259}},{"key_as_string":"2017-04-10T00:00:00.000Z","key":1491782400000,"doc_count":1276,"interval_diff":{"value":-22}},{"key_as_string":"2017-04-03T00:00:00.000Z","key":1491177600000,"doc_count":1298,"interval_diff":{"value":169}},{"key_as_string":"2017-03-27T00:00:00.000Z","key":1490572800000,"doc_count":1129,"interval_diff":{"value":48}},{"key_as_string":"2017-03-20T00:00:00.000Z","key":1489968000000,"doc_count":1081,"interval_diff":{"value":-1}},{"key_as_string":"2017-03-13T00:00:00.000Z","key":1489363200000,"doc_count":1082,"interval_diff":{"value":463}},{"key_as_string":"2017-03-06T00:00:00.000Z","key":1488758400000,"doc_count":619}]}},{"key":"Student loan","doc_count":4857,"product":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[{"key":"Federal student loan servicing","doc_count":2950,"trend_period":{"buckets":[{"key_as_string":"2017-06-26T00:00:00.000Z","key":1498435200000,"doc_count":125,"interval_diff":{"value":5}}]}},{"key":"Private student loan","doc_count":995,"trend_period":{"buckets":[{"key_as_string":"2017-06-26T00:00:00.000Z","key":1498435200000,"doc_count":69,"interval_diff":{"value":-33}}]}},{"key":"Non-federal student loan","doc_count":912,"trend_period":{"buckets":[{"key_as_string":"2017-04-10T00:00:00.000Z","key":1491782400000,"doc_count":154,"interval_diff":{"value":8}}]}}]},"trend_period":{"buckets":[{"key_as_string":"2017-07-03T00:00:00.000Z","key":1499040000000,"doc_count":169,"interval_diff":{"value":-25}},{"key_as_string":"2017-06-26T00:00:00.000Z","key":1498435200000,"doc_count":194,"interval_diff":{"value":-28}},{"key_as_string":"2017-06-19T00:00:00.000Z","key":1497830400000,"doc_count":222,"interval_diff":{"value":22}},{"key_as_string":"2017-06-12T00:00:00.000Z","key":1497225600000,"doc_count":200,"interval_diff":{"value":9}},{"key_as_string":"2017-06-05T00:00:00.000Z","key":1496620800000,"doc_count":191,"interval_diff":{"value":0}},{"key_as_string":"2017-05-29T00:00:00.000Z","key":1496016000000,"doc_count":191,"interval_diff":{"value":-46}},{"key_as_string":"2017-05-22T00:00:00.000Z","key":1495411200000,"doc_count":237,"interval_diff":{"value":25}},{"key_as_string":"2017-05-15T00:00:00.000Z","key":1494806400000,"doc_count":212,"interval_diff":{"value":-18}},{"key_as_string":"2017-05-08T00:00:00.000Z","key":1494201600000,"doc_count":230,"interval_diff":{"value":-28}},{"key_as_string":"2017-05-01T00:00:00.000Z","key":1493596800000,"doc_count":258,"interval_diff":{"value":-24}},{"key_as_string":"2017-04-24T00:00:00.000Z","key":1492992000000,"doc_count":282,"interval_diff":{"value":-14}},{"key_as_string":"2017-04-17T00:00:00.000Z","key":1492387200000,"doc_count":296,"interval_diff":{"value":-115}},{"key_as_string":"2017-04-10T00:00:00.000Z","key":1491782400000,"doc_count":411,"interval_diff":{"value":2}},{"key_as_string":"2017-04-03T00:00:00.000Z","key":1491177600000,"doc_count":409,"interval_diff":{"value":30}},{"key_as_string":"2017-03-27T00:00:00.000Z","key":1490572800000,"doc_count":379,"interval_diff":{"value":54}},{"key_as_string":"2017-03-20T00:00:00.000Z","key":1489968000000,"doc_count":325,"interval_diff":{"value":-95}},{"key_as_string":"2017-03-13T00:00:00.000Z","key":1489363200000,"doc_count":420,"interval_diff":{"value":189}},{"key_as_string":"2017-03-06T00:00:00.000Z","key":1488758400000,"doc_count":231}]}}]}},"max_date":{"value":1589821200000,"value_as_string":"2020-05-18T12:00:00-05:00"},"min_date":{"value":1322758800000,"value_as_string":"2011-12-01T12:00:00-05:00"},"dateRangeArea":{"doc_count":75777,"dateRangeArea":{"buckets":[{"key_as_string":"2017-03-06T00:00:00.000Z","key":1488758400000,"doc_count":2721},{"key_as_string":"2017-03-13T00:00:00.000Z","key":1489363200000,"doc_count":4524},{"key_as_string":"2017-03-20T00:00:00.000Z","key":1489968000000,"doc_count":4358},{"key_as_string":"2017-03-27T00:00:00.000Z","key":1490572800000,"doc_count":4384},{"key_as_string":"2017-04-03T00:00:00.000Z","key":1491177600000,"doc_count":4613},{"key_as_string":"2017-04-10T00:00:00.000Z","key":1491782400000,"doc_count":4398},{"key_as_string":"2017-04-17T00:00:00.000Z","key":1492387200000,"doc_count":3972},{"key_as_string":"2017-04-24T00:00:00.000Z","key":1492992000000,"doc_count":5057},{"key_as_string":"2017-05-01T00:00:00.000Z","key":1493596800000,"doc_count":4735},{"key_as_string":"2017-05-08T00:00:00.000Z","key":1494201600000,"doc_count":4250},{"key_as_string":"2017-05-15T00:00:00.000Z","key":1494806400000,"doc_count":4364},{"key_as_string":"2017-05-22T00:00:00.000Z","key":1495411200000,"doc_count":4190},{"key_as_string":"2017-05-29T00:00:00.000Z","key":1496016000000,"doc_count":3843},{"key_as_string":"2017-06-05T00:00:00.000Z","key":1496620800000,"doc_count":4081},{"key_as_string":"2017-06-12T00:00:00.000Z","key":1497225600000,"doc_count":4102},{"key_as_string":"2017-06-19T00:00:00.000Z","key":1497830400000,"doc_count":4572},{"key_as_string":"2017-06-26T00:00:00.000Z","key":1498435200000,"doc_count":4297},{"key_as_string":"2017-07-03T00:00:00.000Z","key":1499040000000,"doc_count":3316}]}},"dateRangeBuckets":{"doc_count":75777,"dateRangeBuckets":{"buckets":[{"key_as_string":"2017-03-06T00:00:00.000Z","key":1488758400000,"doc_count":2721},{"key_as_string":"2017-03-13T00:00:00.000Z","key":1489363200000,"doc_count":4524},{"key_as_string":"2017-03-20T00:00:00.000Z","key":1489968000000,"doc_count":4358},{"key_as_string":"2017-03-27T00:00:00.000Z","key":1490572800000,"doc_count":4384},{"key_as_string":"2017-04-03T00:00:00.000Z","key":1491177600000,"doc_count":4613},{"key_as_string":"2017-04-10T00:00:00.000Z","key":1491782400000,"doc_count":4398},{"key_as_string":"2017-04-17T00:00:00.000Z","key":1492387200000,"doc_count":3972},{"key_as_string":"2017-04-24T00:00:00.000Z","key":1492992000000,"doc_count":5057},{"key_as_string":"2017-05-01T00:00:00.000Z","key":1493596800000,"doc_count":4735},{"key_as_string":"2017-05-08T00:00:00.000Z","key":1494201600000,"doc_count":4250},{"key_as_string":"2017-05-15T00:00:00.000Z","key":1494806400000,"doc_count":4364},{"key_as_string":"2017-05-22T00:00:00.000Z","key":1495411200000,"doc_count":4190},{"key_as_string":"2017-05-29T00:00:00.000Z","key":1496016000000,"doc_count":3843},{"key_as_string":"2017-06-05T00:00:00.000Z","key":1496620800000,"doc_count":4081},{"key_as_string":"2017-06-12T00:00:00.000Z","key":1497225600000,"doc_count":4102},{"key_as_string":"2017-06-19T00:00:00.000Z","key":1497830400000,"doc_count":4572},{"key_as_string":"2017-06-26T00:00:00.000Z","key":1498435200000,"doc_count":4297},{"key_as_string":"2017-07-03T00:00:00.000Z","key":1499040000000,"doc_count":3316}]}}}
+export const trendsAggsMissingBucketsResults = {"activeCall":"","chartType":"line","colorMap":{"Other":"#a2a3a4","Credit reporting, credit repair services, or other personal consumer reports":"#addc91","Debt collection":"#257675","Mortgage":"#9ec4c3","Credit reporting":"#0072ce","Student loan":"#96c4ed","Complaints":"#ADDC91","All other products":"#a2a3a4","All other companies":"#a2a3a4","All other values":"#a2a3a4"},"error":false,"expandedTrends":[],"expandableRows":["Mortgage","Credit card or prepaid card","Credit reporting, credit repair services, or other personal consumer reports","Checking or savings account","Debt collection","Student loan"],"focus":"","isLoading":false,"lastDate":"2017-07-03T00:00:00.000Z","lens":"Product","results":{"company":[],"dateRangeArea":[{"name":"Other","value":792,"date":"2017-03-06T00:00:00.000Z"},{"name":"Other","value":1238,"date":"2017-03-13T00:00:00.000Z"},{"name":"Other","value":1216,"date":"2017-03-20T00:00:00.000Z"},{"name":"Other","value":1124,"date":"2017-03-27T00:00:00.000Z"},{"name":"Other","value":1221,"date":"2017-04-03T00:00:00.000Z"},{"name":"Other","value":1183,"date":"2017-04-10T00:00:00.000Z"},{"name":"Other","value":1062,"date":"2017-04-17T00:00:00.000Z"},{"name":"Other","value":1067,"date":"2017-04-24T00:00:00.000Z"},{"name":"Other","value":1115,"date":"2017-05-01T00:00:00.000Z"},{"name":"Other","value":960,"date":"2017-05-08T00:00:00.000Z"},{"name":"Other","value":926,"date":"2017-05-15T00:00:00.000Z"},{"name":"Other","value":953,"date":"2017-05-22T00:00:00.000Z"},{"name":"Other","value":889,"date":"2017-05-29T00:00:00.000Z"},{"name":"Other","value":954,"date":"2017-06-05T00:00:00.000Z"},{"name":"Other","value":1136,"date":"2017-06-12T00:00:00.000Z"},{"name":"Other","value":1169,"date":"2017-06-19T00:00:00.000Z"},{"name":"Other","value":1018,"date":"2017-06-26T00:00:00.000Z"},{"name":"Other","value":797,"date":"2017-07-03T00:00:00.000Z"},{"name":"Credit reporting, credit repair services, or other personal consumer reports","value":1962,"date":"2017-04-24T00:00:00.000Z"},{"name":"Credit reporting, credit repair services, or other personal consumer reports","value":1708,"date":"2017-05-01T00:00:00.000Z"},{"name":"Credit reporting, credit repair services, or other personal consumer reports","value":1566,"date":"2017-05-08T00:00:00.000Z"},{"name":"Credit reporting, credit repair services, or other personal consumer reports","value":1574,"date":"2017-05-15T00:00:00.000Z"},{"name":"Credit reporting, credit repair services, or other personal consumer reports","value":1589,"date":"2017-05-22T00:00:00.000Z"},{"name":"Credit reporting, credit repair services, or other personal consumer reports","value":1461,"date":"2017-05-29T00:00:00.000Z"},{"name":"Credit reporting, credit repair services, or other personal consumer reports","value":1480,"date":"2017-06-05T00:00:00.000Z"},{"name":"Credit reporting, credit repair services, or other personal consumer reports","value":1450,"date":"2017-06-12T00:00:00.000Z"},{"name":"Credit reporting, credit repair services, or other personal consumer reports","value":1854,"date":"2017-06-19T00:00:00.000Z"},{"name":"Credit reporting, credit repair services, or other personal consumer reports","value":1642,"date":"2017-06-26T00:00:00.000Z"},{"name":"Credit reporting, credit repair services, or other personal consumer reports","value":1296,"date":"2017-07-03T00:00:00.000Z"},{"name":"Credit reporting, credit repair services, or other personal consumer reports","value":0,"date":"2017-03-06T00:00:00.000Z"},{"name":"Credit reporting, credit repair services, or other personal consumer reports","value":0,"date":"2017-03-13T00:00:00.000Z"},{"name":"Credit reporting, credit repair services, or other personal consumer reports","value":0,"date":"2017-03-20T00:00:00.000Z"},{"name":"Credit reporting, credit repair services, or other personal consumer reports","value":0,"date":"2017-03-27T00:00:00.000Z"},{"name":"Credit reporting, credit repair services, or other personal consumer reports","value":0,"date":"2017-04-03T00:00:00.000Z"},{"name":"Credit reporting, credit repair services, or other personal consumer reports","value":0,"date":"2017-04-10T00:00:00.000Z"},{"name":"Credit reporting, credit repair services, or other personal consumer reports","value":0,"date":"2017-04-17T00:00:00.000Z"},{"name":"Debt collection","value":632,"date":"2017-03-06T00:00:00.000Z"},{"name":"Debt collection","value":1059,"date":"2017-03-13T00:00:00.000Z"},{"name":"Debt collection","value":1063,"date":"2017-03-20T00:00:00.000Z"},{"name":"Debt collection","value":1063,"date":"2017-03-27T00:00:00.000Z"},{"name":"Debt collection","value":1086,"date":"2017-04-03T00:00:00.000Z"},{"name":"Debt collection","value":944,"date":"2017-04-10T00:00:00.000Z"},{"name":"Debt collection","value":967,"date":"2017-04-17T00:00:00.000Z"},{"name":"Debt collection","value":1040,"date":"2017-04-24T00:00:00.000Z"},{"name":"Debt collection","value":1003,"date":"2017-05-01T00:00:00.000Z"},{"name":"Debt collection","value":947,"date":"2017-05-08T00:00:00.000Z"},{"name":"Debt collection","value":1002,"date":"2017-05-15T00:00:00.000Z"},{"name":"Debt collection","value":813,"date":"2017-05-22T00:00:00.000Z"},{"name":"Debt collection","value":817,"date":"2017-05-29T00:00:00.000Z"},{"name":"Debt collection","value":914,"date":"2017-06-05T00:00:00.000Z"},{"name":"Debt collection","value":798,"date":"2017-06-12T00:00:00.000Z"},{"name":"Debt collection","value":803,"date":"2017-06-19T00:00:00.000Z"},{"name":"Debt collection","value":904,"date":"2017-06-26T00:00:00.000Z"},{"name":"Debt collection","value":663,"date":"2017-07-03T00:00:00.000Z"},{"name":"Mortgage","value":447,"date":"2017-03-06T00:00:00.000Z"},{"name":"Mortgage","value":725,"date":"2017-03-13T00:00:00.000Z"},{"name":"Mortgage","value":673,"date":"2017-03-20T00:00:00.000Z"},{"name":"Mortgage","value":689,"date":"2017-03-27T00:00:00.000Z"},{"name":"Mortgage","value":599,"date":"2017-04-03T00:00:00.000Z"},{"name":"Mortgage","value":584,"date":"2017-04-10T00:00:00.000Z"},{"name":"Mortgage","value":630,"date":"2017-04-17T00:00:00.000Z"},{"name":"Mortgage","value":706,"date":"2017-04-24T00:00:00.000Z"},{"name":"Mortgage","value":651,"date":"2017-05-01T00:00:00.000Z"},{"name":"Mortgage","value":547,"date":"2017-05-08T00:00:00.000Z"},{"name":"Mortgage","value":650,"date":"2017-05-15T00:00:00.000Z"},{"name":"Mortgage","value":598,"date":"2017-05-22T00:00:00.000Z"},{"name":"Mortgage","value":485,"date":"2017-05-29T00:00:00.000Z"},{"name":"Mortgage","value":542,"date":"2017-06-05T00:00:00.000Z"},{"name":"Mortgage","value":518,"date":"2017-06-12T00:00:00.000Z"},{"name":"Mortgage","value":524,"date":"2017-06-19T00:00:00.000Z"},{"name":"Mortgage","value":539,"date":"2017-06-26T00:00:00.000Z"},{"name":"Mortgage","value":391,"date":"2017-07-03T00:00:00.000Z"},{"name":"Credit reporting","value":619,"date":"2017-03-06T00:00:00.000Z"},{"name":"Credit reporting","value":1082,"date":"2017-03-13T00:00:00.000Z"},{"name":"Credit reporting","value":1081,"date":"2017-03-20T00:00:00.000Z"},{"name":"Credit reporting","value":1129,"date":"2017-03-27T00:00:00.000Z"},{"name":"Credit reporting","value":1298,"date":"2017-04-03T00:00:00.000Z"},{"name":"Credit reporting","value":1276,"date":"2017-04-10T00:00:00.000Z"},{"name":"Credit reporting","value":1017,"date":"2017-04-17T00:00:00.000Z"},{"name":"Credit reporting","value":0,"date":"2017-04-24T00:00:00.000Z"},{"name":"Credit reporting","value":0,"date":"2017-05-01T00:00:00.000Z"},{"name":"Credit reporting","value":0,"date":"2017-05-08T00:00:00.000Z"},{"name":"Credit reporting","value":0,"date":"2017-05-15T00:00:00.000Z"},{"name":"Credit reporting","value":0,"date":"2017-05-22T00:00:00.000Z"},{"name":"Credit reporting","value":0,"date":"2017-05-29T00:00:00.000Z"},{"name":"Credit reporting","value":0,"date":"2017-06-05T00:00:00.000Z"},{"name":"Credit reporting","value":0,"date":"2017-06-12T00:00:00.000Z"},{"name":"Credit reporting","value":0,"date":"2017-06-19T00:00:00.000Z"},{"name":"Credit reporting","value":0,"date":"2017-06-26T00:00:00.000Z"},{"name":"Credit reporting","value":0,"date":"2017-07-03T00:00:00.000Z"},{"name":"Student loan","value":231,"date":"2017-03-06T00:00:00.000Z"},{"name":"Student loan","value":420,"date":"2017-03-13T00:00:00.000Z"},{"name":"Student loan","value":325,"date":"2017-03-20T00:00:00.000Z"},{"name":"Student loan","value":379,"date":"2017-03-27T00:00:00.000Z"},{"name":"Student loan","value":409,"date":"2017-04-03T00:00:00.000Z"},{"name":"Student loan","value":411,"date":"2017-04-10T00:00:00.000Z"},{"name":"Student loan","value":296,"date":"2017-04-17T00:00:00.000Z"},{"name":"Student loan","value":282,"date":"2017-04-24T00:00:00.000Z"},{"name":"Student loan","value":258,"date":"2017-05-01T00:00:00.000Z"},{"name":"Student loan","value":230,"date":"2017-05-08T00:00:00.000Z"},{"name":"Student loan","value":212,"date":"2017-05-15T00:00:00.000Z"},{"name":"Student loan","value":237,"date":"2017-05-22T00:00:00.000Z"},{"name":"Student loan","value":191,"date":"2017-05-29T00:00:00.000Z"},{"name":"Student loan","value":191,"date":"2017-06-05T00:00:00.000Z"},{"name":"Student loan","value":200,"date":"2017-06-12T00:00:00.000Z"},{"name":"Student loan","value":222,"date":"2017-06-19T00:00:00.000Z"},{"name":"Student loan","value":194,"date":"2017-06-26T00:00:00.000Z"},{"name":"Student loan","value":169,"date":"2017-07-03T00:00:00.000Z"}],"dateRangeLine":{"dataByTopic":[{"topic":"Credit reporting, credit repair services, or other personal consumer reports","topicName":"Credit reporting, credit repair services, or other personal consumer reports","dashed":false,"show":true,"dates":[{"name":"Credit reporting, credit repair services, or other personal consumer reports","date":"2017-03-06T00:00:00.000Z","value":0},{"name":"Credit reporting, credit repair services, or other personal consumer reports","date":"2017-03-13T00:00:00.000Z","value":0},{"name":"Credit reporting, credit repair services, or other personal consumer reports","date":"2017-03-20T00:00:00.000Z","value":0},{"name":"Credit reporting, credit repair services, or other personal consumer reports","date":"2017-03-27T00:00:00.000Z","value":0},{"name":"Credit reporting, credit repair services, or other personal consumer reports","date":"2017-04-03T00:00:00.000Z","value":0},{"name":"Credit reporting, credit repair services, or other personal consumer reports","date":"2017-04-10T00:00:00.000Z","value":0},{"name":"Credit reporting, credit repair services, or other personal consumer reports","date":"2017-04-17T00:00:00.000Z","value":0},{"name":"Credit reporting, credit repair services, or other personal consumer reports","date":"2017-04-24T00:00:00.000Z","value":1962},{"name":"Credit reporting, credit repair services, or other personal consumer reports","date":"2017-05-01T00:00:00.000Z","value":1708},{"name":"Credit reporting, credit repair services, or other personal consumer reports","date":"2017-05-08T00:00:00.000Z","value":1566},{"name":"Credit reporting, credit repair services, or other personal consumer reports","date":"2017-05-15T00:00:00.000Z","value":1574},{"name":"Credit reporting, credit repair services, or other personal consumer reports","date":"2017-05-22T00:00:00.000Z","value":1589},{"name":"Credit reporting, credit repair services, or other personal consumer reports","date":"2017-05-29T00:00:00.000Z","value":1461},{"name":"Credit reporting, credit repair services, or other personal consumer reports","date":"2017-06-05T00:00:00.000Z","value":1480},{"name":"Credit reporting, credit repair services, or other personal consumer reports","date":"2017-06-12T00:00:00.000Z","value":1450},{"name":"Credit reporting, credit repair services, or other personal consumer reports","date":"2017-06-19T00:00:00.000Z","value":1854},{"name":"Credit reporting, credit repair services, or other personal consumer reports","date":"2017-06-26T00:00:00.000Z","value":1642},{"name":"Credit reporting, credit repair services, or other personal consumer reports","date":"2017-07-03T00:00:00.000Z","value":1296}]},{"topic":"Debt collection","topicName":"Debt collection","dashed":false,"show":true,"dates":[{"name":"Debt collection","date":"2017-03-06T00:00:00.000Z","value":632},{"name":"Debt collection","date":"2017-03-13T00:00:00.000Z","value":1059},{"name":"Debt collection","date":"2017-03-20T00:00:00.000Z","value":1063},{"name":"Debt collection","date":"2017-03-27T00:00:00.000Z","value":1063},{"name":"Debt collection","date":"2017-04-03T00:00:00.000Z","value":1086},{"name":"Debt collection","date":"2017-04-10T00:00:00.000Z","value":944},{"name":"Debt collection","date":"2017-04-17T00:00:00.000Z","value":967},{"name":"Debt collection","date":"2017-04-24T00:00:00.000Z","value":1040},{"name":"Debt collection","date":"2017-05-01T00:00:00.000Z","value":1003},{"name":"Debt collection","date":"2017-05-08T00:00:00.000Z","value":947},{"name":"Debt collection","date":"2017-05-15T00:00:00.000Z","value":1002},{"name":"Debt collection","date":"2017-05-22T00:00:00.000Z","value":813},{"name":"Debt collection","date":"2017-05-29T00:00:00.000Z","value":817},{"name":"Debt collection","date":"2017-06-05T00:00:00.000Z","value":914},{"name":"Debt collection","date":"2017-06-12T00:00:00.000Z","value":798},{"name":"Debt collection","date":"2017-06-19T00:00:00.000Z","value":803},{"name":"Debt collection","date":"2017-06-26T00:00:00.000Z","value":904},{"name":"Debt collection","date":"2017-07-03T00:00:00.000Z","value":663}]},{"topic":"Mortgage","topicName":"Mortgage","dashed":false,"show":true,"dates":[{"name":"Mortgage","date":"2017-03-06T00:00:00.000Z","value":447},{"name":"Mortgage","date":"2017-03-13T00:00:00.000Z","value":725},{"name":"Mortgage","date":"2017-03-20T00:00:00.000Z","value":673},{"name":"Mortgage","date":"2017-03-27T00:00:00.000Z","value":689},{"name":"Mortgage","date":"2017-04-03T00:00:00.000Z","value":599},{"name":"Mortgage","date":"2017-04-10T00:00:00.000Z","value":584},{"name":"Mortgage","date":"2017-04-17T00:00:00.000Z","value":630},{"name":"Mortgage","date":"2017-04-24T00:00:00.000Z","value":706},{"name":"Mortgage","date":"2017-05-01T00:00:00.000Z","value":651},{"name":"Mortgage","date":"2017-05-08T00:00:00.000Z","value":547},{"name":"Mortgage","date":"2017-05-15T00:00:00.000Z","value":650},{"name":"Mortgage","date":"2017-05-22T00:00:00.000Z","value":598},{"name":"Mortgage","date":"2017-05-29T00:00:00.000Z","value":485},{"name":"Mortgage","date":"2017-06-05T00:00:00.000Z","value":542},{"name":"Mortgage","date":"2017-06-12T00:00:00.000Z","value":518},{"name":"Mortgage","date":"2017-06-19T00:00:00.000Z","value":524},{"name":"Mortgage","date":"2017-06-26T00:00:00.000Z","value":539},{"name":"Mortgage","date":"2017-07-03T00:00:00.000Z","value":391}]},{"topic":"Credit reporting","topicName":"Credit reporting","dashed":false,"show":true,"dates":[{"name":"Credit reporting","date":"2017-03-06T00:00:00.000Z","value":619},{"name":"Credit reporting","date":"2017-03-13T00:00:00.000Z","value":1082},{"name":"Credit reporting","date":"2017-03-20T00:00:00.000Z","value":1081},{"name":"Credit reporting","date":"2017-03-27T00:00:00.000Z","value":1129},{"name":"Credit reporting","date":"2017-04-03T00:00:00.000Z","value":1298},{"name":"Credit reporting","date":"2017-04-10T00:00:00.000Z","value":1276},{"name":"Credit reporting","date":"2017-04-17T00:00:00.000Z","value":1017},{"name":"Credit reporting","date":"2017-04-24T00:00:00.000Z","value":0},{"name":"Credit reporting","date":"2017-05-01T00:00:00.000Z","value":0},{"name":"Credit reporting","date":"2017-05-08T00:00:00.000Z","value":0},{"name":"Credit reporting","date":"2017-05-15T00:00:00.000Z","value":0},{"name":"Credit reporting","date":"2017-05-22T00:00:00.000Z","value":0},{"name":"Credit reporting","date":"2017-05-29T00:00:00.000Z","value":0},{"name":"Credit reporting","date":"2017-06-05T00:00:00.000Z","value":0},{"name":"Credit reporting","date":"2017-06-12T00:00:00.000Z","value":0},{"name":"Credit reporting","date":"2017-06-19T00:00:00.000Z","value":0},{"name":"Credit reporting","date":"2017-06-26T00:00:00.000Z","value":0},{"name":"Credit reporting","date":"2017-07-03T00:00:00.000Z","value":0}]},{"topic":"Student loan","topicName":"Student loan","dashed":false,"show":true,"dates":[{"name":"Student loan","date":"2017-03-06T00:00:00.000Z","value":231},{"name":"Student loan","date":"2017-03-13T00:00:00.000Z","value":420},{"name":"Student loan","date":"2017-03-20T00:00:00.000Z","value":325},{"name":"Student loan","date":"2017-03-27T00:00:00.000Z","value":379},{"name":"Student loan","date":"2017-04-03T00:00:00.000Z","value":409},{"name":"Student loan","date":"2017-04-10T00:00:00.000Z","value":411},{"name":"Student loan","date":"2017-04-17T00:00:00.000Z","value":296},{"name":"Student loan","date":"2017-04-24T00:00:00.000Z","value":282},{"name":"Student loan","date":"2017-05-01T00:00:00.000Z","value":258},{"name":"Student loan","date":"2017-05-08T00:00:00.000Z","value":230},{"name":"Student loan","date":"2017-05-15T00:00:00.000Z","value":212},{"name":"Student loan","date":"2017-05-22T00:00:00.000Z","value":237},{"name":"Student loan","date":"2017-05-29T00:00:00.000Z","value":191},{"name":"Student loan","date":"2017-06-05T00:00:00.000Z","value":191},{"name":"Student loan","date":"2017-06-12T00:00:00.000Z","value":200},{"name":"Student loan","date":"2017-06-19T00:00:00.000Z","value":222},{"name":"Student loan","date":"2017-06-26T00:00:00.000Z","value":194},{"name":"Student loan","date":"2017-07-03T00:00:00.000Z","value":169}]}]},"product":[{"hasChildren":true,"isNotFilter":false,"isParent":true,"name":"Credit reporting, credit repair services, or other personal consumer reports","value":17582,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Credit reporting","value":17207,"parent":"Credit reporting, credit repair services, or other personal consumer reports","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Other personal consumer report","value":312,"parent":"Credit reporting, credit repair services, or other personal consumer reports","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Credit repair services","value":63,"parent":"Credit reporting, credit repair services, or other personal consumer reports","visible":false,"width":0.4},{"hasChildren":false,"isParent":false,"key":"Visualize trends for Credit reporting, credit repair services, or other personal consumer reports","name":"Visualize trends for Credit reporting, credit repair services, or other personal consumer reports","splitterText":"Visualize trends for Credit reporting, credit repair services, or other personal consumer reports","value":"","parent":"Credit reporting, credit repair services, or other personal consumer reports","width":0.3,"visible":false},{"hasChildren":true,"isNotFilter":false,"isParent":true,"name":"Debt collection","value":16518,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"I do not know","value":3034,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Other debt","value":2937,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Other (i.e. phone, health club, etc.)","value":2343,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Credit card debt","value":1845,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Medical debt","value":1702,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isParent":false,"key":"Visualize trends for Debt collection","name":"Visualize trends for Debt collection","splitterText":"Visualize trends for Debt collection","value":"","parent":"Debt collection","width":0.3,"visible":false},{"hasChildren":true,"isNotFilter":false,"isParent":true,"name":"Mortgage","value":10498,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Conventional home mortgage","value":3221,"parent":"Mortgage","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Other type of mortgage","value":1439,"parent":"Mortgage","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Conventional fixed mortgage","value":1433,"parent":"Mortgage","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"FHA mortgage","value":1378,"parent":"Mortgage","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Other mortgage","value":1268,"parent":"Mortgage","visible":false,"width":0.4},{"hasChildren":false,"isParent":false,"key":"Visualize trends for Mortgage","name":"Visualize trends for Mortgage","splitterText":"Visualize trends for Mortgage","value":"","parent":"Mortgage","width":0.3,"visible":false},{"hasChildren":false,"isNotFilter":false,"isParent":true,"name":"Credit reporting ","value":7502,"parent":false,"visible":true,"width":0.5},{"hasChildren":true,"isNotFilter":false,"isParent":true,"name":"Student loan","value":4857,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Federal student loan servicing","value":2950,"parent":"Student loan","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Private student loan","value":995,"parent":"Student loan","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Non-federal student loan","value":912,"parent":"Student loan","visible":false,"width":0.4},{"hasChildren":false,"isParent":false,"key":"Visualize trends for Student loan","name":"Visualize trends for Student loan","splitterText":"Visualize trends for Student loan","value":"","parent":"Student loan","width":0.3,"visible":false}]},"subLens":"","tooltip":false,"total":75777}
diff --git a/src/reducers/__fixtures__/trendsBackfill.jsx b/src/reducers/__fixtures__/trendsBackfill.jsx
new file mode 100644
index 000000000..3deb3422d
--- /dev/null
+++ b/src/reducers/__fixtures__/trendsBackfill.jsx
@@ -0,0 +1,3 @@
+// for the "Covid" test where values don't appear outside of the search range
+export const trendsBackfill = {"dateRangeBrush":{"doc_count":532,"dateRangeBrush":{"buckets":[{"key_as_string":"2020-01-01T00:00:00.000Z","key":1577836800000,"doc_count":532}]}},"product":{"doc_count":532,"product":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[{"key":"Mortgage","doc_count":185,"product":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[{"key":"Conventional home mortgage","doc_count":108,"trend_period":{"buckets":[]}},{"key":"FHA mortgage","doc_count":44,"trend_period":{"buckets":[]}},{"key":"VA mortgage","doc_count":19,"trend_period":{"buckets":[]}},{"key":"Other type of mortgage","doc_count":9,"trend_period":{"buckets":[]}},{"key":"Home equity loan or line of credit (HELOC)","doc_count":5,"trend_period":{"buckets":[]}}]},"trend_period":{"buckets":[{"key_as_string":"2020-01-01T00:00:00.000Z","key":1577836800000,"doc_count":185}]}},{"key":"Credit card or prepaid card","doc_count":129,"product":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[{"key":"General-purpose credit card or charge card","doc_count":98,"trend_period":{"buckets":[]}},{"key":"Store credit card","doc_count":23,"trend_period":{"buckets":[]}},{"key":"Government benefit card","doc_count":6,"trend_period":{"buckets":[]}},{"key":"General-purpose prepaid card","doc_count":2,"trend_period":{"buckets":[]}}]},"trend_period":{"buckets":[{"key_as_string":"2020-01-01T00:00:00.000Z","key":1577836800000,"doc_count":129}]}},{"key":"Credit reporting, credit repair services, or other personal consumer reports","doc_count":87,"product":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[{"key":"Credit reporting","doc_count":84,"trend_period":{"buckets":[]}},{"key":"Credit repair services","doc_count":2,"trend_period":{"buckets":[]}},{"key":"Other personal consumer report","doc_count":1,"trend_period":{"buckets":[]}}]},"trend_period":{"buckets":[{"key_as_string":"2020-01-01T00:00:00.000Z","key":1577836800000,"doc_count":87}]}},{"key":"Checking or savings account","doc_count":43,"product":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[{"key":"Checking account","doc_count":34,"trend_period":{"buckets":[]}},{"key":"Savings account","doc_count":5,"trend_period":{"buckets":[]}},{"key":"Other banking product or service","doc_count":3,"trend_period":{"buckets":[]}},{"key":"CD (Certificate of Deposit)","doc_count":1,"trend_period":{"buckets":[]}}]},"trend_period":{"buckets":[{"key_as_string":"2020-01-01T00:00:00.000Z","key":1577836800000,"doc_count":43}]}},{"key":"Debt collection","doc_count":38,"product":{"doc_count_error_upper_bound":0,"sum_other_doc_count":2,"buckets":[{"key":"Other debt","doc_count":12,"trend_period":{"buckets":[]}},{"key":"I do not know","doc_count":8,"trend_period":{"buckets":[]}},{"key":"Medical debt","doc_count":8,"trend_period":{"buckets":[]}},{"key":"Auto debt","doc_count":4,"trend_period":{"buckets":[]}},{"key":"Credit card debt","doc_count":4,"trend_period":{"buckets":[]}}]},"trend_period":{"buckets":[{"key_as_string":"2020-01-01T00:00:00.000Z","key":1577836800000,"doc_count":38}]}},{"key":"Vehicle loan or lease","doc_count":18,"product":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[{"key":"Loan","doc_count":16,"trend_period":{"buckets":[]}},{"key":"Lease","doc_count":2,"trend_period":{"buckets":[]}}]},"trend_period":{"buckets":[{"key_as_string":"2020-01-01T00:00:00.000Z","key":1577836800000,"doc_count":18}]}},{"key":"Payday loan, title loan, or personal loan","doc_count":17,"product":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[{"key":"Installment loan","doc_count":8,"trend_period":{"buckets":[]}},{"key":"Personal line of credit","doc_count":6,"trend_period":{"buckets":[]}},{"key":"Payday loan","doc_count":2,"trend_period":{"buckets":[]}},{"key":"Title loan","doc_count":1,"trend_period":{"buckets":[]}}]},"trend_period":{"buckets":[{"key_as_string":"2020-01-01T00:00:00.000Z","key":1577836800000,"doc_count":17}]}},{"key":"Student loan","doc_count":9,"product":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[{"key":"Private student loan","doc_count":5,"trend_period":{"buckets":[]}},{"key":"Federal student loan servicing","doc_count":4,"trend_period":{"buckets":[]}}]},"trend_period":{"buckets":[{"key_as_string":"2020-01-01T00:00:00.000Z","key":1577836800000,"doc_count":9}]}},{"key":"Money transfer, virtual currency, or money service","doc_count":6,"product":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[{"key":"Mobile or digital wallet","doc_count":3,"trend_period":{"buckets":[]}},{"key":"Domestic (US) money transfer","doc_count":2,"trend_period":{"buckets":[]}},{"key":"Traveler's check or cashier's check","doc_count":1,"trend_period":{"buckets":[]}}]},"trend_period":{"buckets":[{"key_as_string":"2020-01-01T00:00:00.000Z","key":1577836800000,"doc_count":6}]}}]}},"max_date":{"value":1589216400000,"value_as_string":"2020-05-11T12:00:00-05:00"},"min_date":{"value":1584032400000,"value_as_string":"2020-03-12T12:00:00-05:00"},"dateRangeArea":{"doc_count":532,"dateRangeArea":{"buckets":[{"key_as_string":"2020-01-01T00:00:00.000Z","key":1577836800000,"doc_count":532}]}},"dateRangeBuckets":{"doc_count":784113,"dateRangeBuckets":{"buckets":[{"key_as_string":"2017-01-01T00:00:00.000Z","key":1483228800000,"doc_count":123458},{"key_as_string":"2018-01-01T00:00:00.000Z","key":1514764800000,"doc_count":257315},{"key_as_string":"2019-01-01T00:00:00.000Z","key":1546300800000,"doc_count":277392},{"key_as_string":"2020-01-01T00:00:00.000Z","key":1577836800000,"doc_count":125948}]}}}
+export const trendsBackfillResults = {"activeCall":"","chartType":"area","colorMap":{"Other":"#a2a3a4","Mortgage":"#addc91","Credit card or prepaid card":"#257675","Credit reporting, credit repair services, or other personal consumer reports":"#9ec4c3","Checking or savings account":"#0072ce","Debt collection":"#96c4ed","Complaints":"#ADDC91","All other products":"#a2a3a4","All other companies":"#a2a3a4","All other values":"#a2a3a4"},"error":false,"expandedTrends":[],"expandableRows":["Mortgage","Credit card or prepaid card","Credit reporting, credit repair services, or other personal consumer reports","Checking or savings account","Debt collection","Student loan","Vehicle loan or lease","Payday loan, title loan, or personal loan","Money transfer, virtual currency, or money service"],"focus":"","isLoading":false,"lastDate":"2020-01-01T00:00:00.000Z","lens":"Product","results":{"company":[],"dateRangeArea":[{"name":"Other","value":50,"date":"2020-01-01T00:00:00.000Z"},{"name":"Other","value":0,"date":"2017-01-01T00:00:00.000Z"},{"name":"Other","value":0,"date":"2018-01-01T00:00:00.000Z"},{"name":"Other","value":0,"date":"2019-01-01T00:00:00.000Z"},{"name":"Mortgage","value":185,"date":"2020-01-01T00:00:00.000Z"},{"name":"Mortgage","value":0,"date":"2017-01-01T00:00:00.000Z"},{"name":"Mortgage","value":0,"date":"2018-01-01T00:00:00.000Z"},{"name":"Mortgage","value":0,"date":"2019-01-01T00:00:00.000Z"},{"name":"Credit card or prepaid card","value":129,"date":"2020-01-01T00:00:00.000Z"},{"name":"Credit card or prepaid card","value":0,"date":"2017-01-01T00:00:00.000Z"},{"name":"Credit card or prepaid card","value":0,"date":"2018-01-01T00:00:00.000Z"},{"name":"Credit card or prepaid card","value":0,"date":"2019-01-01T00:00:00.000Z"},{"name":"Credit reporting, credit repair services, or other personal consumer reports","value":87,"date":"2020-01-01T00:00:00.000Z"},{"name":"Credit reporting, credit repair services, or other personal consumer reports","value":0,"date":"2017-01-01T00:00:00.000Z"},{"name":"Credit reporting, credit repair services, or other personal consumer reports","value":0,"date":"2018-01-01T00:00:00.000Z"},{"name":"Credit reporting, credit repair services, or other personal consumer reports","value":0,"date":"2019-01-01T00:00:00.000Z"},{"name":"Checking or savings account","value":43,"date":"2020-01-01T00:00:00.000Z"},{"name":"Checking or savings account","value":0,"date":"2017-01-01T00:00:00.000Z"},{"name":"Checking or savings account","value":0,"date":"2018-01-01T00:00:00.000Z"},{"name":"Checking or savings account","value":0,"date":"2019-01-01T00:00:00.000Z"},{"name":"Debt collection","value":38,"date":"2020-01-01T00:00:00.000Z"},{"name":"Debt collection","value":0,"date":"2017-01-01T00:00:00.000Z"},{"name":"Debt collection","value":0,"date":"2018-01-01T00:00:00.000Z"},{"name":"Debt collection","value":0,"date":"2019-01-01T00:00:00.000Z"}],"dateRangeLine":{"dataByTopic":[{"topic":"Mortgage","topicName":"Mortgage","dashed":false,"show":true,"dates":[{"name":"Mortgage","date":"2017-01-01T00:00:00.000Z","value":0},{"name":"Mortgage","date":"2018-01-01T00:00:00.000Z","value":0},{"name":"Mortgage","date":"2019-01-01T00:00:00.000Z","value":0},{"name":"Mortgage","date":"2020-01-01T00:00:00.000Z","value":185}]},{"topic":"Credit card or prepaid card","topicName":"Credit card or prepaid card","dashed":false,"show":true,"dates":[{"name":"Credit card or prepaid card","date":"2017-01-01T00:00:00.000Z","value":0},{"name":"Credit card or prepaid card","date":"2018-01-01T00:00:00.000Z","value":0},{"name":"Credit card or prepaid card","date":"2019-01-01T00:00:00.000Z","value":0},{"name":"Credit card or prepaid card","date":"2020-01-01T00:00:00.000Z","value":129}]},{"topic":"Credit reporting, credit repair services, or other personal consumer reports","topicName":"Credit reporting, credit repair services, or other personal consumer reports","dashed":false,"show":true,"dates":[{"name":"Credit reporting, credit repair services, or other personal consumer reports","date":"2017-01-01T00:00:00.000Z","value":0},{"name":"Credit reporting, credit repair services, or other personal consumer reports","date":"2018-01-01T00:00:00.000Z","value":0},{"name":"Credit reporting, credit repair services, or other personal consumer reports","date":"2019-01-01T00:00:00.000Z","value":0},{"name":"Credit reporting, credit repair services, or other personal consumer reports","date":"2020-01-01T00:00:00.000Z","value":87}]},{"topic":"Checking or savings account","topicName":"Checking or savings account","dashed":false,"show":true,"dates":[{"name":"Checking or savings account","date":"2017-01-01T00:00:00.000Z","value":0},{"name":"Checking or savings account","date":"2018-01-01T00:00:00.000Z","value":0},{"name":"Checking or savings account","date":"2019-01-01T00:00:00.000Z","value":0},{"name":"Checking or savings account","date":"2020-01-01T00:00:00.000Z","value":43}]},{"topic":"Debt collection","topicName":"Debt collection","dashed":false,"show":true,"dates":[{"name":"Debt collection","date":"2017-01-01T00:00:00.000Z","value":0},{"name":"Debt collection","date":"2018-01-01T00:00:00.000Z","value":0},{"name":"Debt collection","date":"2019-01-01T00:00:00.000Z","value":0},{"name":"Debt collection","date":"2020-01-01T00:00:00.000Z","value":38}]}]},"product":[{"hasChildren":true,"isNotFilter":false,"isParent":true,"name":"Mortgage","value":185,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Conventional home mortgage","value":108,"parent":"Mortgage","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"FHA mortgage","value":44,"parent":"Mortgage","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"VA mortgage","value":19,"parent":"Mortgage","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Other type of mortgage","value":9,"parent":"Mortgage","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Home equity loan or line of credit (HELOC)","value":5,"parent":"Mortgage","visible":false,"width":0.4},{"hasChildren":false,"isParent":false,"key":"Visualize trends for Mortgage","name":"Visualize trends for Mortgage","splitterText":"Visualize trends for Mortgage","value":"","parent":"Mortgage","width":0.3,"visible":false},{"hasChildren":true,"isNotFilter":false,"isParent":true,"name":"Credit card or prepaid card","value":129,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"General-purpose credit card or charge card","value":98,"parent":"Credit card or prepaid card","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Store credit card","value":23,"parent":"Credit card or prepaid card","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Government benefit card","value":6,"parent":"Credit card or prepaid card","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"General-purpose prepaid card","value":2,"parent":"Credit card or prepaid card","visible":false,"width":0.4},{"hasChildren":false,"isParent":false,"key":"Visualize trends for Credit card or prepaid card","name":"Visualize trends for Credit card or prepaid card","splitterText":"Visualize trends for Credit card or prepaid card","value":"","parent":"Credit card or prepaid card","width":0.3,"visible":false},{"hasChildren":true,"isNotFilter":false,"isParent":true,"name":"Credit reporting, credit repair services, or other personal consumer reports","value":87,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Credit reporting","value":84,"parent":"Credit reporting, credit repair services, or other personal consumer reports","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Credit repair services","value":2,"parent":"Credit reporting, credit repair services, or other personal consumer reports","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Other personal consumer report","value":1,"parent":"Credit reporting, credit repair services, or other personal consumer reports","visible":false,"width":0.4},{"hasChildren":false,"isParent":false,"key":"Visualize trends for Credit reporting, credit repair services, or other personal consumer reports","name":"Visualize trends for Credit reporting, credit repair services, or other personal consumer reports","splitterText":"Visualize trends for Credit reporting, credit repair services, or other personal consumer reports","value":"","parent":"Credit reporting, credit repair services, or other personal consumer reports","width":0.3,"visible":false},{"hasChildren":true,"isNotFilter":false,"isParent":true,"name":"Checking or savings account","value":43,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Checking account","value":34,"parent":"Checking or savings account","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Savings account","value":5,"parent":"Checking or savings account","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Other banking product or service","value":3,"parent":"Checking or savings account","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"CD (Certificate of Deposit)","value":1,"parent":"Checking or savings account","visible":false,"width":0.4},{"hasChildren":false,"isParent":false,"key":"Visualize trends for Checking or savings account","name":"Visualize trends for Checking or savings account","splitterText":"Visualize trends for Checking or savings account","value":"","parent":"Checking or savings account","width":0.3,"visible":false},{"hasChildren":true,"isNotFilter":false,"isParent":true,"name":"Debt collection","value":38,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Other debt","value":12,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"I do not know","value":8,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Medical debt","value":8,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Auto debt","value":4,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Credit card debt","value":4,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isParent":false,"key":"Visualize trends for Debt collection","name":"Visualize trends for Debt collection","splitterText":"Visualize trends for Debt collection","value":"","parent":"Debt collection","width":0.3,"visible":false},{"hasChildren":true,"isNotFilter":false,"isParent":true,"name":"Vehicle loan or lease","value":18,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Loan","value":16,"parent":"Vehicle loan or lease","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Lease","value":2,"parent":"Vehicle loan or lease","visible":false,"width":0.4},{"hasChildren":false,"isParent":false,"key":"Visualize trends for Vehicle loan or lease","name":"Visualize trends for Vehicle loan or lease","splitterText":"Visualize trends for Vehicle loan or lease","value":"","parent":"Vehicle loan or lease","width":0.3,"visible":false},{"hasChildren":true,"isNotFilter":false,"isParent":true,"name":"Payday loan, title loan, or personal loan","value":17,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Installment loan","value":8,"parent":"Payday loan, title loan, or personal loan","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Personal line of credit","value":6,"parent":"Payday loan, title loan, or personal loan","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Payday loan","value":2,"parent":"Payday loan, title loan, or personal loan","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Title loan","value":1,"parent":"Payday loan, title loan, or personal loan","visible":false,"width":0.4},{"hasChildren":false,"isParent":false,"key":"Visualize trends for Payday loan, title loan, or personal loan","name":"Visualize trends for Payday loan, title loan, or personal loan","splitterText":"Visualize trends for Payday loan, title loan, or personal loan","value":"","parent":"Payday loan, title loan, or personal loan","width":0.3,"visible":false},{"hasChildren":true,"isNotFilter":false,"isParent":true,"name":"Student loan","value":9,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Private student loan","value":5,"parent":"Student loan","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Federal student loan servicing","value":4,"parent":"Student loan","visible":false,"width":0.4},{"hasChildren":false,"isParent":false,"key":"Visualize trends for Student loan","name":"Visualize trends for Student loan","splitterText":"Visualize trends for Student loan","value":"","parent":"Student loan","width":0.3,"visible":false},{"hasChildren":true,"isNotFilter":false,"isParent":true,"name":"Money transfer, virtual currency, or money service","value":6,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Mobile or digital wallet","value":3,"parent":"Money transfer, virtual currency, or money service","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Domestic (US) money transfer","value":2,"parent":"Money transfer, virtual currency, or money service","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Traveler's check or cashier's check","value":1,"parent":"Money transfer, virtual currency, or money service","visible":false,"width":0.4},{"hasChildren":false,"isParent":false,"key":"Visualize trends for Money transfer, virtual currency, or money service","name":"Visualize trends for Money transfer, virtual currency, or money service","splitterText":"Visualize trends for Money transfer, virtual currency, or money service","value":"","parent":"Money transfer, virtual currency, or money service","width":0.3,"visible":false}],"issue":[{"hasChildren":false,"isNotFilter":false,"isParent":true,"name":"Attempts to collect debt not owed","value":2483,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":true,"name":"Written notification about debt","value":1019,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":true,"name":"False statements or representation","value":395,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":true,"name":"Took or threatened to take negative or legal action","value":330,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":true,"name":"Communication tactics","value":296,"parent":false,"visible":true,"width":0.5}],"sub-product":[{"hasChildren":false,"isNotFilter":false,"isParent":true,"name":"I do not know","value":1180,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":true,"name":"Other debt","value":1156,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":true,"name":"Credit card debt","value":1092,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":true,"name":"Medical debt","value":727,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":true,"name":"Auto debt","value":149,"parent":false,"visible":true,"width":0.5}]},"subLens":"sub_product","tooltip":false,"total":532}
diff --git a/src/reducers/__fixtures__/trendsFocusAggs.jsx b/src/reducers/__fixtures__/trendsFocusAggs.jsx
new file mode 100644
index 000000000..05b1b741b
--- /dev/null
+++ b/src/reducers/__fixtures__/trendsFocusAggs.jsx
@@ -0,0 +1,3 @@
+export const trendsFocusAggs = {"sub-product":{"doc_count":4581,"sub-product":{"doc_count_error_upper_bound":0,"sum_other_doc_count":277,"buckets":[{"key":"I do not know","doc_count":1180,"trend_period":{"buckets":[{"key_as_string":"2020-05-18T00:00:00.000Z","key":1589760000000,"doc_count":2,"interval_diff":{"value":-56}},{"key_as_string":"2020-05-11T00:00:00.000Z","key":1589155200000,"doc_count":58,"interval_diff":{"value":-61}},{"key_as_string":"2020-05-04T00:00:00.000Z","key":1588550400000,"doc_count":119,"interval_diff":{"value":-134}},{"key_as_string":"2020-04-27T00:00:00.000Z","key":1587945600000,"doc_count":253,"interval_diff":{"value":-53}},{"key_as_string":"2020-04-20T00:00:00.000Z","key":1587340800000,"doc_count":306,"interval_diff":{"value":16}},{"key_as_string":"2020-04-13T00:00:00.000Z","key":1586736000000,"doc_count":290,"interval_diff":{"value":138}},{"key_as_string":"2020-04-06T00:00:00.000Z","key":1586131200000,"doc_count":152}]}},{"key":"Other debt","doc_count":1156,"trend_period":{"buckets":[{"key_as_string":"2020-05-18T00:00:00.000Z","key":1589760000000,"doc_count":2,"interval_diff":{"value":-58}},{"key_as_string":"2020-05-11T00:00:00.000Z","key":1589155200000,"doc_count":60,"interval_diff":{"value":-97}},{"key_as_string":"2020-05-04T00:00:00.000Z","key":1588550400000,"doc_count":157,"interval_diff":{"value":-122}},{"key_as_string":"2020-04-27T00:00:00.000Z","key":1587945600000,"doc_count":279,"interval_diff":{"value":35}},{"key_as_string":"2020-04-20T00:00:00.000Z","key":1587340800000,"doc_count":244,"interval_diff":{"value":19}},{"key_as_string":"2020-04-13T00:00:00.000Z","key":1586736000000,"doc_count":225,"interval_diff":{"value":36}},{"key_as_string":"2020-04-06T00:00:00.000Z","key":1586131200000,"doc_count":189}]}},{"key":"Credit card debt","doc_count":1092,"trend_period":{"buckets":[{"key_as_string":"2020-05-11T00:00:00.000Z","key":1589155200000,"doc_count":47,"interval_diff":{"value":-46}},{"key_as_string":"2020-05-04T00:00:00.000Z","key":1588550400000,"doc_count":93,"interval_diff":{"value":-146}},{"key_as_string":"2020-04-27T00:00:00.000Z","key":1587945600000,"doc_count":239,"interval_diff":{"value":-25}},{"key_as_string":"2020-04-20T00:00:00.000Z","key":1587340800000,"doc_count":264,"interval_diff":{"value":-4}},{"key_as_string":"2020-04-13T00:00:00.000Z","key":1586736000000,"doc_count":268,"interval_diff":{"value":87}},{"key_as_string":"2020-04-06T00:00:00.000Z","key":1586131200000,"doc_count":181}]}},{"key":"Medical debt","doc_count":727,"trend_period":{"buckets":[{"key_as_string":"2020-05-18T00:00:00.000Z","key":1589760000000,"doc_count":1,"interval_diff":{"value":-49}},{"key_as_string":"2020-05-11T00:00:00.000Z","key":1589155200000,"doc_count":50,"interval_diff":{"value":-43}},{"key_as_string":"2020-05-04T00:00:00.000Z","key":1588550400000,"doc_count":93,"interval_diff":{"value":-56}},{"key_as_string":"2020-04-27T00:00:00.000Z","key":1587945600000,"doc_count":149,"interval_diff":{"value":-7}},{"key_as_string":"2020-04-20T00:00:00.000Z","key":1587340800000,"doc_count":156,"interval_diff":{"value":-1}},{"key_as_string":"2020-04-13T00:00:00.000Z","key":1586736000000,"doc_count":157,"interval_diff":{"value":36}},{"key_as_string":"2020-04-06T00:00:00.000Z","key":1586131200000,"doc_count":121}]}},{"key":"Auto debt","doc_count":149,"trend_period":{"buckets":[{"key_as_string":"2020-05-11T00:00:00.000Z","key":1589155200000,"doc_count":5,"interval_diff":{"value":-16}},{"key_as_string":"2020-05-04T00:00:00.000Z","key":1588550400000,"doc_count":21,"interval_diff":{"value":-17}},{"key_as_string":"2020-04-27T00:00:00.000Z","key":1587945600000,"doc_count":38,"interval_diff":{"value":11}},{"key_as_string":"2020-04-20T00:00:00.000Z","key":1587340800000,"doc_count":27,"interval_diff":{"value":-8}},{"key_as_string":"2020-04-13T00:00:00.000Z","key":1586736000000,"doc_count":35,"interval_diff":{"value":12}},{"key_as_string":"2020-04-06T00:00:00.000Z","key":1586131200000,"doc_count":23}]}}]}},"dateRangeBrush":{"doc_count":293471,"dateRangeBrush":{"buckets":[{"key_as_string":"2013-07-08T00:00:00.000Z","key":1373241600000,"doc_count":172},{"key_as_string":"2013-07-15T00:00:00.000Z","key":1373846400000,"doc_count":276},{"key_as_string":"2013-07-22T00:00:00.000Z","key":1374451200000,"doc_count":284},{"key_as_string":"2013-07-29T00:00:00.000Z","key":1375056000000,"doc_count":326},{"key_as_string":"2013-08-05T00:00:00.000Z","key":1375660800000,"doc_count":365},{"key_as_string":"2013-08-12T00:00:00.000Z","key":1376265600000,"doc_count":328},{"key_as_string":"2013-08-19T00:00:00.000Z","key":1376870400000,"doc_count":290},{"key_as_string":"2013-08-26T00:00:00.000Z","key":1377475200000,"doc_count":368},{"key_as_string":"2013-09-02T00:00:00.000Z","key":1378080000000,"doc_count":348},{"key_as_string":"2013-09-09T00:00:00.000Z","key":1378684800000,"doc_count":519},{"key_as_string":"2013-09-16T00:00:00.000Z","key":1379289600000,"doc_count":536},{"key_as_string":"2013-09-23T00:00:00.000Z","key":1379894400000,"doc_count":499},{"key_as_string":"2013-09-30T00:00:00.000Z","key":1380499200000,"doc_count":299},{"key_as_string":"2013-10-07T00:00:00.000Z","key":1381104000000,"doc_count":218},{"key_as_string":"2013-10-14T00:00:00.000Z","key":1381708800000,"doc_count":322},{"key_as_string":"2013-10-21T00:00:00.000Z","key":1382313600000,"doc_count":533},{"key_as_string":"2013-10-28T00:00:00.000Z","key":1382918400000,"doc_count":685},{"key_as_string":"2013-11-04T00:00:00.000Z","key":1383523200000,"doc_count":639},{"key_as_string":"2013-11-11T00:00:00.000Z","key":1384128000000,"doc_count":623},{"key_as_string":"2013-11-18T00:00:00.000Z","key":1384732800000,"doc_count":572},{"key_as_string":"2013-11-25T00:00:00.000Z","key":1385337600000,"doc_count":461},{"key_as_string":"2013-12-02T00:00:00.000Z","key":1385942400000,"doc_count":575},{"key_as_string":"2013-12-09T00:00:00.000Z","key":1386547200000,"doc_count":631},{"key_as_string":"2013-12-16T00:00:00.000Z","key":1387152000000,"doc_count":599},{"key_as_string":"2013-12-23T00:00:00.000Z","key":1387756800000,"doc_count":424},{"key_as_string":"2013-12-30T00:00:00.000Z","key":1388361600000,"doc_count":457},{"key_as_string":"2014-01-06T00:00:00.000Z","key":1388966400000,"doc_count":683},{"key_as_string":"2014-01-13T00:00:00.000Z","key":1389571200000,"doc_count":774},{"key_as_string":"2014-01-20T00:00:00.000Z","key":1390176000000,"doc_count":813},{"key_as_string":"2014-01-27T00:00:00.000Z","key":1390780800000,"doc_count":811},{"key_as_string":"2014-02-03T00:00:00.000Z","key":1391385600000,"doc_count":809},{"key_as_string":"2014-02-10T00:00:00.000Z","key":1391990400000,"doc_count":823},{"key_as_string":"2014-02-17T00:00:00.000Z","key":1392595200000,"doc_count":857},{"key_as_string":"2014-02-24T00:00:00.000Z","key":1393200000000,"doc_count":876},{"key_as_string":"2014-03-03T00:00:00.000Z","key":1393804800000,"doc_count":720},{"key_as_string":"2014-03-10T00:00:00.000Z","key":1394409600000,"doc_count":865},{"key_as_string":"2014-03-17T00:00:00.000Z","key":1395014400000,"doc_count":863},{"key_as_string":"2014-03-24T00:00:00.000Z","key":1395619200000,"doc_count":909},{"key_as_string":"2014-03-31T00:00:00.000Z","key":1396224000000,"doc_count":822},{"key_as_string":"2014-04-07T00:00:00.000Z","key":1396828800000,"doc_count":858},{"key_as_string":"2014-04-14T00:00:00.000Z","key":1397433600000,"doc_count":823},{"key_as_string":"2014-04-21T00:00:00.000Z","key":1398038400000,"doc_count":849},{"key_as_string":"2014-04-28T00:00:00.000Z","key":1398643200000,"doc_count":808},{"key_as_string":"2014-05-05T00:00:00.000Z","key":1399248000000,"doc_count":773},{"key_as_string":"2014-05-12T00:00:00.000Z","key":1399852800000,"doc_count":803},{"key_as_string":"2014-05-19T00:00:00.000Z","key":1400457600000,"doc_count":745},{"key_as_string":"2014-05-26T00:00:00.000Z","key":1401062400000,"doc_count":617},{"key_as_string":"2014-06-02T00:00:00.000Z","key":1401667200000,"doc_count":752},{"key_as_string":"2014-06-09T00:00:00.000Z","key":1402272000000,"doc_count":844},{"key_as_string":"2014-06-16T00:00:00.000Z","key":1402876800000,"doc_count":775},{"key_as_string":"2014-06-23T00:00:00.000Z","key":1403481600000,"doc_count":820},{"key_as_string":"2014-06-30T00:00:00.000Z","key":1404086400000,"doc_count":667},{"key_as_string":"2014-07-07T00:00:00.000Z","key":1404691200000,"doc_count":810},{"key_as_string":"2014-07-14T00:00:00.000Z","key":1405296000000,"doc_count":794},{"key_as_string":"2014-07-21T00:00:00.000Z","key":1405900800000,"doc_count":806},{"key_as_string":"2014-07-28T00:00:00.000Z","key":1406505600000,"doc_count":765},{"key_as_string":"2014-08-04T00:00:00.000Z","key":1407110400000,"doc_count":781},{"key_as_string":"2014-08-11T00:00:00.000Z","key":1407715200000,"doc_count":780},{"key_as_string":"2014-08-18T00:00:00.000Z","key":1408320000000,"doc_count":767},{"key_as_string":"2014-08-25T00:00:00.000Z","key":1408924800000,"doc_count":695},{"key_as_string":"2014-09-01T00:00:00.000Z","key":1409529600000,"doc_count":585},{"key_as_string":"2014-09-08T00:00:00.000Z","key":1410134400000,"doc_count":609},{"key_as_string":"2014-09-15T00:00:00.000Z","key":1410739200000,"doc_count":656},{"key_as_string":"2014-09-22T00:00:00.000Z","key":1411344000000,"doc_count":793},{"key_as_string":"2014-09-29T00:00:00.000Z","key":1411948800000,"doc_count":714},{"key_as_string":"2014-10-06T00:00:00.000Z","key":1412553600000,"doc_count":745},{"key_as_string":"2014-10-13T00:00:00.000Z","key":1413158400000,"doc_count":679},{"key_as_string":"2014-10-20T00:00:00.000Z","key":1413763200000,"doc_count":701},{"key_as_string":"2014-10-27T00:00:00.000Z","key":1414368000000,"doc_count":703},{"key_as_string":"2014-11-03T00:00:00.000Z","key":1414972800000,"doc_count":684},{"key_as_string":"2014-11-10T00:00:00.000Z","key":1415577600000,"doc_count":696},{"key_as_string":"2014-11-17T00:00:00.000Z","key":1416182400000,"doc_count":844},{"key_as_string":"2014-11-24T00:00:00.000Z","key":1416787200000,"doc_count":519},{"key_as_string":"2014-12-01T00:00:00.000Z","key":1417392000000,"doc_count":664},{"key_as_string":"2014-12-08T00:00:00.000Z","key":1417996800000,"doc_count":651},{"key_as_string":"2014-12-15T00:00:00.000Z","key":1418601600000,"doc_count":679},{"key_as_string":"2014-12-22T00:00:00.000Z","key":1419206400000,"doc_count":556},{"key_as_string":"2014-12-29T00:00:00.000Z","key":1419811200000,"doc_count":646},{"key_as_string":"2015-01-05T00:00:00.000Z","key":1420416000000,"doc_count":695},{"key_as_string":"2015-01-12T00:00:00.000Z","key":1421020800000,"doc_count":687},{"key_as_string":"2015-01-19T00:00:00.000Z","key":1421625600000,"doc_count":821},{"key_as_string":"2015-01-26T00:00:00.000Z","key":1422230400000,"doc_count":874},{"key_as_string":"2015-02-02T00:00:00.000Z","key":1422835200000,"doc_count":884},{"key_as_string":"2015-02-09T00:00:00.000Z","key":1423440000000,"doc_count":779},{"key_as_string":"2015-02-16T00:00:00.000Z","key":1424044800000,"doc_count":869},{"key_as_string":"2015-02-23T00:00:00.000Z","key":1424649600000,"doc_count":882},{"key_as_string":"2015-03-02T00:00:00.000Z","key":1425254400000,"doc_count":865},{"key_as_string":"2015-03-09T00:00:00.000Z","key":1425859200000,"doc_count":842},{"key_as_string":"2015-03-16T00:00:00.000Z","key":1426464000000,"doc_count":868},{"key_as_string":"2015-03-23T00:00:00.000Z","key":1427068800000,"doc_count":965},{"key_as_string":"2015-03-30T00:00:00.000Z","key":1427673600000,"doc_count":768},{"key_as_string":"2015-04-06T00:00:00.000Z","key":1428278400000,"doc_count":754},{"key_as_string":"2015-04-13T00:00:00.000Z","key":1428883200000,"doc_count":780},{"key_as_string":"2015-04-20T00:00:00.000Z","key":1429488000000,"doc_count":800},{"key_as_string":"2015-04-27T00:00:00.000Z","key":1430092800000,"doc_count":770},{"key_as_string":"2015-05-04T00:00:00.000Z","key":1430697600000,"doc_count":715},{"key_as_string":"2015-05-11T00:00:00.000Z","key":1431302400000,"doc_count":821},{"key_as_string":"2015-05-18T00:00:00.000Z","key":1431907200000,"doc_count":890},{"key_as_string":"2015-05-25T00:00:00.000Z","key":1432512000000,"doc_count":698},{"key_as_string":"2015-06-01T00:00:00.000Z","key":1433116800000,"doc_count":707},{"key_as_string":"2015-06-08T00:00:00.000Z","key":1433721600000,"doc_count":847},{"key_as_string":"2015-06-15T00:00:00.000Z","key":1434326400000,"doc_count":828},{"key_as_string":"2015-06-22T00:00:00.000Z","key":1434931200000,"doc_count":820},{"key_as_string":"2015-06-29T00:00:00.000Z","key":1435536000000,"doc_count":630},{"key_as_string":"2015-07-06T00:00:00.000Z","key":1436140800000,"doc_count":918},{"key_as_string":"2015-07-13T00:00:00.000Z","key":1436745600000,"doc_count":909},{"key_as_string":"2015-07-20T00:00:00.000Z","key":1437350400000,"doc_count":866},{"key_as_string":"2015-07-27T00:00:00.000Z","key":1437955200000,"doc_count":830},{"key_as_string":"2015-08-03T00:00:00.000Z","key":1438560000000,"doc_count":893},{"key_as_string":"2015-08-10T00:00:00.000Z","key":1439164800000,"doc_count":795},{"key_as_string":"2015-08-17T00:00:00.000Z","key":1439769600000,"doc_count":842},{"key_as_string":"2015-08-24T00:00:00.000Z","key":1440374400000,"doc_count":819},{"key_as_string":"2015-08-31T00:00:00.000Z","key":1440979200000,"doc_count":685},{"key_as_string":"2015-09-07T00:00:00.000Z","key":1441584000000,"doc_count":657},{"key_as_string":"2015-09-14T00:00:00.000Z","key":1442188800000,"doc_count":739},{"key_as_string":"2015-09-21T00:00:00.000Z","key":1442793600000,"doc_count":804},{"key_as_string":"2015-09-28T00:00:00.000Z","key":1443398400000,"doc_count":702},{"key_as_string":"2015-10-05T00:00:00.000Z","key":1444003200000,"doc_count":674},{"key_as_string":"2015-10-12T00:00:00.000Z","key":1444608000000,"doc_count":668},{"key_as_string":"2015-10-19T00:00:00.000Z","key":1445212800000,"doc_count":714},{"key_as_string":"2015-10-26T00:00:00.000Z","key":1445817600000,"doc_count":671},{"key_as_string":"2015-11-02T00:00:00.000Z","key":1446422400000,"doc_count":670},{"key_as_string":"2015-11-09T00:00:00.000Z","key":1447027200000,"doc_count":681},{"key_as_string":"2015-11-16T00:00:00.000Z","key":1447632000000,"doc_count":651},{"key_as_string":"2015-11-23T00:00:00.000Z","key":1448236800000,"doc_count":489},{"key_as_string":"2015-11-30T00:00:00.000Z","key":1448841600000,"doc_count":637},{"key_as_string":"2015-12-07T00:00:00.000Z","key":1449446400000,"doc_count":681},{"key_as_string":"2015-12-14T00:00:00.000Z","key":1450051200000,"doc_count":715},{"key_as_string":"2015-12-21T00:00:00.000Z","key":1450656000000,"doc_count":455},{"key_as_string":"2015-12-28T00:00:00.000Z","key":1451260800000,"doc_count":591},{"key_as_string":"2016-01-04T00:00:00.000Z","key":1451865600000,"doc_count":652},{"key_as_string":"2016-01-11T00:00:00.000Z","key":1452470400000,"doc_count":713},{"key_as_string":"2016-01-18T00:00:00.000Z","key":1453075200000,"doc_count":718},{"key_as_string":"2016-01-25T00:00:00.000Z","key":1453680000000,"doc_count":728},{"key_as_string":"2016-02-01T00:00:00.000Z","key":1454284800000,"doc_count":711},{"key_as_string":"2016-02-08T00:00:00.000Z","key":1454889600000,"doc_count":774},{"key_as_string":"2016-02-15T00:00:00.000Z","key":1455494400000,"doc_count":796},{"key_as_string":"2016-02-22T00:00:00.000Z","key":1456099200000,"doc_count":808},{"key_as_string":"2016-02-29T00:00:00.000Z","key":1456704000000,"doc_count":794},{"key_as_string":"2016-03-07T00:00:00.000Z","key":1457308800000,"doc_count":755},{"key_as_string":"2016-03-14T00:00:00.000Z","key":1457913600000,"doc_count":783},{"key_as_string":"2016-03-21T00:00:00.000Z","key":1458518400000,"doc_count":751},{"key_as_string":"2016-03-28T00:00:00.000Z","key":1459123200000,"doc_count":761},{"key_as_string":"2016-04-04T00:00:00.000Z","key":1459728000000,"doc_count":784},{"key_as_string":"2016-04-11T00:00:00.000Z","key":1460332800000,"doc_count":795},{"key_as_string":"2016-04-18T00:00:00.000Z","key":1460937600000,"doc_count":762},{"key_as_string":"2016-04-25T00:00:00.000Z","key":1461542400000,"doc_count":754},{"key_as_string":"2016-05-02T00:00:00.000Z","key":1462147200000,"doc_count":716},{"key_as_string":"2016-05-09T00:00:00.000Z","key":1462752000000,"doc_count":764},{"key_as_string":"2016-05-16T00:00:00.000Z","key":1463356800000,"doc_count":723},{"key_as_string":"2016-05-23T00:00:00.000Z","key":1463961600000,"doc_count":677},{"key_as_string":"2016-05-30T00:00:00.000Z","key":1464566400000,"doc_count":617},{"key_as_string":"2016-06-06T00:00:00.000Z","key":1465171200000,"doc_count":747},{"key_as_string":"2016-06-13T00:00:00.000Z","key":1465776000000,"doc_count":715},{"key_as_string":"2016-06-20T00:00:00.000Z","key":1466380800000,"doc_count":763},{"key_as_string":"2016-06-27T00:00:00.000Z","key":1466985600000,"doc_count":718},{"key_as_string":"2016-07-04T00:00:00.000Z","key":1467590400000,"doc_count":637},{"key_as_string":"2016-07-11T00:00:00.000Z","key":1468195200000,"doc_count":759},{"key_as_string":"2016-07-18T00:00:00.000Z","key":1468800000000,"doc_count":677},{"key_as_string":"2016-07-25T00:00:00.000Z","key":1469404800000,"doc_count":766},{"key_as_string":"2016-08-01T00:00:00.000Z","key":1470009600000,"doc_count":804},{"key_as_string":"2016-08-08T00:00:00.000Z","key":1470614400000,"doc_count":958},{"key_as_string":"2016-08-15T00:00:00.000Z","key":1471219200000,"doc_count":887},{"key_as_string":"2016-08-22T00:00:00.000Z","key":1471824000000,"doc_count":919},{"key_as_string":"2016-08-29T00:00:00.000Z","key":1472428800000,"doc_count":883},{"key_as_string":"2016-09-05T00:00:00.000Z","key":1473033600000,"doc_count":702},{"key_as_string":"2016-09-12T00:00:00.000Z","key":1473638400000,"doc_count":887},{"key_as_string":"2016-09-19T00:00:00.000Z","key":1474243200000,"doc_count":869},{"key_as_string":"2016-09-26T00:00:00.000Z","key":1474848000000,"doc_count":885},{"key_as_string":"2016-10-03T00:00:00.000Z","key":1475452800000,"doc_count":889},{"key_as_string":"2016-10-10T00:00:00.000Z","key":1476057600000,"doc_count":803},{"key_as_string":"2016-10-17T00:00:00.000Z","key":1476662400000,"doc_count":750},{"key_as_string":"2016-10-24T00:00:00.000Z","key":1477267200000,"doc_count":888},{"key_as_string":"2016-10-31T00:00:00.000Z","key":1477872000000,"doc_count":840},{"key_as_string":"2016-11-07T00:00:00.000Z","key":1478476800000,"doc_count":792},{"key_as_string":"2016-11-14T00:00:00.000Z","key":1479081600000,"doc_count":809},{"key_as_string":"2016-11-21T00:00:00.000Z","key":1479686400000,"doc_count":605},{"key_as_string":"2016-11-28T00:00:00.000Z","key":1480291200000,"doc_count":785},{"key_as_string":"2016-12-05T00:00:00.000Z","key":1480896000000,"doc_count":854},{"key_as_string":"2016-12-12T00:00:00.000Z","key":1481500800000,"doc_count":1033},{"key_as_string":"2016-12-19T00:00:00.000Z","key":1482105600000,"doc_count":835},{"key_as_string":"2016-12-26T00:00:00.000Z","key":1482710400000,"doc_count":587},{"key_as_string":"2017-01-02T00:00:00.000Z","key":1483315200000,"doc_count":741},{"key_as_string":"2017-01-09T00:00:00.000Z","key":1483920000000,"doc_count":863},{"key_as_string":"2017-01-16T00:00:00.000Z","key":1484524800000,"doc_count":804},{"key_as_string":"2017-01-23T00:00:00.000Z","key":1485129600000,"doc_count":957},{"key_as_string":"2017-01-30T00:00:00.000Z","key":1485734400000,"doc_count":1092},{"key_as_string":"2017-02-06T00:00:00.000Z","key":1486339200000,"doc_count":1023},{"key_as_string":"2017-02-13T00:00:00.000Z","key":1486944000000,"doc_count":978},{"key_as_string":"2017-02-20T00:00:00.000Z","key":1487548800000,"doc_count":879},{"key_as_string":"2017-02-27T00:00:00.000Z","key":1488153600000,"doc_count":897},{"key_as_string":"2017-03-06T00:00:00.000Z","key":1488758400000,"doc_count":972},{"key_as_string":"2017-03-13T00:00:00.000Z","key":1489363200000,"doc_count":1059},{"key_as_string":"2017-03-20T00:00:00.000Z","key":1489968000000,"doc_count":1063},{"key_as_string":"2017-03-27T00:00:00.000Z","key":1490572800000,"doc_count":1063},{"key_as_string":"2017-04-03T00:00:00.000Z","key":1491177600000,"doc_count":1086},{"key_as_string":"2017-04-10T00:00:00.000Z","key":1491782400000,"doc_count":944},{"key_as_string":"2017-04-17T00:00:00.000Z","key":1492387200000,"doc_count":967},{"key_as_string":"2017-04-24T00:00:00.000Z","key":1492992000000,"doc_count":1040},{"key_as_string":"2017-05-01T00:00:00.000Z","key":1493596800000,"doc_count":1003},{"key_as_string":"2017-05-08T00:00:00.000Z","key":1494201600000,"doc_count":947},{"key_as_string":"2017-05-15T00:00:00.000Z","key":1494806400000,"doc_count":1002},{"key_as_string":"2017-05-22T00:00:00.000Z","key":1495411200000,"doc_count":813},{"key_as_string":"2017-05-29T00:00:00.000Z","key":1496016000000,"doc_count":817},{"key_as_string":"2017-06-05T00:00:00.000Z","key":1496620800000,"doc_count":914},{"key_as_string":"2017-06-12T00:00:00.000Z","key":1497225600000,"doc_count":798},{"key_as_string":"2017-06-19T00:00:00.000Z","key":1497830400000,"doc_count":803},{"key_as_string":"2017-06-26T00:00:00.000Z","key":1498435200000,"doc_count":904},{"key_as_string":"2017-07-03T00:00:00.000Z","key":1499040000000,"doc_count":808},{"key_as_string":"2017-07-10T00:00:00.000Z","key":1499644800000,"doc_count":1079},{"key_as_string":"2017-07-17T00:00:00.000Z","key":1500249600000,"doc_count":995},{"key_as_string":"2017-07-24T00:00:00.000Z","key":1500854400000,"doc_count":1035},{"key_as_string":"2017-07-31T00:00:00.000Z","key":1501459200000,"doc_count":1036},{"key_as_string":"2017-08-07T00:00:00.000Z","key":1502064000000,"doc_count":1085},{"key_as_string":"2017-08-14T00:00:00.000Z","key":1502668800000,"doc_count":962},{"key_as_string":"2017-08-21T00:00:00.000Z","key":1503273600000,"doc_count":903},{"key_as_string":"2017-08-28T00:00:00.000Z","key":1503878400000,"doc_count":772},{"key_as_string":"2017-09-04T00:00:00.000Z","key":1504483200000,"doc_count":771},{"key_as_string":"2017-09-11T00:00:00.000Z","key":1505088000000,"doc_count":884},{"key_as_string":"2017-09-18T00:00:00.000Z","key":1505692800000,"doc_count":847},{"key_as_string":"2017-09-25T00:00:00.000Z","key":1506297600000,"doc_count":898},{"key_as_string":"2017-10-02T00:00:00.000Z","key":1506902400000,"doc_count":900},{"key_as_string":"2017-10-09T00:00:00.000Z","key":1507507200000,"doc_count":968},{"key_as_string":"2017-10-16T00:00:00.000Z","key":1508112000000,"doc_count":894},{"key_as_string":"2017-10-23T00:00:00.000Z","key":1508716800000,"doc_count":888},{"key_as_string":"2017-10-30T00:00:00.000Z","key":1509321600000,"doc_count":863},{"key_as_string":"2017-11-06T00:00:00.000Z","key":1509926400000,"doc_count":898},{"key_as_string":"2017-11-13T00:00:00.000Z","key":1510531200000,"doc_count":849},{"key_as_string":"2017-11-20T00:00:00.000Z","key":1511136000000,"doc_count":647},{"key_as_string":"2017-11-27T00:00:00.000Z","key":1511740800000,"doc_count":876},{"key_as_string":"2017-12-04T00:00:00.000Z","key":1512345600000,"doc_count":1109},{"key_as_string":"2017-12-11T00:00:00.000Z","key":1512950400000,"doc_count":988},{"key_as_string":"2017-12-18T00:00:00.000Z","key":1513555200000,"doc_count":864},{"key_as_string":"2017-12-25T00:00:00.000Z","key":1514160000000,"doc_count":676},{"key_as_string":"2018-01-01T00:00:00.000Z","key":1514764800000,"doc_count":879},{"key_as_string":"2018-01-08T00:00:00.000Z","key":1515369600000,"doc_count":1197},{"key_as_string":"2018-01-15T00:00:00.000Z","key":1515974400000,"doc_count":1128},{"key_as_string":"2018-01-22T00:00:00.000Z","key":1516579200000,"doc_count":1078},{"key_as_string":"2018-01-29T00:00:00.000Z","key":1517184000000,"doc_count":1139},{"key_as_string":"2018-02-05T00:00:00.000Z","key":1517788800000,"doc_count":1188},{"key_as_string":"2018-02-12T00:00:00.000Z","key":1518393600000,"doc_count":1061},{"key_as_string":"2018-02-19T00:00:00.000Z","key":1518998400000,"doc_count":1112},{"key_as_string":"2018-02-26T00:00:00.000Z","key":1519603200000,"doc_count":1129},{"key_as_string":"2018-03-05T00:00:00.000Z","key":1520208000000,"doc_count":1150},{"key_as_string":"2018-03-12T00:00:00.000Z","key":1520812800000,"doc_count":1176},{"key_as_string":"2018-03-19T00:00:00.000Z","key":1521417600000,"doc_count":1285},{"key_as_string":"2018-03-26T00:00:00.000Z","key":1522022400000,"doc_count":1184},{"key_as_string":"2018-04-02T00:00:00.000Z","key":1522627200000,"doc_count":1169},{"key_as_string":"2018-04-09T00:00:00.000Z","key":1523232000000,"doc_count":1058},{"key_as_string":"2018-04-16T00:00:00.000Z","key":1523836800000,"doc_count":1120},{"key_as_string":"2018-04-23T00:00:00.000Z","key":1524441600000,"doc_count":1172},{"key_as_string":"2018-04-30T00:00:00.000Z","key":1525046400000,"doc_count":1165},{"key_as_string":"2018-05-07T00:00:00.000Z","key":1525651200000,"doc_count":1137},{"key_as_string":"2018-05-14T00:00:00.000Z","key":1526256000000,"doc_count":1112},{"key_as_string":"2018-05-21T00:00:00.000Z","key":1526860800000,"doc_count":915},{"key_as_string":"2018-05-28T00:00:00.000Z","key":1527465600000,"doc_count":855},{"key_as_string":"2018-06-04T00:00:00.000Z","key":1528070400000,"doc_count":1093},{"key_as_string":"2018-06-11T00:00:00.000Z","key":1528675200000,"doc_count":985},{"key_as_string":"2018-06-18T00:00:00.000Z","key":1529280000000,"doc_count":921},{"key_as_string":"2018-06-25T00:00:00.000Z","key":1529884800000,"doc_count":1066},{"key_as_string":"2018-07-02T00:00:00.000Z","key":1530489600000,"doc_count":842},{"key_as_string":"2018-07-09T00:00:00.000Z","key":1531094400000,"doc_count":920},{"key_as_string":"2018-07-16T00:00:00.000Z","key":1531699200000,"doc_count":956},{"key_as_string":"2018-07-23T00:00:00.000Z","key":1532304000000,"doc_count":908},{"key_as_string":"2018-07-30T00:00:00.000Z","key":1532908800000,"doc_count":946},{"key_as_string":"2018-08-06T00:00:00.000Z","key":1533513600000,"doc_count":1001},{"key_as_string":"2018-08-13T00:00:00.000Z","key":1534118400000,"doc_count":1013},{"key_as_string":"2018-08-20T00:00:00.000Z","key":1534723200000,"doc_count":940},{"key_as_string":"2018-08-27T00:00:00.000Z","key":1535328000000,"doc_count":926},{"key_as_string":"2018-09-03T00:00:00.000Z","key":1535932800000,"doc_count":773},{"key_as_string":"2018-09-10T00:00:00.000Z","key":1536537600000,"doc_count":954},{"key_as_string":"2018-09-17T00:00:00.000Z","key":1537142400000,"doc_count":986},{"key_as_string":"2018-09-24T00:00:00.000Z","key":1537747200000,"doc_count":852},{"key_as_string":"2018-10-01T00:00:00.000Z","key":1538352000000,"doc_count":1007},{"key_as_string":"2018-10-08T00:00:00.000Z","key":1538956800000,"doc_count":909},{"key_as_string":"2018-10-15T00:00:00.000Z","key":1539561600000,"doc_count":859},{"key_as_string":"2018-10-22T00:00:00.000Z","key":1540166400000,"doc_count":839},{"key_as_string":"2018-10-29T00:00:00.000Z","key":1540771200000,"doc_count":806},{"key_as_string":"2018-11-05T00:00:00.000Z","key":1541376000000,"doc_count":876},{"key_as_string":"2018-11-12T00:00:00.000Z","key":1541980800000,"doc_count":824},{"key_as_string":"2018-11-19T00:00:00.000Z","key":1542585600000,"doc_count":569},{"key_as_string":"2018-11-26T00:00:00.000Z","key":1543190400000,"doc_count":848},{"key_as_string":"2018-12-03T00:00:00.000Z","key":1543795200000,"doc_count":781},{"key_as_string":"2018-12-10T00:00:00.000Z","key":1544400000000,"doc_count":906},{"key_as_string":"2018-12-17T00:00:00.000Z","key":1545004800000,"doc_count":809},{"key_as_string":"2018-12-24T00:00:00.000Z","key":1545609600000,"doc_count":585},{"key_as_string":"2018-12-31T00:00:00.000Z","key":1546214400000,"doc_count":537},{"key_as_string":"2019-01-07T00:00:00.000Z","key":1546819200000,"doc_count":675},{"key_as_string":"2019-01-14T00:00:00.000Z","key":1547424000000,"doc_count":719},{"key_as_string":"2019-01-21T00:00:00.000Z","key":1548028800000,"doc_count":637},{"key_as_string":"2019-01-28T00:00:00.000Z","key":1548633600000,"doc_count":910},{"key_as_string":"2019-02-04T00:00:00.000Z","key":1549238400000,"doc_count":890},{"key_as_string":"2019-02-11T00:00:00.000Z","key":1549843200000,"doc_count":898},{"key_as_string":"2019-02-18T00:00:00.000Z","key":1550448000000,"doc_count":1045},{"key_as_string":"2019-02-25T00:00:00.000Z","key":1551052800000,"doc_count":977},{"key_as_string":"2019-03-04T00:00:00.000Z","key":1551657600000,"doc_count":1030},{"key_as_string":"2019-03-11T00:00:00.000Z","key":1552262400000,"doc_count":971},{"key_as_string":"2019-03-18T00:00:00.000Z","key":1552867200000,"doc_count":969},{"key_as_string":"2019-03-25T00:00:00.000Z","key":1553472000000,"doc_count":959},{"key_as_string":"2019-04-01T00:00:00.000Z","key":1554076800000,"doc_count":943},{"key_as_string":"2019-04-08T00:00:00.000Z","key":1554681600000,"doc_count":960},{"key_as_string":"2019-04-15T00:00:00.000Z","key":1555286400000,"doc_count":917},{"key_as_string":"2019-04-22T00:00:00.000Z","key":1555891200000,"doc_count":870},{"key_as_string":"2019-04-29T00:00:00.000Z","key":1556496000000,"doc_count":872},{"key_as_string":"2019-05-06T00:00:00.000Z","key":1557100800000,"doc_count":942},{"key_as_string":"2019-05-13T00:00:00.000Z","key":1557705600000,"doc_count":1009},{"key_as_string":"2019-05-20T00:00:00.000Z","key":1558310400000,"doc_count":891},{"key_as_string":"2019-05-27T00:00:00.000Z","key":1558915200000,"doc_count":826},{"key_as_string":"2019-06-03T00:00:00.000Z","key":1559520000000,"doc_count":905},{"key_as_string":"2019-06-10T00:00:00.000Z","key":1560124800000,"doc_count":1029},{"key_as_string":"2019-06-17T00:00:00.000Z","key":1560729600000,"doc_count":996},{"key_as_string":"2019-06-24T00:00:00.000Z","key":1561334400000,"doc_count":1009},{"key_as_string":"2019-07-01T00:00:00.000Z","key":1561939200000,"doc_count":727},{"key_as_string":"2019-07-08T00:00:00.000Z","key":1562544000000,"doc_count":967},{"key_as_string":"2019-07-15T00:00:00.000Z","key":1563148800000,"doc_count":969},{"key_as_string":"2019-07-22T00:00:00.000Z","key":1563753600000,"doc_count":833},{"key_as_string":"2019-07-29T00:00:00.000Z","key":1564358400000,"doc_count":995},{"key_as_string":"2019-08-05T00:00:00.000Z","key":1564963200000,"doc_count":971},{"key_as_string":"2019-08-12T00:00:00.000Z","key":1565568000000,"doc_count":952},{"key_as_string":"2019-08-19T00:00:00.000Z","key":1566172800000,"doc_count":1012},{"key_as_string":"2019-08-26T00:00:00.000Z","key":1566777600000,"doc_count":872},{"key_as_string":"2019-09-02T00:00:00.000Z","key":1567382400000,"doc_count":836},{"key_as_string":"2019-09-09T00:00:00.000Z","key":1567987200000,"doc_count":987},{"key_as_string":"2019-09-16T00:00:00.000Z","key":1568592000000,"doc_count":966},{"key_as_string":"2019-09-23T00:00:00.000Z","key":1569196800000,"doc_count":965},{"key_as_string":"2019-09-30T00:00:00.000Z","key":1569801600000,"doc_count":920},{"key_as_string":"2019-10-07T00:00:00.000Z","key":1570406400000,"doc_count":848},{"key_as_string":"2019-10-14T00:00:00.000Z","key":1571011200000,"doc_count":880},{"key_as_string":"2019-10-21T00:00:00.000Z","key":1571616000000,"doc_count":880},{"key_as_string":"2019-10-28T00:00:00.000Z","key":1572220800000,"doc_count":902},{"key_as_string":"2019-11-04T00:00:00.000Z","key":1572825600000,"doc_count":907},{"key_as_string":"2019-11-11T00:00:00.000Z","key":1573430400000,"doc_count":866},{"key_as_string":"2019-11-18T00:00:00.000Z","key":1574035200000,"doc_count":978},{"key_as_string":"2019-11-25T00:00:00.000Z","key":1574640000000,"doc_count":590},{"key_as_string":"2019-12-02T00:00:00.000Z","key":1575244800000,"doc_count":797},{"key_as_string":"2019-12-09T00:00:00.000Z","key":1575849600000,"doc_count":789},{"key_as_string":"2019-12-16T00:00:00.000Z","key":1576454400000,"doc_count":782},{"key_as_string":"2019-12-23T00:00:00.000Z","key":1577059200000,"doc_count":589},{"key_as_string":"2019-12-30T00:00:00.000Z","key":1577664000000,"doc_count":716},{"key_as_string":"2020-01-06T00:00:00.000Z","key":1578268800000,"doc_count":862},{"key_as_string":"2020-01-13T00:00:00.000Z","key":1578873600000,"doc_count":910},{"key_as_string":"2020-01-20T00:00:00.000Z","key":1579478400000,"doc_count":859},{"key_as_string":"2020-01-27T00:00:00.000Z","key":1580083200000,"doc_count":858},{"key_as_string":"2020-02-03T00:00:00.000Z","key":1580688000000,"doc_count":944},{"key_as_string":"2020-02-10T00:00:00.000Z","key":1581292800000,"doc_count":1022},{"key_as_string":"2020-02-17T00:00:00.000Z","key":1581897600000,"doc_count":954},{"key_as_string":"2020-02-24T00:00:00.000Z","key":1582502400000,"doc_count":1002},{"key_as_string":"2020-03-02T00:00:00.000Z","key":1583107200000,"doc_count":966},{"key_as_string":"2020-03-09T00:00:00.000Z","key":1583712000000,"doc_count":986},{"key_as_string":"2020-03-16T00:00:00.000Z","key":1584316800000,"doc_count":1007},{"key_as_string":"2020-03-23T00:00:00.000Z","key":1584921600000,"doc_count":876},{"key_as_string":"2020-03-30T00:00:00.000Z","key":1585526400000,"doc_count":973},{"key_as_string":"2020-04-06T00:00:00.000Z","key":1586131200000,"doc_count":1053},{"key_as_string":"2020-04-13T00:00:00.000Z","key":1586736000000,"doc_count":1031},{"key_as_string":"2020-04-20T00:00:00.000Z","key":1587340800000,"doc_count":1061},{"key_as_string":"2020-04-27T00:00:00.000Z","key":1587945600000,"doc_count":1014},{"key_as_string":"2020-05-04T00:00:00.000Z","key":1588550400000,"doc_count":512},{"key_as_string":"2020-05-11T00:00:00.000Z","key":1589155200000,"doc_count":233},{"key_as_string":"2020-05-18T00:00:00.000Z","key":1589760000000,"doc_count":6}]}},"product":{"doc_count":4581,"product":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[{"key":"Debt collection","doc_count":4581,"trend_period":{"buckets":[{"key_as_string":"2020-05-18T00:00:00.000Z","key":1589760000000,"doc_count":6,"interval_diff":{"value":-227}},{"key_as_string":"2020-05-11T00:00:00.000Z","key":1589155200000,"doc_count":233,"interval_diff":{"value":-279}},{"key_as_string":"2020-05-04T00:00:00.000Z","key":1588550400000,"doc_count":512,"interval_diff":{"value":-502}},{"key_as_string":"2020-04-27T00:00:00.000Z","key":1587945600000,"doc_count":1014,"interval_diff":{"value":-47}},{"key_as_string":"2020-04-20T00:00:00.000Z","key":1587340800000,"doc_count":1061,"interval_diff":{"value":30}},{"key_as_string":"2020-04-13T00:00:00.000Z","key":1586736000000,"doc_count":1031,"interval_diff":{"value":307}},{"key_as_string":"2020-04-06T00:00:00.000Z","key":1586131200000,"doc_count":724}]}}]}},"max_date":{"value":1589821200000,"value_as_string":"2020-05-18T12:00:00-05:00"},"issue":{"doc_count":4581,"issue":{"doc_count_error_upper_bound":0,"sum_other_doc_count":58,"buckets":[{"key":"Attempts to collect debt not owed","doc_count":2483,"trend_period":{"buckets":[{"key_as_string":"2020-05-18T00:00:00.000Z","key":1589760000000,"doc_count":4,"interval_diff":{"value":-121}},{"key_as_string":"2020-05-11T00:00:00.000Z","key":1589155200000,"doc_count":125,"interval_diff":{"value":-152}},{"key_as_string":"2020-05-04T00:00:00.000Z","key":1588550400000,"doc_count":277,"interval_diff":{"value":-280}},{"key_as_string":"2020-04-27T00:00:00.000Z","key":1587945600000,"doc_count":557,"interval_diff":{"value":-27}},{"key_as_string":"2020-04-20T00:00:00.000Z","key":1587340800000,"doc_count":584,"interval_diff":{"value":30}},{"key_as_string":"2020-04-13T00:00:00.000Z","key":1586736000000,"doc_count":554,"interval_diff":{"value":172}},{"key_as_string":"2020-04-06T00:00:00.000Z","key":1586131200000,"doc_count":382}]}},{"key":"Written notification about debt","doc_count":1019,"trend_period":{"buckets":[{"key_as_string":"2020-05-18T00:00:00.000Z","key":1589760000000,"doc_count":2,"interval_diff":{"value":-45}},{"key_as_string":"2020-05-11T00:00:00.000Z","key":1589155200000,"doc_count":47,"interval_diff":{"value":-71}},{"key_as_string":"2020-05-04T00:00:00.000Z","key":1588550400000,"doc_count":118,"interval_diff":{"value":-123}},{"key_as_string":"2020-04-27T00:00:00.000Z","key":1587945600000,"doc_count":241,"interval_diff":{"value":18}},{"key_as_string":"2020-04-20T00:00:00.000Z","key":1587340800000,"doc_count":223,"interval_diff":{"value":3}},{"key_as_string":"2020-04-13T00:00:00.000Z","key":1586736000000,"doc_count":220,"interval_diff":{"value":52}},{"key_as_string":"2020-04-06T00:00:00.000Z","key":1586131200000,"doc_count":168}]}},{"key":"False statements or representation","doc_count":395,"trend_period":{"buckets":[{"key_as_string":"2020-05-11T00:00:00.000Z","key":1589155200000,"doc_count":20,"interval_diff":{"value":-26}},{"key_as_string":"2020-05-04T00:00:00.000Z","key":1588550400000,"doc_count":46,"interval_diff":{"value":-35}},{"key_as_string":"2020-04-27T00:00:00.000Z","key":1587945600000,"doc_count":81,"interval_diff":{"value":-15}},{"key_as_string":"2020-04-20T00:00:00.000Z","key":1587340800000,"doc_count":96,"interval_diff":{"value":8}},{"key_as_string":"2020-04-13T00:00:00.000Z","key":1586736000000,"doc_count":88,"interval_diff":{"value":24}},{"key_as_string":"2020-04-06T00:00:00.000Z","key":1586131200000,"doc_count":64}]}},{"key":"Took or threatened to take negative or legal action","doc_count":330,"trend_period":{"buckets":[{"key_as_string":"2020-05-11T00:00:00.000Z","key":1589155200000,"doc_count":24,"interval_diff":{"value":-11}},{"key_as_string":"2020-05-04T00:00:00.000Z","key":1588550400000,"doc_count":35,"interval_diff":{"value":-25}},{"key_as_string":"2020-04-27T00:00:00.000Z","key":1587945600000,"doc_count":60,"interval_diff":{"value":-2}},{"key_as_string":"2020-04-20T00:00:00.000Z","key":1587340800000,"doc_count":62,"interval_diff":{"value":-34}},{"key_as_string":"2020-04-13T00:00:00.000Z","key":1586736000000,"doc_count":96,"interval_diff":{"value":43}},{"key_as_string":"2020-04-06T00:00:00.000Z","key":1586131200000,"doc_count":53}]}},{"key":"Communication tactics","doc_count":296,"trend_period":{"buckets":[{"key_as_string":"2020-05-11T00:00:00.000Z","key":1589155200000,"doc_count":13,"interval_diff":{"value":-17}},{"key_as_string":"2020-05-04T00:00:00.000Z","key":1588550400000,"doc_count":30,"interval_diff":{"value":-34}},{"key_as_string":"2020-04-27T00:00:00.000Z","key":1587945600000,"doc_count":64,"interval_diff":{"value":-14}},{"key_as_string":"2020-04-20T00:00:00.000Z","key":1587340800000,"doc_count":78,"interval_diff":{"value":13}},{"key_as_string":"2020-04-13T00:00:00.000Z","key":1586736000000,"doc_count":65,"interval_diff":{"value":19}},{"key_as_string":"2020-04-06T00:00:00.000Z","key":1586131200000,"doc_count":46}]}}]}},"min_date":{"value":1322758800000,"value_as_string":"2011-12-01T12:00:00-05:00"},"dateRangeArea":{"doc_count":4581,"dateRangeArea":{"buckets":[{"key_as_string":"2020-04-06T00:00:00.000Z","key":1586131200000,"doc_count":724},{"key_as_string":"2020-04-13T00:00:00.000Z","key":1586736000000,"doc_count":1031},{"key_as_string":"2020-04-20T00:00:00.000Z","key":1587340800000,"doc_count":1061},{"key_as_string":"2020-04-27T00:00:00.000Z","key":1587945600000,"doc_count":1014},{"key_as_string":"2020-05-04T00:00:00.000Z","key":1588550400000,"doc_count":512},{"key_as_string":"2020-05-11T00:00:00.000Z","key":1589155200000,"doc_count":233},{"key_as_string":"2020-05-18T00:00:00.000Z","key":1589760000000,"doc_count":6}]}},"tags":{"doc_count":4581,"tags":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[{"key":"Servicemember","doc_count":437,"trend_period":{"buckets":[{"key_as_string":"2020-05-18T00:00:00.000Z","key":1589760000000,"doc_count":1,"interval_diff":{"value":-18}},{"key_as_string":"2020-05-11T00:00:00.000Z","key":1589155200000,"doc_count":19,"interval_diff":{"value":-24}},{"key_as_string":"2020-05-04T00:00:00.000Z","key":1588550400000,"doc_count":43,"interval_diff":{"value":-40}},{"key_as_string":"2020-04-27T00:00:00.000Z","key":1587945600000,"doc_count":83,"interval_diff":{"value":-20}},{"key_as_string":"2020-04-20T00:00:00.000Z","key":1587340800000,"doc_count":103,"interval_diff":{"value":-6}},{"key_as_string":"2020-04-13T00:00:00.000Z","key":1586736000000,"doc_count":109,"interval_diff":{"value":30}},{"key_as_string":"2020-04-06T00:00:00.000Z","key":1586131200000,"doc_count":79}]}},{"key":"Older American","doc_count":111,"trend_period":{"buckets":[{"key_as_string":"2020-05-11T00:00:00.000Z","key":1589155200000,"doc_count":2,"interval_diff":{"value":-10}},{"key_as_string":"2020-05-04T00:00:00.000Z","key":1588550400000,"doc_count":12,"interval_diff":{"value":-19}},{"key_as_string":"2020-04-27T00:00:00.000Z","key":1587945600000,"doc_count":31,"interval_diff":{"value":9}},{"key_as_string":"2020-04-20T00:00:00.000Z","key":1587340800000,"doc_count":22,"interval_diff":{"value":-10}},{"key_as_string":"2020-04-13T00:00:00.000Z","key":1586736000000,"doc_count":32,"interval_diff":{"value":20}},{"key_as_string":"2020-04-06T00:00:00.000Z","key":1586131200000,"doc_count":12}]}},{"key":"Older American, Servicemember","doc_count":32,"trend_period":{"buckets":[{"key_as_string":"2020-05-04T00:00:00.000Z","key":1588550400000,"doc_count":4,"interval_diff":{"value":-3}},{"key_as_string":"2020-04-27T00:00:00.000Z","key":1587945600000,"doc_count":7,"interval_diff":{"value":-1}},{"key_as_string":"2020-04-20T00:00:00.000Z","key":1587340800000,"doc_count":8,"interval_diff":{"value":0}},{"key_as_string":"2020-04-13T00:00:00.000Z","key":1586736000000,"doc_count":8,"interval_diff":{"value":3}},{"key_as_string":"2020-04-06T00:00:00.000Z","key":1586131200000,"doc_count":5}]}}]}},"dateRangeBuckets":{"doc_count":37442,"dateRangeBuckets":{"buckets":[{"key_as_string":"2020-04-06T00:00:00.000Z","key":1586131200000,"doc_count":5011},{"key_as_string":"2020-04-13T00:00:00.000Z","key":1586736000000,"doc_count":7832},{"key_as_string":"2020-04-20T00:00:00.000Z","key":1587340800000,"doc_count":8759},{"key_as_string":"2020-04-27T00:00:00.000Z","key":1587945600000,"doc_count":8727},{"key_as_string":"2020-05-04T00:00:00.000Z","key":1588550400000,"doc_count":4339},{"key_as_string":"2020-05-11T00:00:00.000Z","key":1589155200000,"doc_count":2757},{"key_as_string":"2020-05-18T00:00:00.000Z","key":1589760000000,"doc_count":17}]}}}
+
+export const trendsFocusAggsResults = { "activeCall": "", "chartType": "line", "colorMap": { "Other": "#a2a3a4", "I do not know": "#addc91", "Other debt": "#257675", "Credit card debt": "#9ec4c3", "Medical debt": "#0072ce", "Auto debt": "#96c4ed", "Complaints": "#ADDC91", "All other products": "#a2a3a4", "All other companies": "#a2a3a4", "All other values": "#a2a3a4" }, "error": false, "expandedTrends": [], "expandableRows": [ "Mortgage", "Credit card or prepaid card", "Credit reporting, credit repair services, or other personal consumer reports", "Checking or savings account", "Debt collection", "Student loan" ], "focus": "Debt collection", "isLoading": false, "lastDate": "2020-05-18T00:00:00.000Z", "lens": "Product", "results": { "company": [], "dateRangeArea": [ { "name": "Other", "value": 58, "date": "2020-04-06T00:00:00.000Z" }, { "name": "Other", "value": 56, "date": "2020-04-13T00:00:00.000Z" }, { "name": "Other", "value": 64, "date": "2020-04-20T00:00:00.000Z" }, { "name": "Other", "value": 56, "date": "2020-04-27T00:00:00.000Z" }, { "name": "Other", "value": 29, "date": "2020-05-04T00:00:00.000Z" }, { "name": "Other", "value": 13, "date": "2020-05-11T00:00:00.000Z" }, { "name": "Other", "value": 1, "date": "2020-05-18T00:00:00.000Z" }, { "name": "I do not know", "value": 152, "date": "2020-04-06T00:00:00.000Z" }, { "name": "I do not know", "value": 290, "date": "2020-04-13T00:00:00.000Z" }, { "name": "I do not know", "value": 306, "date": "2020-04-20T00:00:00.000Z" }, { "name": "I do not know", "value": 253, "date": "2020-04-27T00:00:00.000Z" }, { "name": "I do not know", "value": 119, "date": "2020-05-04T00:00:00.000Z" }, { "name": "I do not know", "value": 58, "date": "2020-05-11T00:00:00.000Z" }, { "name": "I do not know", "value": 2, "date": "2020-05-18T00:00:00.000Z" }, { "name": "Other debt", "value": 189, "date": "2020-04-06T00:00:00.000Z" }, { "name": "Other debt", "value": 225, "date": "2020-04-13T00:00:00.000Z" }, { "name": "Other debt", "value": 244, "date": "2020-04-20T00:00:00.000Z" }, { "name": "Other debt", "value": 279, "date": "2020-04-27T00:00:00.000Z" }, { "name": "Other debt", "value": 157, "date": "2020-05-04T00:00:00.000Z" }, { "name": "Other debt", "value": 60, "date": "2020-05-11T00:00:00.000Z" }, { "name": "Other debt", "value": 2, "date": "2020-05-18T00:00:00.000Z" }, { "name": "Credit card debt", "value": 181, "date": "2020-04-06T00:00:00.000Z" }, { "name": "Credit card debt", "value": 268, "date": "2020-04-13T00:00:00.000Z" }, { "name": "Credit card debt", "value": 264, "date": "2020-04-20T00:00:00.000Z" }, { "name": "Credit card debt", "value": 239, "date": "2020-04-27T00:00:00.000Z" }, { "name": "Credit card debt", "value": 93, "date": "2020-05-04T00:00:00.000Z" }, { "name": "Credit card debt", "value": 47, "date": "2020-05-11T00:00:00.000Z" }, { "name": "Credit card debt", "value": 0, "date": "2020-05-18T00:00:00.000Z" }, { "name": "Medical debt", "value": 121, "date": "2020-04-06T00:00:00.000Z" }, { "name": "Medical debt", "value": 157, "date": "2020-04-13T00:00:00.000Z" }, { "name": "Medical debt", "value": 156, "date": "2020-04-20T00:00:00.000Z" }, { "name": "Medical debt", "value": 149, "date": "2020-04-27T00:00:00.000Z" }, { "name": "Medical debt", "value": 93, "date": "2020-05-04T00:00:00.000Z" }, { "name": "Medical debt", "value": 50, "date": "2020-05-11T00:00:00.000Z" }, { "name": "Medical debt", "value": 1, "date": "2020-05-18T00:00:00.000Z" }, { "name": "Auto debt", "value": 23, "date": "2020-04-06T00:00:00.000Z" }, { "name": "Auto debt", "value": 35, "date": "2020-04-13T00:00:00.000Z" }, { "name": "Auto debt", "value": 27, "date": "2020-04-20T00:00:00.000Z" }, { "name": "Auto debt", "value": 38, "date": "2020-04-27T00:00:00.000Z" }, { "name": "Auto debt", "value": 21, "date": "2020-05-04T00:00:00.000Z" }, { "name": "Auto debt", "value": 5, "date": "2020-05-11T00:00:00.000Z" }, { "name": "Auto debt", "value": 0, "date": "2020-05-18T00:00:00.000Z" } ], "dateRangeLine": { "dataByTopic": [ { "topic": "I do not know", "topicName": "I do not know", "dashed": false, "show": true, "dates": [ { "name": "I do not know", "date": "2020-04-06T00:00:00.000Z", "value": 152 }, { "name": "I do not know", "date": "2020-04-13T00:00:00.000Z", "value": 290 }, { "name": "I do not know", "date": "2020-04-20T00:00:00.000Z", "value": 306 }, { "name": "I do not know", "date": "2020-04-27T00:00:00.000Z", "value": 253 }, { "name": "I do not know", "date": "2020-05-04T00:00:00.000Z", "value": 119 }, { "name": "I do not know", "date": "2020-05-11T00:00:00.000Z", "value": 58 }, { "name": "I do not know", "date": "2020-05-18T00:00:00.000Z", "value": 2 } ] }, { "topic": "Other debt", "topicName": "Other debt", "dashed": false, "show": true, "dates": [ { "name": "Other debt", "date": "2020-04-06T00:00:00.000Z", "value": 189 }, { "name": "Other debt", "date": "2020-04-13T00:00:00.000Z", "value": 225 }, { "name": "Other debt", "date": "2020-04-20T00:00:00.000Z", "value": 244 }, { "name": "Other debt", "date": "2020-04-27T00:00:00.000Z", "value": 279 }, { "name": "Other debt", "date": "2020-05-04T00:00:00.000Z", "value": 157 }, { "name": "Other debt", "date": "2020-05-11T00:00:00.000Z", "value": 60 }, { "name": "Other debt", "date": "2020-05-18T00:00:00.000Z", "value": 2 } ] }, { "topic": "Credit card debt", "topicName": "Credit card debt", "dashed": false, "show": true, "dates": [ { "name": "Credit card debt", "date": "2020-04-06T00:00:00.000Z", "value": 181 }, { "name": "Credit card debt", "date": "2020-04-13T00:00:00.000Z", "value": 268 }, { "name": "Credit card debt", "date": "2020-04-20T00:00:00.000Z", "value": 264 }, { "name": "Credit card debt", "date": "2020-04-27T00:00:00.000Z", "value": 239 }, { "name": "Credit card debt", "date": "2020-05-04T00:00:00.000Z", "value": 93 }, { "name": "Credit card debt", "date": "2020-05-11T00:00:00.000Z", "value": 47 }, { "name": "Credit card debt", "date": "2020-05-18T00:00:00.000Z", "value": 0 } ] }, { "topic": "Medical debt", "topicName": "Medical debt", "dashed": false, "show": true, "dates": [ { "name": "Medical debt", "date": "2020-04-06T00:00:00.000Z", "value": 121 }, { "name": "Medical debt", "date": "2020-04-13T00:00:00.000Z", "value": 157 }, { "name": "Medical debt", "date": "2020-04-20T00:00:00.000Z", "value": 156 }, { "name": "Medical debt", "date": "2020-04-27T00:00:00.000Z", "value": 149 }, { "name": "Medical debt", "date": "2020-05-04T00:00:00.000Z", "value": 93 }, { "name": "Medical debt", "date": "2020-05-11T00:00:00.000Z", "value": 50 }, { "name": "Medical debt", "date": "2020-05-18T00:00:00.000Z", "value": 1 } ] }, { "topic": "Auto debt", "topicName": "Auto debt", "dashed": false, "show": true, "dates": [ { "name": "Auto debt", "date": "2020-04-06T00:00:00.000Z", "value": 23 }, { "name": "Auto debt", "date": "2020-04-13T00:00:00.000Z", "value": 35 }, { "name": "Auto debt", "date": "2020-04-20T00:00:00.000Z", "value": 27 }, { "name": "Auto debt", "date": "2020-04-27T00:00:00.000Z", "value": 38 }, { "name": "Auto debt", "date": "2020-05-04T00:00:00.000Z", "value": 21 }, { "name": "Auto debt", "date": "2020-05-11T00:00:00.000Z", "value": 5 }, { "name": "Auto debt", "date": "2020-05-18T00:00:00.000Z", "value": 0 } ] } ] }, "product": [ { "hasChildren": false, "isNotFilter": false, "isParent": true, "name": "Debt collection", "value": 4581, "parent": false, "visible": true, "width": 0.5 } ], "issue": [ { "hasChildren": false, "isNotFilter": false, "isParent": true, "name": "Attempts to collect debt not owed", "value": 2483, "parent": false, "visible": true, "width": 0.5 }, { "hasChildren": false, "isNotFilter": false, "isParent": true, "name": "Written notification about debt", "value": 1019, "parent": false, "visible": true, "width": 0.5 }, { "hasChildren": false, "isNotFilter": false, "isParent": true, "name": "False statements or representation", "value": 395, "parent": false, "visible": true, "width": 0.5 }, { "hasChildren": false, "isNotFilter": false, "isParent": true, "name": "Took or threatened to take negative or legal action", "value": 330, "parent": false, "visible": true, "width": 0.5 }, { "hasChildren": false, "isNotFilter": false, "isParent": true, "name": "Communication tactics", "value": 296, "parent": false, "visible": true, "width": 0.5 } ], "sub-product": [ { "hasChildren": false, "isNotFilter": false, "isParent": true, "name": "I do not know", "value": 1180, "parent": false, "visible": true, "width": 0.5 }, { "hasChildren": false, "isNotFilter": false, "isParent": true, "name": "Other debt", "value": 1156, "parent": false, "visible": true, "width": 0.5 }, { "hasChildren": false, "isNotFilter": false, "isParent": true, "name": "Credit card debt", "value": 1092, "parent": false, "visible": true, "width": 0.5 }, { "hasChildren": false, "isNotFilter": false, "isParent": true, "name": "Medical debt", "value": 727, "parent": false, "visible": true, "width": 0.5 }, { "hasChildren": false, "isNotFilter": false, "isParent": true, "name": "Auto debt", "value": 149, "parent": false, "visible": true, "width": 0.5 } ] }, "subLens": "sub_product", "tooltip": false, "total": 4581 }
diff --git a/src/reducers/__fixtures__/trendsResults.jsx b/src/reducers/__fixtures__/trendsResults.jsx
new file mode 100644
index 000000000..ee74c7a49
--- /dev/null
+++ b/src/reducers/__fixtures__/trendsResults.jsx
@@ -0,0 +1 @@
+export const trendsResults = {"activeCall":"","chartType":"line","colorMap":{"Complaints":"#ADDC91","Other":"#a2a3a4","All other products":"#a2a3a4","All other companies":"#a2a3a4","All other values":"#a2a3a4"},"error":false,"expandedTrends":[],"expandableRows":["Mortgage","Credit card or prepaid card","Credit reporting, credit repair services, or other personal consumer reports","Checking or savings account","Debt collection"],"focus":"","isLoading":false,"lastDate":"2020-05-01T00:00:00.000Z","lens":"Overview","results":{"company":[],"dateRangeArea":[],"dateRangeLine":{"dataByTopic":[{"topic":"Complaints","topicName":"Complaints","dashed":false,"show":true,"dates":[{"date":"2020-01-01T00:00:00.000Z","value":0},{"date":"2020-02-01T00:00:00.000Z","value":0},{"date":"2020-03-01T00:00:00.000Z","value":106},{"date":"2020-04-01T00:00:00.000Z","value":374},{"date":"2020-05-01T00:00:00.000Z","value":52}]}]},"product":[{"hasChildren":true,"isNotFilter":false,"isParent":true,"name":"Mortgage","value":185,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Conventional home mortgage","value":108,"parent":"Mortgage","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"FHA mortgage","value":44,"parent":"Mortgage","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"VA mortgage","value":19,"parent":"Mortgage","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Other type of mortgage","value":9,"parent":"Mortgage","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Home equity loan or line of credit (HELOC)","value":5,"parent":"Mortgage","visible":false,"width":0.4},{"hasChildren":false,"isParent":false,"key":"Visualize trends for Mortgage","name":"Visualize trends for Mortgage","splitterText":"Visualize trends for Mortgage","value":"","parent":"Mortgage","width":0.3,"visible":false},{"hasChildren":true,"isNotFilter":false,"isParent":true,"name":"Credit card or prepaid card","value":129,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"General-purpose credit card or charge card","value":98,"parent":"Credit card or prepaid card","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Store credit card","value":23,"parent":"Credit card or prepaid card","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Government benefit card","value":6,"parent":"Credit card or prepaid card","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"General-purpose prepaid card","value":2,"parent":"Credit card or prepaid card","visible":false,"width":0.4},{"hasChildren":false,"isParent":false,"key":"Visualize trends for Credit card or prepaid card","name":"Visualize trends for Credit card or prepaid card","splitterText":"Visualize trends for Credit card or prepaid card","value":"","parent":"Credit card or prepaid card","width":0.3,"visible":false},{"hasChildren":true,"isNotFilter":false,"isParent":true,"name":"Credit reporting, credit repair services, or other personal consumer reports","value":87,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Credit reporting","value":84,"parent":"Credit reporting, credit repair services, or other personal consumer reports","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Credit repair services","value":2,"parent":"Credit reporting, credit repair services, or other personal consumer reports","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Other personal consumer report","value":1,"parent":"Credit reporting, credit repair services, or other personal consumer reports","visible":false,"width":0.4},{"hasChildren":false,"isParent":false,"key":"Visualize trends for Credit reporting, credit repair services, or other personal consumer reports","name":"Visualize trends for Credit reporting, credit repair services, or other personal consumer reports","splitterText":"Visualize trends for Credit reporting, credit repair services, or other personal consumer reports","value":"","parent":"Credit reporting, credit repair services, or other personal consumer reports","width":0.3,"visible":false},{"hasChildren":true,"isNotFilter":false,"isParent":true,"name":"Checking or savings account","value":43,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Checking account","value":34,"parent":"Checking or savings account","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Savings account","value":5,"parent":"Checking or savings account","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Other banking product or service","value":3,"parent":"Checking or savings account","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"CD (Certificate of Deposit)","value":1,"parent":"Checking or savings account","visible":false,"width":0.4},{"hasChildren":false,"isParent":false,"key":"Visualize trends for Checking or savings account","name":"Visualize trends for Checking or savings account","splitterText":"Visualize trends for Checking or savings account","value":"","parent":"Checking or savings account","width":0.3,"visible":false},{"hasChildren":true,"isNotFilter":false,"isParent":true,"name":"Debt collection","value":38,"parent":false,"visible":true,"width":0.5},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Other debt","value":12,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"I do not know","value":8,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Medical debt","value":8,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Auto debt","value":4,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Credit card debt","value":4,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Federal student loan debt","value":1,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isNotFilter":false,"isParent":false,"name":"Private student loan debt","value":1,"parent":"Debt collection","visible":false,"width":0.4},{"hasChildren":false,"isParent":false,"key":"Visualize trends for Debt collection","name":"Visualize trends for Debt collection","splitterText":"Visualize trends for Debt collection","value":"","parent":"Debt collection","width":0.3,"visible":false}]},"subLens":"","tooltip":false,"total":532}
diff --git a/src/reducers/__tests__/aggs.spec.jsx b/src/reducers/__tests__/aggs.spec.jsx
index ecf716650..17de82e0a 100644
--- a/src/reducers/__tests__/aggs.spec.jsx
+++ b/src/reducers/__tests__/aggs.spec.jsx
@@ -25,12 +25,12 @@ describe( 'reducer:aggs', () => {
it( 'handles AGGREGATIONS_FAILED actions', () => {
const action = {
type: AGGREGATIONS_FAILED,
- error: 'error message'
+ error: { message: 'error message', name: 'messageTypeName' }
}
const expected = {
...defaultAggs,
- error: 'error message'
+ error: { message: 'error message', name: 'messageTypeName' }
}
expect( target( {
company: ['ab', 'cd'],
diff --git a/src/reducers/__tests__/map.spec.jsx b/src/reducers/__tests__/map.spec.jsx
index 3bc9f37f5..07f334b3c 100644
--- a/src/reducers/__tests__/map.spec.jsx
+++ b/src/reducers/__tests__/map.spec.jsx
@@ -1,11 +1,10 @@
import target, {
defaultState,
- processAggregations,
processStateAggregations
} from '../map'
import actions from '../../actions'
import stateAggs from '../__fixtures__/stateAggs'
-import { GEO_NORM_NONE, TILE_MAP_STATES } from '../../constants'
+import { GEO_NORM_NONE } from '../../constants'
describe( 'reducer:map', () => {
let action
@@ -13,16 +12,21 @@ describe( 'reducer:map', () => {
describe( 'reducer', () => {
it( 'has a default state', () => {
expect( target( undefined, {} ) ).toEqual( {
+ activeCall: '',
dataNormalization: GEO_NORM_NONE,
+ expandedTrends: [],
+ expandableRows: [],
isLoading: false,
- issue: [],
- product: [],
- state: []
+ results: {
+ issue: [],
+ product: [],
+ state: []
+ }
} )
} )
} )
- describe('handles DATA_NORMALIZATION_SELECTED', ()=>{
+ describe( 'handles DATA_NORMALIZATION_SELECTED', () => {
action = {
type: actions.DATA_NORMALIZATION_SELECTED,
value: 'FooBar'
@@ -30,11 +34,11 @@ describe( 'reducer:map', () => {
expect( target( {}, action ) ).toEqual( {
dataNormalization: 'FooBar'
} )
- })
+ } )
- describe('DATE_RANGE_CHANGED',()=>{
+ describe( 'DATE_RANGE_CHANGED', () => {
- it('handles date_received', ()=>{
+ it( 'handles date_received', () => {
action = {
type: actions.DATE_RANGE_CHANGED,
filterName: 'date_received',
@@ -46,7 +50,7 @@ describe( 'reducer:map', () => {
} )
} )
- it('handles company_received', ()=>{
+ it( 'handles company_received', () => {
action = {
type: actions.DATE_RANGE_CHANGED,
filterName: 'company_received',
@@ -58,7 +62,7 @@ describe( 'reducer:map', () => {
} )
} )
- it('handles company_received null vals', ()=>{
+ it( 'handles company_received null vals', () => {
action = {
type: actions.DATE_RANGE_CHANGED,
filterName: 'company_received',
@@ -69,9 +73,9 @@ describe( 'reducer:map', () => {
dataNormalization: 'FooBar'
} )
} )
- })
+ } )
- describe('handles FILTER_CHANGED', ()=>{
+ describe( 'handles FILTER_CHANGED', () => {
action = {
type: actions.FILTER_CHANGED,
value: 'FooBar'
@@ -89,7 +93,7 @@ describe( 'reducer:map', () => {
expect( target( { dataNormalization: 'FooBar' }, action ) ).toEqual( {
dataNormalization: GEO_NORM_NONE
} )
- })
+ } )
describe( 'handles STATE_FILTER_ADDED', () => {
action = {
@@ -99,7 +103,7 @@ describe( 'reducer:map', () => {
expect( target( { dataNormalization: 'FooBar' }, action ) ).toEqual( {
dataNormalization: GEO_NORM_NONE
} )
- })
+ } )
describe( 'handles STATES_API_CALLED actions', () => {
action = {
@@ -124,152 +128,167 @@ describe( 'reducer:map', () => {
it( 'maps data to object state', () => {
- const result = target( null, action )
+ const result = target( {}, action )
expect( result ).toEqual( {
activeCall: '',
isLoading: false,
- state: [
- { name: "CA", value: 62519, issue: "issue o", product: "fo prod" },
- { name: "FL", value: 47358, issue: "issue o", product: "fo" },
- { name: "TX", value: 44469, issue: "issue o", product: "fo rod" },
- { name: "GA", value: 28395, issue: "issue o", product: "fo prod" },
- { name: "NY", value: 26846, issue: "issue o", product: "fo prod" },
- { name: "IL", value: 18172, issue: "issue o", product: "fo prd" },
- { name: "PA", value: 16054, issue: "issue o", product: "fo prod" },
- { name: "NC", value: 15217, issue: "issue o", product: "fo prod" },
- { name: "NJ", value: 15130, issue: "issue o", product: "fo prod" },
- { name: "OH", value: 14365, issue: "issue o", product: "fo prod" },
- { name: "VA", value: 12901, issue: "issue o", product: "fo prod" },
- { name: "MD", value: 12231, issue: "issue o", product: "fo prod" },
- { name: "MI", value: 10472, issue: "issue o", product: "fo prod" },
- { name: "AZ", value: 10372, issue: "issue o", product: "fo prod" },
- { name: "TN", value: 9011, issue: "issue o", product: "fo prod" },
- { name: "WA", value: 8542, issue: "issue o", product: "fo prod" },
- { name: "MA", value: 8254, issue: "issue o", product: "fo prod" },
- { name: "MO", value: 7832, issue: "issue o", product: "fo prod" },
- { name: "SC", value: 7496, issue: "issue o", product: "fo prod" },
- { name: "CO", value: 7461, issue: "issue o", product: "fo prod" },
- { name: "NV", value: 7095, issue: "issue o", product: "fo prod" },
- { name: "LA", value: 6369, issue: "issue o", product: "fo prod" },
- { name: "AL", value: 6178, issue: "issue o", product: "fo prod" },
- { name: "IN", value: 5659, issue: "issue o", product: "fo prod" },
- { name: "MN", value: 4957, issue: "issue o", product: "fo prod" },
- { name: "CT", value: 4685, issue: "issue o", product: "fo prod" },
- { name: "WI", value: 4443, issue: "issue o", product: "fo prod" },
- { name: "OR", value: 4261, issue: "issue o", product: "fo prod" },
- { name: "UT", value: 3693, issue: "issue o", product: "fo prod" },
- { name: "KY", value: 3392, issue: "issue o", product: "fo prod" },
- { name: "MS", value: 3237, issue: "issue o", product: "fo prod" },
- { name: "OK", value: 2989, issue: "issue o", product: "fo prod" },
- { name: "AR", value: 2691, issue: "issue o", product: "fo prod" },
- { name: "DC", value: 2493, issue: "issue o", product: "fo prod" },
- { name: "KS", value: 2307, issue: "issue o", product: "fo prod" },
- { name: "NM", value: 2176, issue: "issue o", product: "fo prod" },
- { name: "DE", value: 2160, issue: "issue o", product: "fo prod" },
- { name: "IA", value: 1751, issue: "issue o", product: "fo prod" },
- { name: "ID", value: 1436, issue: "issue o", product: "fo prod" },
- { name: "NH", value: 1408, issue: "issue o", product: "fo prod" },
- { name: "NE", value: 1343, issue: "issue o", product: "fo prod" },
- { name: "RI", value: 1166, issue: "issue o", product: "fo prod" },
- { name: "ME", value: 1155, issue: "issue o", product: "fo prod" },
- { name: "WV", value: 1075, issue: "issue o", product: "fo prod" },
- { name: "MT", value: 788, issue: "issue o", product: "fo prod" },
- { name: "ND", value: 637, issue: "issue o", product: "fo prod" },
- { name: "SD", value: 535, issue: "issue o", product: "fo prod" },
- { name: "AK", value: 524, issue: "issue o", product: "fo prod" },
- { name: "WY", value: 450, issue: "issue o", product: "fo prod" },
- { name: "VT", value: 446, issue: "issue o", product: "fo prod" },
- { name: "HI", value: 0, issue: "", product: "" } ],
- issue: [
- {
- name: "alpha",
- value: 600,
- pctChange: 1,
- isParent: true,
- hasChildren: false,
- pctOfSet: "60.00",
- width: 0.5
- },
- {
- name: "bar",
- value: 150,
- pctChange: 1,
- isParent: true,
- hasChildren: false,
- pctOfSet: "15.00",
- width: 0.5
- },
- {
- name: "car",
- value: 125,
- pctChange: 1,
- isParent: true,
- hasChildren: false,
- pctOfSet: "13.00",
- width: 0.5
- },
- {
- name: "delta",
- value: 75,
- pctChange: 1,
- isParent: true,
- hasChildren: false,
- pctOfSet: "8.00",
- width: 0.5
- },
- {
- name: "elephant",
- value: 50,
- pctChange: 1,
- isParent: true,
- hasChildren: false,
- pctOfSet: "5.00",
- width: 0.5
- }
- ],
- product: [
- {
- name: "foo",
- value: 600,
- pctChange: 1,
- isParent: true,
- hasChildren: false,
- pctOfSet: "60.00",
- width: 0.5
- }, {
- name: "goo",
- value: 150,
- pctChange: 1,
- isParent: true,
- hasChildren: false,
- pctOfSet: "15.00",
- width: 0.5
- }, {
- name: "hi",
- value: 125,
- pctChange: 1,
- isParent: true,
- hasChildren: false,
- pctOfSet: "13.00",
- width: 0.5
- }, {
- name: "indigo",
- value: 75,
- pctChange: 1,
- isParent: true,
- hasChildren: false,
- pctOfSet: "8.00",
- width: 0.5
- }, {
- name: "joker",
- value: 50,
- pctChange: 1,
- isParent: true,
- hasChildren: false,
- pctOfSet: "5.00",
- width: 0.5
- }
- ]
+ results: {
+ state: [
+ { name: "CA", value: 62519, issue: "issue o", product: "fo prod" },
+ { name: "FL", value: 47358, issue: "issue o", product: "fo" },
+ { name: "TX", value: 44469, issue: "issue o", product: "fo rod" },
+ { name: "GA", value: 28395, issue: "issue o", product: "fo prod" },
+ { name: "NY", value: 26846, issue: "issue o", product: "fo prod" },
+ { name: "IL", value: 18172, issue: "issue o", product: "fo prd" },
+ { name: "PA", value: 16054, issue: "issue o", product: "fo prod" },
+ { name: "NC", value: 15217, issue: "issue o", product: "fo prod" },
+ { name: "NJ", value: 15130, issue: "issue o", product: "fo prod" },
+ { name: "OH", value: 14365, issue: "issue o", product: "fo prod" },
+ { name: "VA", value: 12901, issue: "issue o", product: "fo prod" },
+ { name: "MD", value: 12231, issue: "issue o", product: "fo prod" },
+ { name: "MI", value: 10472, issue: "issue o", product: "fo prod" },
+ { name: "AZ", value: 10372, issue: "issue o", product: "fo prod" },
+ { name: "TN", value: 9011, issue: "issue o", product: "fo prod" },
+ { name: "WA", value: 8542, issue: "issue o", product: "fo prod" },
+ { name: "MA", value: 8254, issue: "issue o", product: "fo prod" },
+ { name: "MO", value: 7832, issue: "issue o", product: "fo prod" },
+ { name: "SC", value: 7496, issue: "issue o", product: "fo prod" },
+ { name: "CO", value: 7461, issue: "issue o", product: "fo prod" },
+ { name: "NV", value: 7095, issue: "issue o", product: "fo prod" },
+ { name: "LA", value: 6369, issue: "issue o", product: "fo prod" },
+ { name: "AL", value: 6178, issue: "issue o", product: "fo prod" },
+ { name: "IN", value: 5659, issue: "issue o", product: "fo prod" },
+ { name: "MN", value: 4957, issue: "issue o", product: "fo prod" },
+ { name: "CT", value: 4685, issue: "issue o", product: "fo prod" },
+ { name: "WI", value: 4443, issue: "issue o", product: "fo prod" },
+ { name: "OR", value: 4261, issue: "issue o", product: "fo prod" },
+ { name: "UT", value: 3693, issue: "issue o", product: "fo prod" },
+ { name: "KY", value: 3392, issue: "issue o", product: "fo prod" },
+ { name: "MS", value: 3237, issue: "issue o", product: "fo prod" },
+ { name: "OK", value: 2989, issue: "issue o", product: "fo prod" },
+ { name: "AR", value: 2691, issue: "issue o", product: "fo prod" },
+ { name: "DC", value: 2493, issue: "issue o", product: "fo prod" },
+ { name: "KS", value: 2307, issue: "issue o", product: "fo prod" },
+ { name: "NM", value: 2176, issue: "issue o", product: "fo prod" },
+ { name: "DE", value: 2160, issue: "issue o", product: "fo prod" },
+ { name: "IA", value: 1751, issue: "issue o", product: "fo prod" },
+ { name: "ID", value: 1436, issue: "issue o", product: "fo prod" },
+ { name: "NH", value: 1408, issue: "issue o", product: "fo prod" },
+ { name: "NE", value: 1343, issue: "issue o", product: "fo prod" },
+ { name: "RI", value: 1166, issue: "issue o", product: "fo prod" },
+ { name: "ME", value: 1155, issue: "issue o", product: "fo prod" },
+ { name: "WV", value: 1075, issue: "issue o", product: "fo prod" },
+ { name: "MT", value: 788, issue: "issue o", product: "fo prod" },
+ { name: "ND", value: 637, issue: "issue o", product: "fo prod" },
+ { name: "SD", value: 535, issue: "issue o", product: "fo prod" },
+ { name: "AK", value: 524, issue: "issue o", product: "fo prod" },
+ { name: "WY", value: 450, issue: "issue o", product: "fo prod" },
+ { name: "VT", value: 446, issue: "issue o", product: "fo prod" },
+ { name: "HI", value: 0, issue: "", product: "" } ],
+ issue: [
+ {
+ hasChildren: false,
+ isNotFilter: false,
+ isParent: true,
+ name: "alpha",
+ parent: false,
+
+ value: 600,
+ visible: true,
+ width: 0.5
+ },
+ {
+ hasChildren: false,
+ isNotFilter: false,
+ isParent: true,
+ name: "bar",
+ parent: false,
+ value: 150,
+ visible: true,
+ width: 0.5
+ },
+ {
+ hasChildren: false,
+ isNotFilter: false,
+ isParent: true,
+ name: "car",
+ parent: false,
+
+ value: 125,
+ visible: true,
+ width: 0.5
+ },
+ {
+ hasChildren: false,
+ isNotFilter: false,
+ isParent: true,
+ name: "delta",
+ parent: false,
+ value: 75,
+ visible: true,
+ width: 0.5
+ },
+ {
+ hasChildren: false,
+ isNotFilter: false,
+ isParent: true,
+ name: "elephant",
+ parent: false,
+
+ value: 50,
+ visible: true,
+ width: 0.5
+ }
+ ],
+ product: [
+ {
+ hasChildren: false,
+ isNotFilter: false,
+ isParent: true,
+ name: "foo",
+ parent: false,
+ value: 600,
+ visible: true,
+ width: 0.5
+ }, {
+ hasChildren: false,
+ isNotFilter: false,
+ isParent: true,
+ name: "goo",
+ parent: false,
+ value: 150,
+ visible: true,
+ width: 0.5
+ }, {
+ hasChildren: false,
+ isNotFilter: false,
+ isParent: true,
+ name: "hi",
+ parent: false,
+ value: 125,
+ visible: true,
+ width: 0.5
+ }, {
+ hasChildren: false,
+ isNotFilter: false,
+ isParent: true,
+ name: "indigo",
+ parent: false,
+ value: 75,
+ visible: true,
+ width: 0.5
+ }, {
+ hasChildren: false,
+ isNotFilter: false,
+ isParent: true,
+ name: "joker",
+ parent: false,
+ value: 50,
+ visible: true,
+ width: 0.5
+ }
+ ]
+ }
} )
} )
} )
@@ -278,27 +297,67 @@ describe( 'reducer:map', () => {
it( 'handles failed error messages', () => {
action = {
type: actions.STATES_FAILED,
- error: 'foo bar'
+ error: { message: 'foo bar', name: 'ErrorTypeName' }
}
+
expect( target( {
activeCall: 'someurl',
- issue: [ 1, 2, 3 ],
- product: [ 1, 2, 3 ],
- state: [ 1, 2, 3 ]
+ results: {
+ issue: [ 1, 2, 3 ],
+ product: [ 1, 2, 3 ],
+ state: [ 1, 2, 3 ]
+ }
}, action ) ).toEqual( {
activeCall: '',
- error: 'foo bar',
+ error: { message: 'foo bar', name: 'ErrorTypeName' },
isLoading: false,
- issue: [],
- product: [],
- state: TILE_MAP_STATES.map( o => ( {
- name: o,
- value: 0,
- issue: '',
- product: ''
- } ) )
+ results: {
+ issue: [],
+ product: [],
+ state: []
+ }
+ } )
+ } )
+ } )
+
+ describe( 'FOCUS_REMOVED action', () => {
+ it( 'resets row values', () => {
+ action = {
+ type: actions.FOCUS_REMOVED
+ }
+
+ expect( target( {
+ expandableRows: [ 1, 3 ],
+ expandedTrends: [ 1, 3 ]
+ }, action ) ).toEqual( {
+ expandableRows: [],
+ expandedTrends: []
+ } )
+ } )
+ } )
+
+ describe( 'TAB_CHANGED action', () => {
+ it( 'clears results and resets values', () => {
+ action = {
+ type: actions.TAB_CHANGED,
+ tab: 'Foo'
+ }
+
+ expect( target( {
+ expandedTrends: [ 1, 2 ],
+ expandableRows: [ 2, 24 ],
+ results: [ 1, 2, 3 ]
+ }, action ) ).toEqual( {
+ expandedTrends: [ 1, 2 ],
+ expandableRows: [ 2, 24 ],
+ results: {
+ issue: [],
+ product: [],
+ state: []
+ }
} )
} )
+
} )
describe( 'URL_CHANGED actions', () => {
@@ -322,70 +381,22 @@ describe( 'reducer:map', () => {
const actual = target( state, action )
expect( actual.dataNormalization ).toEqual( 'hello' )
} )
- } )
- describe( 'helper functions', () => {
- describe( 'processAggregations', () => {
- it( 'calculates percentages properly', () => {
- const aggData = {
- doc_count: 1000,
- issue: {
- buckets: [
- { key: 'alpha', doc_count: 600 },
- { key: 'bar', doc_count: 150 },
- { key: 'car', doc_count: 125 },
- { key: 'delta', doc_count: 75 },
- { key: 'elephant', doc_count: 50 }
- ]
- }
- }
+ it( 'handles single expandedTrends param', () => {
+ action.params = { expandedTrends: 'hello' }
+ const actual = target( state, action )
+ expect( actual.expandedTrends ).toEqual( [ 'hello' ] )
+ } )
- const res = processAggregations( aggData )
- expect( res ).toEqual( [
- {
- hasChildren: false,
- isParent: true,
- name: "alpha",
- pctChange: 1,
- pctOfSet: "60.00",
- value: 600,
- width: 0.5
- }, {
- hasChildren: false,
- isParent: true,
- name: "bar",
- pctChange: 1,
- pctOfSet: "15.00",
- value: 150,
- width: 0.5
- }, {
- hasChildren: false,
- isParent: true,
- name: "car",
- pctChange: 1,
- pctOfSet: "13.00",
- value: 125,
- width: 0.5
- }, {
- hasChildren: false,
- isParent: true,
- name: "delta",
- pctChange: 1,
- pctOfSet: "8.00",
- value: 75,
- width: 0.5
- }, {
- hasChildren: false,
- isParent: true,
- name: "elephant",
- pctChange: 1,
- pctOfSet: "5.00",
- value: 50,
- width: 0.5
- } ] )
- } )
+ it( 'handles multiple expandedTrends param', () => {
+ action.params = { expandedTrends: [ 'hello', 'ma' ] }
+ const actual = target( state, action )
+ expect( actual.expandedTrends ).toEqual( [ 'hello', 'ma' ] )
} )
+ } )
+
+ describe( 'helper functions', () => {
describe( 'processStateAggregations', () => {
it( 'handles empty buckets', () => {
const stateData = {
diff --git a/src/reducers/__tests__/query.spec.jsx b/src/reducers/__tests__/query.spec.jsx
index 39469f31f..742cab841 100644
--- a/src/reducers/__tests__/query.spec.jsx
+++ b/src/reducers/__tests__/query.spec.jsx
@@ -1,10 +1,10 @@
import target, {
alignDateRange, defaultQuery, filterArrayAction
} from '../query'
+import { MODE_TRENDS, REQUERY_HITS_ONLY, SLUG_SEPARATOR } from '../../constants'
import actions from '../../actions'
import * as types from '../../constants'
-import { REQUERY_HITS_ONLY } from '../../constants'
import moment from 'moment'
import { startOfToday } from '../../utils'
@@ -27,8 +27,8 @@ describe( 'reducer:query', () => {
expect( res ).toHaveProperty( 'date_received_min' )
expect( res.queryString ).toContain( 'date_received_max' )
expect( res.queryString ).toContain( 'date_received_min' )
- expect( res.queryString ).toContain( 'field=all&page=1&size=25' +
- '&sort=created_date_desc' )
+ expect( res.queryString ).toContain( 'field=all&lens=overview' +
+ '&page=1&size=25&sort=created_date_desc' )
} )
} )
@@ -100,27 +100,33 @@ describe( 'reducer:query', () => {
} )
} )
- describe( 'Map Warning', ()=>{
- it('handles MAP_WARNING_DISMISSED action', ()=>{
+ describe( 'trend depth', () => {
+ it( 'handles DEPTH_CHANGED', () => {
const action = {
- type: actions.MAP_WARNING_DISMISSED
+ type: actions.DEPTH_CHANGED,
+ depth: 13
}
const state = {
- company: [1,2,3],
- foo: 'bar',
- mapWarningEnabled: true,
- tab: types.MODE_MAP
+ trendDepth: 5
}
expect( target( state, action ) ).toEqual( {
- company: [1,2,3],
- enablePer1000: false,
- foo: 'bar',
- mapWarningEnabled: false,
- queryString: '?company=1&company=2&company=3&foo=bar&tab=Map',
- tab: types.MODE_MAP
+ queryString: '?trend_depth=13',
+ trendDepth: 13
} )
- })
- })
+ } )
+ it( 'handles DEPTH_RESET', () => {
+ const action = {
+ type: actions.DEPTH_RESET
+ }
+ const state = {
+ trendDepth: 10000
+ }
+ expect( target( state, action ) ).toEqual( {
+ queryString: '?trend_depth=5',
+ trendDepth: 5
+ } )
+ } )
+ } )
describe( 'Pager', () => {
it( 'handles PAGE_CHANGED actions', () => {
@@ -228,20 +234,34 @@ describe( 'reducer:query', () => {
type: actions.TAB_CHANGED
}
state = {
+ focus: 'Yoyo',
tab: 'bar'
}
})
it( 'handles TAB_CHANGED actions', () => {
action.tab = 'foo'
expect( target( state, action ) ).toEqual( {
+ focus: '',
tab: 'foo',
queryString: '?tab=foo'
} )
} )
+ it( 'handles Trends TAB_CHANGED actions', () => {
+ action.tab = 'Trends'
+ expect( target( state, action ) ).toEqual( {
+ focus: 'Yoyo',
+ tab: 'Trends',
+ queryString: '?focus=Yoyo&tab=Trends',
+ trendsDateWarningEnabled: false
+ } )
+ } )
+
+
it( 'handles a Map TAB_CHANGED actions', () => {
action.tab = types.MODE_MAP
expect( target( state, action ) ).toEqual( {
+ focus: '',
enablePer1000: true,
mapWarningEnabled: true,
tab: types.MODE_MAP,
@@ -278,6 +298,13 @@ describe( 'reducer:query', () => {
expect( actual.size ).toEqual( 100 )
} )
+ it( 'handles bogus size & sort parameters', () => {
+ action.params = { size: '9999', sort: 'tables' }
+ const actual = target( state, action )
+ expect( actual.size ).toEqual( 10 )
+ expect( actual.sort ).toEqual( 'created_date_desc' )
+ } )
+
it( 'ignores bad integer parameters', () => {
action.params = { size: 'foo' }
const actual = target( state, action )
@@ -321,6 +348,21 @@ describe( 'reducer:query', () => {
expect( actual.product ).toEqual( [ 'Debt Collection', 'Mortgage' ] )
} )
+ it( 'handles a multiple filters & focus', () => {
+ action.params = { product: [ 'Debt Collection', 'Mortgage' ] }
+ const actual = target( { focus: 'Something' }, action )
+ expect( actual.focus ).toEqual( '' )
+ expect( actual.product ).toEqual( [ 'Debt Collection', 'Mortgage' ] )
+ } )
+
+ it( 'handles a trendDepth param', () => {
+ action.params = { lens: 'Product', trendDepth: 1000 }
+ const actual = target( {}, action )
+ expect( actual.lens ).toEqual( 'Product' )
+ expect( actual.trendDepth ).toEqual( 1000 )
+ } )
+
+
it( 'handles the "All" button from the landing page' , () => {
const dateMin = new Date( types.DATE_RANGE_MIN )
@@ -703,9 +745,11 @@ describe( 'reducer:query', () => {
it( 'removes filters if they exist', () => {
const state = {
+ focus: 'Mo Money',
issue: [ 'foo', 'Mo Money', 'Mo Problems' ]
}
expect( target( state, action ) ).toEqual( {
+ focus: '',
issue: [ 'foo' ],
queryString: '?issue=foo'
} )
@@ -819,23 +863,60 @@ describe( 'reducer:query', () => {
it( 'handles 1y range', () => {
action.dateRange = '1y'
result = target( {}, action )
- const min = new Date( moment().subtract( 1, 'year' ).calendar() )
- const diffMin = moment( min ).diff( moment( result.date_received_min ), 'years' )
- expect( diffMin ).toEqual( 0 )
+ expect( result ).toEqual( {
+ dateRange: '1y',
+ date_received_max: new Date( '2020-05-05T04:00:00.000Z' ),
+ date_received_min: new Date( '2019-05-05T04:00:00.000Z' ),
+ queryString: '?dateRange=1y&date_received_max=2020-05-05&date_received_min=2019-05-05'
+ } )
} )
it( 'default range handling', () => {
action.dateRange = 'foo'
result = target( {}, action )
- // only set max to today's date
- const diff = moment( result.date_received_max ).diff( moment( maxDate ), 'days' )
- // make sure its same day
- expect( diff ).toEqual( 0 )
+ // only set max date
+ expect( result ).toEqual( {
+ dateRange: 'foo',
+ date_received_max: new Date( '2020-05-05T04:00:00.000Z' ),
+ queryString: '?dateRange=foo&date_received_max=2020-05-05'
+ } )
} )
+
+ it( 'On Trends Tab handles All range', () => {
+ action.dateRange = 'All'
+ const state = { dateInterval: 'Day', tab: MODE_TRENDS }
+ result = target( state, action )
+ expect( result.dateInterval ).toEqual( 'Week' )
+ expect( result.trendsDateWarningEnabled ).toEqual( true )
+ } )
+
} )
} )
describe( 'Map', () => {
+
+ describe( 'Map Warning', () => {
+ it( 'handles MAP_WARNING_DISMISSED action', () => {
+ const action = {
+ type: actions.MAP_WARNING_DISMISSED
+ }
+ const state = {
+ company: [ 1, 2, 3 ],
+ foo: 'bar',
+ mapWarningEnabled: true,
+ tab: types.MODE_MAP
+ }
+ expect( target( state, action ) ).toEqual( {
+ company: [ 1, 2, 3 ],
+ enablePer1000: false,
+ foo: 'bar',
+ mapWarningEnabled: false,
+ queryString: '?company=1&company=2&company=3&foo=bar&tab=Map',
+ tab: types.MODE_MAP
+ } )
+ } )
+ } )
+
let action, res
describe( 'STATE_COMPLAINTS_SHOWN', () => {
it( 'switches to List View', () => {
@@ -979,17 +1060,86 @@ describe( 'reducer:query', () => {
} )
describe( 'Trends', () => {
+ describe( 'Trends Date Warning', () => {
+ it( 'handles TRENDS_DATE_WARNING_DISMISSED action', () => {
+ const action = {
+ type: actions.TRENDS_DATE_WARNING_DISMISSED
+ }
+ const state = {
+ trendsDateWarningEnabled: true
+ }
+ expect( target( state, action ) ).toEqual( {
+ queryString: '',
+ trendsDateWarningEnabled: false
+ } )
+ } )
+ } )
+
+ describe( 'CHART_TYPE_CHANGED actions', () => {
+ it( 'changes the chartType', () => {
+ const action = {
+ type: actions.CHART_TYPE_CHANGED,
+ chartType: 'Foo'
+ }
+ const result = target( { chartType: 'ahha' },
+ action )
+ expect( result ).toEqual( {
+ chartType: 'Foo',
+ queryString: '?chartType=Foo',
+ } )
+ } )
+ } )
+
describe( 'DATA_LENS_CHANGED actions', () => {
- it( 'changes the dataLens', () => {
+ it( 'changes the lens', () => {
+ const action = {
+ type: actions.DATA_LENS_CHANGED,
+ lens: 'Foo'
+ }
+ const result = target( { tab: types.MODE_TRENDS, focus: 'ahha' },
+ action )
+ expect( result ).toEqual( {
+ focus: '',
+ lens: 'Foo',
+ subLens: 'sub_foo',
+ queryString: '?lens=foo&sub_lens=sub_foo&tab=Trends&trend_depth=5',
+ tab: 'Trends',
+ trendDepth: 5,
+ trendsDateWarningEnabled: false
+ } )
+ } )
+
+ it( 'has special values when lens = Company', () => {
const action = {
type: actions.DATA_LENS_CHANGED,
- dataLens: 'foo'
+ lens: 'Company'
+ }
+ const result = target( { tab: types.MODE_TRENDS, focus: 'ahha' },
+ action )
+ expect( result ).toEqual( {
+ focus: '',
+ lens: 'Company',
+ subLens: 'product',
+ queryString: '?lens=company&sub_lens=product&tab=Trends&trend_depth=10',
+ tab: 'Trends',
+ trendDepth: 10,
+ trendsDateWarningEnabled: false
+ } )
+ } )
+ } )
+
+ describe( 'DATA_SUBLENS_CHANGED actions', () => {
+ it( 'changes the sub lens', () => {
+ const action = {
+ type: actions.DATA_SUBLENS_CHANGED,
+ subLens: 'Issue'
}
const result = target( { tab: types.MODE_TRENDS }, action )
expect( result ).toEqual( {
- dataLens: 'foo',
- queryString: '?dataLens=foo&tab=Trends',
- tab: 'Trends'
+ subLens: 'issue',
+ queryString: '?sub_lens=issue&tab=Trends',
+ tab: 'Trends',
+ trendsDateWarningEnabled: false
} )
} )
} )
@@ -1003,10 +1153,68 @@ describe( 'reducer:query', () => {
const result = target( { tab: types.MODE_TRENDS }, action )
expect( result ).toEqual( {
dateInterval: 'Day',
- queryString: '?dateInterval=Day&tab=Trends',
- tab: 'Trends'
+ queryString: '?tab=Trends&trend_interval=day',
+ tab: 'Trends',
+ trendsDateWarningEnabled: false
} )
} )
} )
+
+ describe( 'FOCUS_CHANGED actions', () => {
+ it( 'changes the focus', () => {
+ const action = {
+ type: actions.FOCUS_CHANGED,
+ filterValues: [ 'A', 'A' + SLUG_SEPARATOR + 'B' ],
+ focus: 'A',
+ lens: 'Product'
+ }
+ const result = target( { focus: 'Else' }, action )
+ expect( result ).toEqual( {
+ focus: 'A',
+ lens: 'Product',
+ product: [ 'A', 'A' + SLUG_SEPARATOR + 'B'],
+ queryString: '?focus=A&lens=product&product=A&product=A%E2%80%A2B&sub_lens=sub_product&tab=Trends',
+ subLens: 'sub_product',
+ tab: 'Trends',
+ trendsDateWarningEnabled: false
+ } )
+ } )
+
+ it( 'changes the Company Focus', () => {
+ const action = {
+ type: actions.FOCUS_CHANGED,
+ filterValues: [ 'A' ],
+ focus: 'A',
+ lens: 'Company'
+ }
+ const result = target( { focus: 'Else' }, action )
+ expect( result ).toEqual( {
+ focus: 'A',
+ lens: 'Company',
+ company: [ 'A' ],
+ queryString: '?company=A&focus=A&lens=company&sub_lens=product&tab=Trends',
+ subLens: 'product',
+ tab: 'Trends',
+ trendsDateWarningEnabled: false
+ } )
+ } )
+ } )
+
+ describe( 'FOCUS_REMOVED actions', () => {
+ it( 'clears the focus & resets values', () => {
+ const action = {
+ type: actions.FOCUS_REMOVED
+ }
+ const result = target( { lens: 'Product' }, action )
+ expect( result ).toEqual( {
+ focus: '',
+ lens: 'Product',
+ product: [],
+ queryString: '?lens=product&tab=Trends',
+ tab: 'Trends',
+ trendsDateWarningEnabled: false
+ } )
+ } )
+ })
} )
} )
diff --git a/src/reducers/__tests__/trends.spec.jsx b/src/reducers/__tests__/trends.spec.jsx
new file mode 100644
index 000000000..ee6a2b4b2
--- /dev/null
+++ b/src/reducers/__tests__/trends.spec.jsx
@@ -0,0 +1,662 @@
+import target, {
+ defaultState, mainNameLens
+} from '../trends'
+import actions from '../../actions'
+import {
+ trendsBackfill,
+ trendsBackfillResults
+} from '../__fixtures__/trendsBackfill'
+import {
+ trendsFocusAggs,
+ trendsFocusAggsResults
+} from '../__fixtures__/trendsFocusAggs'
+import {
+ trendsResults
+} from '../__fixtures__/trendsResults'
+import trendsAggs from '../__fixtures__/trendsAggs'
+import {
+ trendsAggsDupes, trendsAggsDupeResults
+} from '../__fixtures__/trendsAggsDupes'
+import {
+ trendsAggsMissingBuckets,
+ trendsAggsMissingBucketsResults
+} from '../__fixtures__/trendsAggsMissingBuckets'
+
+describe( 'reducer:trends', () => {
+ let action, result
+
+ describe( 'reducer', () => {
+ it( 'has a default state', () => {
+ expect( target( undefined, {} ) ).toEqual( {
+ activeCall: '',
+ chartType: 'line',
+ colorMap: {},
+ error: false,
+ expandedTrends: [],
+ expandableRows: [],
+ focus: '',
+ isLoading: false,
+ lastDate: false,
+ lens: 'Overview',
+ results: {
+ company: [],
+ dateRangeArea: [],
+ dateRangeLine: [],
+ product: []
+ },
+ subLens: '',
+ tooltip: false,
+ total: 0
+ } )
+ } )
+ } )
+
+ describe( 'Lens Name Pluralization Helper', () => {
+ it( 'pluralizes things properly', () => {
+ expect( mainNameLens('Company') ).toEqual('companies')
+ expect( mainNameLens('Product') ).toEqual('products')
+ expect( mainNameLens('baz') ).toEqual('values')
+ })
+ })
+
+ describe( 'CHART_TYPE_CHANGED action', () => {
+ it( 'changes the chart type', () => {
+ action = {
+ type: actions.CHART_TYPE_CHANGED,
+ chartType: 'FooBar'
+ }
+
+ expect( target( { tooltip: true }, action ) ).toEqual( {
+ chartType: 'FooBar',
+ tooltip: false
+ } )
+ } )
+ } )
+
+ describe( 'DATA_LENS_CHANGED action', () => {
+ it( 'updates the data lens overview', () => {
+ action = {
+ type: actions.DATA_LENS_CHANGED,
+ lens: 'Overview'
+ }
+
+ expect( target( { focus: 'gg', tooltip: 'foo' }, action ) ).toEqual( {
+ chartType: 'line',
+ focus: '',
+ lens: 'Overview',
+ subLens: '',
+ tooltip: false
+ } )
+ } )
+
+ it( 'updates the data lens', () => {
+ action = {
+ type: actions.DATA_LENS_CHANGED,
+ lens: 'Foo'
+ }
+
+ expect( target( { focus: 'gg', tooltip: 'foo' }, action ) ).toEqual( {
+ focus: '',
+ lens: 'Foo',
+ subLens: 'sub_foo',
+ tooltip: false
+ } )
+ } )
+ } )
+
+ describe( 'DATA_SUBLENS_CHANGED action', () => {
+ it( 'updates the data sublens', () => {
+ action = {
+ type: actions.DATA_SUBLENS_CHANGED,
+ subLens: 'sub_something'
+ }
+
+ expect( target( { subLens: 'gg' }, action ) ).toEqual( {
+ subLens: 'sub_something'
+ } )
+ } )
+ } )
+
+ describe( 'FOCUS_CHANGED action', () => {
+ it( 'updates the FOCUS and clears the tooltip', () => {
+ action = {
+ type: actions.FOCUS_CHANGED,
+ focus: 'Some Rando Text',
+ lens: 'Product'
+ }
+
+ expect( target( {
+ focus: 'gg',
+ tooltip: { wut: 'isthis' }
+ }, action ) ).toEqual( {
+ focus: 'Some Rando Text',
+ lens: 'Product',
+ subLens: 'sub_product',
+ tooltip: false
+ } )
+ } )
+ } )
+
+
+ describe( 'FOCUS_REMOVED action', () => {
+ it( 'removes the FOCUS and resets the row info', () => {
+ action = {
+ type: actions.FOCUS_REMOVED,
+ }
+
+ expect( target( {
+ focus: 'gg',
+ tooltip: { wut: 'isthis' }
+ }, action ) ).toEqual( {
+ expandableRows: [],
+ expandedTrends: [],
+ focus: '',
+ tooltip: false
+ } )
+ } )
+ } )
+
+ describe( 'FILTER_ALL_REMOVED action', () => {
+ it( 'resets the FOCUS', () => {
+ action = {
+ type: actions.FILTER_ALL_REMOVED
+ }
+
+ expect( target( { focus: 'gg', }, action ) )
+ .toEqual( { focus: '' } )
+ } )
+ } )
+
+ describe( 'FILTER_MULTIPLE_REMOVED action', () => {
+ it( 'resets the FOCUS if it matches one of the filters', () => {
+ action = {
+ type: actions.FILTER_MULTIPLE_REMOVED,
+ values: [ 'A', 'B' ]
+ }
+
+ expect( target( { focus: 'A' }, action ) ).toEqual( { focus: '' } )
+ } )
+
+ it( 'leaves the FOCUS alone if no match any filters', () => {
+ action = {
+ type: actions.FILTER_MULTIPLE_REMOVED,
+ values: [ 'A', 'B' ]
+ }
+
+ expect( target( { focus: 'C' }, action ) ).toEqual( { focus: 'C' } )
+ } )
+ } )
+
+
+ describe( 'TAB_CHANGED action', () => {
+ it( 'clears results and resets values', () => {
+ action = {
+ type: actions.TAB_CHANGED,
+ tab: 'Foo'
+ }
+
+ expect( target( {
+ focus: 'Your',
+ expandedTrends: [ 1, 2 ],
+ expandableRows: [ 2, 24 ],
+ results: [ 1, 2, 3 ]
+ }, action ) ).toEqual( {
+ expandedTrends: [ 1, 2 ],
+ expandableRows: [ 2, 24 ],
+ focus: '',
+ results: {
+ company: [],
+ dateRangeArea: [],
+ dateRangeLine: [],
+ product: []
+ }
+ } )
+ } )
+
+ it( 'leaves Focus alone when tab is Trend', () => {
+ action = {
+ type: actions.TAB_CHANGED,
+ tab: 'Trends'
+ }
+
+ expect( target( {
+ focus: 'Your',
+ expandedTrends: [ 1, 2 ],
+ expandableRows: [ 2, 24 ],
+ results: [ 1, 2, 3 ]
+ }, action ) ).toEqual( {
+ expandedTrends: [ 1, 2 ],
+ expandableRows: [ 2, 24 ],
+ focus: 'Your',
+ results: {
+ company: [],
+ dateRangeArea: [],
+ dateRangeLine: [],
+ product: []
+ }
+ } )
+ } )
+
+
+ } )
+
+ describe( 'TRENDS_API_CALLED actions', () => {
+ action = {
+ type: actions.TRENDS_API_CALLED,
+ url: 'http://www.example.org'
+ }
+ expect( target( {}, action ) ).toEqual( {
+ activeCall: 'http://www.example.org',
+ isLoading: true
+ } )
+ } )
+
+ describe( 'TRENDS_FAILED actions', () => {
+ it( 'handles failed error messages', () => {
+ action = {
+ type: actions.TRENDS_FAILED,
+ error: { message: 'foo bar', name: 'ErrorTypeName' }
+ }
+ expect( target( {
+ activeCall: 'someurl',
+ results: {
+ dateRangeArea: [ 1, 2, 3 ],
+ dateRangeLine: [ 7, 8, 9 ],
+ issue: [ 10, 11, 12 ],
+ product: [ 13, 25 ]
+ }
+ }, action ) ).toEqual( {
+ activeCall: '',
+ error: { message: 'foo bar', name: 'ErrorTypeName' },
+ isLoading: false,
+ results: {
+ dateRangeArea: [],
+ dateRangeLine: [],
+ issue: [],
+ product: []
+ }
+ } )
+ } )
+ } )
+
+ describe( 'TRENDS_RECEIVED actions', () => {
+ let state
+ beforeEach( () => {
+ action = {
+ type: actions.TRENDS_RECEIVED,
+ data: {
+ aggregations: trendsAggs
+ }
+ }
+ state = Object.assign( {}, defaultState )
+ } )
+
+ it( 'maps data to object state - Overview', () => {
+ // to replicate
+ // just choose All date range and overview
+ result = target( state, action )
+ expect( result ).toEqual( trendsResults )
+ } )
+
+ it( 'maps data to object state - dupe rows', () => {
+ action.data.aggregations = trendsAggsDupes
+ result = target( state, action )
+ expect( result ).toEqual( trendsAggsDupeResults )
+ } )
+
+ it( 'maps data to object state - Missing Bucket', () => {
+ // to replicate this
+ // ?date_received_max=2017-07-08
+ // &date_received_min=2017-03-08
+ // &from=0&lens=Product&tab=Trends
+ // you'll get broken buckets since the product recategorization in apr
+ state.lens = 'Product'
+ action.data.aggregations = trendsAggsMissingBuckets
+ result = target( state, action )
+ expect( result ).toEqual( trendsAggsMissingBucketsResults )
+ } )
+
+ it( 'maps data to object state - Focus', () => {
+ state.lens = 'Product'
+ state.subLens = 'sub_product'
+ state.focus = 'Debt collection'
+ action.data.aggregations = trendsFocusAggs
+ result = target( state, action )
+ expect( result ).toEqual( trendsFocusAggsResults )
+ expect( result.results.issue.length ).toBeTruthy()
+ expect( result.results['sub-product'].length ).toBeTruthy()
+ } )
+
+ it('backfills periods based on dateRangeBuckets ', () =>{
+ // aka: the "covid" search
+ state.chartType = 'area'
+ state.lens = 'Product'
+ state.subLens = 'sub_product'
+ action.data.aggregations = trendsBackfill
+ result = target( state, action )
+ expect( result ).toEqual( trendsBackfillResults )
+ })
+
+ } )
+
+ describe( 'TREND_COLLAPSED', () => {
+ let state, action
+ it( 'hides bars', () => {
+ action = { type: actions.TREND_COLLAPSED, value: 'bar' }
+ state = {
+ expandedTrends: [ 'bar' ],
+ expandableRows: [ 'bar', 'foo' ],
+ results: {
+ issue: [
+ { name: 'bar', visible: true, isParent: true },
+ { name: 'bar1', visible: true, parent: 'bar' },
+ { name: 'bar2', visible: true, parent: 'bar' },
+ { name: 'foo', visible: true, isParent: true },
+ { name: 'foo1', visible: false, parent: 'foo' },
+ { name: 'foo2', visible: false, parent: 'foo' }
+ ]
+ }
+ }
+ expect( target( state, action ) ).toEqual( {
+ expandedTrends: [],
+ expandableRows: [ 'bar', 'foo' ],
+ results: {
+ issue: [
+ { name: 'bar', visible: true, isParent: true },
+ { name: 'bar1', visible: false, parent: 'bar' },
+ { name: 'bar2', visible: false, parent: 'bar' },
+ { name: 'foo', visible: true, isParent: true },
+ { name: 'foo1', visible: false, parent: 'foo' },
+ { name: 'foo2', visible: false, parent: 'foo' }
+ ]
+ }
+ } )
+ } )
+
+ it( 'does not affect hidden bars', () => {
+ action = { type: actions.TREND_COLLAPSED, value: 'bar' }
+ state = {
+ expandedTrends: [],
+ expandableRows: [ 'bar', 'foo' ],
+ results: {
+ issue: [
+ { name: 'bar', visible: true, isParent: true },
+ { name: 'bar1', visible: false, parent: 'bar' },
+ { name: 'bar2', visible: false, parent: 'bar' },
+ { name: 'foo', visible: true, isParent: true },
+ { name: 'foo1', visible: false, parent: 'foo' },
+ { name: 'foo2', visible: false, parent: 'foo' }
+ ]
+ }
+ }
+ expect( target( state, action ) ).toEqual( {
+ expandedTrends: [],
+ expandableRows: [ 'bar', 'foo' ],
+ results: {
+ issue: [
+ { name: 'bar', visible: true, isParent: true },
+ { name: 'bar1', visible: false, parent: 'bar' },
+ { name: 'bar2', visible: false, parent: 'bar' },
+ { name: 'foo', visible: true, isParent: true },
+ { name: 'foo1', visible: false, parent: 'foo' },
+ { name: 'foo2', visible: false, parent: 'foo' }
+ ]
+ }
+ } )
+ } )
+
+
+ it( 'ignores bogus values not in expandableRows', () => {
+ action = { type: actions.TREND_COLLAPSED, value: 'haha' }
+ state = {
+ expandedTrends: [ 'bar' ],
+ expandableRows: [ 'bar', 'foo' ],
+ results: {
+ issue: [
+ { name: 'bar', visible: true, isParent: true },
+ { name: 'bar1', visible: true, parent: 'bar' },
+ { name: 'bar2', visible: true, parent: 'bar' },
+ { name: 'foo', visible: true, isParent: true },
+ { name: 'foo1', visible: false, parent: 'foo' },
+ { name: 'foo2', visible: false, parent: 'foo' }
+ ]
+ }
+ }
+ expect( target( state, action ) ).toEqual( {
+ expandedTrends: [ 'bar' ],
+ expandableRows: [ 'bar', 'foo' ],
+ results: {
+ issue: [
+ { name: 'bar', visible: true, isParent: true },
+ { name: 'bar1', visible: true, parent: 'bar' },
+ { name: 'bar2', visible: true, parent: 'bar' },
+ { name: 'foo', visible: true, isParent: true },
+ { name: 'foo1', visible: false, parent: 'foo' },
+ { name: 'foo2', visible: false, parent: 'foo' }
+ ]
+ }
+ } )
+ } )
+ } )
+
+ describe( 'TREND_EXPANDED', () => {
+ let state, action
+ it( 'makes bars visible', () => {
+ action = { type: actions.TREND_EXPANDED, value: 'foo' }
+ state = {
+ expandedTrends: [ 'bar' ],
+ expandableRows: [ 'bar', 'foo' ],
+ results: {
+ issue: [
+ { name: 'bar', visible: true, isParent: true },
+ { name: 'bar1', visible: true, parent: 'bar' },
+ { name: 'bar2', visible: true, parent: 'bar' },
+ { name: 'foo', visible: true, isParent: true },
+ { name: 'foo1', visible: false, parent: 'foo' },
+ { name: 'foo2', visible: false, parent: 'foo' }
+ ]
+ }
+ }
+ expect( target( state, action ) ).toEqual( {
+ expandedTrends: [ 'bar', 'foo' ],
+ expandableRows: [ 'bar', 'foo' ],
+ results: {
+ issue: [
+ { name: 'bar', visible: true, isParent: true },
+ { name: 'bar1', visible: true, parent: 'bar' },
+ { name: 'bar2', visible: true, parent: 'bar' },
+ { name: 'foo', visible: true, isParent: true },
+ { name: 'foo1', visible: true, parent: 'foo' },
+ { name: 'foo2', visible: true, parent: 'foo' }
+ ]
+ }
+ } )
+ } )
+
+ it( 'does not affect visible bars', () => {
+ action = { type: actions.TREND_EXPANDED, value: 'bar' }
+ state = {
+ expandedTrends: [ 'bar' ],
+ expandableRows: [ 'bar', 'foo' ],
+ results: {
+ issue: [
+ { name: 'bar', visible: true, isParent: true },
+ { name: 'bar1', visible: true, parent: 'bar' },
+ { name: 'bar2', visible: true, parent: 'bar' },
+ { name: 'foo', visible: true, isParent: true },
+ { name: 'foo1', visible: false, parent: 'foo' },
+ { name: 'foo2', visible: false, parent: 'foo' }
+ ]
+ }
+ }
+ expect( target( state, action ) ).toEqual( {
+ expandedTrends: [ 'bar' ],
+ expandableRows: [ 'bar', 'foo' ],
+ results: {
+ issue: [
+ { name: 'bar', visible: true, isParent: true },
+ { name: 'bar1', visible: true, parent: 'bar' },
+ { name: 'bar2', visible: true, parent: 'bar' },
+ { name: 'foo', visible: true, isParent: true },
+ { name: 'foo1', visible: false, parent: 'foo' },
+ { name: 'foo2', visible: false, parent: 'foo' }
+ ]
+ }
+ } )
+ } )
+
+ it( 'ignores bogus values', () => {
+ action = { type: actions.TREND_EXPANDED, value: 'wutf' }
+ state = {
+ expandedTrends: [],
+ expandableRows: [ 'bar', 'foo' ],
+ results: {
+ issue: [
+ { name: 'bar', visible: true, isParent: true },
+ { name: 'bar1', visible: false, parent: 'bar' },
+ { name: 'bar2', visible: false, parent: 'bar' },
+ { name: 'foo', visible: true, isParent: true },
+ { name: 'foo1', visible: false, parent: 'foo' },
+ { name: 'foo2', visible: false, parent: 'foo' }
+ ]
+ }
+ }
+
+ expect( target( state, action ) ).toEqual( {
+ expandedTrends: [],
+ expandableRows: [ 'bar', 'foo' ],
+ results: {
+ issue: [
+ { name: 'bar', visible: true, isParent: true },
+ { name: 'bar1', visible: false, parent: 'bar' },
+ { name: 'bar2', visible: false, parent: 'bar' },
+ { name: 'foo', visible: true, isParent: true },
+ { name: 'foo1', visible: false, parent: 'foo' },
+ { name: 'foo2', visible: false, parent: 'foo' }
+ ]
+ }
+ } )
+ } )
+ } )
+
+ describe( 'TRENDS_TOOLTIP_CHANGED', () => {
+ it( 'handles no value', () => {
+ const action = { type: actions.TRENDS_TOOLTIP_CHANGED }
+ const state = { results: {} }
+ const res = target( state, action )
+
+ expect( res.tooltip ).toBeFalsy()
+ } )
+
+ it( 'calculates total and sets the title', () => {
+ const action = {
+ type: actions.TRENDS_TOOLTIP_CHANGED,
+ value: {
+ interval: 'Month',
+ key: '2018-04-01T00:00:00.000Z',
+ date: '2018-04-01T00:00:00.000Z',
+ dateRange: {
+ from: '2011-07-21',
+ to: '2018-11-30'
+ },
+ values: [
+ {
+ name: 'Alpha',
+ value: 17,
+ date: '2018-04-01T00:00:00.000Z'
+ },
+ {
+ name: 'Beta',
+ value: 28,
+ date: '2018-04-01T00:00:00.000Z'
+ },
+ {
+ name: 'Cooo',
+ value: 8,
+ date: '2018-04-01T00:00:00.000Z'
+ }
+ ]
+ }
+ }
+ const state = {
+ colorMap: {
+ Alpha: '#2cb34a',
+ Beta: '#addc91',
+ Cooo: '#257675'
+ }
+ }
+ const res = target( state, action )
+
+ expect( res.tooltip ).toEqual( {
+ date: '2018-04-01T00:00:00.000Z',
+ dateRange: {
+ from: '2011-07-21',
+ to: '2018-11-30'
+ },
+ interval: 'Month',
+ key: '2018-04-01T00:00:00.000Z',
+ title: 'Date range: 04/01/2018 - 04/30/2018',
+ total: 53,
+ values: [
+ {
+ colorIndex: 0,
+ date: '2018-04-01T00:00:00.000Z',
+ name: 'Alpha',
+ value: 17
+ },
+ {
+ colorIndex: 1,
+ date: '2018-04-01T00:00:00.000Z',
+ name: 'Beta',
+ value: 28
+ },
+ {
+ colorIndex: 2,
+ date: '2018-04-01T00:00:00.000Z',
+ name: 'Cooo',
+ value: 8
+ }
+ ]
+ } )
+ } )
+ } )
+
+
+ describe( 'URL_CHANGED actions', () => {
+ let action
+ let state
+ beforeEach( () => {
+ action = {
+ type: actions.URL_CHANGED,
+ params: {}
+ }
+
+ state = { ...defaultState }
+ } )
+
+ it( 'handles empty params', () => {
+ expect( target( state, action ) ).toEqual( state )
+ } )
+
+ it( 'handles lens params', () => {
+ action.params = { lens: 'hello', subLens: 'mom', nope: 'hi' }
+
+ const actual = target( state, action )
+ expect( actual.lens ).toEqual( 'hello' )
+ expect( actual.subLens ).toEqual( 'mom' )
+ expect( actual.nope ).toBeFalsy()
+ } )
+
+ it( 'handles single expandedTrends param', () => {
+ action.params = { expandedTrends: 'hello' }
+ const actual = target( state, action )
+ expect( actual.expandedTrends ).toEqual( [ 'hello' ] )
+ } )
+
+ it( 'handles multiple expandedTrends param', () => {
+ action.params = { expandedTrends: [ 'hello', 'ma' ] }
+ const actual = target( state, action )
+ expect( actual.expandedTrends ).toEqual( [ 'hello', 'ma' ] )
+ } )
+ } )
+} )
diff --git a/src/reducers/__tests__/view.spec.jsx b/src/reducers/__tests__/view.spec.jsx
index d90b92dee..7e27b72c8 100644
--- a/src/reducers/__tests__/view.spec.jsx
+++ b/src/reducers/__tests__/view.spec.jsx
@@ -86,6 +86,7 @@ describe( 'reducer:map', () => {
fromExternal: true,
printMode: true,
showFilters: true,
+ showTrends: false,
width: 0
} )
} )
diff --git a/src/reducers/aggs.jsx b/src/reducers/aggs.jsx
index 548b9526a..956472ca2 100644
--- a/src/reducers/aggs.jsx
+++ b/src/reducers/aggs.jsx
@@ -1,6 +1,7 @@
import {
AGGREGATIONS_API_CALLED, AGGREGATIONS_FAILED, AGGREGATIONS_RECEIVED
} from '../actions/complaints'
+import { processErrorMessage } from '../utils'
/* eslint-disable camelcase */
@@ -94,7 +95,7 @@ export function processAggregationError( state, action ) {
return {
...defaultAggs,
isLoading: false,
- error: action.error
+ error: processErrorMessage( action.error )
}
}
diff --git a/src/reducers/index.jsx b/src/reducers/index.jsx
index 7f5cdd942..e6202d035 100644
--- a/src/reducers/index.jsx
+++ b/src/reducers/index.jsx
@@ -5,6 +5,7 @@ import map from './map'
import modal from './modal'
import query from './query'
import results from './results'
+import trends from './trends'
import view from './view'
export default combineReducers( {
@@ -14,5 +15,6 @@ export default combineReducers( {
modal,
query,
results,
+ trends,
view
} )
diff --git a/src/reducers/map.jsx b/src/reducers/map.jsx
index ea947f0b2..52af817dc 100644
--- a/src/reducers/map.jsx
+++ b/src/reducers/map.jsx
@@ -1,35 +1,22 @@
// reducer for the Map Tab
+import { coalesce, processErrorMessage, processUrlArrayParams } from '../utils'
+import {
+ collapseTrend, expandTrend, processBucket, processTrendPeriod, validateBucket
+} from './trends'
import { GEO_NORM_NONE, TILE_MAP_STATES } from '../constants'
import actions from '../actions'
export const defaultState = {
+ activeCall: '',
isLoading: false,
- issue: [],
dataNormalization: GEO_NORM_NONE,
- product: [],
- state: []
-}
-
-export const processAggregations = agg => {
- const total = agg.doc_count
- const chartResults = []
- for ( const k in agg ) {
- if ( agg[k].buckets ) {
- agg[k].buckets.forEach( o => {
- chartResults.push( {
- name: o.key,
- value: o.doc_count,
- pctChange: 1,
- isParent: true,
- hasChildren: false,
- pctOfSet: Math.round( o.doc_count / total * 100 )
- .toFixed( 2 ),
- width: 0.5
- } )
- } )
- }
+ expandedTrends: [],
+ expandableRows: [],
+ results: {
+ issue: [],
+ product: [],
+ state: []
}
- return chartResults
}
@@ -59,6 +46,32 @@ export const processStateAggregations = agg => {
// ----------------------------------------------------------------------------
// Action Handlers
+/**
+ * Updates the state when an tab changed occurs, reset values to start clean
+ *
+ * @param {object} state the current state in the Redux store
+ * @returns {object} the new state for the Redux store
+ */
+export function handleTabChanged( state ) {
+ return {
+ ...state,
+ results: defaultState.results
+ }
+}
+
+/** Handler for the focus removed action
+ *
+ * @param {object} state the current state in the Redux store
+ * @returns {object} the new state for the Redux store
+ */
+function removeFocus( state ) {
+ return {
+ ...state,
+ expandableRows: [],
+ expandedTrends: []
+ }
+}
+
/**
* Updates the state when an aggregations call is in progress
*
@@ -82,18 +95,33 @@ export function statesCallInProcess( state, action ) {
* @returns {object} new state for the Redux store
*/
export function processStatesResults( state, action ) {
- const result = { ...state }
-
- const stateData = action.data.aggregations.state
- const issueData = action.data.aggregations.issue
- const productData = action.data.aggregations.product
- result.activeCall = ''
- result.isLoading = false
- result.state = processStateAggregations( stateData )
- result.issue = processAggregations( issueData )
- result.product = processAggregations( productData )
-
- return result
+ const newState = { ...state }
+ const aggregations = action.data.aggregations
+ const { state: stateData } = aggregations
+
+ newState.activeCall = ''
+ newState.isLoading = false
+ newState.results = coalesce( newState, 'results', {} )
+
+ const validAggs = [ 'issue', 'product' ]
+ validAggs.forEach( k => {
+ // validate response coming from API
+ /* istanbul ignore else */
+ if ( validateBucket( aggregations, k ) ) {
+ // set to zero when we are not using focus Lens
+ const buckets = aggregations[k][k].buckets
+ for ( let i = 0; i < buckets.length; i++ ) {
+ const docCount = aggregations[k].doc_count
+ processTrendPeriod( buckets[i], k, docCount )
+ }
+
+ newState.results[k] = processBucket( state, buckets )
+ }
+ } )
+
+ newState.results.state = processStateAggregations( stateData )
+
+ return newState
}
/**
@@ -107,20 +135,16 @@ export function processStatesError( state, action ) {
return {
...state,
activeCall: '',
- issue: [],
- error: action.error,
+ error: processErrorMessage( action.error ),
isLoading: false,
- product: [],
- state: TILE_MAP_STATES.map( o => ( {
- name: o,
- value: 0,
- issue: '',
- product: ''
- } ) )
+ results: {
+ issue: [],
+ product: [],
+ state: []
+ }
}
}
-
/**
* Handler for the update filter data normalization action
*
@@ -186,6 +210,9 @@ function processParams( state, action ) {
processed.dataNormalization = params.dataNormalization
}
+ const arrayParams = [ 'expandedTrends' ]
+ processUrlArrayParams( params, processed, arrayParams )
+
return processed
}
@@ -204,10 +231,14 @@ export function _buildHandlerMap() {
handlers[actions.DATE_RANGE_CHANGED] = updateDateDataNormalization
handlers[actions.FILTER_CHANGED] = updateFilterDataNormalization
handlers[actions.FILTER_MULTIPLE_ADDED] = updateFilterDataNormalization
+ handlers[actions.FOCUS_REMOVED] = removeFocus
handlers[actions.STATE_FILTER_ADDED] = updateFilterDataNormalization
handlers[actions.STATES_API_CALLED] = statesCallInProcess
handlers[actions.STATES_RECEIVED] = processStatesResults
handlers[actions.STATES_FAILED] = processStatesError
+ handlers[actions.TAB_CHANGED] = handleTabChanged
+ handlers[actions.TREND_COLLAPSED] = collapseTrend
+ handlers[actions.TREND_EXPANDED] = expandTrend
handlers[actions.URL_CHANGED] = processParams
diff --git a/src/reducers/query.jsx b/src/reducers/query.jsx
index a3724ce3e..39d33c997 100644
--- a/src/reducers/query.jsx
+++ b/src/reducers/query.jsx
@@ -1,9 +1,13 @@
-/* eslint complexity: ["error", 7] */
-
import * as types from '../constants'
import {
- calculateDateRange, clamp, hasFiltersEnabled, shortIsoFormat, startOfToday
+ calculateDateRange,
+ clamp,
+ hasFiltersEnabled,
+ processUrlArrayParams,
+ shortIsoFormat,
+ startOfToday
} from '../utils'
+import { getSubLens, isGreaterThanYear } from '../utils/trends'
import actions from '../actions'
import moment from 'moment';
@@ -11,23 +15,28 @@ const queryString = require( 'query-string' );
/* eslint-disable camelcase */
export const defaultQuery = {
- dateRange: '3y',
- dataLens: 'Overview',
+ chartType: 'line',
dateInterval: 'Month',
+ dateRange: '3y',
date_received_max: startOfToday(),
date_received_min: new Date(
moment( startOfToday() ).subtract( 3, 'years' )
),
enablePer1000: true,
+ focus: '',
from: 0,
mapWarningEnabled: true,
- searchText: '',
+ lens: 'Overview',
+ page: 1,
searchField: 'all',
+ searchText: '',
size: 25,
sort: 'created_date_desc',
- page: 1,
+ subLens: '',
tab: types.MODE_MAP,
- totalPages: 0
+ totalPages: 0,
+ trendDepth: 5,
+ trendsDateWarningEnabled: false
}
const fieldMap = {
@@ -36,12 +45,24 @@ const fieldMap = {
from: 'frm'
}
-const urlParams = [ 'dateRange', 'searchText', 'searchField', 'tab' ]
-const urlParamsInt = [ 'from', 'page', 'size' ]
+const trendFieldMap = {
+ dateInterval: 'trend_interval',
+ lens: 'lens',
+ subLens: 'sub_lens',
+ trendDepth: 'trend_depth'
+}
+
+const urlParams = [
+ 'dateRange', 'searchText', 'searchField', 'tab',
+ 'lens', 'dateInterval', 'subLens', 'focus', 'chartType'
+]
+const urlParamsInt = [ 'from', 'page', 'size', 'trendDepth' ]
// ----------------------------------------------------------------------------
// Helper functions
+/* eslint-disable complexity */
+
/**
* Makes sure the date range reflects the actual dates selected
*
@@ -87,6 +108,9 @@ export function alignDateRange( state ) {
return state
}
+
+/* eslint-enable complexity */
+
/**
* Check for a common case where there is a date range but no dates
*
@@ -145,20 +169,12 @@ function processParams( state, action ) {
// Filter for known
urlParams.forEach( field => {
if ( typeof params[field] !== 'undefined' ) {
- processed[field] = params[field]
+ processed[field] = enforceValues( params[field], field )
}
} )
// Handle the aggregation filters
- types.knownFilters.forEach( field => {
- if ( typeof params[field] !== 'undefined' ) {
- if ( typeof params[field] === 'string' ) {
- processed[field] = [ params[field] ];
- } else {
- processed[field] = params[field];
- }
- }
- } )
+ processUrlArrayParams( params, processed, types.knownFilters )
// Handle date filters
types.dateFilters.forEach( field => {
@@ -182,7 +198,7 @@ function processParams( state, action ) {
if ( typeof params[field] !== 'undefined' ) {
const n = parseInt( params[field], 10 )
if ( isNaN( n ) === false ) {
- processed[field] = n
+ processed[field] = enforceValues( n, field )
}
}
} )
@@ -196,6 +212,28 @@ function processParams( state, action ) {
return alignDateRange( processed )
}
+/**
+ * helper function to enforce valid values when someone pastes in a url
+ * @param {string | int} value input val to check
+ * @param {string} field key of the query object we need to validate
+ * @returns {string|int|*} valid value
+ */
+function enforceValues( value, field ) {
+ const valMap = {
+ size: Object.keys( types.sizes ).map( o => parseInt( o, 10 ) ),
+ sort: Object.keys( types.sorts )
+ }
+ if ( valMap[field] ) {
+ const validValues = valMap[field]
+ if ( validValues.includes( value ) ) {
+ return value
+ }
+ return validValues[0]
+ }
+
+ return value
+}
+
/**
* update state based on changeDateInterval action
* @param {object} state current redux state
@@ -241,7 +279,7 @@ export function changeDateRange( state, action ) {
newState.date_received_max = maxDate
- return newState;
+ return newState
}
/**
@@ -252,7 +290,6 @@ export function changeDateRange( state, action ) {
* @returns {object} the new state for the Redux store
*/
export function changeDates( state, action ) {
-
const fields = [
action.filterName + '_min',
action.filterName + '_max'
@@ -289,6 +326,27 @@ export function changeDates( state, action ) {
return newState
}
+/**
+ * Makes sure that we have a valid dateInterval is selected, or moves to week
+ * when the date range > 1yr
+ *
+ * @param {object} queryState the current state of query reducer
+ */
+export function validateDateInterval( queryState ) {
+ const { date_received_min, date_received_max, dateInterval } = queryState
+ // determine if we need to update date Interval if range > 1 yr
+ if ( isGreaterThanYear( date_received_min, date_received_max ) &&
+ dateInterval === 'Day' ) {
+ queryState.dateInterval = 'Week'
+ queryState.trendsDateWarningEnabled = true
+ }
+
+ // > 1yr, so we can go ahead and disable the warning
+ if ( !isGreaterThanYear( date_received_min, date_received_max ) ) {
+ queryState.trendsDateWarningEnabled = false
+ }
+}
+
/**
* Change a boolean flag filter
*
@@ -495,6 +553,8 @@ export function removeAllFilters( state ) {
newState.date_received_min = new Date( types.DATE_RANGE_MIN )
newState.date_received_max = startOfToday()
+ newState.focus = ''
+
return newState
}
@@ -529,6 +589,9 @@ function removeFilter( state, action ) {
function removeMultipleFilters( state, action ) {
const newState = { ...state }
const a = newState[action.filterName]
+ // remove the focus if it exists in one of the filter values we are removing
+ newState.focus = action.values.includes( state.focus ) ? '' : state.focus
+
if ( a ) {
action.values.forEach( x => {
const idx = a.indexOf( x )
@@ -569,6 +632,19 @@ export function dismissMapWarning( state ) {
}
}
+/**
+ * Handler for the dismiss trends warning action
+ *
+ * @param {object} state the current state in the Redux store
+ * @returns {object} the new state for the Redux store
+ */
+export function dismissTrendsDateWarning( state ) {
+ return {
+ ...state,
+ trendsDateWarningEnabled: false
+ }
+}
+
/**
* Update state based on the sort order changed action
*
@@ -640,6 +716,7 @@ function changeSort( state, action ) {
function changeTab( state, action ) {
return {
...state,
+ focus: action.tab === types.MODE_TRENDS ? state.focus : '',
tab: action.tab
}
}
@@ -662,6 +739,76 @@ function updateTotalPages( state, action ) {
}
}
+/** Handler for the depth changed action
+ *
+ * @param {object} state the current state in the Redux store
+ * @param {object} action the command being executed
+ * @returns {object} the new state for the Redux store
+ */
+function changeDepth( state, action ) {
+ return {
+ ...state,
+ trendDepth: action.depth
+ }
+}
+
+/** Handler for the depth reset action
+ *
+ * @param {object} state the current state in the Redux store
+ * @returns {object} the new state for the Redux store
+ */
+function resetDepth( state ) {
+ return {
+ ...state,
+ trendDepth: 5
+ }
+}
+
+/** Handler for the focus selected action
+ *
+ * @param {object} state the current state in the Redux store
+ * @param {object} action the command being executed
+ * @returns {object} the new state for the Redux store
+ */
+function changeFocus( state, action ) {
+ const { focus, filterValues, lens } = action
+ const filterKey = lens.toLowerCase()
+ const activeFilters = []
+
+ if ( filterKey === 'company' ) {
+ activeFilters.push( focus )
+ } else {
+ filterValues.forEach( o => {
+ activeFilters.push( o )
+ } )
+ }
+
+ return {
+ ...state,
+ [filterKey]: activeFilters,
+ focus,
+ lens,
+ subLens: state.subLens || getSubLens( lens ),
+ tab: types.MODE_TRENDS
+ }
+}
+
+
+/** Handler for the focus selected action
+ *
+ * @param {object} state the current state in the Redux store
+ * @returns {object} the new state for the Redux store
+ */
+function removeFocus( state ) {
+ const { lens } = state
+ const filterKey = lens.toLowerCase()
+ return {
+ ...state,
+ [filterKey]: [],
+ focus: '',
+ tab: types.MODE_TRENDS
+ }
+}
/**
* update state based on changeDataLens action
@@ -670,9 +817,41 @@ function updateTotalPages( state, action ) {
* @returns {object} new state in redux
*/
function changeDataLens( state, action ) {
+ const { lens } = action
+
+ return {
+ ...state,
+ focus: '',
+ lens,
+ subLens: getSubLens( lens ),
+ trendDepth: lens === 'Company' ? 10 : 5
+ }
+}
+
+/**
+ * update state based on changeDataSubLens action
+ * @param {object} state current redux state
+ * @param {object} action command executed
+ * @returns {object} new state in redux
+ */
+function changeDataSubLens( state, action ) {
return {
...state,
- dataLens: action.dataLens
+ subLens: action.subLens.toLowerCase()
+ }
+}
+
+/**
+ * Handler for the update chart type action
+ *
+ * @param {object} state the current state in the Redux store
+ * @param {object} action the command being executed
+ * @returns {object} the new state for the Redux store
+ */
+export function updateChartType( state, action ) {
+ return {
+ ...state,
+ chartType: action.chartType
}
}
@@ -690,6 +869,7 @@ export function stateToQS( state ) {
const fields = Object.keys( state )
// Copy over the fields
+ // eslint-disable-next-line complexity
fields.forEach( field => {
// Do not include empty fields
if ( !state[field] ) {
@@ -717,6 +897,8 @@ export function stateToQS( state ) {
// Map the internal field names to the API field names
if ( fieldMap[field] ) {
params[fieldMap[field]] = value
+ } else if ( trendFieldMap[field] ) {
+ params[trendFieldMap[field]] = value.toString().toLowerCase()
} else {
params[field] = value
}
@@ -751,17 +933,23 @@ export function validatePer1000( queryState ) {
// eslint-disable-next-line max-statements, require-jsdoc
export function _buildHandlerMap() {
const handlers = {}
+ handlers[actions.CHART_TYPE_CHANGED] = updateChartType
handlers[actions.COMPLAINTS_RECEIVED] = updateTotalPages
handlers[actions.DATA_LENS_CHANGED] = changeDataLens
+ handlers[actions.DATA_SUBLENS_CHANGED] = changeDataSubLens
handlers[actions.DATE_INTERVAL_CHANGED] = changeDateInterval
handlers[actions.DATE_RANGE_CHANGED] = changeDateRange
handlers[actions.DATES_CHANGED] = changeDates
+ handlers[actions.DEPTH_CHANGED] = changeDepth
+ handlers[actions.DEPTH_RESET] = resetDepth
handlers[actions.FILTER_ALL_REMOVED] = removeAllFilters
handlers[actions.FILTER_CHANGED] = toggleFilter
handlers[actions.FILTER_FLAG_CHANGED] = toggleFlagFilter
handlers[actions.FILTER_MULTIPLE_ADDED] = addMultipleFilters
handlers[actions.FILTER_MULTIPLE_REMOVED] = removeMultipleFilters
handlers[actions.FILTER_REMOVED] = removeFilter
+ handlers[actions.FOCUS_CHANGED] = changeFocus
+ handlers[actions.FOCUS_REMOVED] = removeFocus
handlers[actions.PAGE_CHANGED] = changePage
handlers[actions.MAP_WARNING_DISMISSED] = dismissMapWarning
handlers[actions.NEXT_PAGE_SHOWN] = nextPage
@@ -773,6 +961,7 @@ export function _buildHandlerMap() {
handlers[actions.STATE_FILTER_CLEARED] = clearStateFilter
handlers[actions.STATE_FILTER_REMOVED] = removeStateFilter
handlers[actions.TAB_CHANGED] = changeTab
+ handlers[actions.TRENDS_DATE_WARNING_DISMISSED] = dismissTrendsDateWarning
handlers[actions.URL_CHANGED] = processParams
handlers[actions.SEARCH_CHANGED] = changeSearch
@@ -804,6 +993,12 @@ export default ( state = defaultQuery, action ) => {
validatePer1000( newState )
}
+ if ( newState.tab === types.MODE_TRENDS ) {
+ // swap date interval in cases where the date range is > 1yr
+ validateDateInterval( newState )
+ }
+
+
const qs = stateToQS( newState )
newState.queryString = qs === '?' ? '' : qs
diff --git a/src/reducers/trends.jsx b/src/reducers/trends.jsx
new file mode 100644
index 000000000..726a852c4
--- /dev/null
+++ b/src/reducers/trends.jsx
@@ -0,0 +1,714 @@
+/* eslint max-nested-callbacks: ["error", 4] */
+/* eslint-disable camelcase */
+
+// reducer for the Map Tab
+import * as colors from '../constants/colors'
+import {
+ clamp, coalesce, getSubKeyName, processErrorMessage, processUrlArrayParams
+} from '../utils'
+import { getD3Names, getTooltipTitle, updateDateBuckets } from '../utils/chart'
+import { getSubLens, pruneOther } from '../utils/trends'
+import actions from '../actions'
+import { isDateEqual } from '../utils/formatDate'
+import { MODE_TRENDS } from '../constants'
+
+export const defaultState = {
+ activeCall: '',
+ chartType: 'line',
+ colorMap: {},
+ error: false,
+ expandedTrends: [],
+ expandableRows: [],
+ focus: '',
+ isLoading: false,
+ lastDate: false,
+ lens: 'Overview',
+ results: {
+ company: [],
+ dateRangeArea: [],
+ dateRangeLine: [],
+ product: []
+ },
+ subLens: '',
+ tooltip: false,
+ total: 0
+}
+
+// ----------------------------------------------------------------------------
+// Helpers
+/* eslint-disable complexity */
+/**
+ * helper function to drill down a bucket and generate special names for D3
+ * @param {object} state the state in redux
+ * @param {array} agg list of aggregations to go through
+ * @returns {object} the representative bar in a d3 row chart
+ */
+export function processBucket( state, agg ) {
+ const list = []
+ const { expandedTrends, expandableRows } = state
+ for ( let i = 0; i < agg.length; i++ ) {
+ processTrendPeriod( agg[i] )
+
+ const item = agg[i]
+ const subKeyName = getSubKeyName( item )
+
+ item.isParent = true
+ const subItem = item[subKeyName]
+ if ( subItem && subItem.buckets.length ) {
+ item.hasChildren = true
+ /* istanbul ignore else */
+ if ( !expandableRows.includes( item.key ) ) {
+ expandableRows.push( item.key )
+ }
+ }
+
+ // https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_omit
+ // Create a parent row.
+ // remove the lodash omit since it is deprecated in lodash5
+ const tempItem = Object.assign( {}, item )
+ delete tempItem[subKeyName]
+ list.push( tempItem )
+
+ /* istanbul ignore else */
+ if ( subItem && subItem.buckets && subItem.buckets.length ) {
+ const expandableBuckets = subItem.buckets
+ // if there's buckets we need to add a separator for rendering
+ const labelText = `Visualize trends for ${ item.key }`
+ expandableBuckets.push( {
+ hasChildren: false,
+ isParent: false,
+ key: labelText,
+ name: labelText,
+ splitterText: labelText,
+ value: '',
+ parent: item.key,
+ width: 0.3
+ } )
+
+ list.push( expandableBuckets )
+ }
+ }
+
+ const nameMap = []
+
+ // return flattened list
+ return []
+ .concat( ...list )
+ .map( obj => getD3Names( obj, nameMap, expandedTrends ) )
+}
+
+/**
+ * helper function to pluralize field values
+ * @param {lens} lens value we are processing
+ * @returns {string} for consumption by AreaData function
+ */
+export function mainNameLens( lens ) {
+ if ( lens === 'Product' ) {
+ return 'products'
+ } else if ( lens === 'Company' ) {
+ return 'companies'
+ }
+ return 'values'
+}
+
+
+/**
+ * processes the stuff for the area chart, combining them if necessary
+ * @param {object} state redux state
+ * @param {object} aggregations coming from the trends api
+ * @returns {object} the data areas for the stacked area chart
+ */
+function processAreaData( state, aggregations ) {
+ // map subLens / focus values to state
+ const { focus, lens, subLens } = state
+ const filter = focus ? subLens.replace( '_', '-' ).toLowerCase() :
+ lens.toLowerCase()
+ const mainName = 'Other'
+ const compBuckets = aggregations.dateRangeArea.dateRangeArea.buckets.map(
+ obj => ( {
+ name: mainName,
+ value: obj.doc_count,
+ date: obj.key_as_string
+ } )
+ )
+
+ // overall buckets
+ aggregations.dateRangeBuckets.dateRangeBuckets.buckets.forEach( o => {
+ if ( !compBuckets.find( v => o.key_as_string === v.date ) ) {
+ compBuckets.push( {
+ name: mainName,
+ value: 0,
+ date: o.key_as_string
+ } )
+ }
+ } )
+
+ // reference buckets to backfill zero values
+ const refBuckets = Object.assign( {}, compBuckets )
+ const trendResults = aggregations[filter][filter].buckets.slice( 0, 5 )
+
+ for ( let i = 0; i < trendResults.length; i++ ) {
+ const o = trendResults[i]
+ // only take first 10 of the buckets for processing
+ const reverseBuckets = o.trend_period.buckets.reverse()
+ for ( let j = 0; j < reverseBuckets.length; j++ ) {
+ const p = reverseBuckets[j]
+ compBuckets.push( {
+ name: o.key,
+ value: p.doc_count,
+ date: p.key_as_string
+ } )
+
+ // delete total from that date
+ const pos = compBuckets
+ .findIndex( k => k.name === mainName &&
+ isDateEqual( k.date, p.key_as_string ) )
+
+ /* istanbul ignore else */
+ if ( pos > -1 ) {
+ // subtract the value from total, so we calculate the "Other" bin
+ compBuckets[pos].value -= p.doc_count
+ }
+ }
+
+ // we're missing a bucket, so fill it in.
+ const referenceBuckets = Object.values( refBuckets )
+ if ( o.trend_period.buckets.length !== referenceBuckets.length ) {
+ for ( let k = 0; k < referenceBuckets.length; k++ ) {
+ const obj = referenceBuckets[k]
+ const datePoint = compBuckets
+ .filter( f => f.name === o.key )
+ .find( f => isDateEqual( f.date, obj.date ) )
+ if ( !datePoint ) {
+ compBuckets.push( {
+ name: o.key,
+ value: 0,
+ date: obj.date
+ } )
+ }
+ }
+ }
+ }
+
+ // we should prune 'Other' if all of the values are zero
+ return pruneOther( compBuckets )
+}
+
+/**
+ * Process aggs and convert them into a format for Line Charts
+ * @param {string} lens Overview, Issue, Product, etc
+ * @param {object} aggregations comes from the API
+ * @param {string} focus if a focus item was selected
+ * @param {string} subLens current subLens
+ * @returns {{dataByTopic: ([{dashed: boolean, show: boolean, topic: string,
+ * topicName: string, dates: *}]|[])}} theformatted object containing line info
+ */
+function processLineData( lens, aggregations, focus, subLens ) {
+ const areaBuckets = aggregations.dateRangeArea.dateRangeArea.buckets
+ const rangeBuckets = aggregations.dateRangeBuckets.dateRangeBuckets.buckets
+ const dataByTopic = []
+ if ( lens === 'Overview' ) {
+ dataByTopic.push( {
+ topic: 'Complaints',
+ topicName: 'Complaints',
+ dashed: false,
+ show: true,
+ dates: areaBuckets.map( o => ( {
+ date: o.key_as_string,
+ value: o.doc_count
+ } ) )
+ } )
+
+ // backfill empties
+ rangeBuckets.forEach( o => {
+ if ( !dataByTopic[0].dates.find( v => o.key_as_string === v.date ) ) {
+ dataByTopic[0].dates.push( {
+ date: o.key_as_string,
+ value: 0
+ } )
+ }
+ } )
+
+ // sort dates so it doesn't break line chart
+ dataByTopic[0].dates
+ .sort( ( a, b ) => new Date( a.date ) - new Date( b.date ) )
+ }
+
+ if ( lens !== 'Overview' ) {
+ // handle Focus Case
+ const lensKey = focus ? subLens.replace( '_', '-' ) :
+ lens.toLowerCase()
+ const aggBuckets = aggregations[lensKey][lensKey].buckets
+ for ( let i = 0; i < aggBuckets.length; i++ ) {
+ const name = aggBuckets[i].key
+ const dateBuckets = updateDateBuckets( name,
+ aggBuckets[i].trend_period.buckets, rangeBuckets )
+ dataByTopic.push( {
+ topic: name,
+ topicName: name,
+ dashed: false,
+ show: true,
+ dates: dateBuckets
+ } )
+ }
+ }
+ return {
+ dataByTopic: dataByTopic.slice( 0, 5 )
+ }
+}
+
+/**
+ * processes the aggregation buckets set the parent rows for expandable chart
+ * @param {object} bucket subagg bucket with difference intervals
+ */
+export function processTrendPeriod( bucket ) {
+ const subKeyName = getSubKeyName( bucket )
+ if ( bucket[subKeyName] ) {
+ const subaggBuckets = bucket[subKeyName].buckets
+ for ( let j = 0; j < subaggBuckets.length; j++ ) {
+ subaggBuckets[j].parent = bucket.key
+ processTrendPeriod( subaggBuckets[j] )
+ }
+ }
+}
+
+/**
+ * helper function to map color schemes to available data
+ * @param {string} lens selected data lens
+ * @param {array} rowNames rows that are in the stacked area charts
+ * @returns {object} contains Name:Color map
+ */
+export const getColorScheme = ( lens, rowNames ) => {
+ const colScheme = {}
+ const colorScheme = colors.DataLens
+ const uniqueNames = [ ...new Set( rowNames.map( item => item.name ) ) ]
+
+
+ for ( let i = 0; i < uniqueNames.length; i++ ) {
+ const n = uniqueNames[i]
+ const index = clamp( i, 0, 10 )
+ colScheme[n] = colorScheme[index]
+ }
+
+ colScheme.Complaints = colors.BriteCharts.medium
+
+ // Set constant grey colors for all possible "other" buckets"
+ colScheme.Other = colors.DataLens[10]
+ colScheme['All other products'] = colors.DataLens[10]
+ colScheme['All other companies'] = colors.DataLens[10]
+ colScheme['All other values'] = colors.DataLens[10]
+ return colScheme
+}
+
+/**
+ * helper function validate payload and also get under eslint limit
+ * @param {object} aggregations payload from api
+ * @param {string} k the key we need to validate against
+ * @returns {boolean} whether the bucket is valid
+ */
+export function validateBucket( aggregations, k ) {
+ return aggregations[k] && aggregations[k].doc_count &&
+ aggregations[k][k] && aggregations[k][k].buckets
+}
+
+/**
+ * Copies the results locally
+ *
+ * @param {object} state the current state in the Redux store
+ * @param {object} action the command being executed
+ * @returns {object} the new state for the Redux store
+ */
+export function processTrends( state, action ) {
+ const aggregations = action.data.aggregations
+ const { focus, lens, results, subLens } = state
+
+ const kR = 'dateRangeArea'
+ // get the last date now to save time
+ const buckets = aggregations[kR][kR].buckets
+ const lastDate = buckets[buckets.length - 1].key_as_string
+ const total = aggregations[kR].doc_count
+
+ if ( lens !== 'Overview' ) {
+ results[kR] = processAreaData( state, aggregations )
+ }
+
+ results.dateRangeLine = processLineData( lens, aggregations, focus, subLens )
+
+ const keys = [ 'company', 'product' ]
+
+ if ( focus ) {
+ keys.push( 'issue', 'sub-product' )
+ }
+
+ keys.forEach( k => {
+ results[k] = aggregations[k] ?
+ processBucket( state, aggregations[k][k].buckets ) : []
+ } )
+
+ const colorMap = getColorScheme( lens, results.dateRangeArea )
+
+ return {
+ ...state,
+ activeCall: '',
+ colorMap,
+ error: false,
+ isLoading: false,
+ lastDate,
+ results,
+ total
+ }
+}
+
+/* eslint-enable complexity */
+
+/**
+ * Handler for the trend collapse action
+ *
+ * @param {object} state the current state in the Redux store
+ * @param {object} action the command being executed
+ * @returns {object} the new state for the Redux store
+ */
+export function collapseTrend( state, action ) {
+ const { expandedTrends } = state
+ const item = action.value
+ // if it's an available filter
+ const expanded = expandedTrends.filter( o => o !== item )
+
+ const results = updateRowVisibility( state, expanded )
+
+ return {
+ ...state,
+ expandedTrends: expanded,
+ results
+ }
+}
+
+/**
+ * Handler for the trend expand action
+ *
+ * @param {object} state the current state in the Redux store
+ * @param {object} action the command being executed
+ * @returns {object} the new state for the Redux store
+ */
+export function expandTrend( state, action ) {
+ const { expandedTrends, expandableRows } = state
+ const item = action.value
+
+ // if it's an available filter
+ if ( expandableRows.indexOf( item ) > -1 &&
+ expandedTrends.indexOf( item ) === -1 ) {
+ expandedTrends.push( item )
+ }
+
+ const results = updateRowVisibility( state, expandedTrends )
+ return {
+ ...state,
+ expandedTrends,
+ results
+ }
+}
+
+/**
+ * helper function to make rows visible when its parent is in expandedTrends
+ * or it is a parent row
+ * @param {object} state reducer state
+ * @param {array} expandedTrends contains a list of the expanded trends
+ * @returns {object} the results array in the reducer state
+ */
+function updateRowVisibility( state, expandedTrends ) {
+ const { results } = state
+ for ( const k in results ) {
+ // rip through results and expand the ones, or collapse
+ /* istanbul ignore else */
+ if ( results.hasOwnProperty( k ) && Array.isArray( results[k] ) ) {
+ results[k]
+ .forEach( o => {
+ o.visible =
+ Boolean( expandedTrends.includes( o.parent ) || o.isParent )
+ } )
+ }
+ }
+
+ return results
+}
+
+// ----------------------------------------------------------------------------
+// Action Handlers
+/**
+ * Updates the state when an tab changed occurs, reset values to start clean
+ *
+ * @param {object} state the current state in the Redux store
+ * @param {object} action the payload containing the tab we are changing to
+ * @returns {object} the new state for the Redux store
+ */
+export function handleTabChanged( state, action ) {
+ return {
+ ...state,
+ focus: action.tab === MODE_TRENDS ? state.focus : '',
+ results: defaultState.results
+ }
+}
+
+/**
+ * Updates the state when an aggregations call is in progress
+ *
+ * @param {object} state the current state in the Redux store
+ * @param {object} action the payload containing the key/value pairs
+ * @returns {object} the new state for the Redux store
+ */
+export function trendsCallInProcess( state, action ) {
+ return {
+ ...state,
+ activeCall: action.url,
+ isLoading: true
+ }
+}
+
+/**
+ * handling errors from an aggregation call
+ *
+ * @param {object} state the current state in the Redux store
+ * @param {object} action the payload containing the key/value pairs
+ * @returns {object} new state for the Redux store
+ */
+export function processTrendsError( state, action ) {
+ return {
+ ...state,
+ activeCall: '',
+ error: processErrorMessage( action.error ),
+ isLoading: false,
+ results: {
+ dateRangeArea: [],
+ dateRangeLine: [],
+ issue: [],
+ product: []
+ }
+ }
+}
+
+
+/**
+ * Handler for the update chart type action
+ *
+ * @param {object} state the current state in the Redux store
+ * @param {object} action the command being executed
+ * @returns {object} the new state for the Redux store
+ */
+export function updateChartType( state, action ) {
+ return {
+ ...state,
+ chartType: action.chartType,
+ tooltip: false
+ }
+}
+
+/**
+ * Handler for the update data lens action
+ *
+ * @param {object} state the current state in the Redux store
+ * @param {object} action the command being executed
+ * @returns {object} the new state for the Redux store
+ */
+export function updateDataLens( state, action ) {
+ const { lens } = action
+ const chartType = lens === 'Overview' ? 'line' : state.chartType
+ // make sure it's a line chart if it's overview
+ return {
+ ...state,
+ chartType,
+ focus: '',
+ lens,
+ subLens: getSubLens( lens ),
+ tooltip: false
+ }
+}
+
+/**
+ * Handler for the update sub lens action
+ *
+ * @param {object} state the current state in the Redux store
+ * @param {object} action the command being executed
+ * @returns {object} the new state for the Redux store
+ */
+export function updateDataSubLens( state, action ) {
+ return {
+ ...state,
+ subLens: action.subLens
+ }
+}
+
+/** Handler for the focus selected action
+ *
+ * @param {object} state the current state in the Redux store
+ * @param {object} action the command being executed
+ * @returns {object} the new state for the Redux store
+ */
+function changeFocus( state, action ) {
+ const { focus, lens } = action
+ return {
+ ...state,
+ focus,
+ lens,
+ subLens: state.subLens || getSubLens( lens ),
+ tooltip: false
+ }
+}
+
+/** Handler for the focus removed action
+ *
+ * @param {object} state the current state in the Redux store
+ * @returns {object} the new state for the Redux store
+ */
+function removeFocus( state ) {
+ return {
+ ...state,
+ expandableRows: [],
+ expandedTrends: [],
+ focus: '',
+ tooltip: false
+ }
+}
+
+
+/**
+ * Processes an object of key/value strings into the correct internal format
+ *
+ * @param {object} state the current state in the Redux store
+ * @param {object} action the payload containing the key/value pairs
+ * @returns {object} a filtered set of key/value pairs with the values set to
+ * the correct type
+ */
+function processParams( state, action ) {
+ const params = action.params
+ const processed = Object.assign( {}, defaultState )
+
+ // Handle flag filters
+ const filters = [ 'chartType', 'focus', 'lens', 'subLens' ]
+ for ( const val of filters ) {
+ if ( params[val] ) {
+ processed[val] = params[val]
+ }
+ }
+
+ const arrayParams = [ 'expandedTrends' ]
+ processUrlArrayParams( params, processed, arrayParams )
+
+ return processed
+}
+
+/**
+ * Handler for the tooltipUpdate action
+ *
+ * @param {object} state the current state in the Redux store
+ * @param {object} action the command being executed
+ * @returns {object} the new state for the Redux store
+ */
+function updateTooltip( state, action ) {
+ const tooltip = action.value || false
+
+ // need to merge in the actual viewed state
+ if ( tooltip ) {
+ tooltip.title = getTooltipTitle( tooltip.date, tooltip.interval,
+ tooltip.dateRange, true )
+
+ /* istanbul ignore else */
+ if ( tooltip.values ) {
+ tooltip.values.forEach( o => {
+ o.colorIndex = Object.values( colors.DataLens )
+ .indexOf( state.colorMap[o.name] ) || 0
+ // make sure all values have a value
+ o.value = coalesce( o, 'value', 0 )
+ } )
+
+ let total = 0
+ total = tooltip.values.reduce( ( accumulator, currentValue ) =>
+ accumulator + currentValue.value, total )
+ tooltip.total = total
+ }
+ }
+
+ return {
+ ...state,
+ tooltip
+ }
+}
+
+/**
+ * reset the filters selected for the focus too
+ *
+ * @param {object} state the current state in the Redux store
+ * @returns {object} the new state for the Redux store
+ */
+export function removeAllFilters( state ) {
+ return {
+ ...state,
+ focus: ''
+ }
+}
+
+/**
+ * Removes multiple filters from the current set
+ *
+ * @param {object} state the current state in the Redux store
+ * @param {object} action the payload containing the filters to remove
+ * @returns {object} the new state for the Redux store
+ */
+function removeMultipleFilters( state, action ) {
+ const focus = action.values.includes( state.focus ) ? '' : state.focus
+ return {
+ ...state,
+ focus
+ }
+}
+
+// ----------------------------------------------------------------------------
+// Action Handlers
+
+/**
+ * Creates a hash table of action types to handlers
+ *
+ * @returns {object} a map of types to functions
+ */
+export function _buildHandlerMap() {
+ const handlers = {}
+
+ handlers[actions.CHART_TYPE_CHANGED] = updateChartType
+ handlers[actions.DATA_LENS_CHANGED] = updateDataLens
+ handlers[actions.DATA_SUBLENS_CHANGED] = updateDataSubLens
+ handlers[actions.FILTER_ALL_REMOVED] = removeAllFilters
+ handlers[actions.FILTER_MULTIPLE_REMOVED] = removeMultipleFilters
+ handlers[actions.FOCUS_CHANGED] = changeFocus
+ handlers[actions.FOCUS_REMOVED] = removeFocus
+ handlers[actions.TAB_CHANGED] = handleTabChanged
+ handlers[actions.TRENDS_API_CALLED] = trendsCallInProcess
+ handlers[actions.TRENDS_FAILED] = processTrendsError
+ handlers[actions.TRENDS_RECEIVED] = processTrends
+ handlers[actions.TREND_COLLAPSED] = collapseTrend
+ handlers[actions.TREND_EXPANDED] = expandTrend
+ handlers[actions.TRENDS_TOOLTIP_CHANGED] = updateTooltip
+ handlers[actions.URL_CHANGED] = processParams
+
+ return handlers
+}
+
+const _handlers = _buildHandlerMap()
+
+/**
+ * Routes an action to an appropriate handler
+ *
+ * @param {object} state the current state in the Redux store
+ * @param {object} action the command being executed
+ * @returns {object} the new state for the Redux store
+ */
+function handleSpecificAction( state, action ) {
+ if ( action.type in _handlers ) {
+ return _handlers[action.type]( state, action )
+ }
+
+ return state
+}
+
+export default ( state = defaultState, action ) => {
+ const newState = handleSpecificAction( state, action )
+ return newState
+}
diff --git a/src/reducers/view.jsx b/src/reducers/view.jsx
index 7118c9a8a..88cc3f2a4 100644
--- a/src/reducers/view.jsx
+++ b/src/reducers/view.jsx
@@ -1,9 +1,13 @@
import actions from '../actions'
+import { parseCookies } from '../utils'
+
+const cookies = parseCookies()
export const defaultView = {
fromExternal: false,
printMode: false,
showFilters: true,
+ showTrends: cookies.showTrends === 'show',
width: 0
}
diff --git a/src/utils.jsx b/src/utils.jsx
index 124411c1f..b5bbedd8d 100644
--- a/src/utils.jsx
+++ b/src/utils.jsx
@@ -65,6 +65,26 @@ export const clamp = ( x, min, max ) => {
return x;
}
+/**
+ * Function to set the limit of the range of a set of dates
+ * @param {string} x value we are checking
+ * @param {string} min smallest number it can be
+ * @param {string} max biggest number it can be
+ * @returns {*} the limited value
+ */
+export const clampDate = ( x, min, max ) => {
+ let xDate = new Date( x );
+ const minDate = new Date( min );
+ const maxDate = new Date( max );
+
+ if ( xDate < minDate ) {
+ xDate = minDate;
+ } else if ( xDate > maxDate ) {
+ xDate = maxDate;
+ }
+ return xDate;
+}
+
/**
* Replacement for the common pattern:
* if( o.field )
@@ -151,8 +171,42 @@ export function hashObject( o ) {
}
export const normalize = s => s.toLowerCase()
+/**
+ * takes a string and formats it into proper text for an htmd ID
+ * Eat at Joe's => eatatjoes
+ * @param {string} a the dirty string Eat at Joe's
+ * @returns {string} sanitized string eatatjoes
+ */
+export const sanitizeHtmlId = a => a.replace( /\s+|\W/g, '' ).toLowerCase()
+
export const slugify = ( a, b ) => a + SLUG_SEPARATOR + b
+/**
+* Processes the cookie string into key-value pairs
+*
+* @param {string} cookies the unprocessed cookie string
+* @returns {Object} a dictionary of cookie keys and values
+*/
+export function parseCookies( cookies = document.cookie ) {
+ return cookies.split( ';' ).reduce( ( accum, x ) => {
+ const [ k, v ] = x.trim().split( '=' )
+ if ( k ) {
+ accum[k] = v
+ }
+ return accum
+ }, {} )
+}
+
+/**
+ * take in an array or object and clone it as completely new object to remove
+ * pointers. If you .slice() an array of objects, the array is new, but
+ * copied objects still point to original objects, you will still have mutations
+ *
+ * @param {object|array} input the thing to copy
+ * @returns {object|array} the copied new thing
+ */
+export const cloneDeep = input => JSON.parse( JSON.stringify( input ) )
+
/**
* Custom sort for array so that selected items appear first, then by doc_count
* @param {array} options input array containing values
@@ -160,7 +214,7 @@ export const slugify = ( a, b ) => a + SLUG_SEPARATOR + b
* @returns {T[]} sorted array
*/
export const sortSelThenCount = ( options, selected ) => {
- const retVal = ( options || [] ).slice()
+ const retVal = ( cloneDeep( options ) || [] ).slice()
/* eslint complexity: ["error", 5] */
retVal.sort( ( a, b ) => {
@@ -289,3 +343,76 @@ export function getFullUrl( uri ) {
return parser.href
}
+/**
+ * processes error messages so we can see them in redux
+ * @param {error} err the error object from api
+ * @returns {{name: string, message: string}} processed error object we can see
+ */
+export function processErrorMessage( err ) {
+ return {
+ name: err.name,
+ message: err.message
+ }
+}
+
+/**
+ * Takes in a number and outputs to percentage
+ * @param {number} num value we convert .9999
+ * @returns {number} 99.99
+ */
+export function formatPercentage( num ) {
+ // we have to do this so it is a float and not a string
+ const val = parseFloat( parseFloat( num * 100 ).toFixed( 2 ) );
+ return isNaN( val ) ? 0.00 : val;
+}
+
+/**
+ * helper function
+ * @param {object} bucket contains key value pairs
+ * @returns {string} name of the key that has the buckets
+ */
+export const getSubKeyName = bucket => {
+ for ( const k in bucket ) {
+ if ( k !== 'trend_period' && bucket[k].buckets ) {
+ return k;
+ }
+ }
+ return ''
+}
+
+
+/**
+ * helper function to take in array parameters from the url, filters, etc and
+ * set the values in the processed object
+ * @param {object} params the object from the URL_CHANGED action
+ * @param {object} processed the state we will update with a single value or arr
+ * @param {object} arrayParams the array of strings that we will check against
+ */
+export const processUrlArrayParams = ( params, processed, arrayParams ) => {
+ arrayParams.forEach( field => {
+ if ( typeof params[field] !== 'undefined' ) {
+ if ( typeof params[field] === 'string' ) {
+ processed[field] = [ params[field] ]
+ } else {
+ processed[field] = params[field]
+ }
+ }
+ } )
+}
+
+/**
+ * gets a filter and its subagg filters
+ * @param {string} filterKey the filter 'Debt'
+ * @param {array} subitems the buckets to process to generate slug
+ * @returns {Set} returns a set of uniques Debt, Debt*Foo
+ */
+export const getAllFilters = ( filterKey, subitems ) => {
+ const values = new Set()
+ // Add the parent
+ values.add( filterKey )
+ // Add the shown subitems
+ subitems.forEach( sub => {
+ values.add( slugify( filterKey, sub.key ) )
+ } )
+ return values
+}
diff --git a/src/utils/__tests__/chart.spec.jsx b/src/utils/__tests__/chart.spec.jsx
new file mode 100644
index 000000000..4ff26cb5a
--- /dev/null
+++ b/src/utils/__tests__/chart.spec.jsx
@@ -0,0 +1,214 @@
+/* eslint-disable camelcase */
+import * as sut from '../chart'
+
+// ----------------------------------------------------------------------------
+// Tests
+describe( 'getLastDate', () => {
+ const config = {
+ dateRange: {
+ from: '2012',
+ to: '2016'
+ },
+ interval: 'Month',
+ lastDate: '2020-03-01T00:00:00.000Z'
+ }
+
+ const dataSet = [
+ { name: 'foo', date: '2020-01-01T00:00:00.000Z' },
+ { name: 'foo', date: '2020-02-01T00:00:00.000Z' },
+ { name: 'foo', date: '2020-03-01T00:00:00.000Z' },
+ { name: 'bar', date: '2020-01-01T00:00:00.000Z' },
+ { name: 'bar', date: '2020-02-01T00:00:00.000Z' },
+ { name: 'bar', date: '2020-03-01T00:00:00.000Z' }
+ ]
+ it( 'does nothing when data is empty', () => {
+ const res = sut.getLastDate( [], config )
+ expect( res ).toBeNull()
+ } )
+ it( 'retrieves the last point', () => {
+ const res = sut.getLastDate( dataSet, config )
+ expect( res ).toEqual( {
+ date: '2020-03-01T00:00:00.000Z',
+ dateRange: {
+ from: '2012',
+ to: '2016'
+ },
+ interval: 'Month',
+ key: '2020-03-01T00:00:00.000Z',
+ values: [
+ { date: '2020-03-01T00:00:00.000Z', name: 'foo' },
+ { date: '2020-03-01T00:00:00.000Z', name: 'bar' }
+ ]
+ } )
+ } )
+} )
+
+describe( 'getLastLineDate', () => {
+ const config = {
+ dateRange: {
+ from: '2012',
+ to: '2016'
+ },
+ interval: 'Month',
+ lastDate: '2020-03-01T00:00:00.000Z'
+ }
+
+ it( 'does nothing when data is empty', () => {
+ const res = sut.getLastLineDate( [], config )
+ expect( res ).toBeNull()
+ } )
+} )
+
+describe( 'getTooltipTitle', () => {
+ let dateRange, interval, res
+ beforeEach( () => {
+ dateRange = { from: '01/01/1970', to: '10/07/2015' }
+ } )
+
+ it( 'sets tooltip title - month', () => {
+ interval = 'Month'
+ res = sut.getTooltipTitle( '09/1/1980', interval, dateRange, true )
+ expect( res ).toEqual( 'Date range: 09/01/1980 - 09/30/1980' )
+ res = sut.getTooltipTitle( '09/1/1980', interval, dateRange, false )
+ expect( res ).toEqual( '09/01/1980 - 09/30/1980' )
+ } )
+
+ it( 'sets tooltip title - week', () => {
+ interval = 'Week'
+ res = sut.getTooltipTitle( '09/1/1980', interval, dateRange, true )
+ expect( res ).toEqual( 'Date range: 09/01/1980 - 09/07/1980' )
+ res = sut.getTooltipTitle( '09/1/1980', interval, dateRange, false )
+ expect( res ).toEqual( '09/01/1980 - 09/07/1980' )
+ } )
+
+ it( 'sets tooltip title - day', () => {
+ interval = 'Day'
+ res = sut.getTooltipTitle( '09/23/1980', interval, dateRange, true )
+ expect( res ).toEqual( 'Date: 09/23/1980' )
+ res = sut.getTooltipTitle( '09/23/1980', interval, dateRange, false )
+ expect( res ).toEqual( 'Date: 09/23/1980' )
+ } )
+
+ it( 'sets tooltip title - year', () => {
+ interval = 'Year'
+ res = sut.getTooltipTitle( '01/01/1980', interval, dateRange, true )
+ expect( res ).toEqual( 'Date range: 01/01/1980 - 12/31/1980' )
+ } )
+
+ it( 'sets tooltip title - year, odd start offset', () => {
+ interval = 'Year'
+ dateRange.from = '03/22/1980'
+ res = sut.getTooltipTitle( '01/01/1980', interval, dateRange, true )
+ expect( res ).toEqual( 'Date range: 03/22/1980 - 12/31/1980' )
+ } )
+
+ it( 'sets tooltip title - year, odd end offset', () => {
+ interval = 'Year'
+ dateRange.to = '03/22/1980'
+ res = sut.getTooltipTitle( '01/01/1980', interval, dateRange, true )
+ expect( res ).toEqual( 'Date range: 01/01/1980 - 03/22/1980' )
+ } )
+
+ it( 'sets tooltip title - quarter', () => {
+ interval = 'quarter'
+ res = sut.getTooltipTitle( '07/01/1980', interval, dateRange, true )
+ expect( res ).toEqual( 'Date range: 07/01/1980 - 12/31/1980' )
+ } )
+
+ it( 'sets tooltip title - quarter, odd start offset', () => {
+ interval = 'quarter'
+ res = sut.getTooltipTitle( '07/15/1980', interval, dateRange, true )
+ expect( res ).toEqual( 'Date range: 07/15/1980 - 12/31/1980' )
+ } )
+
+ it( 'sets tooltip title - quarter, odd end offset', () => {
+ interval = 'quarter'
+ dateRange.to = '11/10/1980'
+ res = sut.getTooltipTitle( '07/01/1980', interval, dateRange, true )
+ expect( res ).toEqual( 'Date range: 07/01/1980 - 11/10/1980' )
+ } )
+} )
+
+describe( 'getColorScheme', function () {
+ it( 'gets color scheme - default', () => {
+ const rowNames = [ { name: 'abc' }, { name: 'alnb' }, { name: 'Complaints' } ]
+ const actual = sut.getColorScheme( rowNames, false, 'Overview' )
+ expect( actual ).toEqual( [
+ '#20aa3f', '#20aa3f', '#20aa3f'
+ ] )
+ } )
+
+ it( 'gets color scheme - provided color map', () => {
+ const colorMap = { Complaint: '#124', abc: '#aaa', def: '#bbb' }
+ const rowNames = [ { name: 'abc' }, { name: 'def' }, { name: 'Complaint' } ]
+ const actual = sut.getColorScheme( rowNames, colorMap, 'Overview' )
+ expect( actual ).toEqual( [ '#aaa', '#bbb', '#124' ] )
+ } )
+
+ it( 'gets color scheme - provided color map', () => {
+ const colorMap = { Complaint: '#124', abc: '#aaa', def: '#bbb' }
+ const rowNames = [
+ { name: 'abc' },
+ { name: 'def' },
+ { name: 'Complaint' },
+ { name: 'Compla', parent: 'Complaint' },
+ { name: 'de11f', parent: 'def' }
+ ]
+ const actual = sut.getColorScheme( rowNames, colorMap, 'Overview' )
+ expect( actual )
+ .toEqual( [ '#aaa', '#bbb', '#124', '#124', '#bbb' ] )
+ } )
+
+
+ it( 'gets color scheme - provided color map w/ missing data', () => {
+ const colorMap = { Complaints: '#124', abc: '#aaa', def: '#bbb' }
+ const rowNames = [ { name: 'abc' }, { name: 'def' }, { name: 'xxx' },
+ { name: 'Complaints' } ]
+ const actual = sut.getColorScheme( rowNames, colorMap, 'Overview' )
+ expect( actual ).toEqual( [ '#aaa', '#bbb', '#20aa3f', '#124' ] )
+ } )
+
+ it( 'gets color scheme - provided color map, data lens', () => {
+ const colorMap = { Complaint: '#124', abc: '#aaa', def: '#bbb' }
+ const rowNames = [
+ { name: 'abc' },
+ { name: 'def' },
+ { name: 'Complaint' },
+ { name: 'efg' },
+ { name: 'jkh' },
+ ]
+ const actual = sut.getColorScheme( rowNames, colorMap, 'Product' )
+ expect( actual ).toEqual( [ '#aaa', '#bbb', '#124', '#a2a3a4',
+ '#a2a3a4' ] )
+ } )
+
+} )
+
+describe( 'processRows', () => {
+ it( 'handles empty rows / bad data', () => {
+ const res = sut.processRows( false, false )
+ expect( res ).toEqual( {
+ colorScheme: [],
+ data: []
+ } )
+ } )
+
+ it( 'returns only visible rows', () => {
+ const rows = [
+ { name: 'abc', visible: true, value: 123 },
+ { name: 'def', visible: true, value: 123 },
+ { name: 'Complaint', visible: true, value: 123 },
+ { name: 'Compla', parent: 'Complaint', visible: false, value: 123 },
+ { name: 'de11f', parent: 'def', visible: false, value: 123 } ]
+ const res = sut.processRows( rows, false )
+ expect( res ).toEqual( {
+ colorScheme: [ '#20aa3f', '#20aa3f', '#20aa3f' ],
+ data: [
+ { name: 'abc', visible: true, value: 123 },
+ { name: 'def', visible: true, value: 123 },
+ { name: 'Complaint', visible: true, value: 123 }
+ ]
+ } )
+ } )
+
+} )
diff --git a/src/utils/__tests__/formatDate.spec.jsx b/src/utils/__tests__/formatDate.spec.jsx
new file mode 100644
index 000000000..1b17a7407
--- /dev/null
+++ b/src/utils/__tests__/formatDate.spec.jsx
@@ -0,0 +1,42 @@
+/* eslint-disable camelcase */
+
+import * as sut from '../formatDate'
+
+// ----------------------------------------------------------------------------
+// Tests
+
+describe( 'formatDate', function () {
+ it( 'converts a string to pretty date format', function () {
+ const actual = sut.formatDate( 'Dec 12, 1980' )
+ expect( actual ).toEqual( '1980-12-12' )
+ } )
+
+ it( 'converts a date object ', function () {
+ const actual = sut.formatDate( new Date( 'January 12, 1980' ) )
+ expect( actual ).toEqual( '1980-01-12' )
+ } )
+
+ it( 'converts string to view model ', function () {
+ const actual = sut.formatDateView( new Date( 'January 12, 1980' ) )
+ expect( actual ).toEqual( '01/12/1980' )
+ } )
+
+ it( 'converts string to data model ', function () {
+ const actual = sut.formatDateModel( new Date( 'January 12, 1980' ) )
+ expect( actual ).toEqual( '1980-01-12' )
+ } )
+
+ it( 'converts string to short ', function () {
+ const actual = sut.formatDateLocaleShort( new Date( 'January 12, 1980' ) )
+ expect( actual ).toEqual( 'Jan 12, 1980' )
+ } )
+
+ it( 'compares dates', function () {
+ let actual = sut.compareDates( '2012-12-1', '2012-12-1' )
+ expect( actual ).toEqual( 0 )
+ actual = sut.compareDates( '2014-12-1', '2012-12-1' )
+ expect( actual ).toEqual( 1 )
+ actual = sut.compareDates( '2012-12-1', '2014-12-1' )
+ expect( actual ).toEqual( -1 )
+ } )
+} )
diff --git a/src/utils/__tests__/trends.spec.jsx b/src/utils/__tests__/trends.spec.jsx
new file mode 100644
index 000000000..4c8ed1b91
--- /dev/null
+++ b/src/utils/__tests__/trends.spec.jsx
@@ -0,0 +1,104 @@
+/* eslint-disable camelcase */
+import * as sut from '../trends'
+
+// ----------------------------------------------------------------------------
+// Tests
+describe( 'getSubLens', () => {
+ it( 'returns empty string for no lens selected', () => {
+ const res = sut.getSubLens( '' )
+ expect( res ).toEqual( '' )
+ } )
+
+ it( 'returns sublens for Company select', () => {
+ const res = sut.getSubLens( 'Company' )
+ expect( res ).toEqual( 'product' )
+ } )
+
+ it( 'returns sublens for anything else select', () => {
+ const res = sut.getSubLens( 'Foo' )
+ expect( res ).toEqual( 'sub_foo' )
+ } )
+} )
+describe( 'showCompanyOverLay', () => {
+ it( 'hides overlay when it is loading', () => {
+ const res = sut.showCompanyOverLay( 'Company', [ 'foo', 'nar' ], true )
+ expect( res ).toBeFalsy()
+ } )
+
+ it( 'shows overlay when it is Company and no filters', () => {
+ const res = sut.showCompanyOverLay( 'Company', [], false )
+ expect( res ).toBeTruthy()
+ } )
+
+ it( 'shows overlay when it is Company and null filters', () => {
+ const res = sut.showCompanyOverLay( 'Company', null, false )
+ expect( res ).toBeTruthy()
+ } )
+} )
+
+describe( 'pruneOther', () => {
+ it( 'return original array if Other has values', () => {
+ const buckets = [
+ { name: 'Other', value: 100, date: '2012/01/01' },
+ { name: 'Other', value: 0, date: '2012/02/01' },
+ { name: 'Other', value: 100, date: '2012/03/01' },
+ { name: 'Foo', value: 10, date: '2012/01/01' },
+ { name: 'Foo', value: 120, date: '2012/02/01' },
+ { name: 'Foo', value: 10, date: '2012/03/01' },
+ { name: 'Bar', value: 100, date: '2012/01/01' },
+ { name: 'Bar', value: 100, date: '2012/02/01' },
+ { name: 'Bar', value: 100, date: '2012/03/01' }
+ ]
+ const res = sut.pruneOther( buckets )
+ expect( res ).toEqual( buckets )
+ } )
+
+ it( 'removes Other if they are zero values', () => {
+ const buckets = [
+ { name: 'Other', value: 0, date: '2012/01/01' },
+ { name: 'Other', value: 0, date: '2012/02/01' },
+ { name: 'Other', value: 0, date: '2012/03/01' },
+ { name: 'Foo', value: 10, date: '2012/01/01' },
+ { name: 'Foo', value: 120, date: '2012/02/01' },
+ { name: 'Foo', value: 10, date: '2012/03/01' },
+ { name: 'Bar', value: 100, date: '2012/01/01' },
+ { name: 'Bar', value: 100, date: '2012/02/01' },
+ { name: 'Bar', value: 100, date: '2012/03/01' }
+ ]
+ const res = sut.pruneOther( buckets )
+ expect( res ).toEqual( [
+ { name: 'Foo', value: 10, date: '2012/01/01' },
+ { name: 'Foo', value: 120, date: '2012/02/01' },
+ { name: 'Foo', value: 10, date: '2012/03/01' },
+ { name: 'Bar', value: 100, date: '2012/01/01' },
+ { name: 'Bar', value: 100, date: '2012/02/01' },
+ { name: 'Bar', value: 100, date: '2012/03/01' }
+ ] )
+ } )
+} )
+
+describe( 'scrollToFocus', () => {
+ it( 'scrolls to the search summary', () => {
+ let selectElement
+ selectElement = document.createElement( 'div' )
+ selectElement.setAttribute( 'id', 'search-summary' )
+ selectElement.scrollIntoView = jest.fn()
+ window.domNode = selectElement
+ document.body.appendChild( selectElement )
+
+ sut.scrollToFocus()
+ expect( selectElement.scrollIntoView ).toHaveBeenCalled()
+ document.body.removeChild( selectElement )
+ jest.clearAllMocks()
+ } )
+
+ it( 'does nothing if no element found', () => {
+ let selectElement
+ selectElement = document.createElement( 'div' )
+ selectElement.setAttribute( 'id', 'not-search-summary' )
+ selectElement.scrollIntoView = jest.fn()
+ sut.scrollToFocus()
+ expect( selectElement.scrollIntoView ).not.toHaveBeenCalled()
+
+ } )
+} )
diff --git a/src/utils/chart.jsx b/src/utils/chart.jsx
new file mode 100644
index 000000000..4f1554ae5
--- /dev/null
+++ b/src/utils/chart.jsx
@@ -0,0 +1,210 @@
+// ----------------------------------------------------------------------------
+/* eslint-disable no-mixed-operators, camelcase */
+import { formatDateView, isDateEqual } from './formatDate'
+import { clampDate } from '../utils'
+
+import moment from 'moment'
+
+export const getLastDate = ( dataSet, config ) => {
+ // take in array of data points
+ // early exit
+ if ( !dataSet || dataSet.length === 0 ) {
+ return null
+ }
+
+ const lastDate = config.lastDate
+ const lastPointValues = dataSet.filter( o => isDateEqual( o.date, lastDate ) )
+ return {
+ key: lastDate,
+ date: lastDate,
+ dateRange: config.dateRange,
+ interval: config.interval,
+ values: lastPointValues
+ }
+}
+
+export const getLastLineDate = ( dataSet, config ) => {
+ // take in array of data points
+ if ( !dataSet || !dataSet.dataByTopic || dataSet.dataByTopic.length === 0 ) {
+ return null
+ }
+
+ const lastDate = config.lastDate
+ const values = dataSet.dataByTopic.map( o => {
+ const lastPoint = o.dates.find( v => isDateEqual( v.date, lastDate ) )
+ const value = lastPoint ? lastPoint.value : 0
+ return {
+ name: o.topic,
+ date: lastDate,
+ value
+ }
+ } )
+
+ const lastPoint = {
+ key: lastDate,
+ date: lastDate,
+ dateRange: config.dateRange,
+ interval: config.interval,
+ values
+ }
+ return lastPoint
+}
+
+
+export const getTooltipDate = ( inputDate, dateRange ) => {
+ const returnDate = clampDate( inputDate, dateRange.from, dateRange.to )
+ return formatDateView( returnDate )
+}
+
+export const getTooltipTitle = ( inputDate, interval, dateRange, external ) => {
+ /* eslint complexity: ["error", 6] */
+ interval = interval.toLowerCase()
+ const startDate = getTooltipDate( inputDate, dateRange )
+
+ let endDate
+
+ switch ( interval ) {
+ case 'week':
+ endDate = moment( new Date( inputDate ) )
+ .add( 1, interval ).startOf( interval )
+ break
+ case 'quarter':
+ endDate = moment( new Date( inputDate ) )
+ .add( 1, interval )
+ .endOf( interval )
+ .subtract( 1, 'day' )
+ break
+ case 'month':
+ default:
+ endDate = moment( new Date( inputDate ) )
+ .add( 1, interval )
+ .subtract( 1, 'day' )
+ break
+ }
+
+ endDate = getTooltipDate( endDate, dateRange )
+
+ if ( interval === 'day' ) {
+ return `Date: ${ endDate }`
+ }
+
+ return external ? `Date range: ${ startDate } - ${ endDate }` :
+ `${ startDate } - ${ endDate }`
+}
+
+/**
+ * helper to generate chart name for row chart based on trends
+ * @param {array} rowNames passed from trends.results reducer
+ * @param {object} colorMap of the chart for display
+ * @param {string} lens determines which colors to use for defaults
+ * @returns {array} the color scheme [blue, red, yellow, etc]
+ */
+export const getColorScheme = ( rowNames, colorMap, lens ) =>
+ rowNames.map( o => {
+ if ( !colorMap ) {
+ return '#20aa3f'
+ }
+ // bad data. Some titles can appears twice in the product data
+ const name = o.name.trim()
+ const parent = o.parent ? o.parent.trim() : ''
+ // parent should have priority
+ if ( colorMap[parent] ) {
+ return colorMap[parent]
+ } else if ( colorMap[name] ) {
+ return colorMap[name]
+ }
+
+ // return default grey when it's data lens and not in area/line chart
+ // #a2a3a4
+ return lens === 'Overview' ? '#20aa3f' : '#a2a3a4'
+ } )
+
+
+/**
+ * helper function to get d3 bar chart data
+ * @param {object} obj rowdata we are processing
+ * @param {array} nameMap list of names we are keeping track of
+ * @param {array} expandedTrends list of trends that are open in view
+ * @returns {object} the rowdata for row chart
+ */
+export const getD3Names = ( obj, nameMap, expandedTrends ) => {
+ let name = obj.key
+ // D3 doesnt allow dupe keys, so we have to to append
+ // spaces so we have unique keys
+ while ( nameMap[name] ) {
+ name += ' '
+ }
+
+ nameMap[name] = true
+
+ return obj.splitterText ? {
+ ...obj,
+ visible: expandedTrends.indexOf( obj.parent ) > -1
+ } : {
+ hasChildren: Boolean( obj.hasChildren ),
+ isNotFilter: false,
+ isParent: Boolean( obj.isParent ),
+ name: name,
+ value: Number( obj.doc_count ),
+ parent: obj.parent || false,
+ // visible if no parent, or it is in expanded trends
+ visible: !obj.parent || expandedTrends.indexOf( obj.parent ) > -1,
+ // this adjusts the thickness of the parent or child bars
+ width: obj.parent ? 0.4 : 0.5
+ }
+}
+
+
+export const processRows = ( rows, colorMap, lens ) => {
+ let data = rows ? rows : []
+ data = data.filter( o => o.visible )
+ const colorScheme = getColorScheme( data, colorMap, lens )
+
+ return {
+ colorScheme,
+ data
+ }
+}
+
+/**
+ * The api sends us the date buckets in older -> new order
+ * however, in data lens / company aggregation it's reversed
+ * we also need to fill any empty area buckets when dates are missing
+ * @param {string} name bucket name
+ * @param {array} buckets contains dates and value paired objects
+ * @param {array} areaBuckets the reference dates we check against
+ * @returns {array} the sorted array in old-> newest
+ */
+export const updateDateBuckets = ( name, buckets, areaBuckets ) => {
+ // fill in empty zero values
+ areaBuckets.forEach( o => {
+ if ( !buckets.find( b => b.key_as_string === o.key_as_string ) ) {
+ buckets.push( {
+ name: name,
+ doc_count: 0,
+ key_as_string: o.key_as_string
+ } )
+ }
+ } )
+
+ return buckets
+ // eslint-disable-next-line no-confusing-arrow, no-extra-parens
+ .sort( ( a, b ) => ( a.key_as_string > b.key_as_string ) ? 1 : -1 )
+ .map( o => ( {
+ name: name,
+ date: o.key_as_string,
+ value: o.doc_count
+ } ) )
+}
+
+export const externalTooltipFormatter = tooltip => {
+ if ( !tooltip ) {
+ return tooltip
+ }
+ const parts = tooltip.title.split( ':' )
+ return {
+ ...tooltip,
+ heading: parts[0] + ':',
+ date: parts[1] ? parts[1].trim() : ''
+ }
+}
diff --git a/src/utils/formatDate.jsx b/src/utils/formatDate.jsx
new file mode 100644
index 000000000..7ecc50f4d
--- /dev/null
+++ b/src/utils/formatDate.jsx
@@ -0,0 +1,59 @@
+// ----------------------------------------------------------------------------
+// Exports
+import moment from 'moment'
+
+/**
+ * Function to format/convert a string to format we want
+ * @param {(string | object)} uglyDate the input string to convert
+ * @returns {string} the cleaned up string in YYYY-MM-DD
+ */
+export const formatDate = uglyDate =>
+ moment( new Date( uglyDate ) ).format( 'YYYY-MM-DD' );
+
+/**
+ * Function to format/convert a string to view format we want for datePicker
+ * @param {(string | object)} dateIn the input string to convert
+ * @returns {string} the cleaned up string in MM/DD/YYYY
+ */
+export const formatDateView = dateIn =>
+ moment( new Date( dateIn ) ).utc().add( 5.5, 'hours' ).format( 'MM/DD/YYYY' );
+
+/**
+ * Function to format/convert a string to format we want for the model
+ * @param {(string | object)} dateIn the input string to convert
+ * @returns {string} the cleaned up string in YYYY-MM-DD
+ */
+export const formatDateModel = dateIn =>
+ moment( new Date( dateIn ) ).utc().add( 5.5, 'hours' ).format( 'YYYY-MM-DD' );
+
+/**
+ * Function to format/convert a string to format we want for the model
+ * @param {(string | object)} dateIn the input string to convert
+ * @returns {string} the cleaned up string in Jul 4, 2010
+ */
+export const formatDateLocaleShort = dateIn =>
+ moment( new Date( dateIn ) ).utc().add( 5.5, 'hours' ).format( 'll' );
+
+/**
+ * function to convert and compare 2 strings as dates
+ * @param {string} a input date string to compare MM/DD/YYYY or YYYY-MM-DD
+ * @param {string} b input date string to compare MM/DD/YYYY or YYYY-MM-DD
+ * @returns {boolean} lets us know if date is equal
+ */
+export const isDateEqual = ( a, b ) =>
+ moment( new Date( a ) ).isSame( new Date( b ), 'day' );
+
+/**
+ * function to convert and compare 2 strings as dates
+ * @param {string} a input date string to compare MM/DD/YYYY or YYYY-MM-DD
+ * @param {string} b input date string to compare MM/DD/YYYY or YYYY-MM-DD
+ * @returns {number} the return of the compared converted values
+ */
+export const compareDates = ( a, b ) => {
+ if ( isDateEqual( a, b ) ) {
+ return 0;
+ }
+
+ return new Date( a ) < new Date( b ) ? -1 : 1;
+};
+
diff --git a/src/utils/trends.jsx b/src/utils/trends.jsx
new file mode 100644
index 000000000..d040506ee
--- /dev/null
+++ b/src/utils/trends.jsx
@@ -0,0 +1,79 @@
+import moment from 'moment'
+
+// ----------------------------------------------------------------------------
+export const showCompanyOverLay = ( lens, companyFilters, isLoading ) => {
+ if ( isLoading ) {
+ return false
+ }
+
+ // we need to show the companyOverlay if:
+ // lens === 'Company' AND there are no company filters
+ if ( lens === 'Company' ) {
+ return !companyFilters || companyFilters.length === 0
+ }
+
+ return false
+}
+
+/* eslint-disable-next-line no-extra-parens */
+export const getSubLens = lens => {
+ if ( !lens ) {
+ return ''
+ }
+
+ switch ( lens ) {
+ case 'Overview':
+ return ''
+ case 'Company':
+ return 'product'
+ default:
+ return 'sub_' + lens.toLowerCase()
+ }
+}
+
+/**
+ * helper function to strip out the "Other" data points from stacked area if
+ * they don't have any values
+ * @param {array} buckets contains all of the date points for the stacked area
+ * @returns {array} cleaned up array or not
+ */
+export const pruneOther = buckets => {
+ const sumOther = buckets
+ .filter( o => o.name === 'Other' )
+ .reduce( ( prev, cur ) => prev + cur.value, 0 )
+
+ return sumOther > 0 ? buckets : buckets.filter( o => o.name !== 'Other' )
+}
+
+export const isGreaterThanYear = ( from, to ) => {
+ const a = moment( from )
+ const b = moment( to )
+ return b.diff( a, 'days' ) > 366
+}
+
+/**
+ * gets the valid intervals based on dates selected.
+ * get rid of Day if range > 1yr
+ * @param {object} from date
+ * @param {object} to date
+ * @returns {array} array of date intervals
+ */
+export const getIntervals = ( from, to ) => {
+ const intervals = [ 'Day', 'Week', 'Month', 'Quarter', 'Year' ]
+
+ return intervals.map( o => ( {
+ name: o,
+ disabled: isGreaterThanYear( from, to ) && o === 'Day'
+ } ) )
+}
+
+/**
+ * trigger this after a user clicks a focus. we scroll to the select box
+ * so that users don't get a blank wall of content
+ */
+export const scrollToFocus = () => {
+ const lensSelect = document.getElementById( 'search-summary' )
+ if ( lensSelect ) {
+ lensSelect.scrollIntoView()
+ }
+}
diff --git a/tox.ini b/tox.ini
index d14129eb4..c25f01255 100644
--- a/tox.ini
+++ b/tox.ini
@@ -8,6 +8,7 @@ commands=
coverage erase
coverage run ./manage.py test
coverage report --skip-covered
+ coverage html
basepython=
py36: python3.6