diff --git a/.github/workflows/all-commits-in-master.yml b/.github/workflows/all-commits-in-master.yml new file mode 100644 index 0000000000..8ff834082a --- /dev/null +++ b/.github/workflows/all-commits-in-master.yml @@ -0,0 +1,34 @@ +name: all-commits-in-master + +on: + pull_request: + branches: [ "customdc_stable" ] + +jobs: + check_commits: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + # Fetch all history for accurate comparison + fetch-depth: 0 + # Check out the PR branch + ref: ${{ github.event.pull_request.head.ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} + + - name: Check if commits exist in master + run: | + git remote add dc https://github.com/datacommonsorg/website.git + git fetch dc + MASTER_BRANCH="dc/master" + + # Get the list of commits in the source branch that are not in the master branch + MISSING_COMMITS=$(git log --pretty="%H - %s" $MASTER_BRANCH..HEAD --) + + if [[ -n "$MISSING_COMMITS" ]]; then + echo "ERROR: The following commits are not present in $MASTER_BRANCH:" + echo "$MISSING_COMMITS" + exit 1 + fi + + echo "All commits are present in $MASTER_BRANCH" diff --git a/build/cdc_data/run.sh b/build/cdc_data/run.sh index bc71fd62fc..0019a7e124 100644 --- a/build/cdc_data/run.sh +++ b/build/cdc_data/run.sh @@ -32,6 +32,16 @@ if [[ $OUTPUT_DIR == "" ]]; then exit 1 fi +if [[ $DATA_RUN_MODE != "" ]]; then + if [[ $DATA_RUN_MODE != "schemaupdate" ]]; then + echo "DATA_RUN_MODE must be either empty or 'schemaupdate'" + exit 1 + fi + echo "DATA_RUN_MODE=$DATA_RUN_MODE" +else + DATA_RUN_MODE="customdc" +fi + echo "INPUT_DIR=$INPUT_DIR" echo "OUTPUT_DIR=$OUTPUT_DIR" @@ -51,7 +61,7 @@ ADDITIONAL_CATALOG_PATH=$DC_NL_EMBEDDINGS_DIR/custom_catalog.yaml CUSTOM_EMBEDDINGS_INDEX=user_all_minilm_mem # Set IS_CUSTOM_DC var to true. -# This is used by the embeddings builder to set up a custom dc env. +# This is used by the embeddings builder to set up a custom dc env. export IS_CUSTOM_DC=true if [[ $USE_SQLITE == "true" ]]; then @@ -67,15 +77,20 @@ cd $WORKSPACE_DIR/import/simple # Run importer. python3 -m stats.main \ --input_dir=$INPUT_DIR \ - --output_dir=$DC_OUTPUT_DIR + --output_dir=$DC_OUTPUT_DIR \ + --mode=$DATA_RUN_MODE # cd back to workspace dir to run the embeddings builder. cd $WORKSPACE_DIR -# Run embeddings builder. -python3 -m tools.nl.embeddings.build_embeddings \ - --embeddings_name=$CUSTOM_EMBEDDINGS_INDEX \ +if [[ $DATA_RUN_MODE == "schemaupdate" ]]; then + echo "Skipping embeddings builder because run mode is 'schemaupdate'." + echo "Schema update complete." +else + # Run embeddings builder. + python3 -m tools.nl.embeddings.build_embeddings \ + --embeddings_name=$CUSTOM_EMBEDDINGS_INDEX \ --output_dir=$DC_NL_EMBEDDINGS_DIR \ --additional_catalog_path=$ADDITIONAL_CATALOG_PATH - -echo "Data loading completed." + echo "Data loading complete." +fi diff --git a/build/cdc_services/run.sh b/build/cdc_services/run.sh index b28325ac07..19c7a9cdf4 100644 --- a/build/cdc_services/run.sh +++ b/build/cdc_services/run.sh @@ -88,7 +88,7 @@ else fi # Wait for any process to exit -wait +wait -n # Exit with status of process that exited first -exit $? \ No newline at end of file +exit $? diff --git a/build/ci/cloudbuild.webdriver.yaml b/build/ci/cloudbuild.webdriver.yaml index b3e9b0c6d2..5b22240dab 100644 --- a/build/ci/cloudbuild.webdriver.yaml +++ b/build/ci/cloudbuild.webdriver.yaml @@ -30,13 +30,26 @@ steps: # ./run_test.sh -b will build client packages. # These js files generated will be necessery for the flask_webdriver_test task. ./run_test.sh -b + + # Download the files needed for nl server to run. Do the download here because + # webdriver runs on mulitple processes & we only want to do the download once. + - id: download_nl_files + name: python:3.11.3 + entrypoint: /bin/sh + waitFor: + - package_js + args: + - -c + - | + cd tools/nl/download_nl_files + ./run.sh # Run the webdriver tests - id: flask_webdriver_test name: gcr.io/datcom-ci/webdriver-chrome:2024-06-05 entrypoint: /bin/sh waitFor: - - package_js + - download_nl_files args: - -c - | diff --git a/build/nl_server/Dockerfile b/build/nl_server/Dockerfile index 3d41b7bdf8..f0531954fa 100644 --- a/build/nl_server/Dockerfile +++ b/build/nl_server/Dockerfile @@ -34,10 +34,10 @@ COPY shared/. /workspace/shared/ # Download nl files from gcs COPY deploy/nl/catalog.yaml . -COPY build/nl_server/requirements.txt /workspace/build/nl_server/requirements.txt -COPY build/nl_server/download_nl_files.py . -RUN pip3 install -r /workspace/build/nl_server/requirements.txt -RUN python3 download_nl_files.py +COPY tools/nl/download_nl_files/requirements.txt /workspace/download_nl_files/requirements.txt +COPY tools/nl/download_nl_files/download_nl_files.py . +RUN pip3 install -r /workspace/download_nl_files/requirements.txt +RUN python3 download_nl_files.py --is_docker_mode=True # Run server WORKDIR /workspace diff --git a/deploy/terraform-custom-datacommons/README.md b/deploy/terraform-custom-datacommons/README.md index 0dd859b972..0d1fb933b2 100644 --- a/deploy/terraform-custom-datacommons/README.md +++ b/deploy/terraform-custom-datacommons/README.md @@ -50,14 +50,14 @@ dc_api_key = "your-api-key" - **project_id**: The Google Cloud project ID where the resources will be created. - **namespace**: A unique namespace to differentiate multiple instances of custom Data Commons within the same project. -- **dc_api_key**: Data Commons API key. [Request an API key](https://docs.google.com/forms/d/e/1FAIpQLSeVCR95YOZ56ABsPwdH1tPAjjIeVDtisLF-8oDYlOxYmNZ7LQ/viewform?resourcekey=0-yJ9nT9ST-TfoKNtmGIws-g) +- **dc_api_key**: Data Commons API key. [Request an API key](https://apikeys.datacommons.org) #### Optional Configuration Variables - **region**: The [GCP region](https://cloud.google.com/about/locations) where resources will be deployed. - **enable_redis**: Set to true to enable redis caching (default: false) -- **dc_web_service_image**: Docker image to use for the services container. Default: `gcr.io/datcom-ci/datacommons-services:stable` -- **dc_data_job_image**: Docker image to use for the data loading job. Default: `gcr.io/datcom-ci/datacommons-data:stable` +- **dc_web_service_image**: Docker image to use for the services container. Default: `gcr.io/datcom-ci/datacommons-services:stable`. Set to `gcr.io/datcom-ci/datacommons-services:latest` to use the latest web service image. +- **dc_data_job_image**: Docker image to use for the data loading job. Default: `gcr.io/datcom-ci/datacommons-data:stable`. Set to `gcr.io/datcom-ci/datacommons-data:latest` to use the latest data job image. - **make_dc_web_service_public**: By default, the Data Commons web service is publicly accessible. Set this to `false` if your GCP account has restrictions on public access. [Reference](https://cloud.google.com/run/docs/authenticating/public). - **google_analytics_tag_id**: Set to your [Google Analytics Tag ID](https://support.google.com/analytics/answer/9539598) to enable Google Analytics tracking. diff --git a/deploy/terraform-custom-datacommons/modules/main.tf b/deploy/terraform-custom-datacommons/modules/main.tf index a60d09a909..8d6b32eb66 100644 --- a/deploy/terraform-custom-datacommons/modules/main.tf +++ b/deploy/terraform-custom-datacommons/modules/main.tf @@ -169,6 +169,7 @@ resource "google_secret_manager_secret_version" "dc_api_key_version" { resource "google_cloud_run_v2_service" "dc_web_service" { name = "${var.namespace}-datacommons-web-service" location = var.region + deletion_protection = false template { containers { @@ -320,6 +321,8 @@ resource "google_cloud_run_service_iam_member" "dc_web_service_invoker" { resource "google_cloud_run_v2_job" "dc_data_job" { name = "${var.namespace}-datacommons-data-job" location = var.region + deletion_protection = false + template { template { containers { @@ -375,4 +378,4 @@ resource "google_cloud_run_v2_job" "dc_data_job" { google_secret_manager_secret_version.dc_api_key_version, google_secret_manager_secret_version.maps_api_key_version ] -} \ No newline at end of file +} diff --git a/import b/import index fab89e365f..5d14167bc3 160000 --- a/import +++ b/import @@ -1 +1 @@ -Subproject commit fab89e365f0e38cbc87c528f2c00746c04be2d6c +Subproject commit 5d14167bc39b9ded199466f761ec914ed81c592e diff --git a/mixer b/mixer index a5a19782d2..656512fee5 160000 --- a/mixer +++ b/mixer @@ -1 +1 @@ -Subproject commit a5a19782d2c571fa3cd40efc403b06bd58ed31e2 +Subproject commit 656512fee5e3c701b52a3ee26db35ba91a81bd2b diff --git a/nl_requirements.txt b/nl_requirements.txt index 16957a83d6..9c56100f7d 100644 --- a/nl_requirements.txt +++ b/nl_requirements.txt @@ -12,4 +12,5 @@ torchvision==0.17.2 # TODO: this is pinned because latest huggingface_hub is not compatible with # sentence-transformers v2.2.2. Look into upgrading sentence-transformers to # v2.3.0 or newer -huggingface_hub==0.25.2 \ No newline at end of file +huggingface_hub==0.25.2 +transformers==4.45.2 \ No newline at end of file diff --git a/server/integration_tests/test_data/demo_fallback/query_4/chart_config.json b/server/integration_tests/test_data/demo_fallback/query_4/chart_config.json index c26f445cd3..33f44004c0 100644 --- a/server/integration_tests/test_data/demo_fallback/query_4/chart_config.json +++ b/server/integration_tests/test_data/demo_fallback/query_4/chart_config.json @@ -827,6 +827,35 @@ "denom": "Count_Person", "title": "People With Only Private Health Insurance in Counties of California" }, + { + "columns": [ + { + "tiles": [ + { + "statVarKey": [ + "Count_Death" + ], + "title": "Number of Deaths in California", + "type": "LINE" + } + ] + }, + { + "tiles": [ + { + "description": "Number of Deaths in California", + "statVarKey": [ + "Count_Death" + ], + "title": "Number of Deaths in California", + "type": "HIGHLIGHT" + } + ] + } + ], + "denom": "Count_Person", + "title": "Number of Deaths" + }, { "columns": [ { diff --git a/server/integration_tests/test_data/demo_feb2023/query_5/chart_config.json b/server/integration_tests/test_data/demo_feb2023/query_5/chart_config.json index 77cbfebe65..8d11116f3a 100644 --- a/server/integration_tests/test_data/demo_feb2023/query_5/chart_config.json +++ b/server/integration_tests/test_data/demo_feb2023/query_5/chart_config.json @@ -12,12 +12,12 @@ "statVarKey": [ "Count_Worker_NAICSHealthCareSocialAssistance", "dc/p69tpsldf99h7", - "Count_Worker_NAICSConstruction", "Count_Worker_NAICSAccommodationFoodServices", - "Count_Worker_NAICSAdministrativeSupportWasteManagementRemediationServices", + "Count_Worker_NAICSConstruction", "Count_Worker_NAICSProfessionalScientificTechnicalServices", - "Count_Worker_NAICSArtsEntertainmentRecreation", "Count_Worker_NAICSEducationalServices", + "Count_Worker_NAICSArtsEntertainmentRecreation", + "Count_Worker_NAICSAdministrativeSupportWasteManagementRemediationServices", "Count_Worker_NAICSOtherServices", "Count_Worker_NAICSFinanceInsurance", "Count_Worker_NAICSRealEstateRentalLeasing", @@ -67,9 +67,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSConstruction_growth_abs" + "Count_Worker_NAICSAccommodationFoodServices_growth_abs" ], - "title": "Population Working in the Construction Industry in Placer County", + "title": "Accommodation/Food Industry Workers in Placer County", "type": "LINE" } ] @@ -78,9 +78,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSAccommodationFoodServices_growth_abs" + "Count_Worker_NAICSConstruction_growth_abs" ], - "title": "Accommodation/Food Industry Workers in Placer County", + "title": "Population Working in the Construction Industry in Placer County", "type": "LINE" } ] @@ -89,9 +89,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSAdministrativeSupportWasteManagementRemediationServices_growth_abs" + "Count_Worker_NAICSProfessionalScientificTechnicalServices_growth_abs" ], - "title": "Admin / Waste Management Service Industry Workers in Placer County", + "title": "Professional, Scientific, and Technical Services Workers in Placer County", "type": "LINE" } ] @@ -100,9 +100,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSProfessionalScientificTechnicalServices_growth_abs" + "Count_Worker_NAICSEducationalServices_growth_abs" ], - "title": "Professional, Scientific, and Technical Services Workers in Placer County", + "title": "Educational Services Industry Workers in Placer County", "type": "LINE" } ] @@ -122,9 +122,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSEducationalServices_growth_abs" + "Count_Worker_NAICSAdministrativeSupportWasteManagementRemediationServices_growth_abs" ], - "title": "Educational Services Industry Workers in Placer County", + "title": "Admin / Waste Management Service Industry Workers in Placer County", "type": "LINE" } ] @@ -271,9 +271,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSArtsEntertainmentRecreation_growth_pct" + "Count_Worker_NAICSProfessionalScientificTechnicalServices_growth_pct" ], - "title": "Arts, Entertainment, Recreation Industry Workers in Placer County", + "title": "Professional, Scientific, and Technical Services Workers in Placer County", "type": "LINE" } ] @@ -293,9 +293,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSProfessionalScientificTechnicalServices_growth_pct" + "Count_Worker_NAICSAdministrativeSupportWasteManagementRemediationServices_growth_pct" ], - "title": "Professional, Scientific, and Technical Services Workers in Placer County", + "title": "Admin / Waste Management Service Industry Workers in Placer County", "type": "LINE" } ] @@ -304,9 +304,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSAdministrativeSupportWasteManagementRemediationServices_growth_pct" + "Count_Worker_NAICSArtsEntertainmentRecreation_growth_pct" ], - "title": "Admin / Waste Management Service Industry Workers in Placer County", + "title": "Arts, Entertainment, Recreation Industry Workers in Placer County", "type": "LINE" } ] @@ -326,9 +326,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSMiningQuarryingOilGasExtraction_growth_pct" + "Count_Worker_NAICSWholesaleTrade_growth_pct" ], - "title": "Mining, Quarrying, Oil and Gas Extraction Industry Workers in Placer County", + "title": "Wholesale Trade Workers in Placer County", "type": "LINE" } ] @@ -337,9 +337,9 @@ "tiles": [ { "statVarKey": [ - "dc/8p97n7l96lgg8_growth_pct" + "Count_Worker_NAICSRealEstateRentalLeasing_growth_pct" ], - "title": "Transportation and Warehousing Workers in Placer County", + "title": "Real Estate and Rental and Leasing Workers in Placer County", "type": "LINE" } ] @@ -348,9 +348,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSWholesaleTrade_growth_pct" + "dc/8p97n7l96lgg8_growth_pct" ], - "title": "Wholesale Trade Workers in Placer County", + "title": "Transportation and Warehousing Workers in Placer County", "type": "LINE" } ] @@ -359,9 +359,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSRealEstateRentalLeasing_growth_pct" + "Count_Worker_NAICSConstruction_growth_pct" ], - "title": "Real Estate and Rental and Leasing Workers in Placer County", + "title": "Population Working in the Construction Industry in Placer County", "type": "LINE" } ] @@ -370,9 +370,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSConstruction_growth_pct" + "Count_Worker_NAICSAccommodationFoodServices_growth_pct" ], - "title": "Population Working in the Construction Industry in Placer County", + "title": "Accommodation/Food Industry Workers in Placer County", "type": "LINE" } ] @@ -403,9 +403,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSAccommodationFoodServices_growth_pct" + "dc/p69tpsldf99h7_growth_pct" ], - "title": "Accommodation/Food Industry Workers in Placer County", + "title": "Retail Trade Workers in Placer County", "type": "LINE" } ] @@ -425,9 +425,9 @@ "tiles": [ { "statVarKey": [ - "dc/p69tpsldf99h7_growth_pct" + "Count_Worker_NAICSPublicAdministration_growth_pct" ], - "title": "Retail Trade Workers in Placer County", + "title": "Public Administration Workers in Placer County", "type": "LINE" } ] @@ -447,9 +447,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSPublicAdministration_growth_pct" + "Count_Worker_NAICSInformation_growth_pct" ], - "title": "Public Administration Workers in Placer County", + "title": "Information Industry Workers in Placer County", "type": "LINE" } ] @@ -458,9 +458,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSInformation_growth_pct" + "Count_Worker_NAICSMiningQuarryingOilGasExtraction_growth_pct" ], - "title": "Information Industry Workers in Placer County", + "title": "Mining, Quarrying, Oil and Gas Extraction Industry Workers in Placer County", "type": "LINE" } ] @@ -497,9 +497,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSConstruction_growth_pc" + "Count_Worker_NAICSAccommodationFoodServices_growth_pc" ], - "title": "Population Working in the Construction Industry in Placer County", + "title": "Accommodation/Food Industry Workers in Placer County", "type": "LINE" } ] @@ -508,9 +508,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSAccommodationFoodServices_growth_pc" + "Count_Worker_NAICSConstruction_growth_pc" ], - "title": "Accommodation/Food Industry Workers in Placer County", + "title": "Population Working in the Construction Industry in Placer County", "type": "LINE" } ] @@ -519,9 +519,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSAdministrativeSupportWasteManagementRemediationServices_growth_pc" + "Count_Worker_NAICSProfessionalScientificTechnicalServices_growth_pc" ], - "title": "Admin / Waste Management Service Industry Workers in Placer County", + "title": "Professional, Scientific, and Technical Services Workers in Placer County", "type": "LINE" } ] @@ -530,9 +530,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSProfessionalScientificTechnicalServices_growth_pc" + "Count_Worker_NAICSEducationalServices_growth_pc" ], - "title": "Professional, Scientific, and Technical Services Workers in Placer County", + "title": "Educational Services Industry Workers in Placer County", "type": "LINE" } ] @@ -552,9 +552,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSEducationalServices_growth_pc" + "Count_Worker_NAICSAdministrativeSupportWasteManagementRemediationServices_growth_pc" ], - "title": "Educational Services Industry Workers in Placer County", + "title": "Admin / Waste Management Service Industry Workers in Placer County", "type": "LINE" } ] @@ -1199,6 +1199,12 @@ }, "childTopics": [], "exploreMore": { + "Count_Worker_NAICSProfessionalScientificTechnicalServices": { + "establishmentOwnership": [ + "Count_Worker_FederalGovernmentOwnedEstablishment_NAICSProfessionalScientificTechnicalServices", + "Count_Worker_LocalGovernmentOwnedEstablishment_NAICSProfessionalScientificTechnicalServices" + ] + }, "dc/8p97n7l96lgg8": { "establishmentOwnership": [ "dc/wkn0fmqw6ezxc", diff --git a/server/integration_tests/test_data/detection_api_bio/whatisthephylumofvolvox/debug_info.json b/server/integration_tests/test_data/detection_api_bio/whatisthephylumofvolvox/debug_info.json index 046cbf177a..88264f8460 100644 --- a/server/integration_tests/test_data/detection_api_bio/whatisthephylumofvolvox/debug_info.json +++ b/server/integration_tests/test_data/detection_api_bio/whatisthephylumofvolvox/debug_info.json @@ -10,29 +10,29 @@ "query_with_places_removed": "what is the phylum of", "sv_matching": { "CosineScore": [ - 0.35510891675949097, - 0.34608712792396545, - 0.34525778889656067, - 0.34484589099884033, - 0.3411365747451782, - 0.3384982645511627, - 0.3349902927875519, - 0.33166080713272095, - 0.32600581645965576, - 0.32424452900886536, - 0.32060614228248596, - 0.3142656087875366, - 0.31276530027389526, - 0.3126294016838074, - 0.31250450015068054, + 0.35510897636413574, + 0.3460872769355774, + 0.3452577292919159, + 0.344845712184906, + 0.34113651514053345, + 0.3384983241558075, + 0.3349902033805847, + 0.3316609561443329, + 0.3260059356689453, + 0.32424432039260864, + 0.3206062316894531, + 0.31426557898521423, + 0.3127653896808624, + 0.31262922286987305, + 0.31250447034835815, 0.31177398562431335, - 0.31033891439437866, - 0.3100748062133789, - 0.3098834156990051, - 0.30805402994155884, - 0.3074587285518646, + 0.31033921241760254, + 0.31007489562034607, + 0.30988338589668274, + 0.3080539405345917, + 0.30745869874954224, 0.30719631910324097, - 0.3039420545101166 + 0.3039420247077942 ], "MultiSV": {}, "Query": "what is the phylum of", @@ -64,34 +64,34 @@ }, "props_matching": { "CosineScore": [ - 1.0000001192092896, - 0.47528403997421265, - 0.3615415692329407, - 0.3420097827911377, - 0.32933083176612854, - 0.3184516429901123, - 0.3146698474884033, - 0.3083950877189636, - 0.30794060230255127, - 0.3046301305294037, - 0.2827085256576538, - 0.2818753123283386, - 0.28082767128944397, - 0.28045278787612915, - 0.2742983102798462, - 0.2715049386024475, - 0.27071818709373474, - 0.2695465385913849, - 0.25990062952041626, - 0.25990062952041626, - 0.24827902019023895, - 0.24662014842033386, - 0.24632105231285095, - 0.24616341292858124, - 0.24212220311164856, - 0.23135532438755035, - 0.2296244204044342, - 0.2277354896068573 + 0.9999998807907104, + 0.4752839505672455, + 0.36154165863990784, + 0.34200993180274963, + 0.3293309211730957, + 0.31845176219940186, + 0.31466981768608093, + 0.3083951473236084, + 0.3079407513141632, + 0.30463001132011414, + 0.28270864486694336, + 0.28187549114227295, + 0.2808278203010559, + 0.2804529666900635, + 0.27429836988449097, + 0.27150505781173706, + 0.2707182466983795, + 0.26954683661460876, + 0.2599008083343506, + 0.2599008083343506, + 0.24827907979488373, + 0.24662044644355774, + 0.24632112681865692, + 0.24616354703903198, + 0.24212250113487244, + 0.23135541379451752, + 0.2296244502067566, + 0.22773587703704834 ], "PROP": [ "phylum", diff --git a/server/integration_tests/test_data/detection_api_bio/whattypesofgenesarefgfr1,apoe,andache/debug_info.json b/server/integration_tests/test_data/detection_api_bio/whattypesofgenesarefgfr1,apoe,andache/debug_info.json index 2e9413e755..0d288676b2 100644 --- a/server/integration_tests/test_data/detection_api_bio/whattypesofgenesarefgfr1,apoe,andache/debug_info.json +++ b/server/integration_tests/test_data/detection_api_bio/whattypesofgenesarefgfr1,apoe,andache/debug_info.json @@ -12,30 +12,30 @@ "query_with_places_removed": "what types of genes are and", "sv_matching": { "CosineScore": [ - 0.5237791538238525, - 0.4451894164085388, - 0.41981467604637146, - 0.41922128200531006, - 0.4136667847633362, - 0.4096526503562927, - 0.40661105513572693, - 0.4013715982437134, - 0.4010191261768341, - 0.400637686252594, - 0.39874640107154846, - 0.39836061000823975, - 0.39052367210388184, - 0.3890332579612732, - 0.38846099376678467, - 0.3883823752403259, - 0.3873301148414612, - 0.38642191886901855, - 0.3858962655067444, - 0.3856789469718933, - 0.38543426990509033, - 0.38533884286880493, - 0.3818426728248596, - 0.37970495223999023 + 0.5237788558006287, + 0.44518929719924927, + 0.4198145568370819, + 0.41922125220298767, + 0.4136667251586914, + 0.4096524715423584, + 0.4066111147403717, + 0.40137141942977905, + 0.40101921558380127, + 0.40063756704330444, + 0.3987462520599365, + 0.3983607292175293, + 0.39052334427833557, + 0.3890331983566284, + 0.38846108317375183, + 0.3883824050426483, + 0.3873300850391388, + 0.3864220678806305, + 0.38589635491371155, + 0.385678768157959, + 0.3854341208934784, + 0.38533875346183777, + 0.3818424642086029, + 0.37970471382141113 ], "MultiSV": {}, "Query": "what types of genes are and", @@ -68,29 +68,29 @@ }, "props_matching": { "CosineScore": [ - 0.908610999584198, - 0.7445293664932251, - 0.7330226898193359, - 0.7175887823104858, - 0.6834691166877747, - 0.6590197086334229, - 0.6340402960777283, - 0.5988124012947083, + 0.9086108803749084, + 0.7445291876792908, + 0.7330227494239807, + 0.7175889611244202, + 0.6834693551063538, + 0.6590196490287781, + 0.6340398192405701, + 0.5988121628761292, 0.595878541469574, - 0.5850145220756531, - 0.5810791850090027, + 0.5850147604942322, + 0.5810789465904236, 0.5432419776916504, 0.5399730205535889, 0.5320467948913574, 0.5309585928916931, - 0.5142703056335449, - 0.5125278234481812, - 0.46105992794036865, - 0.44410809874534607, - 0.3982294797897339, - 0.3944428563117981, - 0.392289936542511, - 0.38480231165885925 + 0.5142701268196106, + 0.5125278830528259, + 0.4610598683357239, + 0.4441079795360565, + 0.3982292413711548, + 0.3944430947303772, + 0.3922898471355438, + 0.38480237126350403 ], "PROP": [ "typeOfGene", diff --git a/server/integration_tests/test_data/detection_api_multivar/comparemalepopulationwithfemalepopulation/debug_info.json b/server/integration_tests/test_data/detection_api_multivar/comparemalepopulationwithfemalepopulation/debug_info.json index ad8b8b93ac..6911e00711 100644 --- a/server/integration_tests/test_data/detection_api_multivar/comparemalepopulationwithfemalepopulation/debug_info.json +++ b/server/integration_tests/test_data/detection_api_multivar/comparemalepopulationwithfemalepopulation/debug_info.json @@ -8,43 +8,43 @@ "query_with_places_removed": "compare male population with female population", "sv_matching": { "CosineScore": [ - 0.9187595844268799, - 0.8590543866157532, + 0.9187589883804321, + 0.8590542674064636, 0.8354092836380005, - 0.7823134660720825, - 0.7773187756538391, + 0.7823135852813721, + 0.7773193120956421, 0.7762894630432129, 0.7663271427154541, - 0.766107439994812, - 0.7614184617996216, - 0.7606041431427002, - 0.7595797181129456, - 0.7573733329772949, - 0.7573024034500122, - 0.757297158241272, - 0.7553009390830994, - 0.7533451318740845, - 0.7532937526702881, - 0.7509560585021973, - 0.7482578754425049, - 0.7451456785202026, - 0.7443947792053223, - 0.7431552410125732, - 0.7426693439483643, - 0.7396597862243652, - 0.7371534109115601, - 0.7366002798080444, - 0.7347153425216675, - 0.733651876449585, - 0.732607901096344, - 0.7325160503387451, - 0.7302997708320618, - 0.7299268841743469, + 0.7661072611808777, + 0.7614185810089111, + 0.7606043219566345, + 0.7595799565315247, + 0.7573726773262024, + 0.757302463054657, + 0.7572974562644958, + 0.7553005814552307, + 0.753344714641571, + 0.7532935738563538, + 0.7509563565254211, + 0.7482579350471497, + 0.7451451420783997, + 0.7443950176239014, + 0.7431556582450867, + 0.7426689267158508, + 0.7396599650382996, + 0.7371536493301392, + 0.7365996241569519, + 0.7347152829170227, + 0.7336517572402954, + 0.7326081991195679, + 0.7325156927108765, + 0.7302993535995483, + 0.729926347732544, 0.7289118766784668, - 0.7289034724235535, - 0.7280722260475159, - 0.7259584665298462, - 0.7259330153465271 + 0.728903591632843, + 0.7280725836753845, + 0.7259583473205566, + 0.7259331345558167 ], "MultiSV": { "Candidates": [ @@ -54,7 +54,7 @@ "Parts": [ { "CosineScore": [ - 0.9257859587669373 + 0.9257851839065552 ], "QueryPart": "male population", "SV": [ @@ -63,8 +63,8 @@ }, { "CosineScore": [ - 0.9296979904174805, - 0.884743332862854 + 0.92969810962677, + 0.8847430348396301 ], "QueryPart": "female population", "SV": [ @@ -80,7 +80,7 @@ "Parts": [ { "CosineScore": [ - 0.911777138710022 + 0.9117769002914429 ], "QueryPart": "male population female", "SV": [ @@ -89,8 +89,8 @@ }, { "CosineScore": [ - 0.8982378244400024, - 0.8723466396331787 + 0.8982371687889099, + 0.8723466992378235 ], "QueryPart": "population", "SV": [ @@ -106,10 +106,10 @@ "Parts": [ { "CosineScore": [ - 0.8088873028755188, - 0.8034241199493408, - 0.8017654418945312, - 0.7751557230949402 + 0.8088874816894531, + 0.8034244179725647, + 0.8017649054527283, + 0.7751561999320984 ], "QueryPart": "male", "SV": [ @@ -121,8 +121,8 @@ }, { "CosineScore": [ - 0.9170327186584473, - 0.873018741607666 + 0.9170326590538025, + 0.8730189204216003 ], "QueryPart": "population female population", "SV": [ diff --git a/server/integration_tests/test_data/detection_api_multivar/compareobesityvs.poverty/debug_info.json b/server/integration_tests/test_data/detection_api_multivar/compareobesityvs.poverty/debug_info.json index 83ff52431b..2717973e61 100644 --- a/server/integration_tests/test_data/detection_api_multivar/compareobesityvs.poverty/debug_info.json +++ b/server/integration_tests/test_data/detection_api_multivar/compareobesityvs.poverty/debug_info.json @@ -8,35 +8,35 @@ "query_with_places_removed": "compare obesity vs poverty", "sv_matching": { "CosineScore": [ - 0.8778442740440369, - 0.7967699766159058, - 0.762496829032898, - 0.7499465942382812, - 0.7484047412872314, - 0.7442895174026489, - 0.7357541918754578, - 0.7350349426269531, - 0.7310354709625244, - 0.7289618253707886, - 0.7266261577606201, - 0.7264261841773987, - 0.7264261841773987, - 0.7253916263580322, + 0.8778440952301025, + 0.7967696785926819, + 0.7624966502189636, + 0.7499464750289917, + 0.7484046220779419, + 0.744289755821228, + 0.7357544302940369, + 0.7350348830223083, + 0.7310351729393005, + 0.7289621829986572, + 0.7266256213188171, + 0.7264258861541748, + 0.7264258861541748, + 0.7253912091255188, 0.7230079174041748, - 0.7139475345611572, - 0.7126950621604919, - 0.7094853520393372, - 0.7085550427436829, - 0.7085551023483276, - 0.7078822255134583, - 0.7077707052230835, - 0.7045387029647827, - 0.7024303078651428, - 0.7004534602165222, - 0.6994997262954712, - 0.6956704258918762, - 0.6947906613349915, - 0.6913242936134338 + 0.713947594165802, + 0.7126947641372681, + 0.7094854116439819, + 0.7085545659065247, + 0.7085544466972351, + 0.7078820466995239, + 0.7077706456184387, + 0.7045392394065857, + 0.7024305462837219, + 0.7004537582397461, + 0.6994994878768921, + 0.695670485496521, + 0.6947909593582153, + 0.6913240551948547 ], "MultiSV": { "Candidates": [ @@ -46,10 +46,10 @@ "Parts": [ { "CosineScore": [ - 0.8467836380004883, - 0.8316553831100464, - 0.8201552033424377, - 0.8177061080932617 + 0.8467828035354614, + 0.8316561579704285, + 0.8201544284820557, + 0.8177065253257751 ], "QueryPart": "obesity", "SV": [ diff --git a/server/integration_tests/test_data/detection_api_multivar/howarefactorslikeobesity,bloodpressureandasthmaimpactedbyclimatechange/debug_info.json b/server/integration_tests/test_data/detection_api_multivar/howarefactorslikeobesity,bloodpressureandasthmaimpactedbyclimatechange/debug_info.json index cde42a4ae2..fdb51b9dd8 100644 --- a/server/integration_tests/test_data/detection_api_multivar/howarefactorslikeobesity,bloodpressureandasthmaimpactedbyclimatechange/debug_info.json +++ b/server/integration_tests/test_data/detection_api_multivar/howarefactorslikeobesity,bloodpressureandasthmaimpactedbyclimatechange/debug_info.json @@ -8,34 +8,34 @@ "query_with_places_removed": "how are factors like obesity , blood pressure and asthma impacted by climate change", "sv_matching": { "CosineScore": [ - 0.7864793539047241, - 0.7135567665100098, - 0.691805362701416, - 0.6740915179252625, - 0.6734591722488403, - 0.6704620718955994, - 0.6635113954544067, - 0.6593924760818481, - 0.6520178318023682, - 0.6484817266464233, + 0.7864788770675659, + 0.7135568261146545, + 0.691805899143219, + 0.6740916967391968, + 0.6734588742256165, + 0.670462429523468, + 0.6635114550590515, + 0.6593927145004272, + 0.6520175337791443, + 0.6484816074371338, 0.6461696624755859, - 0.6459026336669922, - 0.6435545682907104, + 0.6459028124809265, + 0.6435540914535522, 0.6410900354385376, - 0.6405231952667236, - 0.6402113437652588, - 0.6384210586547852, - 0.6380343437194824, - 0.6376464366912842, - 0.6346377730369568, - 0.6341456174850464, + 0.640523374080658, + 0.6402111649513245, + 0.6384206414222717, + 0.6380341053009033, + 0.6376466751098633, + 0.6346374154090881, + 0.6341455578804016, 0.6338476538658142, - 0.6322696805000305, - 0.6322205662727356, - 0.6304948925971985, - 0.6302965879440308, - 0.6298357844352722, - 0.6295678019523621 + 0.632270336151123, + 0.6322208046913147, + 0.6304947137832642, + 0.6302966475486755, + 0.6298351287841797, + 0.6295675039291382 ], "MultiSV": { "Candidates": [ @@ -45,7 +45,7 @@ "Parts": [ { "CosineScore": [ - 0.7997788786888123 + 0.7997785806655884 ], "QueryPart": "factors like obesity blood pressure asthma impacted", "SV": [ @@ -54,7 +54,7 @@ }, { "CosineScore": [ - 1.0 + 1.000000238418579 ], "QueryPart": "climate change", "SV": [ @@ -69,11 +69,11 @@ "Parts": [ { "CosineScore": [ - 0.7588618993759155, - 0.7463642954826355, - 0.740165650844574, - 0.7351235151290894, - 0.7130995988845825 + 0.7588625550270081, + 0.7463639974594116, + 0.740165114402771, + 0.7351229190826416, + 0.7130995392799377 ], "QueryPart": "factors like obesity", "SV": [ @@ -86,7 +86,7 @@ }, { "CosineScore": [ - 0.9999995827674866 + 1.0000003576278687 ], "QueryPart": "blood pressure", "SV": [ @@ -95,8 +95,8 @@ }, { "CosineScore": [ - 0.8255698680877686, - 0.8027870059013367 + 0.8255704641342163, + 0.802787184715271 ], "QueryPart": "asthma impacted climate change", "SV": [ @@ -112,9 +112,9 @@ "Parts": [ { "CosineScore": [ - 0.7768431901931763, - 0.7495046257972717, - 0.7342654466629028, + 0.7768431305885315, + 0.7495043873786926, + 0.7342660427093506, 0.7325114011764526 ], "QueryPart": "factors like obesity blood pressure asthma", @@ -127,7 +127,7 @@ }, { "CosineScore": [ - 0.9056921005249023 + 0.9056915044784546 ], "QueryPart": "impacted climate change", "SV": [ @@ -142,7 +142,7 @@ "Parts": [ { "CosineScore": [ - 0.8207905888557434 + 0.8207898736000061 ], "QueryPart": "factors like obesity blood pressure", "SV": [ @@ -151,8 +151,8 @@ }, { "CosineScore": [ - 0.8255698680877686, - 0.8027870059013367 + 0.8255704641342163, + 0.802787184715271 ], "QueryPart": "asthma impacted climate change", "SV": [ diff --git a/server/integration_tests/test_data/detection_api_multivar/numberofpoorhispanicwomenwithphd/debug_info.json b/server/integration_tests/test_data/detection_api_multivar/numberofpoorhispanicwomenwithphd/debug_info.json index 9732c39707..88431aa490 100644 --- a/server/integration_tests/test_data/detection_api_multivar/numberofpoorhispanicwomenwithphd/debug_info.json +++ b/server/integration_tests/test_data/detection_api_multivar/numberofpoorhispanicwomenwithphd/debug_info.json @@ -8,46 +8,46 @@ "query_with_places_removed": "number of poor hispanic women with phd", "sv_matching": { "CosineScore": [ - 0.7985796332359314, - 0.7883262634277344, - 0.776346743106842, - 0.77406245470047, - 0.7410296201705933, - 0.7334667444229126, - 0.7228284478187561, - 0.722568929195404, - 0.6995474100112915, - 0.6995023488998413, - 0.697618305683136, - 0.6974341869354248, - 0.696003794670105, - 0.6953426003456116, - 0.6945168972015381, - 0.6939643621444702, - 0.6935360431671143, - 0.6908406019210815, - 0.6906974911689758, - 0.6896734237670898, - 0.6889521479606628, - 0.6886201500892639, - 0.6863292455673218, + 0.7985790967941284, + 0.788325846195221, + 0.7763473391532898, + 0.7740628719329834, + 0.741028904914856, + 0.7334664463996887, + 0.7228288054466248, + 0.7225687503814697, + 0.6995472311973572, + 0.6995018720626831, + 0.6976181268692017, + 0.6974342465400696, + 0.6960033774375916, + 0.6953437924385071, + 0.6945170760154724, + 0.6939643025398254, + 0.693536639213562, + 0.6908403635025024, + 0.690697431564331, + 0.6896734833717346, + 0.6889524459838867, + 0.6886194348335266, + 0.686329185962677, 0.6859177947044373, - 0.6827540397644043, - 0.6822139620780945, - 0.6815624237060547, - 0.67987459897995, - 0.676856517791748, - 0.6763089299201965, - 0.6751540303230286, - 0.6744991540908813, - 0.6725671291351318, - 0.6717973947525024, - 0.6691675186157227, - 0.6690007448196411, - 0.6682180762290955, - 0.6678104400634766, - 0.6650688052177429, - 0.6648702621459961 + 0.6827537417411804, + 0.6822136044502258, + 0.6815626621246338, + 0.6798743009567261, + 0.6768563985824585, + 0.6763087511062622, + 0.6751545071601868, + 0.6744989156723022, + 0.6725670695304871, + 0.6717979907989502, + 0.6691677570343018, + 0.6690006852149963, + 0.6682180166244507, + 0.6678112149238586, + 0.665069043636322, + 0.6648703813552856 ], "MultiSV": { "Candidates": [ @@ -57,17 +57,17 @@ "Parts": [ { "CosineScore": [ - 0.8311771750450134, - 0.8310011029243469, - 0.8255152702331543, - 0.8195514678955078, - 0.8145602345466614, - 0.8090661764144897, - 0.8086389303207397, - 0.8074402809143066, - 0.8002950549125671, - 0.7985796332359314, - 0.787818193435669 + 0.831177294254303, + 0.8310007452964783, + 0.8255155086517334, + 0.8195511698722839, + 0.8145607709884644, + 0.8090665936470032, + 0.8086387515068054, + 0.8074401021003723, + 0.8002946972846985, + 0.798579752445221, + 0.7878183722496033 ], "QueryPart": "number of poor hispanic", "SV": [ @@ -86,8 +86,8 @@ }, { "CosineScore": [ - 0.8318259119987488, - 0.8029923439025879 + 0.8318256139755249, + 0.8029921650886536 ], "QueryPart": "women phd", "SV": [ @@ -103,8 +103,8 @@ "Parts": [ { "CosineScore": [ - 0.8366719484329224, - 0.7972691059112549 + 0.836671769618988, + 0.7972695827484131 ], "QueryPart": "number of poor", "SV": [ @@ -114,10 +114,10 @@ }, { "CosineScore": [ - 0.8151505589485168, - 0.7885995507240295, - 0.7775554656982422, - 0.7752053141593933 + 0.8151502013206482, + 0.7885994911193848, + 0.7775559425354004, + 0.7752048969268799 ], "QueryPart": "hispanic women phd", "SV": [ @@ -135,8 +135,8 @@ "Parts": [ { "CosineScore": [ - 0.8495935201644897, - 0.8335005044937134 + 0.8495932221412659, + 0.8335015177726746 ], "QueryPart": "number of poor hispanic women", "SV": [ @@ -146,11 +146,11 @@ }, { "CosineScore": [ - 0.7646968960762024, + 0.7646967172622681, 0.7476688027381897, - 0.7377066612243652, - 0.7362767457962036, - 0.7305882573127747 + 0.7377063632011414, + 0.7362765669822693, + 0.7305881977081299 ], "QueryPart": "phd", "SV": [ diff --git a/server/integration_tests/test_data/detection_api_multivar/showmetheimpactofclimatechangeondrought/debug_info.json b/server/integration_tests/test_data/detection_api_multivar/showmetheimpactofclimatechangeondrought/debug_info.json index 6c44d9f4bd..faec85fed8 100644 --- a/server/integration_tests/test_data/detection_api_multivar/showmetheimpactofclimatechangeondrought/debug_info.json +++ b/server/integration_tests/test_data/detection_api_multivar/showmetheimpactofclimatechangeondrought/debug_info.json @@ -8,30 +8,30 @@ "query_with_places_removed": "show me the impact of climate change on drought", "sv_matching": { "CosineScore": [ - 0.8393681645393372, - 0.79311203956604, - 0.7699974775314331, - 0.7208107709884644, - 0.7175306081771851, + 0.8393685817718506, + 0.7931121587753296, + 0.7699977159500122, + 0.7208102941513062, + 0.7175307869911194, 0.6995436549186707, - 0.6863456964492798, - 0.674246609210968, - 0.6730499267578125, - 0.6703540682792664, - 0.6652892827987671, - 0.6644606590270996, - 0.6353792548179626, - 0.6349931359291077, - 0.6347004771232605, - 0.630818247795105, + 0.6863453984260559, + 0.674246072769165, + 0.673050582408905, + 0.6703541874885559, + 0.6652891635894775, + 0.6644605398178101, + 0.6353793740272522, + 0.6349935531616211, + 0.6347004175186157, + 0.6308181285858154, 0.6290862560272217, - 0.6256592273712158, - 0.6180376410484314, - 0.6162123084068298, - 0.6141720414161682, - 0.6139707565307617, - 0.6138609647750854, - 0.6123877167701721 + 0.6256593465805054, + 0.6180377006530762, + 0.6162121891975403, + 0.6141721606254578, + 0.6139706969261169, + 0.6138609051704407, + 0.6123875379562378 ], "MultiSV": { "Candidates": [ @@ -41,7 +41,7 @@ "Parts": [ { "CosineScore": [ - 0.8787485361099243 + 0.8787480592727661 ], "QueryPart": "show climate change", "SV": [ @@ -50,7 +50,7 @@ }, { "CosineScore": [ - 0.9999998807907104 + 1.000000238418579 ], "QueryPart": "drought", "SV": [ @@ -65,8 +65,8 @@ "Parts": [ { "CosineScore": [ - 0.794236958026886, - 0.7929013967514038 + 0.7942371964454651, + 0.7929015159606934 ], "QueryPart": "show climate", "SV": [ @@ -76,7 +76,7 @@ }, { "CosineScore": [ - 0.8665127158164978 + 0.866513192653656 ], "QueryPart": "change drought", "SV": [ diff --git a/server/integration_tests/test_data/e2e_date_range/femalepopulationincaliforniacountiesbefore2020/chart_config.json b/server/integration_tests/test_data/e2e_date_range/femalepopulationincaliforniacountiesbefore2020/chart_config.json index 4a42baee50..2af3bf0317 100644 --- a/server/integration_tests/test_data/e2e_date_range/femalepopulationincaliforniacountiesbefore2020/chart_config.json +++ b/server/integration_tests/test_data/e2e_date_range/femalepopulationincaliforniacountiesbefore2020/chart_config.json @@ -217,6 +217,38 @@ "denom": "Count_Person", "title": "Count of Mortality Event: Female in Counties of California" }, + { + "columns": [ + { + "tiles": [ + { + "lineTileSpec": { + "endDate": "2019" + }, + "statVarKey": [ + "Count_Death_Female_1151455814" + ], + "title": "Count of Mortality Event: Female in California", + "type": "LINE" + } + ] + }, + { + "tiles": [ + { + "description": "Count of Mortality Event: Female in California", + "statVarKey": [ + "Count_Death_Female_2019" + ], + "title": "Count of Mortality Event: Female in California", + "type": "HIGHLIGHT" + } + ] + } + ], + "denom": "Count_Person", + "title": "Count of Mortality Event: Female" + }, { "columns": [ { @@ -889,11 +921,21 @@ } ], "statVarSpec": { + "Count_Death_Female_1151455814": { + "facetId": "1151455814", + "name": "Count of Mortality Event: Female", + "statVar": "Count_Death_Female" + }, "Count_Death_Female_2017": { "date": "2017", "name": "Count of Mortality Event: Female", "statVar": "Count_Death_Female" }, + "Count_Death_Female_2019": { + "date": "2019", + "name": "Count of Mortality Event: Female", + "statVar": "Count_Death_Female" + }, "Count_Person_25OrMoreYears_EducationalAttainmentBachelorsDegreeOrHigher_Female_1118952551": { "facetId": "1118952551", "name": "Population: Bachelors Degree or Higher, Female", @@ -1421,6 +1463,50 @@ }, "childTopics": [], "exploreMore": { + "Count_Death_Female": { + "age": [ + "Count_Death_10To14Years_Female", + "Count_Death_15To19Years_Female", + "Count_Death_15To64Years_Female", + "Count_Death_20To24Years_Female", + "Count_Death_25To29Years_Female", + "Count_Death_30To34Years_Female", + "Count_Death_35To39Years_Female", + "Count_Death_40To44Years_Female", + "Count_Death_45To49Years_Female", + "Count_Death_50To54Years_Female", + "Count_Death_55To59Years_Female", + "Count_Death_5To9Years_Female", + "Count_Death_60To64Years_Female", + "Count_Death_65OrMoreYears_Female", + "Count_Death_65To69Years_Female", + "Count_Death_70To74Years_Female", + "Count_Death_75To79Years_Female", + "Count_Death_80OrMoreYears_Female", + "Count_Death_Upto14Years_Female", + "Count_Death_Upto4Years_Female" + ], + "causeOfDeath": [ + "Count_MortalityEvent_AIDS_Female", + "Count_MortalityEvent_AccidentalDischargeOfFirearms_Female", + "Count_MortalityEvent_AccidentalDrowningAndSubmersion_Female", + "Count_MortalityEvent_AccidentalExposureToSmokeFireAndFlames_Female", + "Count_MortalityEvent_AccidentalPoisoningAndExposureToNoxiousSubstances_Female", + "Count_MortalityEvent_Accidents(UnintentionalInjuries)_Female", + "Count_MortalityEvent_AcuteAndRapidlyProgressiveNephriticAndNephroticSyndrome_Female", + "Count_MortalityEvent_AcuteAndSubacuteEndocarditis_Female", + "Count_MortalityEvent_AcuteBronchitisAndBronchiolitis_Female", + "Count_MortalityEvent_AcuteMyocardialInfarction_Female", + "Count_MortalityEvent_AcuteRheumaticFeverAndChronicRheumaticHeartDiseases_Female", + "Count_MortalityEvent_AlcoholicLiverDisease_Female", + "Count_MortalityEvent_AllOtherAndUnspecifiedMalignantNeoplasms_Female", + "Count_MortalityEvent_AllOtherDiseases(Residual)_Female", + "Count_MortalityEvent_AllOtherFormsOfChronicIschemicHeartDisease_Female", + "Count_MortalityEvent_AllOtherFormsOfHeartDisease_Female", + "Count_MortalityEvent_AlzheimersDisease_Female", + "Count_MortalityEvent_AorticAneurysmAndDissection_Female" + ] + }, "Count_Person_25OrMoreYears_EducationalAttainmentBachelorsDegreeOrHigher_Female": { "age": [ "Count_Person_18To24Years_EducationalAttainmentBachelorsDegreeOrHigher_Female", diff --git a/server/integration_tests/test_data/e2e_date_range/femalepopulationincaliforniasinceapr2019/chart_config.json b/server/integration_tests/test_data/e2e_date_range/femalepopulationincaliforniasinceapr2019/chart_config.json index ad397d72ea..41211576d7 100644 --- a/server/integration_tests/test_data/e2e_date_range/femalepopulationincaliforniasinceapr2019/chart_config.json +++ b/server/integration_tests/test_data/e2e_date_range/femalepopulationincaliforniasinceapr2019/chart_config.json @@ -185,6 +185,38 @@ "denom": "Count_Person", "title": "Non-Separated Married Women in Counties of California" }, + { + "columns": [ + { + "tiles": [ + { + "lineTileSpec": { + "startDate": "2019" + }, + "statVarKey": [ + "Count_Death_Female_1151455814" + ], + "title": "Count of Mortality Event: Female in California", + "type": "LINE" + } + ] + }, + { + "tiles": [ + { + "description": "Count of Mortality Event: Female in California", + "statVarKey": [ + "Count_Death_Female" + ], + "title": "Count of Mortality Event: Female in California", + "type": "HIGHLIGHT" + } + ] + } + ], + "denom": "Count_Person", + "title": "Count of Mortality Event: Female" + }, { "columns": [ { @@ -854,81 +886,17 @@ ], "denom": "Count_Person", "title": "Foreign Born Women" - }, - { - "columns": [ - { - "tiles": [ - { - "lineTileSpec": { - "startDate": "2019" - }, - "statVarKey": [ - "Count_Person_16OrMoreYears_Female_WithEarnings_1472009826" - ], - "title": "Population: 16 Years or More, Female, With Earnings in California", - "type": "LINE" - } - ] - }, - { - "tiles": [ - { - "description": "Population: 16 Years or More, Female, With Earnings in California", - "statVarKey": [ - "Count_Person_16OrMoreYears_Female_WithEarnings" - ], - "title": "Population: 16 Years or More, Female, With Earnings in California", - "type": "HIGHLIGHT" - } - ] - } - ], - "denom": "Count_Person", - "title": "Population: 16 Years or More, Female, With Earnings" - }, - { - "columns": [ - { - "tiles": [ - { - "statVarKey": [ - "Count_Person_16OrMoreYears_Female_WithEarnings" - ], - "title": "Population: 16 Years or More, Female, With Earnings in Counties of California (${date})", - "type": "MAP" - } - ] - }, - { - "tiles": [ - { - "rankingTileSpec": { - "rankingCount": 5, - "showHighestLowest": true - }, - "statVarKey": [ - "Count_Person_16OrMoreYears_Female_WithEarnings" - ], - "title": "Population: 16 Years or More, Female, With Earnings in Counties of California (${date})", - "type": "RANKING" - } - ] - } - ], - "denom": "Count_Person", - "title": "Population: 16 Years or More, Female, With Earnings in Counties of California" } ], "statVarSpec": { - "Count_Person_16OrMoreYears_Female_WithEarnings": { - "name": "Population: 16 Years or More, Female, With Earnings", - "statVar": "Count_Person_16OrMoreYears_Female_WithEarnings" + "Count_Death_Female": { + "name": "Count of Mortality Event: Female", + "statVar": "Count_Death_Female" }, - "Count_Person_16OrMoreYears_Female_WithEarnings_1472009826": { - "facetId": "1472009826", - "name": "Population: 16 Years or More, Female, With Earnings", - "statVar": "Count_Person_16OrMoreYears_Female_WithEarnings" + "Count_Death_Female_1151455814": { + "facetId": "1151455814", + "name": "Count of Mortality Event: Female", + "statVar": "Count_Death_Female" }, "Count_Person_25OrMoreYears_EducationalAttainmentBachelorsDegreeOrHigher_Female": { "name": "Population: Bachelors Degree or Higher, Female", @@ -1443,6 +1411,49 @@ }, "childTopics": [], "exploreMore": { + "Count_Death_Female": { + "age": [ + "Count_Death_10To14Years_Female", + "Count_Death_15To19Years_Female", + "Count_Death_15To64Years_Female", + "Count_Death_20To24Years_Female", + "Count_Death_25To29Years_Female", + "Count_Death_30To34Years_Female", + "Count_Death_35To39Years_Female", + "Count_Death_40To44Years_Female", + "Count_Death_45To49Years_Female", + "Count_Death_50To54Years_Female", + "Count_Death_55To59Years_Female", + "Count_Death_5To9Years_Female", + "Count_Death_60To64Years_Female", + "Count_Death_65OrMoreYears_Female", + "Count_Death_65To69Years_Female", + "Count_Death_70To74Years_Female", + "Count_Death_75To79Years_Female", + "Count_Death_80OrMoreYears_Female", + "Count_Death_Upto14Years_Female", + "Count_Death_Upto4Years_Female" + ], + "causeOfDeath": [ + "Count_MortalityEvent_AIDS_Female", + "Count_MortalityEvent_AccidentalDrowningAndSubmersion_Female", + "Count_MortalityEvent_AccidentalExposureToSmokeFireAndFlames_Female", + "Count_MortalityEvent_AccidentalPoisoningAndExposureToNoxiousSubstances_Female", + "Count_MortalityEvent_Accidents(UnintentionalInjuries)_Female", + "Count_MortalityEvent_AcuteAndRapidlyProgressiveNephriticAndNephroticSyndrome_Female", + "Count_MortalityEvent_AcuteAndSubacuteEndocarditis_Female", + "Count_MortalityEvent_AcuteBronchitisAndBronchiolitis_Female", + "Count_MortalityEvent_AcuteMyocardialInfarction_Female", + "Count_MortalityEvent_AcuteRheumaticFeverAndChronicRheumaticHeartDiseases_Female", + "Count_MortalityEvent_AlcoholicLiverDisease_Female", + "Count_MortalityEvent_AllOtherAndUnspecifiedMalignantNeoplasms_Female", + "Count_MortalityEvent_AllOtherDiseases(Residual)_Female", + "Count_MortalityEvent_AllOtherFormsOfChronicIschemicHeartDisease_Female", + "Count_MortalityEvent_AllOtherFormsOfHeartDisease_Female", + "Count_MortalityEvent_AlzheimersDisease_Female", + "Count_MortalityEvent_AorticAneurysmAndDissection_Female" + ] + }, "Count_Person_25OrMoreYears_EducationalAttainmentBachelorsDegreeOrHigher_Female": { "age": [ "Count_Person_18To24Years_EducationalAttainmentBachelorsDegreeOrHigher_Female", diff --git a/server/integration_tests/test_data/e2e_date_range/lifeexpectancyinusstatesinthelast5years/chart_config.json b/server/integration_tests/test_data/e2e_date_range/lifeexpectancyinusstatesinthelast5years/chart_config.json index 9b8a9d4c5d..36c9afa15b 100644 --- a/server/integration_tests/test_data/e2e_date_range/lifeexpectancyinusstatesinthelast5years/chart_config.json +++ b/server/integration_tests/test_data/e2e_date_range/lifeexpectancyinusstatesinthelast5years/chart_config.json @@ -150,6 +150,38 @@ ], "title": "Life Expectancy by Gender" }, + { + "columns": [ + { + "tiles": [ + { + "statVarKey": [ + "Count_Death" + ], + "title": "Number of Deaths in States of United States (${date})", + "type": "MAP" + } + ] + }, + { + "tiles": [ + { + "rankingTileSpec": { + "rankingCount": 5, + "showHighestLowest": true + }, + "statVarKey": [ + "Count_Death" + ], + "title": "Number of Deaths in States of United States (${date})", + "type": "RANKING" + } + ] + } + ], + "denom": "Count_Person", + "title": "Number of Deaths in States of United States" + }, { "columns": [ { @@ -278,6 +310,38 @@ ], "title": "Causes of Death" }, + { + "columns": [ + { + "tiles": [ + { + "statVarKey": [ + "Count_Death_Female" + ], + "title": "Count of Mortality Event: Female in States of United States (${date})", + "type": "MAP" + } + ] + }, + { + "tiles": [ + { + "rankingTileSpec": { + "rankingCount": 5, + "showHighestLowest": true + }, + "statVarKey": [ + "Count_Death_Female" + ], + "title": "Count of Mortality Event: Female in States of United States (${date})", + "type": "RANKING" + } + ] + } + ], + "denom": "Count_Person", + "title": "Count of Mortality Event: Female in States of United States" + }, { "columns": [ { diff --git a/server/integration_tests/test_data/e2e_no_default_place_specified/chart_config.json b/server/integration_tests/test_data/e2e_no_default_place_specified/chart_config.json index 12d8754f1b..ef57c0251c 100644 --- a/server/integration_tests/test_data/e2e_no_default_place_specified/chart_config.json +++ b/server/integration_tests/test_data/e2e_no_default_place_specified/chart_config.json @@ -205,6 +205,38 @@ "denom": "Count_Person", "title": "Count of Mortality Event: Female" }, + { + "columns": [ + { + "tiles": [ + { + "statVarKey": [ + "Count_Death_Female" + ], + "title": "Count of Mortality Event: Female in States of United States of America (${date})", + "type": "MAP" + } + ] + }, + { + "tiles": [ + { + "rankingTileSpec": { + "rankingCount": 5, + "showHighestLowest": true + }, + "statVarKey": [ + "Count_Death_Female" + ], + "title": "Count of Mortality Event: Female in States of United States of America (${date})", + "type": "RANKING" + } + ] + } + ], + "denom": "Count_Person", + "title": "Count of Mortality Event: Female in States of United States of America" + }, { "columns": [ { @@ -1626,6 +1658,7 @@ "age": [ "Count_Person_0To4Years_Female_WhiteAlone", "Count_Person_0Years_Female_WhiteAlone", + "Count_Person_100Years_Female_WhiteAlone", "Count_Person_10To14Years_Female_WhiteAlone", "Count_Person_10Years_Female_WhiteAlone", "Count_Person_11Years_Female_WhiteAlone", @@ -1728,7 +1761,22 @@ "Count_Person_83Years_Female_WhiteAlone", "Count_Person_84Years_Female_WhiteAlone", "Count_Person_85OrMoreYears_Female_WhiteAlone", + "Count_Person_85Years_Female_WhiteAlone", + "Count_Person_86Years_Female_WhiteAlone", + "Count_Person_87Years_Female_WhiteAlone", + "Count_Person_88Years_Female_WhiteAlone", + "Count_Person_89Years_Female_WhiteAlone", "Count_Person_8Years_Female_WhiteAlone", + "Count_Person_90Years_Female_WhiteAlone", + "Count_Person_91Years_Female_WhiteAlone", + "Count_Person_92Years_Female_WhiteAlone", + "Count_Person_93Years_Female_WhiteAlone", + "Count_Person_94Years_Female_WhiteAlone", + "Count_Person_95Years_Female_WhiteAlone", + "Count_Person_96Years_Female_WhiteAlone", + "Count_Person_97Years_Female_WhiteAlone", + "Count_Person_98Years_Female_WhiteAlone", + "Count_Person_99Years_Female_WhiteAlone", "Count_Person_9Years_Female_WhiteAlone" ] }, diff --git a/server/integration_tests/test_data/e2e_single_date/lifeexpectancyinusstatesin2018/chart_config.json b/server/integration_tests/test_data/e2e_single_date/lifeexpectancyinusstatesin2018/chart_config.json index 83645c11d0..0dcbadae0c 100644 --- a/server/integration_tests/test_data/e2e_single_date/lifeexpectancyinusstatesin2018/chart_config.json +++ b/server/integration_tests/test_data/e2e_single_date/lifeexpectancyinusstatesin2018/chart_config.json @@ -150,6 +150,38 @@ ], "title": "Life Expectancy by Gender" }, + { + "columns": [ + { + "tiles": [ + { + "statVarKey": [ + "Count_Death_2018" + ], + "title": "Number of Deaths in States of United States (${date})", + "type": "MAP" + } + ] + }, + { + "tiles": [ + { + "rankingTileSpec": { + "rankingCount": 5, + "showHighestLowest": true + }, + "statVarKey": [ + "Count_Death_2018" + ], + "title": "Number of Deaths in States of United States (${date})", + "type": "RANKING" + } + ] + } + ], + "denom": "Count_Person", + "title": "Number of Deaths in States of United States" + }, { "columns": [ { @@ -278,6 +310,38 @@ ], "title": "Causes of Death" }, + { + "columns": [ + { + "tiles": [ + { + "statVarKey": [ + "Count_Death_Female_2018" + ], + "title": "Count of Mortality Event: Female in States of United States (${date})", + "type": "MAP" + } + ] + }, + { + "tiles": [ + { + "rankingTileSpec": { + "rankingCount": 5, + "showHighestLowest": true + }, + "statVarKey": [ + "Count_Death_Female_2018" + ], + "title": "Count of Mortality Event: Female in States of United States (${date})", + "type": "RANKING" + } + ] + } + ], + "denom": "Count_Person", + "title": "Count of Mortality Event: Female in States of United States" + }, { "columns": [ { diff --git a/server/integration_tests/test_data/e2e_single_date/populationintheusinthelastyear/chart_config.json b/server/integration_tests/test_data/e2e_single_date/populationintheusinthelastyear/chart_config.json index 6e5905ebc3..6399b25bc3 100644 --- a/server/integration_tests/test_data/e2e_single_date/populationintheusinthelastyear/chart_config.json +++ b/server/integration_tests/test_data/e2e_single_date/populationintheusinthelastyear/chart_config.json @@ -13,7 +13,7 @@ "startDate": "2023" }, "statVarKey": [ - "Count_Person_3981252704" + "Count_Person_2176550201" ], "title": "Population in United States", "type": "LINE" @@ -35,6 +35,99 @@ ], "title": "Population" }, + { + "columns": [ + { + "tiles": [ + { + "statVarKey": [ + "Count_Person" + ], + "title": "Population in States of United States (${date})", + "type": "MAP" + } + ] + }, + { + "tiles": [ + { + "rankingTileSpec": { + "rankingCount": 5, + "showHighestLowest": true + }, + "statVarKey": [ + "Count_Person" + ], + "title": "Population in States of United States (${date})", + "type": "RANKING" + } + ] + } + ], + "title": "Population in States of United States" + }, + { + "columns": [ + { + "tiles": [ + { + "lineTileSpec": { + "startDate": "2023" + }, + "statVarKey": [ + "Count_Person_PerArea_1151455814" + ], + "title": "Population Density in United States", + "type": "LINE" + } + ] + }, + { + "tiles": [ + { + "description": "Population Density in United States", + "statVarKey": [ + "Count_Person_PerArea" + ], + "title": "Population Density in United States", + "type": "HIGHLIGHT" + } + ] + } + ], + "title": "Population Density" + }, + { + "columns": [ + { + "tiles": [ + { + "statVarKey": [ + "Count_Person_PerArea" + ], + "title": "Population Density in States of United States (${date})", + "type": "MAP" + } + ] + }, + { + "tiles": [ + { + "rankingTileSpec": { + "rankingCount": 5, + "showHighestLowest": true + }, + "statVarKey": [ + "Count_Person_PerArea" + ], + "title": "Population Density in States of United States (${date})", + "type": "RANKING" + } + ] + } + ], + "title": "Population Density in States of United States" + }, { "columns": [ { @@ -44,27 +137,549 @@ "startDate": "2023" }, "statVarKey": [ - "GrowthRate_Count_Person_3981252704" + "GrowthRate_Count_Person_3981252704" + ], + "title": "Rate of Population Growth in United States", + "type": "LINE" + } + ] + }, + { + "tiles": [ + { + "description": "Rate of Population Growth in United States", + "statVarKey": [ + "GrowthRate_Count_Person" + ], + "title": "Rate of Population Growth in United States", + "type": "HIGHLIGHT" + } + ] + } + ], + "title": "Rate of Population Growth" + }, + { + "columns": [ + { + "tiles": [ + { + "statVarKey": [ + "Count_Person_85OrMoreYears_Female" + ], + "title": "Women Over 85 in States of United States (${date})", + "type": "MAP" + } + ] + }, + { + "tiles": [ + { + "rankingTileSpec": { + "rankingCount": 5, + "showHighestLowest": true + }, + "statVarKey": [ + "Count_Person_85OrMoreYears_Female" + ], + "title": "Women Over 85 in States of United States (${date})", + "type": "RANKING" + } + ] + } + ], + "denom": "Count_Person", + "title": "Women Over 85 in States of United States" + }, + { + "columns": [ + { + "tiles": [ + { + "statVarKey": [ + "Count_Person_85OrMoreYears_Male" + ], + "title": "Men Over 85 in States of United States (${date})", + "type": "MAP" + } + ] + }, + { + "tiles": [ + { + "rankingTileSpec": { + "rankingCount": 5, + "showHighestLowest": true + }, + "statVarKey": [ + "Count_Person_85OrMoreYears_Male" + ], + "title": "Men Over 85 in States of United States (${date})", + "type": "RANKING" + } + ] + } + ], + "denom": "Count_Person", + "title": "Men Over 85 in States of United States" + }, + { + "columns": [ + { + "tiles": [ + { + "lineTileSpec": { + "startDate": "2023" + }, + "statVarKey": [ + "Count_Person_Female_3999249536", + "Count_Person_Male_3999249536" + ], + "title": "Population by Gender in United States", + "type": "LINE" + } + ] + } + ], + "denom": "Count_Person", + "title": "Population by Gender" + }, + { + "columns": [ + { + "tiles": [ + { + "statVarKey": [ + "Count_Person_Female" + ], + "title": "Women in States of United States (${date})", + "type": "MAP" + } + ] + }, + { + "tiles": [ + { + "rankingTileSpec": { + "rankingCount": 5, + "showHighestLowest": true + }, + "statVarKey": [ + "Count_Person_Female" + ], + "title": "Women in States of United States (${date})", + "type": "RANKING" + } + ] + } + ], + "denom": "Count_Person", + "title": "Women in States of United States" + }, + { + "columns": [ + { + "tiles": [ + { + "statVarKey": [ + "Count_Person_Male" + ], + "title": "Men in States of United States (${date})", + "type": "MAP" + } + ] + }, + { + "tiles": [ + { + "rankingTileSpec": { + "rankingCount": 5, + "showHighestLowest": true + }, + "statVarKey": [ + "Count_Person_Male" + ], + "title": "Men in States of United States (${date})", + "type": "RANKING" + } + ] + } + ], + "denom": "Count_Person", + "title": "Men in States of United States" + }, + { + "columns": [ + { + "tiles": [ + { + "lineTileSpec": { + "startDate": "2023" + }, + "statVarKey": [ + "Count_Person_WhiteAlone_3935616881", + "Count_Person_BlackOrAfricanAmericanAlone_3935616881", + "Count_Person_HispanicOrLatino_2317674805", + "Count_Person_AsianAlone_3935616881", + "Count_Person_AmericanIndianAndAlaskaNativeAlone_3935616881" + ], + "title": "Monoracial Breakdown in United States", + "type": "LINE" + } + ] + } + ], + "denom": "Count_Person", + "title": "Monoracial Breakdown" + }, + { + "columns": [ + { + "tiles": [ + { + "statVarKey": [ + "Count_Person_WhiteAlone" + ], + "title": "White Monoracial Population in States of United States (${date})", + "type": "MAP" + } + ] + }, + { + "tiles": [ + { + "rankingTileSpec": { + "rankingCount": 5, + "showHighestLowest": true + }, + "statVarKey": [ + "Count_Person_WhiteAlone" + ], + "title": "White Monoracial Population in States of United States (${date})", + "type": "RANKING" + } + ] + } + ], + "denom": "Count_Person", + "title": "White Monoracial Population in States of United States" + }, + { + "columns": [ + { + "tiles": [ + { + "statVarKey": [ + "Count_Person_BlackOrAfricanAmericanAlone" + ], + "title": "Black Monoracial Population in States of United States (${date})", + "type": "MAP" + } + ] + }, + { + "tiles": [ + { + "rankingTileSpec": { + "rankingCount": 5, + "showHighestLowest": true + }, + "statVarKey": [ + "Count_Person_BlackOrAfricanAmericanAlone" + ], + "title": "Black Monoracial Population in States of United States (${date})", + "type": "RANKING" + } + ] + } + ], + "denom": "Count_Person", + "title": "Black Monoracial Population in States of United States" + }, + { + "columns": [ + { + "tiles": [ + { + "lineTileSpec": { + "startDate": "2023" + }, + "statVarKey": [ + "Count_Person_AmericanIndianAndAlaskaNativeAloneOrInCombinationWithOneOrMoreOtherRaces_3935616881", + "Count_Person_AsianAloneOrInCombinationWithOneOrMoreOtherRaces_3935616881", + "Count_Person_BlackOrAfricanAmericanAloneOrInCombinationWithOneOrMoreOtherRaces_3935616881", + "Count_Person_NativeHawaiianAndOtherPacificIslanderAloneOrInCombinationWithOneOrMoreOtherRaces_3935616881", + "Count_Person_WhiteAloneOrInCombinationWithOneOrMoreOtherRaces_3935616881" + ], + "title": "Monoracial/multiracial Breakdown in United States", + "type": "LINE" + } + ] + } + ], + "denom": "Count_Person", + "title": "Monoracial/multiracial Breakdown" + }, + { + "columns": [ + { + "tiles": [ + { + "statVarKey": [ + "Count_Person_AmericanIndianAndAlaskaNativeAloneOrInCombinationWithOneOrMoreOtherRaces" + ], + "title": "American Indian and Alaska Native Population, Monoracial/Multiracial in States of United States (${date})", + "type": "MAP" + } + ] + }, + { + "tiles": [ + { + "rankingTileSpec": { + "rankingCount": 5, + "showHighestLowest": true + }, + "statVarKey": [ + "Count_Person_AmericanIndianAndAlaskaNativeAloneOrInCombinationWithOneOrMoreOtherRaces" + ], + "title": "American Indian and Alaska Native Population, Monoracial/Multiracial in States of United States (${date})", + "type": "RANKING" + } + ] + } + ], + "denom": "Count_Person", + "title": "American Indian and Alaska Native Population, Monoracial/Multiracial in States of United States" + }, + { + "columns": [ + { + "tiles": [ + { + "statVarKey": [ + "Count_Person_AsianAloneOrInCombinationWithOneOrMoreOtherRaces" + ], + "title": "Asian Population, Monoracial/Multiracial in States of United States (${date})", + "type": "MAP" + } + ] + }, + { + "tiles": [ + { + "rankingTileSpec": { + "rankingCount": 5, + "showHighestLowest": true + }, + "statVarKey": [ + "Count_Person_AsianAloneOrInCombinationWithOneOrMoreOtherRaces" ], - "title": "Rate of Population Growth in United States", - "type": "LINE" + "title": "Asian Population, Monoracial/Multiracial in States of United States (${date})", + "type": "RANKING" + } + ] + } + ], + "denom": "Count_Person", + "title": "Asian Population, Monoracial/Multiracial in States of United States" + }, + { + "columns": [ + { + "tiles": [ + { + "barTileSpec": { + "maxPlaces": 15, + "maxVariables": 15, + "sort": "DESCENDING" + }, + "comparisonPlaces": [ + "country/USA" + ], + "statVarKey": [ + "Count_Person_HispanicOrLatino_AmericanIndianOrAlaskaNativeAlone_multiple_place_bar_block", + "Count_Person_HispanicOrLatino_AsianAlone_multiple_place_bar_block", + "Count_Person_HispanicOrLatino_BlackOrAfricanAmericanAlone_multiple_place_bar_block", + "Count_Person_HispanicOrLatino_NativeHawaiianOrOtherPacificIslanderAlone_multiple_place_bar_block", + "Count_Person_HispanicOrLatino_TwoOrMoreRaces_multiple_place_bar_block", + "Count_Person_HispanicOrLatino_WhiteAlone_multiple_place_bar_block", + "Count_Person_HispanicOrLatino_AmericanIndianAndAlaskaNativeAloneOrInCombinationWithOneOrMoreOtherRaces_multiple_place_bar_block", + "Count_Person_HispanicOrLatino_AsianAloneOrInCombinationWithOneOrMoreOtherRaces_multiple_place_bar_block", + "Count_Person_HispanicOrLatino_NativeHawaiianAndOtherPacificIslanderAloneOrInCombinationWithOneOrMoreOtherRaces_multiple_place_bar_block", + "Count_Person_HispanicOrLatino_WhiteAloneOrInCombinationWithOneOrMoreOtherRaces_multiple_place_bar_block" + ], + "title": "Racial Breakdown With Hispanic Consideration in United States (${date})", + "type": "BAR" + } + ] + } + ], + "denom": "Count_Person", + "title": "Racial Breakdown With Hispanic Consideration" + }, + { + "columns": [ + { + "tiles": [ + { + "statVarKey": [ + "Count_Person_HispanicOrLatino_AmericanIndianOrAlaskaNativeAlone" + ], + "title": "Hispanic American Indian Population in States of United States (${date})", + "type": "MAP" } ] }, { "tiles": [ { - "description": "Rate of Population Growth in United States", + "rankingTileSpec": { + "rankingCount": 5, + "showHighestLowest": true + }, "statVarKey": [ - "GrowthRate_Count_Person" + "Count_Person_HispanicOrLatino_AmericanIndianOrAlaskaNativeAlone" ], - "title": "Rate of Population Growth in United States", - "type": "HIGHLIGHT" + "title": "Hispanic American Indian Population in States of United States (${date})", + "type": "RANKING" } ] } ], - "title": "Rate of Population Growth" + "denom": "Count_Person", + "title": "Hispanic American Indian Population in States of United States" + }, + { + "columns": [ + { + "tiles": [ + { + "statVarKey": [ + "Count_Person_HispanicOrLatino_AsianAlone" + ], + "title": "Hispanic Asian Population in States of United States (${date})", + "type": "MAP" + } + ] + }, + { + "tiles": [ + { + "rankingTileSpec": { + "rankingCount": 5, + "showHighestLowest": true + }, + "statVarKey": [ + "Count_Person_HispanicOrLatino_AsianAlone" + ], + "title": "Hispanic Asian Population in States of United States (${date})", + "type": "RANKING" + } + ] + } + ], + "denom": "Count_Person", + "title": "Hispanic Asian Population in States of United States" + }, + { + "columns": [ + { + "tiles": [ + { + "barTileSpec": { + "maxPlaces": 15, + "maxVariables": 15, + "sort": "DESCENDING" + }, + "comparisonPlaces": [ + "country/USA" + ], + "statVarKey": [ + "Count_Person_WhiteAloneNotHispanicOrLatino_multiple_place_bar_block", + "Count_Person_NotHispanicOrLatino_AmericanIndianOrAlaskaNativeAlone_multiple_place_bar_block", + "Count_Person_NotHispanicOrLatino_AsianAlone_multiple_place_bar_block", + "Count_Person_NotHispanicOrLatino_BlackOrAfricanAmericanAlone_multiple_place_bar_block", + "Count_Person_NotHispanicOrLatino_NativeHawaiianOrOtherPacificIslanderAlone_multiple_place_bar_block", + "Count_Person_NotHispanicOrLatino_AmericanIndianAndAlaskaNativeAloneOrInCombinationWithOneOrMoreOtherRaces_multiple_place_bar_block", + "Count_Person_NotHispanicOrLatino_AsianAloneOrInCombinationWithOneOrMoreOtherRaces_multiple_place_bar_block", + "Count_Person_NotHispanicOrLatino_BlackOrAfricanAmericanAloneOrInCombinationWithOneOrMoreOtherRaces_multiple_place_bar_block", + "Count_Person_NotHispanicOrLatino_NativeHawaiianAndOtherPacificIslanderAloneOrInCombinationWithOneOrMoreOtherRaces_multiple_place_bar_block", + "Count_Person_NotHispanicOrLatino_TwoOrMoreRaces_multiple_place_bar_block", + "Count_Person_NotHispanicOrLatino_WhiteAloneOrInCombinationWithOneOrMoreOtherRaces_multiple_place_bar_block" + ], + "title": "Racial Breakdown With Non Hispanic Consideration in United States (${date})", + "type": "BAR" + } + ] + } + ], + "denom": "Count_Person", + "title": "Racial Breakdown With Non Hispanic Consideration" + }, + { + "columns": [ + { + "tiles": [ + { + "statVarKey": [ + "Count_Person_WhiteAloneNotHispanicOrLatino" + ], + "title": "White Hispanic Monoracial Population in States of United States (${date})", + "type": "MAP" + } + ] + }, + { + "tiles": [ + { + "rankingTileSpec": { + "rankingCount": 5, + "showHighestLowest": true + }, + "statVarKey": [ + "Count_Person_WhiteAloneNotHispanicOrLatino" + ], + "title": "White Hispanic Monoracial Population in States of United States (${date})", + "type": "RANKING" + } + ] + } + ], + "denom": "Count_Person", + "title": "White Hispanic Monoracial Population in States of United States" + }, + { + "columns": [ + { + "tiles": [ + { + "statVarKey": [ + "Count_Person_NotHispanicOrLatino_AmericanIndianOrAlaskaNativeAlone" + ], + "title": "Non Hispanic Population Identifying as American Indian or Alaska Native Alone in States of United States (${date})", + "type": "MAP" + } + ] + }, + { + "tiles": [ + { + "rankingTileSpec": { + "rankingCount": 5, + "showHighestLowest": true + }, + "statVarKey": [ + "Count_Person_NotHispanicOrLatino_AmericanIndianOrAlaskaNativeAlone" + ], + "title": "Non Hispanic Population Identifying as American Indian or Alaska Native Alone in States of United States (${date})", + "type": "RANKING" + } + ] + } + ], + "denom": "Count_Person", + "title": "Non Hispanic Population Identifying as American Indian or Alaska Native Alone in States of United States" }, { "columns": [ @@ -291,18 +906,141 @@ ], "denom": "Count_Person", "title": "Population: Household" + }, + { + "columns": [ + { + "tiles": [ + { + "lineTileSpec": { + "startDate": "2023" + }, + "statVarKey": [ + "Count_Death_1151455814" + ], + "title": "Number of Deaths in United States", + "type": "LINE" + } + ] + }, + { + "tiles": [ + { + "description": "Number of Deaths in United States", + "statVarKey": [ + "Count_Death" + ], + "title": "Number of Deaths in United States", + "type": "HIGHLIGHT" + } + ] + } + ], + "denom": "Count_Person", + "title": "Number of Deaths" + }, + { + "columns": [ + { + "tiles": [ + { + "statVarKey": [ + "Count_Death" + ], + "title": "Number of Deaths in States of United States (${date})", + "type": "MAP" + } + ] + }, + { + "tiles": [ + { + "rankingTileSpec": { + "rankingCount": 5, + "showHighestLowest": true + }, + "statVarKey": [ + "Count_Death" + ], + "title": "Number of Deaths in States of United States (${date})", + "type": "RANKING" + } + ] + } + ], + "denom": "Count_Person", + "title": "Number of Deaths in States of United States" } ], "statVarSpec": { + "Count_Death": { + "name": "Number of Deaths", + "statVar": "Count_Death" + }, + "Count_Death_1151455814": { + "facetId": "1151455814", + "name": "Number of Deaths", + "statVar": "Count_Death" + }, "Count_Person": { "name": "Population", "statVar": "Count_Person" }, - "Count_Person_3981252704": { - "facetId": "3981252704", + "Count_Person_2176550201": { + "facetId": "2176550201", "name": "Population", "statVar": "Count_Person" }, + "Count_Person_85OrMoreYears_Female": { + "name": "Women over 85", + "statVar": "Count_Person_85OrMoreYears_Female" + }, + "Count_Person_85OrMoreYears_Male": { + "name": "Men over 85", + "statVar": "Count_Person_85OrMoreYears_Male" + }, + "Count_Person_AmericanIndianAndAlaskaNativeAloneOrInCombinationWithOneOrMoreOtherRaces": { + "name": "American Indian and Alaska Native Population, Monoracial/Multiracial", + "statVar": "Count_Person_AmericanIndianAndAlaskaNativeAloneOrInCombinationWithOneOrMoreOtherRaces" + }, + "Count_Person_AmericanIndianAndAlaskaNativeAloneOrInCombinationWithOneOrMoreOtherRaces_3935616881": { + "facetId": "3935616881", + "name": "American Indian and Alaska Native Population, Monoracial/Multiracial", + "statVar": "Count_Person_AmericanIndianAndAlaskaNativeAloneOrInCombinationWithOneOrMoreOtherRaces" + }, + "Count_Person_AmericanIndianAndAlaskaNativeAlone_3935616881": { + "facetId": "3935616881", + "name": "Population American Indian or Alaska Native Alone", + "statVar": "Count_Person_AmericanIndianAndAlaskaNativeAlone" + }, + "Count_Person_AsianAloneOrInCombinationWithOneOrMoreOtherRaces": { + "name": "Asian Population, Monoracial/Multiracial", + "statVar": "Count_Person_AsianAloneOrInCombinationWithOneOrMoreOtherRaces" + }, + "Count_Person_AsianAloneOrInCombinationWithOneOrMoreOtherRaces_3935616881": { + "facetId": "3935616881", + "name": "Asian Population, Monoracial/Multiracial", + "statVar": "Count_Person_AsianAloneOrInCombinationWithOneOrMoreOtherRaces" + }, + "Count_Person_AsianAlone_3935616881": { + "facetId": "3935616881", + "name": "Population Asian Alone", + "statVar": "Count_Person_AsianAlone" + }, + "Count_Person_BlackOrAfricanAmericanAlone": { + "name": "Black Monoracial Population", + "statVar": "Count_Person_BlackOrAfricanAmericanAlone" + }, + "Count_Person_BlackOrAfricanAmericanAloneOrInCombinationWithOneOrMoreOtherRaces_3935616881": { + "facetId": "3935616881", + "name": "Black Population, Monoracial/Multiracial", + "statVar": "Count_Person_BlackOrAfricanAmericanAloneOrInCombinationWithOneOrMoreOtherRaces" + }, + "Count_Person_BlackOrAfricanAmericanAlone_3935616881": { + "facetId": "3935616881", + "name": "Black Monoracial Population", + "statVar": "Count_Person_BlackOrAfricanAmericanAlone" + }, "Count_Person_Employed": { "name": "Population With Current Employment", "statVar": "Count_Person_Employed" @@ -312,6 +1050,68 @@ "name": "Population With Current Employment", "statVar": "Count_Person_Employed" }, + "Count_Person_Female": { + "name": "Women", + "statVar": "Count_Person_Female" + }, + "Count_Person_Female_3999249536": { + "facetId": "3999249536", + "name": "Women", + "statVar": "Count_Person_Female" + }, + "Count_Person_HispanicOrLatino_2317674805": { + "facetId": "2317674805", + "name": "Hispanic Population", + "statVar": "Count_Person_HispanicOrLatino" + }, + "Count_Person_HispanicOrLatino_AmericanIndianAndAlaskaNativeAloneOrInCombinationWithOneOrMoreOtherRaces_multiple_place_bar_block": { + "name": "Hispanic American Indian Population", + "statVar": "Count_Person_HispanicOrLatino_AmericanIndianAndAlaskaNativeAloneOrInCombinationWithOneOrMoreOtherRaces" + }, + "Count_Person_HispanicOrLatino_AmericanIndianOrAlaskaNativeAlone": { + "name": "Hispanic American Indian Population", + "statVar": "Count_Person_HispanicOrLatino_AmericanIndianOrAlaskaNativeAlone" + }, + "Count_Person_HispanicOrLatino_AmericanIndianOrAlaskaNativeAlone_multiple_place_bar_block": { + "name": "Hispanic American Indian Population", + "statVar": "Count_Person_HispanicOrLatino_AmericanIndianOrAlaskaNativeAlone" + }, + "Count_Person_HispanicOrLatino_AsianAlone": { + "name": "Hispanic Asian Population", + "statVar": "Count_Person_HispanicOrLatino_AsianAlone" + }, + "Count_Person_HispanicOrLatino_AsianAloneOrInCombinationWithOneOrMoreOtherRaces_multiple_place_bar_block": { + "name": "Hispanic Asian Population", + "statVar": "Count_Person_HispanicOrLatino_AsianAloneOrInCombinationWithOneOrMoreOtherRaces" + }, + "Count_Person_HispanicOrLatino_AsianAlone_multiple_place_bar_block": { + "name": "Hispanic Asian Population", + "statVar": "Count_Person_HispanicOrLatino_AsianAlone" + }, + "Count_Person_HispanicOrLatino_BlackOrAfricanAmericanAlone_multiple_place_bar_block": { + "name": "Hispanic African American Population", + "statVar": "Count_Person_HispanicOrLatino_BlackOrAfricanAmericanAlone" + }, + "Count_Person_HispanicOrLatino_NativeHawaiianAndOtherPacificIslanderAloneOrInCombinationWithOneOrMoreOtherRaces_multiple_place_bar_block": { + "name": "Hispanic Native Hawaiian/Other Pacific Islander Population. Monoracial/Multiracial", + "statVar": "Count_Person_HispanicOrLatino_NativeHawaiianAndOtherPacificIslanderAloneOrInCombinationWithOneOrMoreOtherRaces" + }, + "Count_Person_HispanicOrLatino_NativeHawaiianOrOtherPacificIslanderAlone_multiple_place_bar_block": { + "name": "Hispanic Native Hawaiian/Other Pacific Islander Alone Population", + "statVar": "Count_Person_HispanicOrLatino_NativeHawaiianOrOtherPacificIslanderAlone" + }, + "Count_Person_HispanicOrLatino_TwoOrMoreRaces_multiple_place_bar_block": { + "name": "Hispanic Multiracial Population", + "statVar": "Count_Person_HispanicOrLatino_TwoOrMoreRaces" + }, + "Count_Person_HispanicOrLatino_WhiteAloneOrInCombinationWithOneOrMoreOtherRaces_multiple_place_bar_block": { + "name": "White Hispanic Population, Monoracial/Multiracial", + "statVar": "Count_Person_HispanicOrLatino_WhiteAloneOrInCombinationWithOneOrMoreOtherRaces" + }, + "Count_Person_HispanicOrLatino_WhiteAlone_multiple_place_bar_block": { + "name": "White Hispanic Monoracial Population", + "statVar": "Count_Person_HispanicOrLatino_WhiteAlone" + }, "Count_Person_InLaborForce": { "name": "Population in the Labor Force", "statVar": "Count_Person_InLaborForce" @@ -321,6 +1121,73 @@ "name": "Population in the Labor Force", "statVar": "Count_Person_InLaborForce" }, + "Count_Person_Male": { + "name": "Men", + "statVar": "Count_Person_Male" + }, + "Count_Person_Male_3999249536": { + "facetId": "3999249536", + "name": "Men", + "statVar": "Count_Person_Male" + }, + "Count_Person_NativeHawaiianAndOtherPacificIslanderAloneOrInCombinationWithOneOrMoreOtherRaces_3935616881": { + "facetId": "3935616881", + "name": "Native Hawaiian and Other Pacific Islander Population, Monoracial/Multiracial", + "statVar": "Count_Person_NativeHawaiianAndOtherPacificIslanderAloneOrInCombinationWithOneOrMoreOtherRaces" + }, + "Count_Person_NotHispanicOrLatino_AmericanIndianAndAlaskaNativeAloneOrInCombinationWithOneOrMoreOtherRaces_multiple_place_bar_block": { + "name": "Non Hispanic Population Identifying as American Indian and Alaska Native, Monoracial/Multiracial", + "statVar": "Count_Person_NotHispanicOrLatino_AmericanIndianAndAlaskaNativeAloneOrInCombinationWithOneOrMoreOtherRaces" + }, + "Count_Person_NotHispanicOrLatino_AmericanIndianOrAlaskaNativeAlone": { + "name": "Non Hispanic Population Identifying as American Indian or Alaska Native Alone", + "statVar": "Count_Person_NotHispanicOrLatino_AmericanIndianOrAlaskaNativeAlone" + }, + "Count_Person_NotHispanicOrLatino_AmericanIndianOrAlaskaNativeAlone_multiple_place_bar_block": { + "name": "Non Hispanic Population Identifying as American Indian or Alaska Native Alone", + "statVar": "Count_Person_NotHispanicOrLatino_AmericanIndianOrAlaskaNativeAlone" + }, + "Count_Person_NotHispanicOrLatino_AsianAloneOrInCombinationWithOneOrMoreOtherRaces_multiple_place_bar_block": { + "name": "Non Hispanic Population Identifying as Asian", + "statVar": "Count_Person_NotHispanicOrLatino_AsianAloneOrInCombinationWithOneOrMoreOtherRaces" + }, + "Count_Person_NotHispanicOrLatino_AsianAlone_multiple_place_bar_block": { + "name": "Non Hispanic Population Identifying as Asian Alone", + "statVar": "Count_Person_NotHispanicOrLatino_AsianAlone" + }, + "Count_Person_NotHispanicOrLatino_BlackOrAfricanAmericanAloneOrInCombinationWithOneOrMoreOtherRaces_multiple_place_bar_block": { + "name": "Non Hispanic Population Identifying as Black or African American", + "statVar": "Count_Person_NotHispanicOrLatino_BlackOrAfricanAmericanAloneOrInCombinationWithOneOrMoreOtherRaces" + }, + "Count_Person_NotHispanicOrLatino_BlackOrAfricanAmericanAlone_multiple_place_bar_block": { + "name": "Non Hispanic Population Identifying as Black or African American Alone", + "statVar": "Count_Person_NotHispanicOrLatino_BlackOrAfricanAmericanAlone" + }, + "Count_Person_NotHispanicOrLatino_NativeHawaiianAndOtherPacificIslanderAloneOrInCombinationWithOneOrMoreOtherRaces_multiple_place_bar_block": { + "name": "Non Hispanic Population Identifying as Native Hawaiian and Other Pacific Islander", + "statVar": "Count_Person_NotHispanicOrLatino_NativeHawaiianAndOtherPacificIslanderAloneOrInCombinationWithOneOrMoreOtherRaces" + }, + "Count_Person_NotHispanicOrLatino_NativeHawaiianOrOtherPacificIslanderAlone_multiple_place_bar_block": { + "name": "Non Hispanic Population Identifying as Native Hawaiian or Other Pacific Islander Alone", + "statVar": "Count_Person_NotHispanicOrLatino_NativeHawaiianOrOtherPacificIslanderAlone" + }, + "Count_Person_NotHispanicOrLatino_TwoOrMoreRaces_multiple_place_bar_block": { + "name": "Non Hispanic Multiracial Population", + "statVar": "Count_Person_NotHispanicOrLatino_TwoOrMoreRaces" + }, + "Count_Person_NotHispanicOrLatino_WhiteAloneOrInCombinationWithOneOrMoreOtherRaces_multiple_place_bar_block": { + "name": "Non Hispanic White Population, Monoracial/Multiracial", + "statVar": "Count_Person_NotHispanicOrLatino_WhiteAloneOrInCombinationWithOneOrMoreOtherRaces" + }, + "Count_Person_PerArea": { + "name": "Population Density", + "statVar": "Count_Person_PerArea" + }, + "Count_Person_PerArea_1151455814": { + "facetId": "1151455814", + "name": "Population Density", + "statVar": "Count_Person_PerArea" + }, "Count_Person_ResidesInHousehold": { "name": "Population: Household", "statVar": "Count_Person_ResidesInHousehold" @@ -348,6 +1215,28 @@ "name": "Population Living in Urban Areas", "statVar": "Count_Person_Urban" }, + "Count_Person_WhiteAlone": { + "name": "White Monoracial Population", + "statVar": "Count_Person_WhiteAlone" + }, + "Count_Person_WhiteAloneNotHispanicOrLatino": { + "name": "White Hispanic Monoracial Population", + "statVar": "Count_Person_WhiteAloneNotHispanicOrLatino" + }, + "Count_Person_WhiteAloneNotHispanicOrLatino_multiple_place_bar_block": { + "name": "White Hispanic Monoracial Population", + "statVar": "Count_Person_WhiteAloneNotHispanicOrLatino" + }, + "Count_Person_WhiteAloneOrInCombinationWithOneOrMoreOtherRaces_3935616881": { + "facetId": "3935616881", + "name": "White Population, Monoracial/Multiracial", + "statVar": "Count_Person_WhiteAloneOrInCombinationWithOneOrMoreOtherRaces" + }, + "Count_Person_WhiteAlone_3935616881": { + "facetId": "3935616881", + "name": "White Monoracial Population", + "statVar": "Count_Person_WhiteAlone" + }, "GrowthRate_Count_Person": { "name": "Rate of Population Growth", "statVar": "GrowthRate_Count_Person" @@ -795,9 +1684,45 @@ ], "exploreMore": { "Count_Person": { + "gender": [ + "Count_Person_Female", + "Count_Person_Male" + ], "placeOfResidenceClassification": [ "Count_Person_Rural", "Count_Person_Urban" + ], + "race": [ + "Count_Person_AmericanIndianAndAlaskaNativeAlone", + "Count_Person_AmericanIndianAndAlaskaNativeAloneOrInCombinationWithOneOrMoreOtherRaces", + "Count_Person_AsianAlone", + "Count_Person_AsianAloneOrInCombinationWithOneOrMoreOtherRaces", + "Count_Person_BlackOrAfricanAmericanAlone", + "Count_Person_BlackOrAfricanAmericanAloneOrInCombinationWithOneOrMoreOtherRaces", + "Count_Person_HispanicOrLatino", + "Count_Person_HispanicOrLatino_AmericanIndianAndAlaskaNativeAloneOrInCombinationWithOneOrMoreOtherRaces", + "Count_Person_HispanicOrLatino_AmericanIndianOrAlaskaNativeAlone", + "Count_Person_HispanicOrLatino_AsianAlone", + "Count_Person_HispanicOrLatino_AsianAloneOrInCombinationWithOneOrMoreOtherRaces", + "Count_Person_HispanicOrLatino_BlackOrAfricanAmericanAlone", + "Count_Person_HispanicOrLatino_NativeHawaiianAndOtherPacificIslanderAloneOrInCombinationWithOneOrMoreOtherRaces", + "Count_Person_HispanicOrLatino_NativeHawaiianOrOtherPacificIslanderAlone", + "Count_Person_HispanicOrLatino_TwoOrMoreRaces", + "Count_Person_HispanicOrLatino_WhiteAlone", + "Count_Person_HispanicOrLatino_WhiteAloneOrInCombinationWithOneOrMoreOtherRaces", + "Count_Person_NativeHawaiianAndOtherPacificIslanderAloneOrInCombinationWithOneOrMoreOtherRaces", + "Count_Person_NotHispanicOrLatino_AmericanIndianAndAlaskaNativeAloneOrInCombinationWithOneOrMoreOtherRaces", + "Count_Person_NotHispanicOrLatino_AmericanIndianOrAlaskaNativeAlone", + "Count_Person_NotHispanicOrLatino_AsianAlone", + "Count_Person_NotHispanicOrLatino_AsianAloneOrInCombinationWithOneOrMoreOtherRaces", + "Count_Person_NotHispanicOrLatino_BlackOrAfricanAmericanAlone", + "Count_Person_NotHispanicOrLatino_BlackOrAfricanAmericanAloneOrInCombinationWithOneOrMoreOtherRaces", + "Count_Person_NotHispanicOrLatino_NativeHawaiianAndOtherPacificIslanderAloneOrInCombinationWithOneOrMoreOtherRaces", + "Count_Person_NotHispanicOrLatino_NativeHawaiianOrOtherPacificIslanderAlone", + "Count_Person_NotHispanicOrLatino_TwoOrMoreRaces", + "Count_Person_WhiteAlone", + "Count_Person_WhiteAloneNotHispanicOrLatino", + "Count_Person_WhiteAloneOrInCombinationWithOneOrMoreOtherRaces" ] } }, diff --git a/server/integration_tests/test_data/e2e_toolformer_rag_mode/howhasemploymentinhospitalitychangedovertimeinnewjerseycounties/chart_config.json b/server/integration_tests/test_data/e2e_toolformer_rag_mode/howhasemploymentinhospitalitychangedovertimeinnewjerseycounties/chart_config.json index 605e422760..4b01d93255 100644 --- a/server/integration_tests/test_data/e2e_toolformer_rag_mode/howhasemploymentinhospitalitychangedovertimeinnewjerseycounties/chart_config.json +++ b/server/integration_tests/test_data/e2e_toolformer_rag_mode/howhasemploymentinhospitalitychangedovertimeinnewjerseycounties/chart_config.json @@ -13,17 +13,17 @@ "geoId/34025", "geoId/34003", "geoId/34017", - "geoId/34029", "geoId/34013", + "geoId/34029", "geoId/34027", "geoId/34023", "geoId/34015", "geoId/34035", "geoId/34005", "geoId/34031", - "geoId/34009", "geoId/34021", "geoId/34007", + "geoId/34009", "geoId/34039", "geoId/34037", "geoId/34019", @@ -85,11 +85,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/34029", + "placeDcidOverride": "geoId/34013", "statVarKey": [ "Count_Worker_NAICSAccommodationFoodServices_growth_abs_1429745441" ], - "title": "Ocean County", + "title": "Essex County", "type": "LINE" } ] @@ -97,11 +97,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/34013", + "placeDcidOverride": "geoId/34029", "statVarKey": [ "Count_Worker_NAICSAccommodationFoodServices_growth_abs_1429745441" ], - "title": "Essex County", + "title": "Ocean County", "type": "LINE" } ] @@ -181,11 +181,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/34009", + "placeDcidOverride": "geoId/34021", "statVarKey": [ "Count_Worker_NAICSAccommodationFoodServices_growth_abs_1429745441" ], - "title": "Cape May County", + "title": "Mercer County", "type": "LINE" } ] @@ -193,11 +193,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/34021", + "placeDcidOverride": "geoId/34007", "statVarKey": [ "Count_Worker_NAICSAccommodationFoodServices_growth_abs_1429745441" ], - "title": "Mercer County", + "title": "Camden County", "type": "LINE" } ] @@ -205,11 +205,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/34007", + "placeDcidOverride": "geoId/34009", "statVarKey": [ "Count_Worker_NAICSAccommodationFoodServices_growth_abs_1429745441" ], - "title": "Camden County", + "title": "Cape May County", "type": "LINE" } ] @@ -343,11 +343,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/34025", + "placeDcidOverride": "geoId/34035", "statVarKey": [ "Count_Worker_NAICSAccommodationFoodServices_growth_pct_1429745441" ], - "title": "Monmouth County", + "title": "Somerset County", "type": "LINE" } ] @@ -355,11 +355,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/34035", + "placeDcidOverride": "geoId/34025", "statVarKey": [ "Count_Worker_NAICSAccommodationFoodServices_growth_pct_1429745441" ], - "title": "Somerset County", + "title": "Monmouth County", "type": "LINE" } ] @@ -367,11 +367,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/34019", + "placeDcidOverride": "geoId/34037", "statVarKey": [ "Count_Worker_NAICSAccommodationFoodServices_growth_pct_1429745441" ], - "title": "Hunterdon County", + "title": "Sussex County", "type": "LINE" } ] @@ -379,11 +379,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/34037", + "placeDcidOverride": "geoId/34019", "statVarKey": [ "Count_Worker_NAICSAccommodationFoodServices_growth_pct_1429745441" ], - "title": "Sussex County", + "title": "Hunterdon County", "type": "LINE" } ] @@ -403,11 +403,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/34031", + "placeDcidOverride": "geoId/34013", "statVarKey": [ "Count_Worker_NAICSAccommodationFoodServices_growth_pct_1429745441" ], - "title": "Passaic County", + "title": "Essex County", "type": "LINE" } ] @@ -415,11 +415,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/34009", + "placeDcidOverride": "geoId/34003", "statVarKey": [ "Count_Worker_NAICSAccommodationFoodServices_growth_pct_1429745441" ], - "title": "Cape May County", + "title": "Bergen County", "type": "LINE" } ] @@ -427,11 +427,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/34003", + "placeDcidOverride": "geoId/34031", "statVarKey": [ "Count_Worker_NAICSAccommodationFoodServices_growth_pct_1429745441" ], - "title": "Bergen County", + "title": "Passaic County", "type": "LINE" } ] @@ -439,11 +439,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/34013", + "placeDcidOverride": "geoId/34009", "statVarKey": [ "Count_Worker_NAICSAccommodationFoodServices_growth_pct_1429745441" ], - "title": "Essex County", + "title": "Cape May County", "type": "LINE" } ] @@ -463,11 +463,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/34011", + "placeDcidOverride": "geoId/34005", "statVarKey": [ "Count_Worker_NAICSAccommodationFoodServices_growth_pct_1429745441" ], - "title": "Cumberland County", + "title": "Burlington County", "type": "LINE" } ] @@ -475,11 +475,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/34005", + "placeDcidOverride": "geoId/34011", "statVarKey": [ "Count_Worker_NAICSAccommodationFoodServices_growth_pct_1429745441" ], - "title": "Burlington County", + "title": "Cumberland County", "type": "LINE" } ] @@ -661,11 +661,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/34019", + "placeDcidOverride": "geoId/34037", "statVarKey": [ "Count_Worker_NAICSAccommodationFoodServices_growth_pc_1429745441" ], - "title": "Hunterdon County", + "title": "Sussex County", "type": "LINE" } ] @@ -673,11 +673,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/34037", + "placeDcidOverride": "geoId/34013", "statVarKey": [ "Count_Worker_NAICSAccommodationFoodServices_growth_pc_1429745441" ], - "title": "Sussex County", + "title": "Essex County", "type": "LINE" } ] @@ -685,11 +685,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/34021", + "placeDcidOverride": "geoId/34019", "statVarKey": [ "Count_Worker_NAICSAccommodationFoodServices_growth_pc_1429745441" ], - "title": "Mercer County", + "title": "Hunterdon County", "type": "LINE" } ] @@ -697,11 +697,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/34013", + "placeDcidOverride": "geoId/34021", "statVarKey": [ "Count_Worker_NAICSAccommodationFoodServices_growth_pc_1429745441" ], - "title": "Essex County", + "title": "Mercer County", "type": "LINE" } ] @@ -745,11 +745,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/34011", + "placeDcidOverride": "geoId/34007", "statVarKey": [ "Count_Worker_NAICSAccommodationFoodServices_growth_pc_1429745441" ], - "title": "Cumberland County", + "title": "Camden County", "type": "LINE" } ] @@ -757,11 +757,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/34007", + "placeDcidOverride": "geoId/34011", "statVarKey": [ "Count_Worker_NAICSAccommodationFoodServices_growth_pc_1429745441" ], - "title": "Camden County", + "title": "Cumberland County", "type": "LINE" } ] diff --git a/server/integration_tests/test_data/e2e_toolformer_rag_mode/howhaslifeexpectancychangedovertimeacrossusstates/chart_config.json b/server/integration_tests/test_data/e2e_toolformer_rag_mode/howhaslifeexpectancychangedovertimeacrossusstates/chart_config.json index 398bb3b8f3..1eed7020a4 100644 --- a/server/integration_tests/test_data/e2e_toolformer_rag_mode/howhaslifeexpectancychangedovertimeacrossusstates/chart_config.json +++ b/server/integration_tests/test_data/e2e_toolformer_rag_mode/howhaslifeexpectancychangedovertimeacrossusstates/chart_config.json @@ -11,56 +11,56 @@ { "comparisonPlaces": [ "geoId/11", + "geoId/06", + "geoId/36", "geoId/15", "geoId/53", + "geoId/51", "geoId/41", - "geoId/16", "geoId/33", - "geoId/51", - "geoId/23", "geoId/25", - "geoId/49", - "geoId/13", "geoId/50", - "geoId/44", - "geoId/42", - "geoId/37", - "geoId/30", + "geoId/32", + "geoId/34", + "geoId/24", + "geoId/13", "geoId/10", - "geoId/08", + "geoId/17", "geoId/02", - "geoId/32", - "geoId/06", - "geoId/40", + "geoId/44", "geoId/12", - "geoId/56", + "geoId/37", + "geoId/16", + "geoId/09", + "geoId/23", + "geoId/42", "geoId/48", + "geoId/08", "geoId/27", - "geoId/24", - "geoId/31", "geoId/45", "geoId/26", - "geoId/19", - "geoId/17", - "geoId/05", - "geoId/01", + "geoId/49", "geoId/55", - "geoId/20", - "geoId/09", + "geoId/31", + "geoId/30", + "geoId/19", + "geoId/04", + "geoId/56", + "geoId/22", + "geoId/39", "geoId/29", + "geoId/46", + "geoId/20", + "geoId/18", + "geoId/01", "geoId/47", - "geoId/39", - "geoId/21", + "geoId/05", "geoId/38", - "geoId/18", - "geoId/54", - "geoId/22", - "geoId/46", - "geoId/36", - "geoId/34", + "geoId/21", + "geoId/40", "geoId/28", - "geoId/04", - "geoId/35" + "geoId/35", + "geoId/54" ], "statVarKey": [ "LifeExpectancy_Person51" @@ -90,11 +90,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/15", + "placeDcidOverride": "geoId/06", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Hawaii", + "title": "California", "type": "LINE" } ] @@ -102,11 +102,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/53", + "placeDcidOverride": "geoId/36", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Washington", + "title": "New York", "type": "LINE" } ] @@ -114,11 +114,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/41", + "placeDcidOverride": "geoId/15", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Oregon", + "title": "Hawaii", "type": "LINE" } ] @@ -126,11 +126,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/16", + "placeDcidOverride": "geoId/53", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Idaho", + "title": "Washington", "type": "LINE" } ] @@ -138,11 +138,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/33", + "placeDcidOverride": "geoId/51", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "New Hampshire", + "title": "Virginia", "type": "LINE" } ] @@ -150,11 +150,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/51", + "placeDcidOverride": "geoId/41", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Virginia", + "title": "Oregon", "type": "LINE" } ] @@ -162,11 +162,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/23", + "placeDcidOverride": "geoId/33", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Maine", + "title": "New Hampshire", "type": "LINE" } ] @@ -186,11 +186,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/49", + "placeDcidOverride": "geoId/50", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Utah", + "title": "Vermont", "type": "LINE" } ] @@ -198,11 +198,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/13", + "placeDcidOverride": "geoId/32", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Georgia", + "title": "Nevada", "type": "LINE" } ] @@ -210,11 +210,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/50", + "placeDcidOverride": "geoId/34", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Vermont", + "title": "New Jersey", "type": "LINE" } ] @@ -222,11 +222,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/44", + "placeDcidOverride": "geoId/24", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Rhode Island", + "title": "Maryland", "type": "LINE" } ] @@ -234,11 +234,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/42", + "placeDcidOverride": "geoId/13", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Pennsylvania", + "title": "Georgia", "type": "LINE" } ] @@ -246,11 +246,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/37", + "placeDcidOverride": "geoId/10", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "North Carolina", + "title": "Delaware", "type": "LINE" } ] @@ -258,11 +258,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/30", + "placeDcidOverride": "geoId/17", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Montana", + "title": "Illinois", "type": "LINE" } ] @@ -270,11 +270,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/10", + "placeDcidOverride": "geoId/02", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Delaware", + "title": "Alaska", "type": "LINE" } ] @@ -282,11 +282,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/08", + "placeDcidOverride": "geoId/44", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Colorado", + "title": "Rhode Island", "type": "LINE" } ] @@ -294,11 +294,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/02", + "placeDcidOverride": "geoId/12", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Alaska", + "title": "Florida", "type": "LINE" } ] @@ -306,11 +306,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/32", + "placeDcidOverride": "geoId/37", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Nevada", + "title": "North Carolina", "type": "LINE" } ] @@ -318,11 +318,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/06", + "placeDcidOverride": "geoId/16", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "California", + "title": "Idaho", "type": "LINE" } ] @@ -330,11 +330,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/40", + "placeDcidOverride": "geoId/09", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Oklahoma", + "title": "Connecticut", "type": "LINE" } ] @@ -342,11 +342,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/12", + "placeDcidOverride": "geoId/23", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Florida", + "title": "Maine", "type": "LINE" } ] @@ -354,11 +354,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/56", + "placeDcidOverride": "geoId/42", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Wyoming", + "title": "Pennsylvania", "type": "LINE" } ] @@ -378,11 +378,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/27", + "placeDcidOverride": "geoId/08", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Minnesota", + "title": "Colorado", "type": "LINE" } ] @@ -390,11 +390,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/24", + "placeDcidOverride": "geoId/27", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Maryland", + "title": "Minnesota", "type": "LINE" } ] @@ -402,11 +402,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/31", + "placeDcidOverride": "geoId/45", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Nebraska", + "title": "South Carolina", "type": "LINE" } ] @@ -414,11 +414,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/45", + "placeDcidOverride": "geoId/26", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "South Carolina", + "title": "Michigan", "type": "LINE" } ] @@ -426,11 +426,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/26", + "placeDcidOverride": "geoId/49", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Michigan", + "title": "Utah", "type": "LINE" } ] @@ -438,11 +438,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/19", + "placeDcidOverride": "geoId/55", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Iowa", + "title": "Wisconsin", "type": "LINE" } ] @@ -450,11 +450,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/17", + "placeDcidOverride": "geoId/31", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Illinois", + "title": "Nebraska", "type": "LINE" } ] @@ -462,11 +462,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/05", + "placeDcidOverride": "geoId/30", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Arkansas", + "title": "Montana", "type": "LINE" } ] @@ -474,11 +474,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/01", + "placeDcidOverride": "geoId/19", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Alabama", + "title": "Iowa", "type": "LINE" } ] @@ -486,11 +486,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/55", + "placeDcidOverride": "geoId/04", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Wisconsin", + "title": "Arizona", "type": "LINE" } ] @@ -498,11 +498,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/20", + "placeDcidOverride": "geoId/56", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Kansas", + "title": "Wyoming", "type": "LINE" } ] @@ -510,11 +510,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/09", + "placeDcidOverride": "geoId/22", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Connecticut", + "title": "Louisiana", "type": "LINE" } ] @@ -522,11 +522,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/29", + "placeDcidOverride": "geoId/39", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Missouri", + "title": "Ohio", "type": "LINE" } ] @@ -534,11 +534,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/47", + "placeDcidOverride": "geoId/29", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Tennessee", + "title": "Missouri", "type": "LINE" } ] @@ -546,11 +546,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/39", + "placeDcidOverride": "geoId/46", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Ohio", + "title": "South Dakota", "type": "LINE" } ] @@ -558,11 +558,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/21", + "placeDcidOverride": "geoId/20", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Kentucky", + "title": "Kansas", "type": "LINE" } ] @@ -570,11 +570,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/38", + "placeDcidOverride": "geoId/18", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "North Dakota", + "title": "Indiana", "type": "LINE" } ] @@ -582,11 +582,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/18", + "placeDcidOverride": "geoId/01", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Indiana", + "title": "Alabama", "type": "LINE" } ] @@ -594,11 +594,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/54", + "placeDcidOverride": "geoId/47", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "West Virginia", + "title": "Tennessee", "type": "LINE" } ] @@ -606,11 +606,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/22", + "placeDcidOverride": "geoId/05", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Louisiana", + "title": "Arkansas", "type": "LINE" } ] @@ -618,11 +618,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/46", + "placeDcidOverride": "geoId/38", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "South Dakota", + "title": "North Dakota", "type": "LINE" } ] @@ -630,11 +630,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/36", + "placeDcidOverride": "geoId/21", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "New York", + "title": "Kentucky", "type": "LINE" } ] @@ -642,11 +642,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/34", + "placeDcidOverride": "geoId/40", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "New Jersey", + "title": "Oklahoma", "type": "LINE" } ] @@ -666,11 +666,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/04", + "placeDcidOverride": "geoId/35", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Arizona", + "title": "New Mexico", "type": "LINE" } ] @@ -678,11 +678,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/35", + "placeDcidOverride": "geoId/54", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "New Mexico", + "title": "West Virginia", "type": "LINE" } ] @@ -707,11 +707,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/15", + "placeDcidOverride": "geoId/06", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Hawaii", + "title": "California", "type": "LINE" } ] @@ -719,11 +719,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/53", + "placeDcidOverride": "geoId/36", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Washington", + "title": "New York", "type": "LINE" } ] @@ -731,11 +731,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/41", + "placeDcidOverride": "geoId/15", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Oregon", + "title": "Hawaii", "type": "LINE" } ] @@ -743,11 +743,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/16", + "placeDcidOverride": "geoId/51", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Idaho", + "title": "Virginia", "type": "LINE" } ] @@ -755,11 +755,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/33", + "placeDcidOverride": "geoId/53", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "New Hampshire", + "title": "Washington", "type": "LINE" } ] @@ -767,11 +767,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/23", + "placeDcidOverride": "geoId/41", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Maine", + "title": "Oregon", "type": "LINE" } ] @@ -779,11 +779,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/51", + "placeDcidOverride": "geoId/33", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Virginia", + "title": "New Hampshire", "type": "LINE" } ] @@ -803,11 +803,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/49", + "placeDcidOverride": "geoId/50", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Utah", + "title": "Vermont", "type": "LINE" } ] @@ -815,11 +815,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/13", + "placeDcidOverride": "geoId/32", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Georgia", + "title": "Nevada", "type": "LINE" } ] @@ -827,11 +827,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/50", + "placeDcidOverride": "geoId/34", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Vermont", + "title": "New Jersey", "type": "LINE" } ] @@ -839,11 +839,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/08", + "placeDcidOverride": "geoId/13", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Colorado", + "title": "Georgia", "type": "LINE" } ] @@ -851,11 +851,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/44", + "placeDcidOverride": "geoId/24", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Rhode Island", + "title": "Maryland", "type": "LINE" } ] @@ -863,11 +863,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/42", + "placeDcidOverride": "geoId/10", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Pennsylvania", + "title": "Delaware", "type": "LINE" } ] @@ -875,11 +875,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/30", + "placeDcidOverride": "geoId/17", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Montana", + "title": "Illinois", "type": "LINE" } ] @@ -887,11 +887,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/10", + "placeDcidOverride": "geoId/02", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Delaware", + "title": "Alaska", "type": "LINE" } ] @@ -899,11 +899,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/02", + "placeDcidOverride": "geoId/12", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Alaska", + "title": "Florida", "type": "LINE" } ] @@ -923,11 +923,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/06", + "placeDcidOverride": "geoId/44", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "California", + "title": "Rhode Island", "type": "LINE" } ] @@ -935,11 +935,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/32", + "placeDcidOverride": "geoId/16", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Nevada", + "title": "Idaho", "type": "LINE" } ] @@ -947,11 +947,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/40", + "placeDcidOverride": "geoId/09", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Oklahoma", + "title": "Connecticut", "type": "LINE" } ] @@ -959,11 +959,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/12", + "placeDcidOverride": "geoId/23", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Florida", + "title": "Maine", "type": "LINE" } ] @@ -971,11 +971,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/27", + "placeDcidOverride": "geoId/42", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Minnesota", + "title": "Pennsylvania", "type": "LINE" } ] @@ -983,11 +983,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/24", + "placeDcidOverride": "geoId/48", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Maryland", + "title": "Texas", "type": "LINE" } ] @@ -995,11 +995,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/48", + "placeDcidOverride": "geoId/45", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Texas", + "title": "South Carolina", "type": "LINE" } ] @@ -1007,11 +1007,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/56", + "placeDcidOverride": "geoId/08", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Wyoming", + "title": "Colorado", "type": "LINE" } ] @@ -1019,11 +1019,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/31", + "placeDcidOverride": "geoId/27", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Nebraska", + "title": "Minnesota", "type": "LINE" } ] @@ -1031,11 +1031,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/19", + "placeDcidOverride": "geoId/26", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Iowa", + "title": "Michigan", "type": "LINE" } ] @@ -1043,11 +1043,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/17", + "placeDcidOverride": "geoId/49", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Illinois", + "title": "Utah", "type": "LINE" } ] @@ -1055,11 +1055,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/26", + "placeDcidOverride": "geoId/55", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Michigan", + "title": "Wisconsin", "type": "LINE" } ] @@ -1067,11 +1067,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/45", + "placeDcidOverride": "geoId/31", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "South Carolina", + "title": "Nebraska", "type": "LINE" } ] @@ -1079,11 +1079,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/55", + "placeDcidOverride": "geoId/30", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Wisconsin", + "title": "Montana", "type": "LINE" } ] @@ -1091,11 +1091,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/05", + "placeDcidOverride": "geoId/19", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Arkansas", + "title": "Iowa", "type": "LINE" } ] @@ -1103,11 +1103,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/01", + "placeDcidOverride": "geoId/04", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Alabama", + "title": "Arizona", "type": "LINE" } ] @@ -1115,11 +1115,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/20", + "placeDcidOverride": "geoId/56", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Kansas", + "title": "Wyoming", "type": "LINE" } ] @@ -1127,11 +1127,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/09", + "placeDcidOverride": "geoId/22", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Connecticut", + "title": "Louisiana", "type": "LINE" } ] @@ -1139,11 +1139,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/29", + "placeDcidOverride": "geoId/39", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Missouri", + "title": "Ohio", "type": "LINE" } ] @@ -1151,11 +1151,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/39", + "placeDcidOverride": "geoId/29", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Ohio", + "title": "Missouri", "type": "LINE" } ] @@ -1163,11 +1163,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/38", + "placeDcidOverride": "geoId/46", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "North Dakota", + "title": "South Dakota", "type": "LINE" } ] @@ -1175,11 +1175,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/47", + "placeDcidOverride": "geoId/20", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Tennessee", + "title": "Kansas", "type": "LINE" } ] @@ -1187,11 +1187,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/21", + "placeDcidOverride": "geoId/18", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Kentucky", + "title": "Indiana", "type": "LINE" } ] @@ -1199,11 +1199,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/18", + "placeDcidOverride": "geoId/01", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Indiana", + "title": "Alabama", "type": "LINE" } ] @@ -1211,11 +1211,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/22", + "placeDcidOverride": "geoId/47", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Louisiana", + "title": "Tennessee", "type": "LINE" } ] @@ -1223,11 +1223,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/54", + "placeDcidOverride": "geoId/05", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "West Virginia", + "title": "Arkansas", "type": "LINE" } ] @@ -1235,11 +1235,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/36", + "placeDcidOverride": "geoId/38", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "New York", + "title": "North Dakota", "type": "LINE" } ] @@ -1247,11 +1247,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/34", + "placeDcidOverride": "geoId/21", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "New Jersey", + "title": "Kentucky", "type": "LINE" } ] @@ -1259,11 +1259,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/46", + "placeDcidOverride": "geoId/40", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "South Dakota", + "title": "Oklahoma", "type": "LINE" } ] @@ -1283,11 +1283,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/04", + "placeDcidOverride": "geoId/35", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Arizona", + "title": "New Mexico", "type": "LINE" } ] @@ -1295,11 +1295,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/35", + "placeDcidOverride": "geoId/54", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "New Mexico", + "title": "West Virginia", "type": "LINE" } ] diff --git a/server/integration_tests/test_data/international/query_2/chart_config.json b/server/integration_tests/test_data/international/query_2/chart_config.json index 98bc57c6b6..68ae66e253 100644 --- a/server/integration_tests/test_data/international/query_2/chart_config.json +++ b/server/integration_tests/test_data/international/query_2/chart_config.json @@ -144,6 +144,38 @@ ], "title": "Life Expectancy by Gender" }, + { + "columns": [ + { + "tiles": [ + { + "statVarKey": [ + "Count_Death" + ], + "title": "Number of Deaths in Administrative Area 1 Places of China (${date})", + "type": "MAP" + } + ] + }, + { + "tiles": [ + { + "rankingTileSpec": { + "rankingCount": 5, + "showHighestLowest": true + }, + "statVarKey": [ + "Count_Death" + ], + "title": "Number of Deaths in Administrative Area 1 Places of China (${date})", + "type": "RANKING" + } + ] + } + ], + "denom": "Count_Person", + "title": "Number of Deaths in Administrative Area 1 Places of China" + }, { "columns": [ { diff --git a/server/routes/shared_api/autocomplete/autocomplete.py b/server/routes/shared_api/autocomplete/autocomplete.py index aab2a704ba..5d0299e525 100644 --- a/server/routes/shared_api/autocomplete/autocomplete.py +++ b/server/routes/shared_api/autocomplete/autocomplete.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json +import logging from flask import Blueprint from flask import jsonify @@ -21,7 +21,6 @@ from server.routes.shared_api.autocomplete import helpers from server.routes.shared_api.autocomplete.types import AutoCompleteApiResponse from server.routes.shared_api.autocomplete.types import AutoCompleteResult -from server.routes.shared_api.place import findplacedcid # TODO(gmechali): Add Stat Var search. @@ -44,22 +43,33 @@ def autocomplete(): # Send requests to the Google Maps Predictions API. prediction_responses = helpers.predict(queries, lang) - place_ids = [] - for prediction in prediction_responses: - place_ids.append(prediction.place_id) + # Augment responses with place DCID. + prediction_responses = helpers.fetch_place_id_to_dcid(prediction_responses) + + # Custom places hack - Continents not supported by Google Maps Predictions API. + # This hack will always evaluate continents and a few custom places for each response. + # They will get filtered in/out based on the match_score we compute. + prediction_responses = helpers.prepend_custom_places_hack( + prediction_responses, queries) - place_id_to_dcid = [] - if place_ids: - place_id_to_dcid = json.loads(findplacedcid(place_ids).data) + prediction_responses.sort(key=helpers.get_score) final_predictions = [] for prediction in prediction_responses: - if prediction.place_id in place_id_to_dcid: + # Only keep places that have a DCID. + if prediction.place_dcid: current_prediction = AutoCompleteResult( name=prediction.description, match_type='location_search', matched_query=prediction.matched_query, - dcid=place_id_to_dcid[prediction.place_id]) + dcid=prediction.place_dcid) final_predictions.append(current_prediction) + if len(final_predictions) == helpers.DISPLAYED_RESPONSE_COUNT_LIMIT: + break + + logging.info( + "[Place_Autocomplete] Returning a total of %d place predictions.", + len(final_predictions)) + return jsonify(AutoCompleteApiResponse(predictions=final_predictions)) diff --git a/server/routes/shared_api/autocomplete/helpers.py b/server/routes/shared_api/autocomplete/helpers.py index dbfd556156..53a667f0c9 100644 --- a/server/routes/shared_api/autocomplete/helpers.py +++ b/server/routes/shared_api/autocomplete/helpers.py @@ -13,6 +13,7 @@ # limitations under the License. import json +import logging import re from typing import Dict, List from urllib.parse import urlencode @@ -21,11 +22,39 @@ import requests from server.routes.shared_api.autocomplete.types import ScoredPrediction +from server.routes.shared_api.place import findplacedcid MAPS_API_URL = "https://maps.googleapis.com/maps/api/place/autocomplete/json?" MIN_CHARACTERS_PER_QUERY = 3 MAX_NUM_OF_QUERIES = 4 DISPLAYED_RESPONSE_COUNT_LIMIT = 5 +# Additional places to hack in autocomplete +TWO_WORD_CUSTOM_PLACES = [{ + 'description': 'North America', + 'place_dcid': 'northamerica' +}, { + 'description': 'South America', + 'place_dcid': 'southamerica' +}] +CUSTOM_PLACES = [{ + 'description': 'World', + 'place_dcid': 'Earth' +}, { + 'description': 'Earth', + 'place_dcid': 'Earth' +}, { + 'description': 'Europe', + 'place_dcid': 'europe' +}, { + 'description': 'Oceania', + 'place_dcid': 'oceania' +}, { + 'description': 'Africa', + 'place_dcid': 'africa' +}, { + 'description': 'Asia', + 'place_dcid': 'asia' +}] + TWO_WORD_CUSTOM_PLACES def find_queries(user_query: str) -> List[str]: @@ -72,38 +101,130 @@ def execute_maps_request(query: str, language: str) -> Dict: return json.loads(response.text) +def bag_of_letters(text: str) -> Dict: + """Creates a bag-of-letters representation of a given string. + Returns: + dict: A dictionary where keys are letters and values are their counts. + """ + bag = {} + for char in text.lower(): + if char.isalpha(): + bag[char] = bag.get(char, 0) + 1 + return bag + + +# TODO(gmechali): Look into a better typo algo e.g Levenshtein distance. +def off_by_one_letter(str1_word: str, name_word: str) -> bool: + """Function to do off by one check. + Returns whether the two strings are off by at most one letter. + """ + offby = 0 + str1_bag = bag_of_letters(str1_word) + str2_bag = bag_of_letters(name_word) + for key, value in str1_bag.items(): + if key in str2_bag: + offby += abs(str2_bag[key] - value) + else: + offby += value + + # Add to offby for letters in str2 but not str1. + for key, value in str2_bag.items(): + if key not in str1_bag: + offby += value + + return offby <= 1 + + def get_match_score(match_string: str, name: str) -> float: """Computes a 'score' based on the matching words in two strings. Lowest score is best match. Returns: Float score.""" + rgx = re.compile(r'[\s|,]+') words_in_name = re.split(rgx, name) words_in_str1 = re.split(rgx, match_string) score = 0 start_index = 0 - for str1_word in words_in_str1: + for str1_idx, str1_word in enumerate(words_in_str1): str1_word = str1_word.lower() + found_match = False for idx, name_word in enumerate(words_in_name): if idx < start_index: continue name_word = name_word.lower() + if idx == 0 and str1_idx == 0 and name_word.startswith(str1_word): + # boost score for start of query. + score -= 0.25 + if str1_word == name_word: start_index = idx + 1 score -= 1 + found_match = True break elif str1_word in name_word: start_index = idx + 1 score -= 0.5 + found_match = True break - else: - score += 1 + elif off_by_one_letter(str1_word, name_word): + start_index = idx + 1 + found_match = True + score -= 0.25 + + if not found_match: + score += 1 return score +def score_below_zero(pred: ScoredPrediction) -> bool: + """Returns whether the score is below 0.""" + return pred.score < 0 + + +def prepend_custom_places_hack(responses: List[ScoredPrediction], + queries: List[str]) -> List[ScoredPrediction]: + """Prepend custom places as responses in order to hack it in autocomplete. + Returns: + List of scored predictions.""" + + if len(queries) == 0: + return responses + + custom_places_responses = [] + single_word_query = queries[-1] + for place in CUSTOM_PLACES: + scored_prediction = ScoredPrediction(description=place['description'], + place_id=None, + matched_query=single_word_query, + place_dcid=place['place_dcid'], + score=get_match_score( + single_word_query, + place['description'])) + custom_places_responses.append(scored_prediction) + + if len(queries) > 1: + two_word_query = queries[-2] + # If we have a 2 two word query, also place the two word custom places as responses. + for place in TWO_WORD_CUSTOM_PLACES: + scored_prediction = ScoredPrediction(description=place['description'], + place_id=None, + matched_query=two_word_query, + place_dcid=place['place_dcid'], + score=get_match_score( + two_word_query, + place['description'])) + custom_places_responses.append(scored_prediction) + + # Only keep custom places with a score below 0 as it implies it's close to the query. + custom_places_responses = list( + filter(score_below_zero, custom_places_responses)) + return custom_places_responses + responses + + def predict(queries: List[str], lang: str) -> List[ScoredPrediction]: """Trigger maps prediction api requests and parse the output. Remove duplication responses and limit the number of results. Returns: @@ -116,17 +237,20 @@ def predict(queries: List[str], lang: str) -> List[ScoredPrediction]: for pred in predictions_for_query: scored_prediction = ScoredPrediction(description=pred['description'], place_id=pred['place_id'], + place_dcid=None, matched_query=query, score=get_match_score( query, pred['description'])) all_responses.append(scored_prediction) all_responses.sort(key=get_score) + logging.info("[Place_Autocomplete] Received %d total place predictions.", + len(all_responses)) responses = [] place_ids = set() index = 0 - while len(responses) < DISPLAYED_RESPONSE_COUNT_LIMIT and index < len( + while len(responses) < 2 * DISPLAYED_RESPONSE_COUNT_LIMIT and index < len( all_responses): if all_responses[index].place_id not in place_ids: responses.append(all_responses[index]) @@ -136,6 +260,30 @@ def predict(queries: List[str], lang: str) -> List[ScoredPrediction]: return responses +def fetch_place_id_to_dcid( + prediction_responses: List[ScoredPrediction]) -> Dict[str, str]: + """Fetches the associated DCID for each place ID returned by Google. + Returns: + Mapping of Place ID to DCID.""" + + place_ids = [] + for prediction in prediction_responses: + place_ids.append(prediction.place_id) + + place_id_to_dcid = dict() + if place_ids: + place_id_to_dcid = json.loads(findplacedcid(place_ids).data) + + for prediction in prediction_responses: + if prediction.place_id in place_id_to_dcid: + prediction.place_dcid = place_id_to_dcid[prediction.place_id] + + logging.info("[Place_Autocomplete] Found %d place ID to DCID mappings.", + len(place_id_to_dcid)) + + return prediction_responses + + def get_score(p: ScoredPrediction) -> float: """Returns the score.""" return p.score diff --git a/server/routes/shared_api/autocomplete/types.py b/server/routes/shared_api/autocomplete/types.py index a387e8f74b..872132bd7c 100644 --- a/server/routes/shared_api/autocomplete/types.py +++ b/server/routes/shared_api/autocomplete/types.py @@ -16,14 +16,15 @@ """ from dataclasses import dataclass -from typing import List +from typing import List, Optional @dataclass class ScoredPrediction: """Data type for a prediction with its score.""" description: str - place_id: str + place_id: Optional[str] + place_dcid: Optional[str] matched_query: str score: float diff --git a/server/templates/custom_dc/custom/base.html b/server/templates/custom_dc/custom/base.html index e9281e7c1b..8b6c22f406 100644 --- a/server/templates/custom_dc/custom/base.html +++ b/server/templates/custom_dc/custom/base.html @@ -71,7 +71,7 @@