diff --git a/tests/endpoints/v1/test_beam.py b/tests/endpoints/v1/test_beam.py new file mode 100644 index 0000000..c9010f5 --- /dev/null +++ b/tests/endpoints/v1/test_beam.py @@ -0,0 +1,787 @@ +import unittest + +from tests import load_fixture, with_mock_client +from predicthq.endpoints.v1.beam.schemas import ( + FeatureImportance, + CorrelationResultSet, + Analysis, + CreateAnalysisResponse, + CreateAnalysisGroupResponse, + AnalysisResultSet, + AnalysisGroupResultSet, + AnalysisGroup, +) + + +class BeamTest(unittest.TestCase): + @with_mock_client( + request_returns=load_fixture("requests_responses/beam_test/test_search") + ) + def test_search(self, client): + result = client.beam.analysis.search() + + client.request.assert_called_once_with( + "get", + "/v1/beam/analyses/", + params={}, + verify=True, + ) + + assert isinstance(result, AnalysisResultSet) + + @with_mock_client( + request_returns=load_fixture("requests_responses/beam_test/test_empty_search") + ) + def test_search_params_underscores(self, client): + client.beam.analysis.search( + updated__gt="2016-03-01", + updated__gte="2016-03-01", + updated__lt="2016-04-01", + updated__lte="2016-04-01", + q="query", + status="active", + group_id="group_id", + demand_type__interval="week", + demand_type__industry="retail", + readiness_status=["ready", "not_ready"], + include_deleted=True, + sort=["rank", "-start"], + offset=10, + limit=10, + external_id="external_id", + label=["label1", "label2"], + ) + + client.request.assert_called_once_with( + "get", + "/v1/beam/analyses/", + params={ + "updated.gt": "2016-03-01", + "updated.gte": "2016-03-01", + "updated.lt": "2016-04-01", + "updated.lte": "2016-04-01", + "q": "query", + "status": "active", + "group_id": "group_id", + "demand_type.interval": "week", + "demand_type.industry": "retail", + "readiness_status": "ready,not_ready", + "include_deleted": 1, + "sort": "rank,-start", + "offset": 10, + "limit": 10, + "external_id": "external_id", + "label": "label1,label2", + }, + verify=True, + ) + + @with_mock_client( + request_returns=load_fixture("requests_responses/beam_test/test_empty_search") + ) + def test_search_params_dicts(self, client): + client.beam.analysis.search( + updated={ + "gt": "2016-03-01", + "gte": "2016-03-01", + "lt": "2016-04-01", + "lte": "2016-04-01", + }, + q="query", + status="active", + group_id="group_id", + demand_type={"interval": "week", "industry": "retail"}, + readiness_status=["ready", "not_ready"], + include_deleted=True, + sort=["rank", "-start"], + offset=10, + limit=10, + external_id="external_id", + label=["label1", "label2"], + ) + + client.request.assert_called_once_with( + "get", + "/v1/beam/analyses/", + params={ + "updated.gt": "2016-03-01", + "updated.gte": "2016-03-01", + "updated.lt": "2016-04-01", + "updated.lte": "2016-04-01", + "q": "query", + "status": "active", + "group_id": "group_id", + "demand_type.interval": "week", + "demand_type.industry": "retail", + "readiness_status": "ready,not_ready", + "include_deleted": 1, + "sort": "rank,-start", + "offset": 10, + "limit": 10, + "external_id": "external_id", + "label": "label1,label2", + }, + verify=True, + ) + + @with_mock_client( + request_returns=load_fixture("requests_responses/beam_test/test_create") + ) + def test_create_params_underscores(self, client): + result = client.beam.analysis.create( + name="name", + location__geopoint={"lat": 1.1, "lon": 1.2}, + location__radius=1.0, + location__unit="km", + location__google_place_id="google_place_id", + location__geoscope_paths=["geoscope_path1", "geoscope_path2"], + rank__type="type", + rank__levels__phq={"min": 1.0, "max": 2.0}, + rank__levels__local={"min": 3.0, "max": 4.0}, + demand_type__industry="industry", + demand_type__unit_descriptor="unit_descriptor", + demand_type__unit_currency_multiplier=1.4, + demand_type__currency_code="currency_code", + tz="tz", + external_id="external_id", + label=["label1", "label2"], + ) + + client.request.assert_called_once_with( + "post", + "/v1/beam/analyses/", + json={ + "name": "name", + "location": { + "geopoint": {"lat": 1.1, "lon": 1.2}, + "radius": 1.0, + "unit": "km", + "google_place_id": "google_place_id", + "geoscope_paths": ["geoscope_path1", "geoscope_path2"], + }, + "rank": { + "type": "type", + "levels": { + "phq": {"min": 1.0, "max": 2.0}, + "local": {"min": 3.0, "max": 4.0}, + }, + }, + "demand_type": { + "industry": "industry", + "unit_descriptor": "unit_descriptor", + "unit_currency_multiplier": 1.4, + "currency_code": "currency_code", + }, + "tz": "tz", + "external_id": "external_id", + "label": ["label1", "label2"], + }, + verify=True, + ) + assert isinstance(result, CreateAnalysisResponse) + + @with_mock_client( + request_returns=load_fixture("requests_responses/beam_test/test_create") + ) + def test_create_params_dicts(self, client): + result = client.beam.analysis.create( + name="name", + location={ + "geopoint": {"lat": 1.1, "lon": 1.2}, + "radius": 1.0, + "unit": "km", + "google_place_id": "google_place_id", + "geoscope_paths": ["geoscope_path1", "geoscope_path2"], + }, + rank={ + "type": "type", + "levels": { + "phq": {"min": 1.0, "max": 2.0}, + "local": {"min": 3.0, "max": 4.0}, + }, + }, + demand_type={ + "industry": "industry", + "unit_descriptor": "unit_descriptor", + "unit_currency_multiplier": 1.4, + "currency_code": "currency_code", + }, + tz="tz", + external_id="external_id", + label=["label1", "label2"], + ) + + client.request.assert_called_once_with( + "post", + "/v1/beam/analyses/", + json={ + "name": "name", + "location": { + "geopoint": {"lat": 1.1, "lon": 1.2}, + "radius": 1.0, + "unit": "km", + "google_place_id": "google_place_id", + "geoscope_paths": ["geoscope_path1", "geoscope_path2"], + }, + "rank": { + "type": "type", + "levels": { + "phq": {"min": 1.0, "max": 2.0}, + "local": {"min": 3.0, "max": 4.0}, + }, + }, + "demand_type": { + "industry": "industry", + "unit_descriptor": "unit_descriptor", + "unit_currency_multiplier": 1.4, + "currency_code": "currency_code", + }, + "tz": "tz", + "external_id": "external_id", + "label": ["label1", "label2"], + }, + verify=True, + ) + + assert isinstance(result, CreateAnalysisResponse) + + @with_mock_client() + def test_update_params_underscores(self, client): + client.beam.analysis.update( + analysis_id="abc123", + name="name", + location__geopoint={"lat": 1.1, "lon": 1.2}, + location__radius=1.0, + location__unit="km", + location__google_place_id="google_place_id", + location__geoscope_paths=["geoscope_path1", "geoscope_path2"], + rank__type="type", + rank__levels__phq={"min": 1.0, "max": 2.0}, + rank__levels__local={"min": 3.0, "max": 4.0}, + demand_type__industry="industry", + demand_type__unit_descriptor="unit_descriptor", + demand_type__unit_currency_multiplier=1.4, + demand_type__currency_code="currency_code", + tz="tz", + external_id="external_id", + label=["label1", "label2"], + ) + + client.request.assert_called_once_with( + "patch", + "/v1/beam/analyses/abc123/", + json={ + "name": "name", + "location": { + "geopoint": {"lat": 1.1, "lon": 1.2}, + "radius": 1.0, + "unit": "km", + "google_place_id": "google_place_id", + "geoscope_paths": ["geoscope_path1", "geoscope_path2"], + }, + "rank": { + "type": "type", + "levels": { + "phq": {"min": 1.0, "max": 2.0}, + "local": {"min": 3.0, "max": 4.0}, + }, + }, + "demand_type": { + "industry": "industry", + "unit_descriptor": "unit_descriptor", + "unit_currency_multiplier": 1.4, + "currency_code": "currency_code", + }, + "tz": "tz", + "external_id": "external_id", + "label": ["label1", "label2"], + }, + verify=True, + ) + + @with_mock_client() + def test_update_params_dicts(self, client): + client.beam.analysis.update( + analysis_id="abc123", + name="name", + location={ + "geopoint": {"lat": 1.1, "lon": 1.2}, + "radius": 1.0, + "unit": "km", + "google_place_id": "google_place_id", + "geoscope_paths": ["geoscope_path1", "geoscope_path2"], + }, + rank={ + "type": "type", + "levels": { + "phq": {"min": 1.0, "max": 2.0}, + "local": {"min": 3.0, "max": 4.0}, + }, + }, + demand_type={ + "industry": "industry", + "unit_descriptor": "unit_descriptor", + "unit_currency_multiplier": 1.4, + "currency_code": "currency_code", + }, + tz="tz", + external_id="external_id", + label=["label1", "label2"], + ) + + client.request.assert_called_once_with( + "patch", + "/v1/beam/analyses/abc123/", + json={ + "name": "name", + "location": { + "geopoint": {"lat": 1.1, "lon": 1.2}, + "radius": 1.0, + "unit": "km", + "google_place_id": "google_place_id", + "geoscope_paths": ["geoscope_path1", "geoscope_path2"], + }, + "rank": { + "type": "type", + "levels": { + "phq": {"min": 1.0, "max": 2.0}, + "local": {"min": 3.0, "max": 4.0}, + }, + }, + "demand_type": { + "industry": "industry", + "unit_descriptor": "unit_descriptor", + "unit_currency_multiplier": 1.4, + "currency_code": "currency_code", + }, + "tz": "tz", + "external_id": "external_id", + "label": ["label1", "label2"], + }, + verify=True, + ) + + @with_mock_client() + def test_delete(self, client): + client.beam.analysis.delete(analysis_id="abc123") + + client.request.assert_called_once_with( + "delete", + "/v1/beam/analyses/abc123/", + params={}, + verify=True, + ) + + @with_mock_client() + def test_refresh(self, client): + client.beam.analysis.refresh(analysis_id="abc123") + + client.request.assert_called_once_with( + "post", + "/v1/beam/analyses/abc123/refresh/", + params={}, + verify=True, + ) + + @with_mock_client( + request_returns=load_fixture( + "requests_responses/beam_test/test_empty_correlation" + ) + ) + def test_get_correlation_results_params_underscores(self, client): + client.beam.analysis.get_correlation_results( + analysis_id="abc123", + date__gt="2024-01-01", + date__gte="2024-01-01", + date__lt="2024-01-31", + date__lte="2024-01-31", + offset=10, + limit=10, + include_features=["feature1", "feature2"], + ) + + client.request.assert_called_once_with( + "get", + "/v1/beam/analyses/abc123/correlate/", + params={ + "date.gt": "2024-01-01", + "date.gte": "2024-01-01", + "date.lt": "2024-01-31", + "date.lte": "2024-01-31", + "offset": 10, + "limit": 10, + "include_features": "feature1,feature2", + }, + verify=True, + ) + + @with_mock_client( + request_returns=load_fixture( + "requests_responses/beam_test/test_empty_correlation" + ) + ) + def test_get_correlation_results_empty_params_dicts(self, client): + client.beam.analysis.get_correlation_results( + analysis_id="abc123", + date={ + "gt": "2024-01-01", + "gte": "2024-01-01", + "lt": "2024-01-31", + "lte": "2024-01-31", + }, + offset=10, + limit=10, + include_features=["feature1", "feature2"], + ) + + client.request.assert_called_once_with( + "get", + "/v1/beam/analyses/abc123/correlate/", + params={ + "date.gt": "2024-01-01", + "date.gte": "2024-01-01", + "date.lt": "2024-01-31", + "date.lte": "2024-01-31", + "offset": 10, + "limit": 10, + "include_features": "feature1,feature2", + }, + verify=True, + ) + + @with_mock_client( + request_returns=load_fixture("requests_responses/beam_test/test_correlation") + ) + def test_get_correlation_results_params_dicts(self, client): + result = client.beam.analysis.get_correlation_results( + analysis_id="abc123", + date={ + "gt": "2024-01-01", + "gte": "2024-01-01", + "lt": "2024-01-31", + "lte": "2024-01-31", + }, + offset=10, + limit=10, + include_features=["feature1", "feature2"], + ) + + client.request.assert_called_once_with( + "get", + "/v1/beam/analyses/abc123/correlate/", + params={ + "date.gt": "2024-01-01", + "date.gte": "2024-01-01", + "date.lt": "2024-01-31", + "date.lte": "2024-01-31", + "offset": 10, + "limit": 10, + "include_features": "feature1,feature2", + }, + verify=True, + ) + + assert isinstance(result, CorrelationResultSet) + + @with_mock_client( + request_returns=load_fixture( + "requests_responses/beam_test/test_empty_feature_importance" + ) + ) + def test_feature_empty_importance(self, client): + client.beam.analysis.get_feature_importance(analysis_id="abc123") + + client.request.assert_called_once_with( + "get", + "/v1/beam/analyses/abc123/feature-importance/", + params={}, + verify=True, + ) + + @with_mock_client( + request_returns=load_fixture( + "requests_responses/beam_test/test_feature_importance" + ) + ) + def test_feature_importance(self, client): + result = client.beam.analysis.get_feature_importance(analysis_id="abc123") + + client.request.assert_called_once_with( + "get", + "/v1/beam/analyses/abc123/feature-importance/", + params={}, + verify=True, + ) + assert isinstance(result, FeatureImportance) + + @with_mock_client( + request_returns=load_fixture("requests_responses/beam_test/test_analysis") + ) + def test_get_analysis(self, client): + result = client.beam.analysis.get(analysis_id="abc123") + + client.request.assert_called_once_with( + "get", + "/v1/beam/analyses/abc123/", + params={}, + verify=True, + ) + assert isinstance(result, Analysis) + + @with_mock_client( + request_returns=load_fixture("requests_responses/beam_test/test_create_group") + ) + def test_create_group_params_underscores(self, client): + result = client.beam.analysis_group.create( + name="name", + analysis_ids=["analysis_id1", "analysis_id2"], + demand_type__unit_descriptor="unit_descriptor", + ) + + client.request.assert_called_once_with( + "post", + "/v1/beam/analysis-groups/", + json={ + "name": "name", + "analysis_ids": ["analysis_id1", "analysis_id2"], + "demand_type": {"unit_descriptor": "unit_descriptor"}, + }, + verify=True, + ) + + assert isinstance(result, CreateAnalysisGroupResponse) + + @with_mock_client( + request_returns=load_fixture("requests_responses/beam_test/test_create_group") + ) + def test_create_group_params_dicts(self, client): + result = client.beam.analysis_group.create( + name="name", + analysis_ids=["analysis_id1", "analysis_id2"], + demand_type={"unit_descriptor": "unit_descriptor"}, + ) + + client.request.assert_called_once_with( + "post", + "/v1/beam/analysis-groups/", + json={ + "name": "name", + "analysis_ids": ["analysis_id1", "analysis_id2"], + "demand_type": {"unit_descriptor": "unit_descriptor"}, + }, + verify=True, + ) + + assert isinstance(result, CreateAnalysisGroupResponse) + + @with_mock_client( + request_returns=load_fixture("requests_responses/beam_test/test_group_search") + ) + def test_search_group(self, client): + result = client.beam.analysis_group.search() + + client.request.assert_called_once_with( + "get", + "/v1/beam/analysis-groups/", + params={}, + verify=True, + ) + + assert isinstance(result, AnalysisGroupResultSet) + + @with_mock_client( + request_returns=load_fixture( + "requests_responses/beam_test/test_empty_group_search" + ) + ) + def test_search_group_params_underscores(self, client): + client.beam.analysis_group.search( + updated__gt="2016-03-01", + updated__gte="2016-03-01", + updated__lt="2016-04-01", + updated__lte="2016-04-01", + q="query", + status=["active", "inactive"], + demand_type__interval=["week", "month"], + demand_type__industry=["retail", "hospitality"], + readiness_status=["ready", "not_ready"], + include_deleted=True, + sort=["rank", "-start"], + offset=10, + limit=10, + ) + + client.request.assert_called_once_with( + "get", + "/v1/beam/analysis-groups/", + params={ + "updated.gt": "2016-03-01", + "updated.gte": "2016-03-01", + "updated.lt": "2016-04-01", + "updated.lte": "2016-04-01", + "q": "query", + "status": "active,inactive", + "demand_type.interval": "week,month", + "demand_type.industry": "retail,hospitality", + "readiness_status": "ready,not_ready", + "include_deleted": 1, + "sort": "rank,-start", + "offset": 10, + "limit": 10, + }, + verify=True, + ) + + @with_mock_client( + request_returns=load_fixture( + "requests_responses/beam_test/test_empty_group_search" + ) + ) + def test_search_group_params_dicts(self, client): + client.beam.analysis_group.search( + updated={ + "gt": "2016-03-01", + "gte": "2016-03-01", + "lt": "2016-04-01", + "lte": "2016-04-01", + }, + q="query", + status="active,inactive", + demand_type={ + "interval": "week,month", + "industry": "retail,hospitality", + }, + readiness_status="ready,not_ready", + include_deleted=1, + sort="rank,-start", + offset=10, + limit=10, + ) + + client.request.assert_called_once_with( + "get", + "/v1/beam/analysis-groups/", + params={ + "updated.gt": "2016-03-01", + "updated.gte": "2016-03-01", + "updated.lt": "2016-04-01", + "updated.lte": "2016-04-01", + "q": "query", + "status": "active,inactive", + "demand_type.interval": "week,month", + "demand_type.industry": "retail,hospitality", + "readiness_status": "ready,not_ready", + "include_deleted": 1, + "sort": "rank,-start", + "offset": 10, + "limit": 10, + }, + verify=True, + ) + + @with_mock_client( + request_returns=load_fixture("requests_responses/beam_test/test_analysis_group") + ) + def test_get_analysis_group(self, client): + result = client.beam.analysis_group.get(group_id="abc123") + + client.request.assert_called_once_with( + "get", + "/v1/beam/analysis-groups/abc123/", + params={}, + verify=True, + ) + assert isinstance(result, AnalysisGroup) + + @with_mock_client() + def test_update_group_params_underscores(self, client): + client.beam.analysis_group.update( + group_id="abc123", + name="name", + analysis_ids=["analysis_id1", "analysis_id2"], + demand_type__unit_descriptor="unit_descriptor", + ) + + client.request.assert_called_once_with( + "patch", + "/v1/beam/analysis-groups/abc123/", + json={ + "name": "name", + "analysis_ids": ["analysis_id1", "analysis_id2"], + "demand_type": {"unit_descriptor": "unit_descriptor"}, + }, + verify=True, + ) + + @with_mock_client() + def test_update_group_params_dicts(self, client): + client.beam.analysis_group.update( + group_id="abc123", + name="name", + analysis_ids=["analysis_id1", "analysis_id2"], + demand_type={"unit_descriptor": "unit_descriptor"}, + ) + + client.request.assert_called_once_with( + "patch", + "/v1/beam/analysis-groups/abc123/", + json={ + "name": "name", + "analysis_ids": ["analysis_id1", "analysis_id2"], + "demand_type": {"unit_descriptor": "unit_descriptor"}, + }, + verify=True, + ) + + @with_mock_client() + def test_delete_group(self, client): + client.beam.analysis_group.delete(group_id="abc123") + + client.request.assert_called_once_with( + "delete", + "/v1/beam/analysis-groups/abc123/", + params={}, + verify=True, + ) + + @with_mock_client() + def test_refresh_group(self, client): + client.beam.analysis_group.refresh(group_id="abc123") + + client.request.assert_called_once_with( + "post", + "/v1/beam/analysis-groups/abc123/refresh/", + params={}, + verify=True, + ) + + @with_mock_client( + request_returns=load_fixture( + "requests_responses/beam_test/test_empty_feature_importance" + ) + ) + def test_group_feature_empty_importance(self, client): + client.beam.analysis_group.get_feature_importance(group_id="abc123") + + client.request.assert_called_once_with( + "get", + "/v1/beam/analysis-groups/abc123/feature-importance/", + params={}, + verify=True, + ) + + @with_mock_client( + request_returns=load_fixture( + "requests_responses/beam_test/test_feature_importance" + ) + ) + def test_group_feature_importance(self, client): + result = client.beam.analysis_group.get_feature_importance(group_id="abc123") + + client.request.assert_called_once_with( + "get", + "/v1/beam/analysis-groups/abc123/feature-importance/", + params={}, + verify=True, + ) + assert isinstance(result, FeatureImportance) diff --git a/tests/fixtures/requests_responses/beam_test/test_analysis.json b/tests/fixtures/requests_responses/beam_test/test_analysis.json new file mode 100644 index 0000000..33a47ca --- /dev/null +++ b/tests/fixtures/requests_responses/beam_test/test_analysis.json @@ -0,0 +1,64 @@ +{ + "name": "SDK Test", + "location": { + "geopoint": { + "lat": "37.7749", + "lon": "-122.4194" + }, + "radius": 3345.52, + "unit": "m", + "google_place_id": null + }, + "rank": { + "type": "local", + "levels": { + "phq": null, + "local": { + "min": 35, + "max": null + } + } + }, + "user_id": null, + "access_type": "full", + "status": "active", + "readiness_status": "ready", + "readiness_checks": { + "date_range": { + "start": "2019-01-01T00:00:00", + "end": "2021-09-26T00:00:00" + }, + "error_code": null, + "missing_dates": [], + "validation_response": { + "missing_data_percentage": 0.0, + "consecutive_nan": 0 + }, + "best_practice": false, + "best_practice_checks": { + "industry": false, + "rank": true, + "radius": true + } + }, + "processing_completed": { + "correlation": true, + "feature_importance": true, + "value_quant": true + }, + "demand_type": { + "interval": "day", + "week_start_day": null, + "industry": "other", + "unit_descriptor": "omitted", + "currency_code": "USD", + "unit_currency_multiplier": 1.0 + }, + "group_ids": null, + "tz": "America/Los_Angeles", + "create_dt": "2025-01-15T00:30:44Z", + "update_dt": "2025-01-15T00:53:48Z", + "processed_dt": "2025-01-15T00:53:30Z", + "external_id": null, + "label": null +} \ No newline at end of file diff --git a/tests/fixtures/requests_responses/beam_test/test_analysis_group.json b/tests/fixtures/requests_responses/beam_test/test_analysis_group.json new file mode 100644 index 0000000..4423e72 --- /dev/null +++ b/tests/fixtures/requests_responses/beam_test/test_analysis_group.json @@ -0,0 +1,34 @@ +{ + "name": "test group", + "analysis_ids": [ + "2r2f23f2", + "sgds2356" + ], + "user_id": "sdf25g", + "processing_completed": { + "feature_importance": true, + "value_quant": true, + "excluded_analyses": [ + { + "analysis_id": "sdgsg35", + "reason": "analysis_deleted", + "excluded_from": [ + "feature_importance", + "value_quant" + ] + } + ] + }, + "readiness_status": "ready", + "demand_type": { + "interval": "day", + "week_start_day": null, + "industry": "retail", + "unit_descriptor": "Sales", + "currency_code": "USD" + }, + "status": "active", + "create_dt": "2024-09-13T03:59:45Z", + "update_dt": "2024-12-17T01:55:45Z", + "processed_dt": "2024-12-17T01:55:46Z" +} \ No newline at end of file diff --git a/tests/fixtures/requests_responses/beam_test/test_correlation.json b/tests/fixtures/requests_responses/beam_test/test_correlation.json new file mode 100644 index 0000000..999ff2d --- /dev/null +++ b/tests/fixtures/requests_responses/beam_test/test_correlation.json @@ -0,0 +1,1168 @@ +{ + "count": 30, + "previous": null, + "next": null, + "model_version": "2.3.1", + "version": 6, + "dates": [ + { + "date": "2021-06-01", + "actual_demand": 96.0, + "baseline_demand": 106.05615230186515, + "remainder": -10.056152301865154, + "impact_significance": "NO_IMPACT", + "impact_significance_score": 0, + "features": { + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_rank_observances": { + "rank_levels": { + "2": 1, + "3": 2 + } + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + } + }, + "phq_impact_sum": 0, + "phq_spend_sum": 0, + "phq_attendance_sum": 18820, + "phq_rank_count": 9 + }, + { + "date": "2021-06-02", + "actual_demand": 97.0, + "baseline_demand": 106.98993686596805, + "remainder": -9.989936865968048, + "impact_significance": "NO_IMPACT", + "impact_significance_score": 0, + "features": { + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + } + }, + "phq_impact_sum": 0, + "phq_spend_sum": 0, + "phq_attendance_sum": 18820, + "phq_rank_count": 6 + }, + { + "date": "2021-06-03", + "actual_demand": 108.0, + "baseline_demand": 107.78619345008876, + "remainder": 0.21380654991124004, + "impact_significance": "WEAK", + "impact_significance_score": 1, + "features": { + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_rank_observances": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + } + }, + "phq_impact_sum": 0, + "phq_spend_sum": 0, + "phq_attendance_sum": 18820, + "phq_rank_count": 7 + }, + { + "date": "2021-06-04", + "actual_demand": 104.0, + "baseline_demand": 106.09708199255878, + "remainder": -2.0970819925587847, + "impact_significance": "NO_IMPACT", + "impact_significance_score": 0, + "features": { + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + } + }, + "phq_impact_sum": 0, + "phq_spend_sum": 0, + "phq_attendance_sum": 18820, + "phq_rank_count": 6 + }, + { + "date": "2021-06-05", + "actual_demand": 85.0, + "baseline_demand": 90.29705752901104, + "remainder": -5.297057529011042, + "impact_significance": "NO_IMPACT", + "impact_significance_score": 0, + "features": { + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + } + }, + "phq_impact_sum": 0, + "phq_spend_sum": 0, + "phq_attendance_sum": 18820, + "phq_rank_count": 6 + }, + { + "date": "2021-06-06", + "actual_demand": 84.0, + "baseline_demand": 77.76561500510894, + "remainder": 6.234384994891059, + "impact_significance": "WEAK", + "impact_significance_score": 1, + "features": { + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + } + }, + "phq_impact_sum": 0, + "phq_spend_sum": 0, + "phq_attendance_sum": 18820, + "phq_rank_count": 6 + }, + { + "date": "2021-06-07", + "actual_demand": 94.0, + "baseline_demand": 89.68251774264668, + "remainder": 4.317482257353319, + "impact_significance": "WEAK", + "impact_significance_score": 1, + "features": { + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + } + }, + "phq_impact_sum": 0, + "phq_spend_sum": 0, + "phq_attendance_sum": 18820, + "phq_rank_count": 6 + }, + { + "date": "2021-06-08", + "actual_demand": 98.0, + "baseline_demand": 104.79481768246053, + "remainder": -6.794817682460533, + "impact_significance": "NO_IMPACT", + "impact_significance_score": 0, + "features": { + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + } + }, + "phq_impact_sum": 0, + "phq_spend_sum": 0, + "phq_attendance_sum": 18820, + "phq_rank_count": 6 + }, + { + "date": "2021-06-09", + "actual_demand": 118.0, + "baseline_demand": 106.99744606698593, + "remainder": 11.00255393301407, + "impact_significance": "WEAK", + "impact_significance_score": 1, + "features": { + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + } + }, + "phq_impact_sum": 0, + "phq_spend_sum": 0, + "phq_attendance_sum": 18820, + "phq_rank_count": 6 + }, + { + "date": "2021-06-10", + "actual_demand": 93.0, + "baseline_demand": 109.22977624427338, + "remainder": -16.22977624427338, + "impact_significance": "NO_IMPACT", + "impact_significance_score": 0, + "features": { + "phq_attendance_concerts": { + "sum": 1154 + }, + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_spend_concerts": { + "sum": 25444 + }, + "phq_spend_concerts_accommodation": { + "sum": 3920 + }, + "phq_spend_concerts_hospitality": { + "sum": 12188 + }, + "phq_spend_concerts_transportation": { + "sum": 9334 + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + } + }, + "phq_impact_sum": 0, + "phq_spend_sum": 50886, + "phq_attendance_sum": 19974, + "phq_rank_count": 6 + }, + { + "date": "2021-06-11", + "actual_demand": 91.0, + "baseline_demand": 110.31791642300257, + "remainder": -19.317916423002572, + "impact_significance": "MEDIUM", + "impact_significance_score": 2, + "features": { + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + } + }, + "phq_impact_sum": 0, + "phq_spend_sum": 0, + "phq_attendance_sum": 18820, + "phq_rank_count": 6 + }, + { + "date": "2021-06-12", + "actual_demand": 95.0, + "baseline_demand": 95.6506657272828, + "remainder": -0.6506657272827994, + "impact_significance": "NO_IMPACT", + "impact_significance_score": 0, + "features": { + "phq_attendance_concerts": { + "sum": 822 + }, + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_spend_concerts": { + "sum": 20195 + }, + "phq_spend_concerts_accommodation": { + "sum": 3921 + }, + "phq_spend_concerts_hospitality": { + "sum": 9216 + }, + "phq_spend_concerts_transportation": { + "sum": 7057 + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + } + }, + "phq_impact_sum": 0, + "phq_spend_sum": 40389, + "phq_attendance_sum": 19642, + "phq_rank_count": 6 + }, + { + "date": "2021-06-13", + "actual_demand": 76.0, + "baseline_demand": 82.95270472073167, + "remainder": -6.952704720731674, + "impact_significance": "NO_IMPACT", + "impact_significance_score": 0, + "features": { + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + } + }, + "phq_impact_sum": 0, + "phq_spend_sum": 0, + "phq_attendance_sum": 18820, + "phq_rank_count": 6 + }, + { + "date": "2021-06-14", + "actual_demand": 97.0, + "baseline_demand": 93.59407396673511, + "remainder": 3.4059260332648904, + "impact_significance": "WEAK", + "impact_significance_score": 1, + "features": { + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_rank_observances": { + "rank_levels": { + "3": 1, + "4": 1 + } + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + } + }, + "phq_impact_sum": 0, + "phq_spend_sum": 0, + "phq_attendance_sum": 18820, + "phq_rank_count": 8 + }, + { + "date": "2021-06-15", + "actual_demand": 104.0, + "baseline_demand": 105.7583549266292, + "remainder": -1.7583549266291953, + "impact_significance": "NO_IMPACT", + "impact_significance_score": 0, + "features": { + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + } + }, + "phq_impact_sum": 0, + "phq_spend_sum": 0, + "phq_attendance_sum": 18820, + "phq_rank_count": 6 + }, + { + "date": "2021-06-16", + "actual_demand": 88.0, + "baseline_demand": 103.1721650429274, + "remainder": -15.172165042927404, + "impact_significance": "NO_IMPACT", + "impact_significance_score": 0, + "features": { + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + } + }, + "phq_impact_sum": 0, + "phq_spend_sum": 0, + "phq_attendance_sum": 18820, + "phq_rank_count": 6 + }, + { + "date": "2021-06-17", + "actual_demand": 102.0, + "baseline_demand": 100.69169170492215, + "remainder": 1.3083082950778504, + "impact_significance": "WEAK", + "impact_significance_score": 1, + "features": { + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + } + }, + "phq_impact_sum": 0, + "phq_spend_sum": 0, + "phq_attendance_sum": 18820, + "phq_rank_count": 6 + }, + { + "date": "2021-06-18", + "actual_demand": 118.0, + "baseline_demand": 98.10072896104927, + "remainder": 19.89927103895073, + "impact_significance": "MEDIUM", + "impact_significance_score": 2, + "features": { + "phq_attendance_concerts": { + "sum": 787 + }, + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_spend_concerts": { + "sum": 19355 + }, + "phq_spend_concerts_accommodation": { + "sum": 3758 + }, + "phq_spend_concerts_hospitality": { + "sum": 8832 + }, + "phq_spend_concerts_transportation": { + "sum": 6764 + }, + "phq_rank_observances": { + "rank_levels": { + "2": 1 + } + }, + "phq_rank_public_holidays": { + "rank_levels": { + "4": 1, + "5": 1 + } + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + }, + "phq_impact_severe_weather_thunderstorm_retail": { + "sum": 56, + "max": 56 + } + }, + "phq_impact_sum": 56, + "phq_spend_sum": 38709, + "phq_attendance_sum": 19607, + "phq_rank_count": 9 + }, + { + "date": "2021-06-19", + "actual_demand": 80.0, + "baseline_demand": 79.90844533909288, + "remainder": 0.09155466090712139, + "impact_significance": "WEAK", + "impact_significance_score": 1, + "features": { + "phq_attendance_community": { + "sum": 280 + }, + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_spend_community": { + "sum": 2848 + }, + "phq_spend_community_hospitality": { + "sum": 1885 + }, + "phq_spend_community_transportation": { + "sum": 962 + }, + "phq_rank_observances": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_public_holidays": { + "rank_levels": { + "4": 1, + "5": 2 + } + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + }, + "phq_impact_severe_weather_thunderstorm_retail": { + "sum": 56, + "max": 56 + } + }, + "phq_impact_sum": 56, + "phq_spend_sum": 5695, + "phq_attendance_sum": 19100, + "phq_rank_count": 10 + }, + { + "date": "2021-06-20", + "actual_demand": 84.0, + "baseline_demand": 67.07823205057903, + "remainder": 16.921767949420968, + "impact_significance": "WEAK", + "impact_significance_score": 1, + "features": { + "phq_attendance_concerts": { + "sum": 246 + }, + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_spend_concerts": { + "sum": 3901 + }, + "phq_spend_concerts_hospitality": { + "sum": 2209 + }, + "phq_spend_concerts_transportation": { + "sum": 1692 + }, + "phq_rank_observances": { + "rank_levels": { + "2": 2, + "5": 1 + } + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + }, + "phq_impact_severe_weather_thunderstorm_retail": { + "sum": 25, + "max": 25 + } + }, + "phq_impact_sum": 25, + "phq_spend_sum": 7802, + "phq_attendance_sum": 19066, + "phq_rank_count": 9 + }, + { + "date": "2021-06-21", + "actual_demand": 91.0, + "baseline_demand": 79.1158828855306, + "remainder": 11.884117114469404, + "impact_significance": "WEAK", + "impact_significance_score": 1, + "features": { + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + } + }, + "phq_impact_sum": 0, + "phq_spend_sum": 0, + "phq_attendance_sum": 18820, + "phq_rank_count": 6 + }, + { + "date": "2021-06-22", + "actual_demand": 96.0, + "baseline_demand": 93.64346589904916, + "remainder": 2.3565341009508387, + "impact_significance": "WEAK", + "impact_significance_score": 1, + "features": { + "phq_attendance_concerts": { + "sum": 822 + }, + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_spend_concerts": { + "sum": 20230 + }, + "phq_spend_concerts_accommodation": { + "sum": 3928 + }, + "phq_spend_concerts_hospitality": { + "sum": 9232 + }, + "phq_spend_concerts_transportation": { + "sum": 7069 + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + } + }, + "phq_impact_sum": 0, + "phq_spend_sum": 40459, + "phq_attendance_sum": 19642, + "phq_rank_count": 6 + }, + { + "date": "2021-06-23", + "actual_demand": 88.0, + "baseline_demand": 95.74263012317203, + "remainder": -7.7426301231720345, + "impact_significance": "NO_IMPACT", + "impact_significance_score": 0, + "features": { + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + } + }, + "phq_impact_sum": 0, + "phq_spend_sum": 0, + "phq_attendance_sum": 18820, + "phq_rank_count": 6 + }, + { + "date": "2021-06-24", + "actual_demand": 96.0, + "baseline_demand": 99.68731430141152, + "remainder": -3.6873143014115186, + "impact_significance": "NO_IMPACT", + "impact_significance_score": 0, + "features": { + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + } + }, + "phq_impact_sum": 0, + "phq_spend_sum": 0, + "phq_attendance_sum": 18820, + "phq_rank_count": 6 + }, + { + "date": "2021-06-25", + "actual_demand": 97.0, + "baseline_demand": 102.57127927550286, + "remainder": -5.57127927550286, + "impact_significance": "NO_IMPACT", + "impact_significance_score": 0, + "features": { + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + } + }, + "phq_impact_sum": 0, + "phq_spend_sum": 0, + "phq_attendance_sum": 18820, + "phq_rank_count": 6 + }, + { + "date": "2021-06-26", + "actual_demand": 75.0, + "baseline_demand": 89.9836068363395, + "remainder": -14.983606836339504, + "impact_significance": "NO_IMPACT", + "impact_significance_score": 0, + "features": { + "phq_attendance_concerts": { + "sum": 319 + }, + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_spend_concerts": { + "sum": 5064 + }, + "phq_spend_concerts_hospitality": { + "sum": 2868 + }, + "phq_spend_concerts_transportation": { + "sum": 2196 + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + } + }, + "phq_impact_sum": 0, + "phq_spend_sum": 10128, + "phq_attendance_sum": 19139, + "phq_rank_count": 6 + }, + { + "date": "2021-06-27", + "actual_demand": 88.0, + "baseline_demand": 80.16344951178947, + "remainder": 7.836550488210534, + "impact_significance": "WEAK", + "impact_significance_score": 1, + "features": { + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + }, + "phq_impact_severe_weather_flood_retail": { + "sum": 10, + "max": 10 + } + }, + "phq_impact_sum": 10, + "phq_spend_sum": 0, + "phq_attendance_sum": 18820, + "phq_rank_count": 6 + }, + { + "date": "2021-06-28", + "actual_demand": 105.0, + "baseline_demand": 93.81334859988509, + "remainder": 11.186651400114911, + "impact_significance": "WEAK", + "impact_significance_score": 1, + "features": { + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + }, + "phq_impact_severe_weather_flood_retail": { + "sum": 21, + "max": 21 + } + }, + "phq_impact_sum": 21, + "phq_spend_sum": 0, + "phq_attendance_sum": 18820, + "phq_rank_count": 6 + }, + { + "date": "2021-06-29", + "actual_demand": 109.0, + "baseline_demand": 107.64564801761523, + "remainder": 1.3543519823847703, + "impact_significance": "WEAK", + "impact_significance_score": 1, + "features": { + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + }, + "phq_impact_severe_weather_flood_retail": { + "sum": 56, + "max": 56 + } + }, + "phq_impact_sum": 56, + "phq_spend_sum": 0, + "phq_attendance_sum": 18820, + "phq_rank_count": 6 + }, + { + "date": "2021-06-30", + "actual_demand": 86.0, + "baseline_demand": 106.41714640075705, + "remainder": -20.417146400757048, + "impact_significance": "MEDIUM", + "impact_significance_score": 2, + "features": { + "phq_attendance_school_holidays": { + "sum": 18820 + }, + "phq_rank_school_holidays": { + "rank_levels": { + "3": 3, + "4": 1 + } + }, + "phq_rank_academic_session": { + "rank_levels": { + "3": 1 + } + }, + "phq_rank_academic_holiday": { + "rank_levels": { + "4": 1 + } + }, + "phq_impact_severe_weather_flood_retail": { + "sum": 31, + "max": 31 + } + }, + "phq_impact_sum": 31, + "phq_spend_sum": 0, + "phq_attendance_sum": 18820, + "phq_rank_count": 6 + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/requests_responses/beam_test/test_create.json b/tests/fixtures/requests_responses/beam_test/test_create.json new file mode 100644 index 0000000..3c7a2f4 --- /dev/null +++ b/tests/fixtures/requests_responses/beam_test/test_create.json @@ -0,0 +1,3 @@ +{ + "analysis_id": "abc123" +} \ No newline at end of file diff --git a/tests/fixtures/requests_responses/beam_test/test_create_group.json b/tests/fixtures/requests_responses/beam_test/test_create_group.json new file mode 100644 index 0000000..3540f1b --- /dev/null +++ b/tests/fixtures/requests_responses/beam_test/test_create_group.json @@ -0,0 +1,3 @@ +{ + "group_id": "abc123" +} \ No newline at end of file diff --git a/tests/fixtures/requests_responses/beam_test/test_empty_correlation.json b/tests/fixtures/requests_responses/beam_test/test_empty_correlation.json new file mode 100644 index 0000000..717649d --- /dev/null +++ b/tests/fixtures/requests_responses/beam_test/test_empty_correlation.json @@ -0,0 +1,6 @@ +{ + "model_version": "1.0", + "version": 1, + "dates": [], + "count": 0 +} \ No newline at end of file diff --git a/tests/fixtures/requests_responses/beam_test/test_empty_feature_importance.json b/tests/fixtures/requests_responses/beam_test/test_empty_feature_importance.json new file mode 100644 index 0000000..c14f62c --- /dev/null +++ b/tests/fixtures/requests_responses/beam_test/test_empty_feature_importance.json @@ -0,0 +1,100 @@ +{ + "feature_importance": [ + { + "feature_group": "concerts", + "features": [ + "phq_attendance_concerts" + ], + "p_value": 0.0, + "important": true + }, + { + "feature_group": "severe-weather", + "features": [ + "phq_impact_severe_weather_heat_wave_retail" + ], + "p_value": 0.0015, + "important": true + }, + { + "feature_group": "performing-arts", + "features": [ + "phq_attendance_performing_arts" + ], + "p_value": 0.2646, + "important": false + }, + { + "feature_group": "school-holidays", + "features": [ + "phq_attendance_school_holidays" + ], + "p_value": 0.4283, + "important": false + }, + { + "feature_group": "festivals", + "features": [ + "phq_attendance_festivals" + ], + "p_value": 0.4689, + "important": false + }, + { + "feature_group": "public-holidays", + "features": [ + "phq_rank_public_holidays" + ], + "p_value": 0.5, + "important": false + }, + { + "feature_group": "expos", + "features": [ + "phq_attendance_expos" + ], + "p_value": 0.5611, + "important": false + }, + { + "feature_group": "conferences", + "features": [ + "phq_attendance_conferences" + ], + "p_value": 0.9605, + "important": false + }, + { + "feature_group": "observances", + "features": [ + "phq_rank_observances" + ], + "p_value": 0.9945, + "important": false + }, + { + "feature_group": "sports", + "features": [ + "phq_attendance_sports" + ], + "p_value": 0.9974, + "important": false + }, + { + "feature_group": "community", + "features": [ + "phq_attendance_community" + ], + "p_value": 0.998, + "important": false + }, + { + "feature_group": "academic", + "features": [ + "phq_rank_academic_holiday" + ], + "p_value": 0.999, + "important": false + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/requests_responses/beam_test/test_empty_group_search.json b/tests/fixtures/requests_responses/beam_test/test_empty_group_search.json new file mode 100644 index 0000000..58111f6 --- /dev/null +++ b/tests/fixtures/requests_responses/beam_test/test_empty_group_search.json @@ -0,0 +1,4 @@ +{ + "count": 88, + "groups": [] +} \ No newline at end of file diff --git a/tests/fixtures/requests_responses/beam_test/test_empty_search.json b/tests/fixtures/requests_responses/beam_test/test_empty_search.json new file mode 100644 index 0000000..9ebb62b --- /dev/null +++ b/tests/fixtures/requests_responses/beam_test/test_empty_search.json @@ -0,0 +1,4 @@ +{ + "count": 0, + "analyses": [] +} \ No newline at end of file diff --git a/tests/fixtures/requests_responses/beam_test/test_feature_importance.json b/tests/fixtures/requests_responses/beam_test/test_feature_importance.json new file mode 100644 index 0000000..3681e3b --- /dev/null +++ b/tests/fixtures/requests_responses/beam_test/test_feature_importance.json @@ -0,0 +1,3 @@ +{ + "feature_importance": [] +} \ No newline at end of file diff --git a/tests/fixtures/requests_responses/beam_test/test_group_search.json b/tests/fixtures/requests_responses/beam_test/test_group_search.json new file mode 100644 index 0000000..aef9fca --- /dev/null +++ b/tests/fixtures/requests_responses/beam_test/test_group_search.json @@ -0,0 +1,308 @@ +{ + "count": 88, + "groups": [ + { + "group_id": "abc123", + "name": "test group name", + "analysis_ids": [ + "id1", + "id2" + ], + "user_id": "test user id", + "processing_completed": { + "feature_importance": true, + "value_quant": true, + "excluded_analyses": [ + { + "analysis_id": "analysis id", + "reason": "analysis_deleted", + "excluded_from": [ + "feature_importance", + "value_quant" + ] + } + ] + }, + "readiness_status": "ready", + "demand_type": { + "interval": "day", + "week_start_day": null, + "industry": "retail", + "unit_descriptor": "Sales", + "currency_code": "USD" + }, + "status": "active", + "create_dt": "2024-09-13T03:59:45Z", + "update_dt": "2024-12-17T01:55:45Z", + "processed_dt": "2024-12-17T01:55:46Z" + }, + { + "group_id": "abc123", + "name": "test group name", + "analysis_ids": [ + "id1", + "id2" + ], + "user_id": "test user id", + "processing_completed": { + "feature_importance": true, + "value_quant": true, + "excluded_analyses": [] + }, + "readiness_status": "ready", + "demand_type": { + "interval": "week", + "week_start_day": "monday", + "industry": null, + "unit_descriptor": "Sales", + "currency_code": "USD" + }, + "status": "active", + "create_dt": "2024-05-16T21:14:03.204830Z", + "update_dt": "2024-12-15T20:45:24Z", + "processed_dt": "2024-12-15T20:45:26Z" + }, + { + "group_id": "abc123", + "name": "test group name", + "analysis_ids": [ + "id1", + "id2" + ], + "user_id": "test user id", + "processing_completed": { + "feature_importance": false, + "value_quant": false, + "excluded_analyses": [ + { + "analysis_id": "analysis id", + "reason": "analysis_demand_type_inconsistent", + "excluded_from": [ + "feature_importance", + "value_quant" + ] + }, + { + "analysis_id": "analysis id", + "reason": "analysis_demand_type_inconsistent", + "excluded_from": [ + "feature_importance", + "value_quant" + ] + } + ] + }, + "readiness_status": "failed", + "demand_type": { + "interval": "day", + "week_start_day": null, + "industry": null, + "unit_descriptor": "omitted", + "currency_code": "USD" + }, + "status": "active", + "create_dt": "2024-05-07T01:45:28.369118Z", + "update_dt": "2024-11-04T03:35:35Z", + "processed_dt": "2024-11-04T03:36:02Z" + }, + { + "group_id": "abc123", + "name": "test group name", + "analysis_ids": [ + "id1", + "id2" + ], + "user_id": "test user id", + "processing_completed": { + "feature_importance": false, + "value_quant": false, + "excluded_analyses": [ + { + "analysis_id": "analysis id", + "reason": "analysis_demand_type_inconsistent", + "excluded_from": [ + "feature_importance", + "value_quant" + ] + }, + { + "analysis_id": "analysis id", + "reason": "analysis_demand_type_inconsistent", + "excluded_from": [ + "feature_importance", + "value_quant" + ] + } + ] + }, + "readiness_status": "failed", + "demand_type": { + "interval": "day", + "week_start_day": null, + "industry": null, + "unit_descriptor": "omitted", + "currency_code": "USD" + }, + "status": "active", + "create_dt": "2024-05-03T01:17:21.981509Z", + "update_dt": "2024-11-04T03:35:35Z", + "processed_dt": "2024-11-04T03:36:03Z" + }, + { + "group_id": "abc123", + "name": "test group name", + "analysis_ids": [ + "id1", + "id2" + ], + "user_id": "test user id", + "processing_completed": { + "feature_importance": true, + "value_quant": true, + "excluded_analyses": [] + }, + "readiness_status": "ready", + "demand_type": { + "interval": "week", + "week_start_day": "monday", + "industry": null, + "unit_descriptor": "omitted", + "currency_code": "USD" + }, + "status": "active", + "create_dt": "2024-07-17T21:27:50.392447Z", + "update_dt": "2024-10-16T21:31:59Z", + "processed_dt": "2024-10-16T21:40:03Z" + }, + { + "group_id": "abc123", + "name": "test group name", + "analysis_ids": [ + "id1", + "id2" + ], + "user_id": "test user id", + "processing_completed": { + "feature_importance": true, + "value_quant": true, + "excluded_analyses": [] + }, + "readiness_status": "ready", + "demand_type": { + "interval": "day", + "week_start_day": null, + "industry": null, + "unit_descriptor": "omitted", + "currency_code": "USD" + }, + "status": "active", + "create_dt": "2024-05-06T00:10:40.455098Z", + "update_dt": "2024-10-16T21:21:02Z", + "processed_dt": "2024-10-16T21:36:26Z" + }, + { + "group_id": "abc123", + "name": "test group name", + "analysis_ids": [ + "id1", + "id2" + ], + "user_id": "test user id", + "processing_completed": { + "feature_importance": true, + "value_quant": true, + "excluded_analyses": [] + }, + "readiness_status": "ready", + "demand_type": { + "interval": "week", + "week_start_day": "monday", + "industry": null, + "unit_descriptor": "omitted", + "currency_code": "USD" + }, + "status": "active", + "create_dt": "2024-05-16T20:07:33.503432Z", + "update_dt": "2024-10-16T21:14:41Z", + "processed_dt": "2024-10-16T21:19:15Z" + }, + { + "group_id": "abc123", + "name": "test group name", + "analysis_ids": [ + "id1", + "id2" + ], + "user_id": "test user id", + "processing_completed": { + "feature_importance": true, + "value_quant": true, + "excluded_analyses": [] + }, + "readiness_status": "ready", + "demand_type": { + "interval": "day", + "week_start_day": null, + "industry": null, + "unit_descriptor": "omitted", + "currency_code": "USD" + }, + "status": "active", + "create_dt": "2024-05-08T00:04:55.402304Z", + "update_dt": "2024-10-16T21:14:05Z", + "processed_dt": "2024-10-16T21:19:06Z" + }, + { + "group_id": "abc123", + "name": "test group name", + "analysis_ids": [ + "id1", + "id2" + ], + "user_id": "test user id", + "processing_completed": { + "feature_importance": true, + "value_quant": true, + "excluded_analyses": [] + }, + "readiness_status": "ready", + "demand_type": { + "interval": "day", + "week_start_day": null, + "industry": null, + "unit_descriptor": "omitted", + "currency_code": "USD" + }, + "status": "active", + "create_dt": "2024-05-08T00:06:04.760846Z", + "update_dt": "2024-10-16T21:14:05Z", + "processed_dt": "2024-10-16T21:19:05Z" + }, + { + "group_id": "abc123", + "name": "test group name", + "analysis_ids": [ + "id1", + "id2" + ], + "user_id": "test user id", + "processing_completed": { + "feature_importance": true, + "value_quant": true, + "excluded_analyses": [] + }, + "readiness_status": "ready", + "demand_type": { + "interval": "day", + "week_start_day": null, + "industry": null, + "unit_descriptor": "omitted", + "currency_code": "USD" + }, + "status": "active", + "create_dt": "2024-05-07T02:32:16.855072Z", + "update_dt": "2024-10-16T21:13:58Z", + "processed_dt": "2024-10-16T21:31:01Z" + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/requests_responses/beam_test/test_search.json b/tests/fixtures/requests_responses/beam_test/test_search.json new file mode 100644 index 0000000..698e2dc --- /dev/null +++ b/tests/fixtures/requests_responses/beam_test/test_search.json @@ -0,0 +1,673 @@ +{ + "count": 1142, + "analyses": [ + { + "analysis_id": "abc123", + "name": "test name", + "location": { + "geopoint": { + "lat": "37.7749", + "lon": "-122.4194" + }, + "radius": 3345.52, + "unit": "m", + "google_place_id": null + }, + "rank": { + "type": "local", + "levels": { + "phq": null, + "local": { + "min": 35, + "max": null + } + } + }, + "user_id": null, + "access_type": "limited", + "status": "active", + "readiness_status": null, + "readiness_checks": { + "date_range": null, + "error_code": null, + "missing_dates": null, + "validation_response": null, + "best_practice": false, + "best_practice_checks": { + "industry": false, + "rank": true, + "radius": true + } + }, + "processing_completed": { + "correlation": false, + "feature_importance": false, + "value_quant": false + }, + "demand_type": { + "interval": "day", + "week_start_day": null, + "industry": "other", + "unit_descriptor": "omitted", + "currency_code": "USD", + "unit_currency_multiplier": 1.0 + }, + "group_ids": null, + "tz": null, + "create_dt": "2025-01-15T23:45:01Z", + "update_dt": "2025-01-15T23:45:01Z", + "processed_dt": null, + "external_id": null, + "label": null + }, + { + "analysis_id": "abc123", + "name": "test name", + "location": { + "geopoint": { + "lat": "37.7749", + "lon": "-122.4194" + }, + "radius": 3345.52, + "unit": "m", + "google_place_id": null + }, + "rank": { + "type": "local", + "levels": { + "phq": null, + "local": { + "min": 35, + "max": null + } + } + }, + "user_id": null, + "access_type": "full", + "status": "active", + "readiness_status": "ready", + "readiness_checks": { + "date_range": { + "start": "2019-01-01T00:00:00", + "end": "2021-09-26T00:00:00" + }, + "error_code": null, + "missing_dates": [], + "validation_response": { + "missing_data_percentage": 0.0, + "consecutive_nan": 0 + }, + "best_practice": false, + "best_practice_checks": { + "industry": false, + "rank": true, + "radius": true + } + }, + "processing_completed": { + "correlation": true, + "feature_importance": true, + "value_quant": true + }, + "demand_type": { + "interval": "day", + "week_start_day": null, + "industry": "other", + "unit_descriptor": "omitted", + "currency_code": "USD", + "unit_currency_multiplier": 1.0 + }, + "group_ids": null, + "tz": "America/Los_Angeles", + "create_dt": "2025-01-15T00:30:44Z", + "update_dt": "2025-01-15T00:53:48Z", + "processed_dt": "2025-01-15T00:53:30Z", + "external_id": null, + "label": null + }, + { + "analysis_id": "abc123", + "name": "test name", + "location": { + "geopoint": { + "lat": "38.9808979", + "lon": "-76.5400824" + }, + "radius": 9.23, + "unit": "mi", + "google_place_id": null + }, + "rank": { + "type": "phq", + "levels": { + "phq": { + "min": 35, + "max": null + }, + "local": null + } + }, + "user_id": null, + "access_type": "full", + "status": "active", + "readiness_status": "ready", + "readiness_checks": { + "date_range": { + "start": "2024-01-01T00:00:00", + "end": "2024-11-12T00:00:00" + }, + "error_code": null, + "missing_dates": [], + "validation_response": { + "missing_data_percentage": 0.0, + "consecutive_nan": 0 + }, + "best_practice": true, + "best_practice_checks": { + "industry": true, + "rank": true, + "radius": true + } + }, + "processing_completed": { + "correlation": true, + "feature_importance": true, + "value_quant": true + }, + "demand_type": { + "interval": "day", + "week_start_day": null, + "industry": "accommodation", + "unit_descriptor": "omitted", + "currency_code": "USD", + "unit_currency_multiplier": 1.0 + }, + "group_ids": null, + "tz": "America/New_York", + "create_dt": "2024-12-17T02:11:22Z", + "update_dt": "2025-01-14T02:11:24Z", + "processed_dt": "2025-01-14T02:11:15Z", + "external_id": null, + "label": null + }, + { + "analysis_id": "abc123", + "name": "test name", + "location": { + "geopoint": { + "lat": "41.4917972", + "lon": "-72.0903866" + }, + "radius": 7.14, + "unit": "mi", + "google_place_id": null + }, + "rank": { + "type": "local", + "levels": { + "phq": null, + "local": { + "min": 50, + "max": null + } + } + }, + "user_id": null, + "access_type": "full", + "status": "active", + "readiness_status": "ready", + "readiness_checks": { + "date_range": { + "start": "2019-06-01T00:00:00", + "end": "2019-12-31T00:00:00" + }, + "error_code": null, + "missing_dates": [ + "2019-11-28", + "2019-12-25" + ], + "validation_response": { + "missing_data_percentage": 0.935, + "consecutive_nan": 1 + }, + "best_practice": true, + "best_practice_checks": { + "industry": true, + "rank": true, + "radius": true + } + }, + "processing_completed": { + "correlation": true, + "feature_importance": true, + "value_quant": true + }, + "demand_type": { + "interval": "day", + "week_start_day": null, + "industry": "accommodation", + "unit_descriptor": "omitted", + "currency_code": "USD", + "unit_currency_multiplier": 1.0 + }, + "group_ids": null, + "tz": "America/New_York", + "create_dt": "2025-01-08T03:02:14Z", + "update_dt": "2025-01-08T03:03:43Z", + "processed_dt": "2025-01-08T03:03:33Z", + "external_id": null, + "label": null + }, + { + "analysis_id": "abc123", + "name": "test name", + "location": { + "geopoint": { + "lat": "41.657871", + "lon": "-91.534637" + }, + "radius": 1.76, + "unit": "km", + "google_place_id": null + }, + "rank": { + "type": "phq", + "levels": { + "phq": { + "min": 30, + "max": 100 + }, + "local": null + } + }, + "user_id": null, + "access_type": "full", + "status": "draft", + "readiness_status": "ready", + "readiness_checks": { + "date_range": { + "start": "2021-06-01T00:00:00", + "end": "2022-07-04T00:00:00" + }, + "error_code": null, + "missing_dates": [ + "2022-01-15", + "2022-01-16" + ], + "validation_response": { + "missing_data_percentage": 0.501, + "consecutive_nan": 2 + }, + "best_practice": false, + "best_practice_checks": { + "industry": false, + "rank": false, + "radius": false + } + }, + "processing_completed": { + "correlation": true, + "feature_importance": true, + "value_quant": true + }, + "demand_type": { + "interval": "day", + "week_start_day": null, + "industry": null, + "unit_descriptor": "", + "currency_code": "USD", + "unit_currency_multiplier": 75.0 + }, + "group_ids": null, + "tz": "America/Chicago", + "create_dt": "2022-09-15T03:21:44.436078Z", + "update_dt": "2024-12-16T23:02:47Z", + "processed_dt": "2024-12-16T23:02:30Z", + "external_id": null, + "label": null + }, + { + "analysis_id": "abc123", + "name": "test name", + "location": { + "geopoint": { + "lat": "25.793463", + "lon": "-80.337645" + }, + "radius": 10.0, + "unit": "km", + "google_place_id": null + }, + "rank": { + "type": "phq", + "levels": { + "phq": { + "min": 30, + "max": null + }, + "local": null + } + }, + "user_id": null, + "access_type": "full", + "status": "draft", + "readiness_status": "ready", + "readiness_checks": { + "date_range": { + "start": "2017-01-02T00:00:00", + "end": "2019-12-31T00:00:00" + }, + "error_code": null, + "missing_dates": [ + "2017-04-16", + "2017-09-08", + "2017-09-09", + "2017-09-10", + "2017-09-11", + "2017-09-12", + "2017-11-23", + "2017-12-25", + "2018-04-01", + "2018-11-22", + "2018-12-25", + "2019-04-21", + "2019-09-02", + "2019-11-28", + "2019-12-25" + ], + "validation_response": { + "missing_data_percentage": 1.371, + "consecutive_nan": 5 + }, + "best_practice": false, + "best_practice_checks": { + "industry": true, + "rank": false, + "radius": false + } + }, + "processing_completed": { + "correlation": true, + "feature_importance": true, + "value_quant": true + }, + "demand_type": { + "interval": "day", + "week_start_day": null, + "industry": "retail", + "unit_descriptor": "Rooms", + "currency_code": "USD", + "unit_currency_multiplier": 1.0 + }, + "group_ids": [ + "nbH6wEfXKA4" + ], + "tz": "America/New_York", + "create_dt": "2024-08-11T22:41:03.603998Z", + "update_dt": "2024-12-16T19:32:49Z", + "processed_dt": "2024-12-16T19:32:12Z", + "external_id": null, + "label": null + }, + { + "analysis_id": "abc123", + "name": "test name", + "location": { + "geopoint": { + "lat": "-36.84440239999999", + "lon": "174.7648646" + }, + "radius": 2.28, + "unit": "mi", + "google_place_id": null + }, + "rank": { + "type": "phq", + "levels": { + "phq": { + "min": 35, + "max": null + }, + "local": null + } + }, + "user_id": null, + "access_type": "full", + "status": "active", + "readiness_status": "ready", + "readiness_checks": { + "date_range": { + "start": "2019-06-01T00:00:00", + "end": "2019-12-31T00:00:00" + }, + "error_code": null, + "missing_dates": [ + "2019-11-28", + "2019-12-25" + ], + "validation_response": { + "missing_data_percentage": 0.935, + "consecutive_nan": 1 + }, + "best_practice": false, + "best_practice_checks": { + "industry": true, + "rank": false, + "radius": false + } + }, + "processing_completed": { + "correlation": true, + "feature_importance": true, + "value_quant": true + }, + "demand_type": { + "interval": "day", + "week_start_day": null, + "industry": "parking", + "unit_descriptor": "omitted", + "currency_code": "USD", + "unit_currency_multiplier": 1.0 + }, + "group_ids": null, + "tz": "Pacific/Auckland", + "create_dt": "2024-10-06T20:42:57Z", + "update_dt": "2024-12-16T19:32:03Z", + "processed_dt": "2024-12-16T19:31:52Z", + "external_id": null, + "label": null + }, + { + "analysis_id": "abc123", + "name": "test name", + "location": { + "geopoint": { + "lat": "38.9808979", + "lon": "-76.5400824" + }, + "radius": 9.23, + "unit": "mi", + "google_place_id": null + }, + "rank": { + "type": "phq", + "levels": { + "phq": { + "min": 35, + "max": null + }, + "local": null + } + }, + "user_id": null, + "access_type": "limited", + "status": "active", + "readiness_status": null, + "readiness_checks": { + "date_range": null, + "error_code": null, + "missing_dates": null, + "validation_response": null, + "best_practice": true, + "best_practice_checks": { + "industry": true, + "rank": true, + "radius": true + } + }, + "processing_completed": { + "correlation": false, + "feature_importance": false, + "value_quant": false + }, + "demand_type": { + "interval": "day", + "week_start_day": null, + "industry": "accommodation", + "unit_descriptor": "omitted", + "currency_code": "USD", + "unit_currency_multiplier": 1.0 + }, + "group_ids": null, + "tz": null, + "create_dt": "2024-12-16T02:08:29Z", + "update_dt": "2024-12-16T02:08:29Z", + "processed_dt": null, + "external_id": null, + "label": null + }, + { + "analysis_id": "abc123", + "name": "test name", + "location": { + "geopoint": { + "lat": "-36.848448", + "lon": "174.7596161" + }, + "radius": 3418.29, + "unit": "m", + "google_place_id": null + }, + "rank": { + "type": "local", + "levels": { + "phq": null, + "local": { + "min": 30, + "max": null + } + } + }, + "user_id": null, + "access_type": "full", + "status": "active", + "readiness_status": "ready", + "readiness_checks": { + "date_range": { + "start": "2024-01-01T00:00:00", + "end": "2024-07-01T00:00:00" + }, + "error_code": null, + "missing_dates": [], + "validation_response": { + "missing_data_percentage": 0.0, + "consecutive_nan": 0 + }, + "best_practice": false, + "best_practice_checks": { + "industry": true, + "rank": false, + "radius": true + } + }, + "processing_completed": { + "correlation": true, + "feature_importance": true, + "value_quant": true + }, + "demand_type": { + "interval": "day", + "week_start_day": null, + "industry": "retail", + "unit_descriptor": "omitted", + "currency_code": "USD", + "unit_currency_multiplier": 1.0 + }, + "group_ids": null, + "tz": "Pacific/Auckland", + "create_dt": "2024-12-16T01:58:18Z", + "update_dt": "2024-12-16T01:58:50Z", + "processed_dt": "2024-12-16T01:58:39Z", + "external_id": null, + "label": null + }, + { + "analysis_id": "abc123", + "name": "test name", + "location": { + "geopoint": { + "lat": "-36.84440239999999", + "lon": "174.7648646" + }, + "radius": 4.04, + "unit": "km", + "google_place_id": null + }, + "rank": { + "type": "phq", + "levels": { + "phq": { + "min": 35, + "max": null + }, + "local": null + } + }, + "user_id": null, + "access_type": "full", + "status": "active", + "readiness_status": "ready", + "readiness_checks": { + "date_range": { + "start": "2019-06-01T00:00:00", + "end": "2019-12-31T00:00:00" + }, + "error_code": null, + "missing_dates": [ + "2019-11-28", + "2019-12-25" + ], + "validation_response": { + "missing_data_percentage": 0.935, + "consecutive_nan": 1 + }, + "best_practice": false, + "best_practice_checks": { + "industry": true, + "rank": false, + "radius": false + } + }, + "processing_completed": { + "correlation": true, + "feature_importance": true, + "value_quant": true + }, + "demand_type": { + "interval": "day", + "week_start_day": null, + "industry": "accommodation", + "unit_descriptor": "Sales", + "currency_code": "EUR", + "unit_currency_multiplier": 1.0 + }, + "group_ids": null, + "tz": "Pacific/Auckland", + "create_dt": "2024-12-15T20:36:50Z", + "update_dt": "2024-12-16T01:46:37Z", + "processed_dt": "2024-12-16T01:46:26Z", + "external_id": null, + "label": null + } + ] +} \ No newline at end of file