diff --git a/.dfo-protected-paths b/.dfo-protected-paths index b9a558f6ff..755d46405e 100644 --- a/.dfo-protected-paths +++ b/.dfo-protected-paths @@ -10,12 +10,21 @@ build/cdc_services/Dockerfile build/cdc_services/run.sh build/cdc_services/nginx.conf -# Repo-level DFO files +# Repo-level DFO files. Every upstream-tracked file DFO modifies, adds, or +# deletes belongs here, or a conflict on it silently takes upstream's side. justfile .dockerignore .gcloudignore .dfo-protected-paths .dfo-overridden-files +.gitattributes +.gitignore +README.md +package-lock.json +pyproject.toml +CONTRIBUTING-DFO.md +# Deleted in this fork; a conflict here means upstream changed it. +.github/CODEOWNERS # CI/deploy workflows and deploy docs are DFO-owned even though they live # under upstream-owned directories (.github/, deploy/); an upstream file diff --git a/.dockerignore b/.dockerignore index 69b655a85d..5264c88c3e 100644 --- a/.dockerignore +++ b/.dockerignore @@ -16,6 +16,7 @@ import/simple/sample/ **/.data **/testdata **/test_data +import/simple/tests/ # ONE/DFO: exclude build artifacts from the Docker build context; keep source. **/.next diff --git a/.gcloudignore b/.gcloudignore index cc993c2362..cb45db833a 100644 --- a/.gcloudignore +++ b/.gcloudignore @@ -7,9 +7,6 @@ # $ gcloud topic gcloudignore # .gcloudignore -# If you would like to upload your .git directory, .gitignore file or files -# from your .gitignore file, remove the corresponding line -# below: .git .gitignore #!include:.gitignore @@ -23,13 +20,11 @@ # Ignored by the build system /setup.cfg -static/node_modules/ +**/node_modules/ server/dist/ -**/.venv/ -**/.venv_website/ -**/.venv_nl/ +**/.venv*/ # ONE/DFO: exclude build artifacts from Cloud Build context; keep source. # (.dockerignore above already propagates these via #!include, but listed explicitly for parity.) diff --git a/.gitattributes b/.gitattributes index 1c43e45576..9468d5054b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,5 @@ # Keep DFO-owned copies of upstream-tracked files across `git merge upstream/master`. # `merge=ours` makes git keep our version and discard upstream's changes to these paths. -# The driver is registered per-clone by `just setup` (git config merge.ours.driver true); +# `just sync` and `just setup` register the driver per clone (git config merge.ours.driver true); # without it git falls back to a normal 3-way merge. README.md merge=ours diff --git a/.github/workflows/build-and-pin.yml b/.github/workflows/build-and-pin.yml index ebbb9ab32c..10e0e4382e 100644 --- a/.github/workflows/build-and-pin.yml +++ b/.github/workflows/build-and-pin.yml @@ -110,11 +110,12 @@ jobs: fi - name: Free disk space - # ubuntu-latest has ~14 GB usable, and this build pulls large NL - # model/embedding files, installs torch CPU wheels, and exports every - # intermediate layer via mode=max cache-to. Removing the runner's - # preinstalled Android SDK, .NET, and GHC toolchains buys back room - # without a third-party action. + # ubuntu-latest has ~14 GB usable. The build holds four stages at + # once (Go toolchain and module cache, the website's Python venv, + # and two Node installs with their builds) on top of the runtime + # base, and mode=max cache-to exports every intermediate layer. + # Removing the runner's preinstalled Android SDK, .NET, and GHC + # toolchains buys back room without a third-party action. run: | sudo rm -rf /usr/local/lib/android sudo rm -rf /usr/share/dotnet diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 28212253cb..658b9d4016 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,10 +8,11 @@ name: CI # tree before it builds. # # Does not build the Docker image. build/cdc_services/Dockerfile compiles -# the Go mixer, builds two Python venvs, and runs a Next.js production -# build across four stages -- several minutes even with cache, so it only -# runs on push to a deploy branch, in deploy-dev.yml and deploy-prod.yml, -# with a registry-backed cache to keep that path fast. +# the Go mixer, installs the website's Python venv, builds the website's +# static assets, and runs a Next.js production build, in four build stages +# -- several minutes even with cache, so it only runs on push to a deploy +# branch, in deploy-dev.yml and deploy-prod.yml, with a registry-backed +# cache to keep that path fast. on: pull_request: diff --git a/CONTRIBUTING-DFO.md b/CONTRIBUTING-DFO.md index ea57fb891f..ef7916cba6 100644 --- a/CONTRIBUTING-DFO.md +++ b/CONTRIBUTING-DFO.md @@ -9,7 +9,7 @@ The DFO's Data Commons instance, meaning the mixer and the graph-serving layer u Two kinds of code live here, and they behave differently. - **Upstream code.** Everything outside `custom_dc/` tracks datacommonsorg/website and the `mixer` and `import` submodules. We take changes from upstream; we do not write them here. -- **ONE Data code.** Everything under `custom_dc/` is ours (for the DFO). `custom_dc/dfo/prototypes` is the frontend, and `custom_dc/api_server` holds a legacy copy of the Search API that stays until its removal PR lands. Upstream never touches these paths, so an upstream sync cannot conflict with work there. +- **ONE Data code.** Everything under `custom_dc/` is ours (for the DFO). `custom_dc/dfo/prototypes` is the frontend. Upstream never touches these paths, so an upstream sync cannot conflict with work there. The repo builds one container image. A sibling repo, `infra`, deploys it to Cloud Run. This repo builds and pushes an image, and `infra` runs it. @@ -25,8 +25,6 @@ feat/* ──► dev ──► main dfo-dev dfo-prod ``` -`customdc_stable` is not a tier. It mirrors upstream's stable release channel and serves as the reference point for `just sync`. - ## Where your work goes The loop is short. @@ -44,34 +42,39 @@ The loop is short. ## Taking upstream changes -Upstream sync is a step on `dev`, not a separate long-lived branch. +`dev` tracks Data Commons Platform (DCP) releases. `infra` pins a DCP version as `dcp_version` in `infra/stacks/dcp/variables.tf`, and `dev` carries the website and mixer that release was built from. A sync is a merge of that website commit into `dev`, so `dev` shares history with datacommonsorg/website. ```sh git checkout dev -git fetch upstream -just sync # shows what changed since the last sync -git merge upstream/master -git submodule update --init --recursive +just sync 1.1.6 # merge the website commit DCP 1.1.6 was built from ``` -Merging upstream's website also moves the `mixer` and `import` submodule pointers, because upstream pins them. **Website and submodules must move together.** +`just sync` stops on conflicts. `just sync-resolve` takes upstream's side for every path outside `.dfo-protected-paths` and leaves the protected ones for you. After resolving those, `git add` them and run `just sync-finish`. `just sync-abort` drops the merge. Once committed, the recipe checks out the submodules and runs `just check-overrides`, which lists the seam files in `.dfo-overridden-files` that upstream changed across the sync. ### Matching a Data Commons Platform release -`infra` pins a DCP version (`1.1.x`) for the Terraform stack, and the image this repo builds has to match it. A website tag alone will not tell you which mixer that release runs. Google builds the release image from a website tag plus a mixer commit that runs ahead of what the tag pins. DCP 1.1.2 was built from website `v3.5.7` with mixer `79627f8`, while `v3.5.7` itself pins mixer `051d8ff`. +The website and mixer move as a pair, and the pairing comes from the release image. Each image `gcr.io/datcom-ci/datacommons-services:` records its source commits as the `WEBSITE_HASH` and `MIXER_HASH` build args. A website tag pins one mixer, and Google can build a release with a newer one. DCP 1.1.2 was built from website `v3.5.7` with mixer `79627f8`, while `v3.5.7` pins mixer `051d8ff`. + +`just dcp-pair ` prints the pairing: + +```sh +$ just dcp-pair 1.1.6 +website=9852134 +mixer=8118587 +``` -That mapping exists only inside the published image, as build args: +It reads the image config from the registry, the same as: ```sh CFG=$(curl -s -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \ - https://gcr.io/v2/datcom-ci/datacommons-services/manifests/1.1.2 | jq -r .config.digest) + https://gcr.io/v2/datcom-ci/datacommons-services/manifests/1.1.6 | jq -r .config.digest) curl -sL https://gcr.io/v2/datcom-ci/datacommons-services/blobs/$CFG \ | jq '.config.Env[] | select(contains("HASH"))' ``` -To move to a new DCP release, read `WEBSITE_HASH` and `MIXER_HASH` off that release's image, merge the website commit, then set the `mixer` pointer to `MIXER_HASH`. Taking the mixer the website tag carries instead builds a pairing Google never tested against that release's Terraform stack. +`just sync` merges `WEBSITE_HASH`, sets the `mixer` pointer to `MIXER_HASH`, and sets the `import` pointer to the one the website commit pins. It fails if the image or either build arg is missing. Taking the mixer the website tag carries builds a pairing Google never tested against that release's Terraform stack. -`.github/workflows/codeql-analysis.yml`, `dependabot-approval.yml`, and `submodule-update.yml` are deleted in this fork. All three guard their jobs on `github.repository == 'datacommonsorg/website'`, so they never run here. Upstream re-adds them on every sync that touches them. Keep them deleted rather than resolving the conflict toward upstream's version. +`.github/workflows/` is DFO-owned. A workflow file upstream adds there would run on the fork, so a sync takes nothing from upstream under that directory. `just sync` and `just sync-finish` reset it to the pre-merge version and list every file upstream added, changed, or deleted there. Port one by hand in its own PR if the fork needs it. Upstream's `codeql-analysis.yml`, `dependabot-approval.yml`, and `submodule-update.yml` stay deleted this way. ## Releasing to production @@ -109,5 +112,6 @@ always reproducible from a committed sha. - **Commits** follow [Conventional Commits](https://www.conventionalcommits.org): `feat:`, `fix:`, `chore:`, and so on. - **PRs target `dev`.** Only the release step writes to `main`. +- **PRs into `dev` land as merge commits.** The `dev` ruleset allows only merges. A sync commit's second parent is the upstream website commit, and that parent is what keeps the fork's history shared with datacommonsorg/website. A squash or rebase drops it, and the next sync merges from an older base and replays upstream changes the fork already has as conflicts. - **Delete merged branches.** Feature branches are short-lived. - **Keep internal notes out of the repo.** Design docs, plans, and audits stay local. This guide and real reference docs are the exception. diff --git a/README.md b/README.md index a160b50e52..1bff813007 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ New here? Read [CONTRIBUTING-DFO.md](./CONTRIBUTING-DFO.md) before opening a bra ## Layout -- **`custom_dc/`** is ONE Data's DFO code. `custom_dc/dfo/prototypes` is the frontend, and `custom_dc/api_server` holds a legacy copy of the Search API that stays until its removal PR lands. The Search API and Datasets API are built in [apis](https://github.com/DevelopmentFinanceObservatory/apis). Upstream never touches these paths. +- **`custom_dc/`** is ONE Data's DFO code. `custom_dc/dfo/prototypes` is the frontend. The Search API and Datasets API are built in [apis](https://github.com/DevelopmentFinanceObservatory/apis). Upstream never touches these paths. - **Everything else** tracks upstream `datacommonsorg/website`, with the graph server (`mixer`) and ingestion (`import`) as submodules. ## Quickstart diff --git a/build/cdc_data/Dockerfile b/build/cdc_data/Dockerfile index 407212c039..c3fd1da6db 100644 --- a/build/cdc_data/Dockerfile +++ b/build/cdc_data/Dockerfile @@ -20,6 +20,10 @@ ENV ENV=${ENV} WORKDIR /workspace +# Apply security patches for OS base packages (OpenSSL, Perl, glibc, pcre2, etc.) +RUN apt-get update && apt-get upgrade -y \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* # Copy simple importer requirements. COPY import/simple/requirements.txt ./import/simple/requirements.txt @@ -27,9 +31,10 @@ COPY import/simple/requirements.txt ./import/simple/requirements.txt ARG PIP_DISABLE_PIP_VERSION_CHECK=1 ARG PIP_NO_CACHE_DIR=1 -# Create a virtual env, add it to path, and install all requirements. +# Create a virtual env, add it to path, upgrade core packaging tools, and install all requirements. RUN python -m venv /workspace/venv ENV PATH="/workspace/venv/bin:$PATH" +RUN pip3 install --no-cache-dir --upgrade pip "setuptools<70" wheel # Install simple importer requirements. RUN pip3 install -r ./import/simple/requirements.txt @@ -47,4 +52,4 @@ RUN chmod +x run.sh ENV PATH="/workspace/venv/bin:$PATH" # Set the entrypoint to force bash execution -ENTRYPOINT ["/bin/bash", "./run.sh"] \ No newline at end of file +ENTRYPOINT ["/bin/bash", "./run.sh"] diff --git a/build/cdc_services/Dockerfile b/build/cdc_services/Dockerfile index 71d90c2fc2..978e7c69f0 100644 --- a/build/cdc_services/Dockerfile +++ b/build/cdc_services/Dockerfile @@ -49,7 +49,7 @@ RUN protoc \ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bin/mixer cmd/main.go -# #### Stage 2: Build python servers (website and NL). #### +# #### Stage 2: Build python servers (website and MCP). #### FROM --platform=linux/amd64 python:3.11.14-slim as py-servers ARG PIP_DISABLE_PIP_VERSION_CHECK=1 @@ -61,33 +61,21 @@ WORKDIR /workspace RUN apt-get update && apt-get -y upgrade && apt-get install -y git # Copy requirements. -# Copy nl_requirements.txt since it is referenced by embeddings requirements.txt COPY server/requirements.txt ./server/requirements.txt -COPY nl_server/requirements.txt ./nl_server/requirements.txt -COPY nl_requirements.txt ./nl_requirements.txt -COPY torch_requirements.txt ./torch_requirements.txt # Create a virtual env and install requirements. RUN python -m venv ./venv ENV PATH="/workspace/venv/bin:$PATH" -RUN pip3 install --upgrade pip setuptools \ +RUN pip3 install --no-cache-dir --upgrade pip setuptools \ && pip3 install --no-cache-dir -r /workspace/server/requirements.txt \ - && pip3 install --no-cache-dir -r /workspace/torch_requirements.txt --index-url https://download.pytorch.org/whl/cpu \ - && pip3 install --no-cache-dir -r /workspace/nl_server/requirements.txt \ && pip3 install --no-cache-dir datacommons-mcp # Copy website app script. COPY web_app.py ./web_app.py # Copy server module. COPY server/. ./server/ -# Copy NL app script. -COPY nl_app.py ./nl_app.py -# Copy nl_server module. -COPY nl_server/. ./nl_server/ # Copy the shared module. COPY shared/. ./shared/ -# Copy yaml files. -COPY deploy/nl/. /datacommons/nl/ # #### Stage 3: Build static website assets. #### @@ -116,19 +104,6 @@ WORKDIR /workspace/static RUN npm run-script build -# #### Stage 4: Download base dc model and embeddings from GCS. #### -FROM --platform=linux/amd64 google/cloud-sdk:slim as download - -# Remove auth check since these are public buckets and we don't have credentials within the container. -# Copy model and embeddings. -RUN gcloud config set auth/disable_credentials True \ - && mkdir -p /tmp/datcom-nl-models \ - && gcloud storage cp --recursive \ - gs://datcom-nl-models/ft_final_v20230717230459.all-MiniLM-L6-v2/ \ - gs://datcom-nl-models/embeddings_medium_2024_05_09_18_01_32.ft_final_v20230717230459.all-MiniLM-L6-v2.csv \ - /tmp/datcom-nl-models/ - - # >>> DFO bake-in (custom_dc/dfo) >>> # ONE/DFO: Build the DFO prototyping Next.js app (custom_dc/dfo/prototypes). # Isolated stage; upstream never edits this. See custom_dc/dfo/README.md. @@ -145,7 +120,10 @@ COPY custom_dc/dfo/prototypes/ ./ # Wire /prototype/search to the live Search API. This is a NEXT_PUBLIC_* var, so # it is inlined into the browser bundle at build time — a runtime env on Cloud Run # cannot flip it. Set to 0 (--build-arg NEXT_PUBLIC_USE_SEARCH_API=0) to bake a -# fixtures-only image. The engine still needs GEMINI_API_KEY set at runtime. +# fixtures-only image. /api/search is rewritten to dfo-apis and needs no key here. +# GEMINI_API_KEY (or GOOGLE_API_KEY) is read at runtime by /api/similarity, which +# falls back to pseudo-embeddings without it, and by /api/skill-compare +# (lib/skillAgent.ts), which returns an error without it. ARG NEXT_PUBLIC_USE_SEARCH_API=1 ENV NEXT_PUBLIC_USE_SEARCH_API=${NEXT_PUBLIC_USE_SEARCH_API} # The website origin that next.config.mjs bakes into the /api/search and @@ -194,13 +172,10 @@ COPY --from=mixer /workspace/deploy/featureflags deploy/featureflags COPY --from=mixer /workspace/mixer-grpc.pb . # nginx. COPY build/cdc_services/nginx.conf . -# Website and NL servers. +# Website server. COPY --from=py-servers /workspace/ . -COPY --from=py-servers /datacommons/ /datacommons # Static website assets. COPY --from=static /workspace/server ./server -# Downloaded model and embeddings. -COPY --from=download /tmp/datcom-nl-models /tmp/datcom-nl-models # Copy executable script. COPY build/cdc_services/run.sh . diff --git a/build/cdc_services/run.sh b/build/cdc_services/run.sh index 892e6e6122..83202e1519 100755 --- a/build/cdc_services/run.sh +++ b/build/cdc_services/run.sh @@ -16,12 +16,6 @@ set -e export MIXER_API_KEY=$DC_API_KEY -# https://stackoverflow.com/a/62703850 -export TOKENIZERS_PARALLELISM=false -# https://github.com/UKPLab/sentence-transformers/issues/1318#issuecomment-1084731111 -export OMP_NUM_THREADS=1 - -export NL_SERVER_PORT=${NL_SERVER_PORT:-6060} # If OUTPUT_DIR is not specified and the deprecated GCS_DATA_PATH is, use that as OUTPUT_DIR. if [[ $OUTPUT_DIR == "" && $GCS_DATA_PATH != "" ]]; then @@ -51,7 +45,6 @@ echo "OUTPUT_DIR=$OUTPUT_DIR" export IS_CUSTOM_DC=true export USER_DATA_PATH=$OUTPUT_DIR -export ADDITIONAL_CATALOG_PATH=$USER_DATA_PATH/datacommons/nl/embeddings/custom_catalog.yaml if [[ $USE_SQLITE == "true" ]]; then export SQLITE_PATH=$OUTPUT_DIR/datacommons/datacommons.db @@ -60,48 +53,42 @@ fi nginx -c /workspace/nginx.conf +# 1. Dynamically update feature flags for Website and Mixer +python3 update_dcp_flags.py + +# Resolve Project ID across standard environment variables, or fall back to Compute/Cloud Run Metadata Server +GCP_PROJECT_ID=${GCP_PROJECT_ID:-${GOOGLE_CLOUD_PROJECT:-$PROJECT_ID}} +if [[ -z "$GCP_PROJECT_ID" ]]; then + GCP_PROJECT_ID=$(python3 -c "import urllib.request; req = urllib.request.Request('http://metadata.google.internal/computeMetadata/v1/project/project-id', headers={'Metadata-Flavor': 'Google'}); print(urllib.request.urlopen(req).read().decode())" 2>/dev/null) || true +fi + +if [[ -z "$GCP_PROJECT_ID" ]]; then + echo "ERROR: GCP_PROJECT_ID (or GOOGLE_CLOUD_PROJECT / PROJECT_ID) not specified and could not be resolved from metadata." + exit 1 +fi + +SPANNER_CONFIG_YAML="{project: \"$GCP_PROJECT_ID\", instance: \"$GCP_SPANNER_INSTANCE_ID\", database: \"$GCP_SPANNER_DATABASE_NAME\"}" +SPANNER_SEARCH_CONFIG_PATH=${SPANNER_SEARCH_CONFIG_PATH:-"/workspace/internal/server/spanner/spanner_config/dcp_default.yaml"} + +# 2. Configure Mixer arguments (Spanner Graph + V2 API) MIXER_ARGS=( "--agent_default_expand_topics=false" + "--spanner_graph_info=$SPANNER_CONFIG_YAML" + "--spanner_search_config_path=$SPANNER_SEARCH_CONFIG_PATH" + "--use_spanner_graph=true" + "--feature_flags_path=deploy/featureflags/dcp.yaml" + "--host_project=$GCP_PROJECT_ID" + # Embed query terms in the service's own region. Mixer otherwise calls + # us-central1, whose shared Vertex AI capacity returns 429s under load. + "--genai_client_location=${GENAI_CLIENT_LOCATION:-$REGION}" ) -if [[ $ENABLE_MODEL == "true" && $RESOLVE_WITH_SPANNER_EMBEDDINGS != "true" ]]; then - # Custom embeddings index built at - # https://github.com/datacommonsorg/website/blob/40111935bd6e564f8825c7abc1ccd920ea942aef/build/cdc_data/run.sh#L90-L94 - export CUSTOM_EMBEDDINGS_INDEX=${CUSTOM_EMBEDDINGS_INDEX:-"user_all_minilm_mem"} - MIXER_ARGS+=( - "--embeddings_server_url=http://localhost:$NL_SERVER_PORT" - "--resolve_embeddings_indexes=$CUSTOM_EMBEDDINGS_INDEX" - ) -fi -if [[ $USE_SPANNER_GRAPH == "true" ]]; then - echo "Spanner Graph detected. Enabling V2 API for Website and Mixer." - - # 1. Dynamically update feature flags for Website and Mixer - python3 update_dcp_flags.py - # Resolve Project ID across standard environment variables, or fall back to Compute/Cloud Run Metadata Server - GCP_PROJECT_ID=${GCP_PROJECT_ID:-${GOOGLE_CLOUD_PROJECT:-$PROJECT_ID}} - if [[ -z "$GCP_PROJECT_ID" ]]; then - GCP_PROJECT_ID=$(python3 -c "import urllib.request; req = urllib.request.Request('http://metadata.google.internal/computeMetadata/v1/project/project-id', headers={'Metadata-Flavor': 'Google'}); print(urllib.request.urlopen(req).read().decode())" 2>/dev/null) || true - fi - - if [[ -z "$GCP_PROJECT_ID" ]]; then - echo "ERROR: GCP_PROJECT_ID (or GOOGLE_CLOUD_PROJECT / PROJECT_ID) not specified and could not be resolved from metadata." - exit 1 - fi - - SPANNER_CONFIG_YAML="{project: \"$GCP_PROJECT_ID\", instance: \"$GCP_SPANNER_INSTANCE_ID\", database: \"$GCP_SPANNER_DATABASE_NAME\"}" - SPANNER_SEARCH_CONFIG_PATH=${SPANNER_SEARCH_CONFIG_PATH:-"/workspace/internal/server/spanner/spanner_config/dcp_default.yaml"} - - # 2. Enable V2 API for Mixer +# 3. Enable Redis cache for Mixer if REDIS_HOST and REDIS_PORT are configured +if [[ -n "$REDIS_HOST" && -n "$REDIS_PORT" ]]; then + REDIS_CONFIG_YAML="{instances: [{region: \"$REGION\", host: \"$REDIS_HOST\", port: \"$REDIS_PORT\"}]}" MIXER_ARGS+=( - "--spanner_graph_info=$SPANNER_CONFIG_YAML" - "--spanner_search_config_path=$SPANNER_SEARCH_CONFIG_PATH" - "--use_spanner_graph=true" - "--feature_flags_path=deploy/featureflags/dcp.yaml" - "--host_project=$GCP_PROJECT_ID" - # Embed query terms in the service's own region. Mixer otherwise calls - # us-central1, whose shared Vertex AI capacity returns 429s under load. - "--genai_client_location=${GENAI_CLIENT_LOCATION:-$REGION}" + "--use_redis=true" + "--redis_info=$REDIS_CONFIG_YAML" ) fi @@ -122,17 +109,6 @@ echo "DEBUG: Starting Mixer with arguments: ${MIXER_ARGS[@]}" # Start envoy. envoy -l warning --config-path /workspace/esp/envoy-config.yaml & -# Start NL server. -if [[ $ENABLE_MODEL == "true" && $RESOLVE_WITH_SPANNER_EMBEDDINGS != "true" ]]; then - if [[ $DEBUG == "true" ]]; then - echo "Starting NL Server in debug mode." - python3 nl_app.py $NL_SERVER_PORT & - else - echo "Starting NL Server." - gunicorn --log-level info --preload --timeout 1000 --bind 0.0.0.0:$NL_SERVER_PORT -w 1 nl_app:app & - fi -fi - # Start MCP server. if [[ $ENABLE_MCP == "true" ]]; then echo "Starting MCP Server." diff --git a/build/cdc_services/update_dcp_flags.py b/build/cdc_services/update_dcp_flags.py index 9a84abbc59..3105c9af8c 100644 --- a/build/cdc_services/update_dcp_flags.py +++ b/build/cdc_services/update_dcp_flags.py @@ -72,7 +72,6 @@ def update_website_flags(): for flag in data: if flag.get('name') in ( 'enable_nl_v2node_fetchall', - 'use_v2_resolve_for_nl_search_vars', 'enable_schema_driven_topic_resolution' ): flag['enabled'] = True diff --git a/build/ci/cloudbuild.deploy_mixer.yaml b/build/ci/cloudbuild.deploy_mixer.yaml index 4ce7e9cb60..4354b3232d 100644 --- a/build/ci/cloudbuild.deploy_mixer.yaml +++ b/build/ci/cloudbuild.deploy_mixer.yaml @@ -58,24 +58,9 @@ steps: --region=us-central1 \ --project=datcom-ci - # 3. TAG NL IMAGE FOR SIDE CAR - # The Mixer deployment includes an embeddings sidecar (datacommons-nl image). - # We need to explicitly tag the 'cicd' version of this image as 'mixer-sidecar' - # so that we can deploy it using a specific alias in Skaffold. - # This alias (datacommons-embeddings-sidecar) allows us to deploy the same physical image - # with a different tag/purpose than the main website NL image, avoiding version conflicts. - echo "Tagging datacommons-nl:cicd image with mixer-sidecar..." - gcloud container images add-tag \ - "us-docker.pkg.dev/datcom-ci/gcr.io/datacommons-nl:cicd" \ - "us-docker.pkg.dev/datcom-ci/gcr.io/datacommons-nl:mixer-sidecar" \ - --project=datcom-ci --quiet - # Run the deployment creation. - # Note the addition of the 'datacommons-embeddings-sidecar' image in the --images flag. - # This maps the physical image (with our new tag) to the artifact alias defined in skaffold.yaml. images_arr=( "gcr.io/datcom-ci/datacommons-mixer=us-docker.pkg.dev/datcom-ci/gcr.io/datacommons-mixer:${mixer_githash}" - "gcr.io/datcom-ci/datacommons-embeddings-sidecar=us-docker.pkg.dev/datcom-ci/gcr.io/datacommons-nl:mixer-sidecar" ) images_str=$(IFS=,; echo "${images_arr[*]}") diff --git a/build/ci/cloudbuild.deploy_website_mixer.yaml b/build/ci/cloudbuild.deploy_website_mixer.yaml index 65ccb5fa54..1a80907c5f 100644 --- a/build/ci/cloudbuild.deploy_website_mixer.yaml +++ b/build/ci/cloudbuild.deploy_website_mixer.yaml @@ -84,17 +84,10 @@ steps: --project=datcom-ci # Run the deployment creation. - # Note the addition of 'datacommons-embeddings-sidecar' in the images flag. - # This maps the Artifact Registry image (specifically the 'mixer-sidecar' tag) - # to the 'gcr.io/datcom-ci/datacommons-embeddings-sidecar' artifact alias in skaffold.yaml. - # Unlike the pure mixer pipeline, we DO NOT re-tag the image here; we rely on the tag - # established by the datacommons-mixer pipeline to ensure stability/sync with mixer releases. images_arr=( "gcr.io/datcom-ci/datacommons-website=us-docker.pkg.dev/datcom-ci/gcr.io/datacommons-website:$${website_githash}" "gcr.io/datcom-ci/datacommons-mixer=us-docker.pkg.dev/datcom-ci/gcr.io/datacommons-mixer:$${mixer_githash}" "gcr.io/datcom-ci/datacommons-nodejs=us-docker.pkg.dev/datcom-ci/gcr.io/datacommons-nodejs:$${website_githash}" - "gcr.io/datcom-ci/datacommons-nl=us-docker.pkg.dev/datcom-ci/gcr.io/datacommons-nl:$${website_githash}" - "gcr.io/datcom-ci/datacommons-embeddings-sidecar=us-docker.pkg.dev/datcom-ci/gcr.io/datacommons-nl:mixer-sidecar" ) images_str=$$(IFS=,; echo "$${images_arr[*]}") diff --git a/build/ci/cloudbuild.push.yaml b/build/ci/cloudbuild.push.yaml index 0edf3bf541..a7a821d436 100644 --- a/build/ci/cloudbuild.push.yaml +++ b/build/ci/cloudbuild.push.yaml @@ -60,23 +60,6 @@ steps: echo "Total time: ${total_duration} seconds" waitFor: ["-"] - - id: push-nl-server - name: gcr.io/cloud-builders/docker - entrypoint: "bash" - args: - - -c - - | - set -e - docker build -f build/nl_server/Dockerfile \ - -t gcr.io/datcom-ci/datacommons-nl:$SHORT_SHA \ - -t gcr.io/datcom-ci/datacommons-nl:latest \ - -t gcr.io/datcom-ci/datacommons-nl:cicd \ - . - docker push gcr.io/datcom-ci/datacommons-nl:$SHORT_SHA - docker push gcr.io/datcom-ci/datacommons-nl:latest - docker push gcr.io/datcom-ci/datacommons-nl:cicd - waitFor: ["-"] - - id: push-datacommons-script-runner name: gcr.io/cloud-builders/docker entrypoint: "bash" @@ -164,7 +147,7 @@ steps: - website-image-pushed - --project=datcom-ci - --message=${SHORT_SHA} - waitFor: ["push-web-server", "push-nl-server", "push-nodejs-server", "push-datacommons-script-runner"] + waitFor: ["push-web-server", "push-nodejs-server", "push-datacommons-script-runner"] timeout: 3600s diff --git a/build/ci/cloudbuild.push_cdc_data_image.yaml b/build/ci/cloudbuild.push_cdc_data_image.yaml index 812d1c89a4..b05e7c26d9 100644 --- a/build/ci/cloudbuild.push_cdc_data_image.yaml +++ b/build/ci/cloudbuild.push_cdc_data_image.yaml @@ -18,6 +18,14 @@ steps: + - id: pull-cache + name: gcr.io/cloud-builders/docker + entrypoint: "bash" + args: + - -c + - | + docker pull gcr.io/datcom-ci/datacommons-data:latest || true + - id: push-cdc-data-image name: gcr.io/cloud-builders/docker entrypoint: "bash" @@ -25,11 +33,15 @@ steps: - -c - | set -e - docker build -f build/cdc_data/Dockerfile \ - --network=cloudbuild \ + DOCKER_BUILDKIT=1 docker build -f build/cdc_data/Dockerfile \ + --cache-from gcr.io/datcom-ci/datacommons-data:latest \ + --build-arg BUILDKIT_INLINE_CACHE=1 \ -t gcr.io/datcom-ci/datacommons-data:${_TAG} \ + -t gcr.io/datcom-ci/datacommons-data:latest \ . docker push gcr.io/datcom-ci/datacommons-data:${_TAG} + docker push gcr.io/datcom-ci/datacommons-data:latest + waitFor: ["pull-cache"] timeout: 3600s options: diff --git a/build/ci/cloudbuild.push_cdc_services_image.yaml b/build/ci/cloudbuild.push_cdc_services_image.yaml index 1975d7d3e5..e4384969a1 100644 --- a/build/ci/cloudbuild.push_cdc_services_image.yaml +++ b/build/ci/cloudbuild.push_cdc_services_image.yaml @@ -45,13 +45,14 @@ steps: DOCKER_BUILDKIT=1 docker build -f build/cdc_services/Dockerfile \ --build-arg MIXER_HASH=$(cat mixer_hash.txt) \ --build-arg WEBSITE_HASH=$(cat website_hash.txt) \ - --tag gcr.io/datcom-ci/datacommons-services:${_TAG} \ + --tag gcr.io/${_PROJECT_ID}/datacommons-services:${_TAG} \ . - docker push gcr.io/datcom-ci/datacommons-services:${_TAG} + docker push gcr.io/${_PROJECT_ID}/datacommons-services:${_TAG} waitFor: ["resolve-hashes"] substitutions: _TAG: "" + _PROJECT_ID: "datcom-ci" _WEBSITE_HASH: "" _MIXER_HASH: "" diff --git a/build/ci/cloudbuild.push_image.yaml b/build/ci/cloudbuild.push_image.yaml index deecb7d762..394b44a3ef 100644 --- a/build/ci/cloudbuild.push_image.yaml +++ b/build/ci/cloudbuild.push_image.yaml @@ -61,17 +61,6 @@ steps: docker push gcr.io/$_PROJECT_ID/datacommons-services:${_TAG} waitFor: ["resolve-hashes"] - - id: push-nl-server - name: gcr.io/cloud-builders/docker - entrypoint: "bash" - args: - - -c - - | - set -e - DOCKER_BUILDKIT=1 docker build -f build/nl_server/Dockerfile --tag gcr.io/$_PROJECT_ID/datacommons-nl:${_TAG} . - docker push gcr.io/$_PROJECT_ID/datacommons-nl:${_TAG} - waitFor: ["-"] - - id: push-nodejs-server name: gcr.io/cloud-builders/docker entrypoint: "bash" @@ -106,4 +95,5 @@ substitutions: timeout: 3600s options: dynamic_substitutions: true + substitution_option: "ALLOW_LOOSE" machineType: "E2_HIGHCPU_32" diff --git a/custom_dc/dfo/README.md b/custom_dc/dfo/README.md index d42ac8f3c5..79be539fe0 100644 --- a/custom_dc/dfo/README.md +++ b/custom_dc/dfo/README.md @@ -77,8 +77,8 @@ Manager **Secret Accessor** role on those secrets — if a key can't be fetched, the recipe prompts for it instead. The resulting `env.list` is gitignored; never commit it. -Any value can be supplied as an environment variable to skip its prompt (and, for -the keys, to override Secret Manager) — so `just env` runs fully non-interactively +Any prompted value can be supplied as an environment variable to skip its prompt +(and, for the keys, to override Secret Manager) — so `just env` runs fully non-interactively in CI: ``` @@ -88,6 +88,22 @@ $ OUTPUT_DIR=/data DC_API_KEY=… MAPS_API_KEY=… just env `OUTPUT_DIR` is the only value with no Secret Manager fallback, so set it this way (or accept the prompt) when running headless. +`env.list.sample` sets `GCP_PROJECT_ID`, `GCP_SPANNER_INSTANCE_ID`, +`GCP_SPANNER_DATABASE_NAME`, and `REGION` to the dfo-dev values +(`dev-fin-observatory`, `dfo-dev-dc-instance`, `dfo-dev-dc-db`, +`northamerica-northeast1`), and `just env` fills them in when they are empty or +missing. It takes these four from fixed values and ignores the shell environment, +so the project, instance, and database always name the same graph. The container's +`run.sh` starts mixer against that Spanner graph on every boot and exits without a +project, so a local container reads dfo-dev data through your mounted ADC. It also +passes the project to mixer as `--host_project`, and mixer then embeds query terms +through Vertex AI in `REGION` (us-central1 when `REGION` is empty). The account +behind your ADC needs two roles on `dev-fin-observatory`: +`roles/spanner.databaseReader` to read the graph and `roles/aiplatform.user` to +call the embedding model. `just run-local`, `just dev`, and `just shell` stop with +an error if `env.list` lacks the Spanner settings; run `just env` to add them to +an older file. + ### 2. Build and run the baked image ``` @@ -205,44 +221,29 @@ $ cd ../dfo-infra && just deploy ## Keeping in sync with upstream -The only files that can conflict on upstream sync are the three seam files (`build/cdc_services/Dockerfile`, `run.sh`, `nginx.conf`). Everything under `custom_dc/dfo/` and `custom_dc/api_server/` is untouched by upstream. +An upstream sync can conflict only on upstream-tracked files DFO modifies, adds, or deletes: the three seam files (`build/cdc_services/Dockerfile`, `run.sh`, `nginx.conf`) and the repo-level files listed in `.dfo-protected-paths`, such as `README.md`, `.gitignore`, `package-lock.json`, and the CI workflows. Everything under `custom_dc/dfo/` is untouched by upstream. `.github/workflows/` is DFO-owned too, and a sync keeps it as it was: `just sync` and `just sync-finish` leave every workflow upstream adds, changes, or deletes out of the merge and list it. ### Workflow -1. **Check what changed:** - - ``` - $ just sync - Commits behind upstream/customdc_stable: 12 - ``` +`dev` tracks Data Commons Platform releases. Each release image records the website and mixer commits it was built from, and `just sync` reads them from there. -2. **Merge:** +1. **Merge the release's website commit:** ``` - $ just sync-auto + $ just sync 1.1.6 + DCP 1.1.6: website 9852134, mixer 8118587 + Merging website v3.5.13 into dev... ``` - On a clean merge, this updates submodules and runs `check-overrides`. On conflicts, it lists them and offers options. - -3. **Resolve conflicts:** - - - `just sync-resolve` — accepts upstream for everything except paths in `.dfo-protected-paths`; lists the protected files for manual resolution. - - `just sync-theirs` — accepts upstream for all conflicts. Use when none of the conflicting files are DFO-owned. - - `just sync-abort` — abort and return to the pre-merge state. + The recipe pins `mixer` to the release's mixer and `import` to the website's pin. When the release's mixer differs from the website's pin, it resolves the short hash in the `mixer` submodule and requires it on upstream mixer `master`. On a clean merge it commits, checks out the recorded submodule commits, and runs `check-overrides`. On conflicts it lists them and exits 1. -4. **Check for stray conflict markers:** +2. **Resolve conflicts:** - ``` - $ just check-markers - ``` - -5. **Check seam file changes:** - - ``` - $ just check-overrides - ``` + - `just sync-resolve` accepts upstream for everything except paths in `.dfo-protected-paths` and finishes the merge when no conflicts remain. Otherwise it lists every unmerged file, protected or not, and exits 1. + - After resolving by hand, `git add` the files and run `just sync-finish`. It refuses while conflict markers remain, then commits, checks out the recorded submodule commits (`git submodule update --init --recursive`), and runs `check-overrides`. + - `just sync-abort` aborts and returns to the pre-merge state. - This compares each upstream seam file against its last merge base. If an upstream commit touched `Dockerfile`, `run.sh`, or `nginx.conf`, it prints a warning: +3. **Check seam file changes.** `check-overrides` compares each upstream seam file across the sync, from the previous merge base to the new website commit. If upstream touched `Dockerfile`, `run.sh`, or `nginx.conf`, it prints a warning: ``` WARNING build/cdc_services/run.sh @@ -250,7 +251,7 @@ The only files that can conflict on upstream sync are the three seam files (`bui Changes: 1 file changed, 3 insertions(+) ``` - When this fires, read the upstream diff (`git diff ..upstream/customdc_stable -- build/cdc_services/run.sh`), confirm the DFO hooks are still in place and still correct, then rebuild and run the e2e check. + When this fires, read the upstream diff it prints (`git diff .. -- build/cdc_services/run.sh`), confirm the DFO hooks are still in place and still correct, then rebuild and run the e2e check. To preview a sync, run `just check-overrides `. `.dfo-protected-paths` lists the paths `sync-resolve` protects from auto-resolution. `.dfo-overridden-files` maps each seam file to its DFO delegate(s), which is what `check-overrides` reads. @@ -282,7 +283,7 @@ the same supervisor. The subshell loops forever and never exits on its own, so `run.sh`'s `wait -n` never sees it die. A Next.js crash restarts Next in ~2 seconds without affecting the mixer, website, or MCP process. The DC site stays up. -A crash in a DC service (mixer, website, NL, or MCP) still hits `wait -n` and exits the container, triggering a Cloud Run restart. That is upstream's intended behaviour and is unchanged. +A crash in a DC service (mixer, Envoy, website, or MCP) still hits `wait -n` and exits the container, triggering a Cloud Run restart. That is upstream's intended behaviour and is unchanged. --- diff --git a/custom_dc/dfo/env.list.sample b/custom_dc/dfo/env.list.sample index c9ce2be943..4e9b965af0 100644 --- a/custom_dc/dfo/env.list.sample +++ b/custom_dc/dfo/env.list.sample @@ -12,6 +12,17 @@ OUTPUT_DIR= # Input directory containing files to be processed (absolute path or gs:///). INPUT_DIR= +### Spanner graph (required) ### + +# run.sh starts mixer against this Spanner database on every boot and exits +# without a project. A local container reads dfo-dev through the mounted ADC. +GCP_PROJECT_ID=dev-fin-observatory +GCP_SPANNER_INSTANCE_ID=dfo-dev-dc-instance +GCP_SPANNER_DATABASE_NAME=dfo-dev-dc-db +# run.sh also hands mixer the project as --host_project, so mixer embeds query +# terms through Vertex AI in this region (us-central1 when empty). +REGION=northamerica-northeast1 + ### DFO Next.js app ### # Port the Next.js app listens on inside the container. diff --git a/custom_dc/dfo/prototypes/app/search/lib/humanizeSourceLabel.ts b/custom_dc/dfo/prototypes/app/search/lib/humanizeSourceLabel.ts index e73a7078f7..3f9b493873 100644 --- a/custom_dc/dfo/prototypes/app/search/lib/humanizeSourceLabel.ts +++ b/custom_dc/dfo/prototypes/app/search/lib/humanizeSourceLabel.ts @@ -1,7 +1,7 @@ /** * humanizeSourceLabel — normalize a raw provenance/import identifier for * source-axis display text. Ports the engine's own rule - * (custom_dc/api_server/src/search/render.py's `_humanize_source_label` / + * (the apis repo's src/search/render/labels.py `_humanize_source_label` / * `_camel_to_words`) verbatim so a bound source chip (rendered by the engine) * and this frontend's source popover options (built from the same raw labels * via `optionsFromSpec`'s resolved_sources fallback) never disagree on diff --git a/custom_dc/dfo/prototypes/app/search/lib/taxonomy/SlotOptionsProvider.ts b/custom_dc/dfo/prototypes/app/search/lib/taxonomy/SlotOptionsProvider.ts index 31cf099d3a..177334b816 100644 --- a/custom_dc/dfo/prototypes/app/search/lib/taxonomy/SlotOptionsProvider.ts +++ b/custom_dc/dfo/prototypes/app/search/lib/taxonomy/SlotOptionsProvider.ts @@ -19,7 +19,7 @@ export interface SlotOption { * to tell probed-zero from never-probed. */ count?: number; /** the engine's raw coverage verdict for this option, when the request probed - * it (custom_dc/api_server/src/search/models.py's Coverage union). Absent for providers + * it (the apis repo's src/search/models/coverage.py Coverage union). Absent for providers * that don't carry coverage through (e.g. FixtureOptions) -- callers should * fall back to `count` in that case (see lib/optionCoverage.ts's * optionState/optionRichness). */ diff --git a/custom_dc/dfo/prototypes/lib/client/searchClient.ts b/custom_dc/dfo/prototypes/lib/client/searchClient.ts index f6dc8a7337..ac7fac6172 100644 --- a/custom_dc/dfo/prototypes/lib/client/searchClient.ts +++ b/custom_dc/dfo/prototypes/lib/client/searchClient.ts @@ -11,8 +11,8 @@ * origin directly. * * MIRROR: A deliberately-shallow type layer of the engine contract. See the - * fuller types in `lib/contract/types.ts` (source of truth: `custom_dc/api_server/ - * src/search/models.py`). Keep this layer in sync as the contract evolves. + * fuller types in `lib/contract/types.ts` (source of truth: the apis repo's + * `src/search/models/`). Keep this layer in sync as the contract evolves. */ import { diff --git a/custom_dc/dfo/prototypes/lib/contract/types.ts b/custom_dc/dfo/prototypes/lib/contract/types.ts index 923f42d793..d24007abb3 100644 --- a/custom_dc/dfo/prototypes/lib/contract/types.ts +++ b/custom_dc/dfo/prototypes/lib/contract/types.ts @@ -2,7 +2,7 @@ * Search engine contract: TypeScript mirror. * * Single source of truth for every consumer. These types mirror the shipped - * engine contract in `custom_dc/api_server/src/search/models.py` (the authoritative + * engine contract in the apis repo's `src/search/models/` (the authoritative * pydantic models; live schema at `GET /api/search/schema`). The engine owns the * contract; we consume it. When the models and these types diverge, the models * win and these types must be updated (and the schema_version bumped if MAJOR). diff --git a/custom_dc/dfo/prototypes/lib/optionCoverage.test.ts b/custom_dc/dfo/prototypes/lib/optionCoverage.test.ts index 7a3a5fffec..ededfd4143 100644 --- a/custom_dc/dfo/prototypes/lib/optionCoverage.test.ts +++ b/custom_dc/dfo/prototypes/lib/optionCoverage.test.ts @@ -10,7 +10,7 @@ import { } from './optionCoverage'; // Minimal option shape mirroring the engine's SlotOption/EntityOption: a label -// plus an optional Coverage (see custom_dc/api_server/src/search/models.py). +// plus an optional Coverage (see the apis repo's src/search/models/coverage.py). type Opt = { label: string; dcid: string; coverage?: any }; function opt(label: string, dcid: string, coverage?: any): Opt { diff --git a/custom_dc/dfo/prototypes/lib/optionCoverage.ts b/custom_dc/dfo/prototypes/lib/optionCoverage.ts index 4149f96b46..f430390454 100644 --- a/custom_dc/dfo/prototypes/lib/optionCoverage.ts +++ b/custom_dc/dfo/prototypes/lib/optionCoverage.ts @@ -10,10 +10,9 @@ * - 'unknown' never probed (coverage off), or this option had no * constructible/confirmable member to probe at all * The engine never fabricates a verdict for the third case (see - * FamilyResolver.option_coverage's contract in - * custom_dc/api_server/src/search/engine/families/protocol.py) — coverage stays `None`/ - * `undefined` rather than being reported as zero, so it must never be treated - * as "no data" here either. + * SlotOption.coverage in the apis repo's src/search/models/options.py) — + * coverage stays `None`/`undefined` rather than being reported as zero, so it + * must never be treated as "no data" here either. * * partitionOptions groups a list into `main` (observed, richest-first, then * unknown in original relative order) and `hidden` (probed-zero, minus any @@ -24,7 +23,7 @@ export type CoverageState = 'observed' | 'probed-zero' | 'unknown'; /** State for an engine-shaped coverage value (SlotOption.coverage from - * custom_dc/api_server/src/search/models.py): absent means never probed, has_data:false + * the apis repo's src/search/models/options.py): absent means never probed, has_data:false * means the probe ran and confirmed nothing, otherwise observed. */ export function coverageState(coverage: { has_data?: boolean } | null | undefined): CoverageState { if (!coverage) return 'unknown'; @@ -57,7 +56,7 @@ export function countState(count: number | null | undefined): CoverageState { /** Flattened production SlotOption shape (app/search/lib/taxonomy/SlotOptionsProvider.ts): * a `count` plus an optional raw `coverage` ride-along. `coverage` is `any` * here for the same reason as coverageRichness's param -- it's the engine's - * Coverage discriminated union (custom_dc/api_server/src/search/models.py), which this + * Coverage discriminated union (the apis repo's src/search/models/coverage.py), which this * shared lib deliberately doesn't import to stay usable from both the * flattened production shape and the raw engine shape (app/gutcheck/page.tsx). */ interface FlattenedOption { diff --git a/custom_dc/dfo/start.sh b/custom_dc/dfo/start.sh index a14d382acc..9fcb8d3bab 100644 --- a/custom_dc/dfo/start.sh +++ b/custom_dc/dfo/start.sh @@ -3,7 +3,7 @@ # before `wait -n`. Runs the standalone Next.js server under a self-restarting # supervisor subshell so an app crash restarts Next only — it never trips # run.sh's `wait -n` and never takes down mixer/website/MCP. -# DC-service deaths (mixer/website/NL/MCP) still cycle the container (upstream +# DC-service deaths (mixer/Envoy/website/MCP) still cycle the container (upstream # behaviour, unchanged). The subshell loops forever; it exits only on SIGINT/TERM # (container shutdown), so Cloud Run graceful termination still works. diff --git a/custom_dc/sample/entities/alaska_hospitals_unplanned_visits.csv b/custom_dc/sample/entities/alaska_hospitals_unplanned_visits.csv index d20bbbc967..a43dd0569f 100644 --- a/custom_dc/sample/entities/alaska_hospitals_unplanned_visits.csv +++ b/custom_dc/sample/entities/alaska_hospitals_unplanned_visits.csv @@ -1,127 +1,190 @@ entity,date,variable,value,observationPeriod -CCN20001,2023-06-30,EDAC_30_AMI_TOTAL,432,P3Y -CCN20001,2023-06-30,EDAC_30_AMI_RETURN,92,P3Y -CCN20001,2023-06-30,EDAC_30_HF_TOTAL,401,P3Y -CCN20001,2023-06-30,EDAC_30_HF_RETURN,124,P3Y -CCN20001,2023-06-30,EDAC_30_PN_TOTAL,200,P3Y -CCN20001,2023-06-30,EDAC_30_PN_RETURN,54,P3Y -CCN20006,2023-06-30,EDAC_30_AMI_TOTAL,139,P3Y -CCN20006,2023-06-30,EDAC_30_AMI_RETURN,42,P3Y -CCN20006,2023-06-30,EDAC_30_HF_TOTAL,198,P3Y -CCN20006,2023-06-30,EDAC_30_HF_RETURN,69,P3Y -CCN20006,2023-06-30,EDAC_30_PN_TOTAL,242,P3Y -CCN20006,2023-06-30,EDAC_30_PN_RETURN,69,P3Y -CCN20008,2023-06-30,EDAC_30_AMI_TOTAL,,P3Y -CCN20008,2023-06-30,EDAC_30_AMI_RETURN,,P3Y -CCN20008,2023-06-30,EDAC_30_HF_TOTAL,45,P3Y -CCN20008,2023-06-30,EDAC_30_HF_RETURN,20,P3Y -CCN20008,2023-06-30,EDAC_30_PN_TOTAL,39,P3Y -CCN20008,2023-06-30,EDAC_30_PN_RETURN,11,P3Y -CCN20012,2023-06-30,EDAC_30_AMI_TOTAL,75,P3Y -CCN20012,2023-06-30,EDAC_30_AMI_RETURN,17,P3Y -CCN20012,2023-06-30,EDAC_30_HF_TOTAL,103,P3Y -CCN20012,2023-06-30,EDAC_30_HF_RETURN,20,P3Y -CCN20012,2023-06-30,EDAC_30_PN_TOTAL,107,P3Y -CCN20012,2023-06-30,EDAC_30_PN_RETURN,26,P3Y -CCN20017,2023-06-30,EDAC_30_AMI_TOTAL,140,P3Y -CCN20017,2023-06-30,EDAC_30_AMI_RETURN,38,P3Y -CCN20017,2023-06-30,EDAC_30_HF_TOTAL,198,P3Y -CCN20017,2023-06-30,EDAC_30_HF_RETURN,71,P3Y -CCN20017,2023-06-30,EDAC_30_PN_TOTAL,186,P3Y -CCN20017,2023-06-30,EDAC_30_PN_RETURN,51,P3Y -CCN20018,2023-06-30,EDAC_30_AMI_TOTAL,,P3Y -CCN20018,2023-06-30,EDAC_30_AMI_RETURN,,P3Y -CCN20018,2023-06-30,EDAC_30_HF_TOTAL,30,P3Y -CCN20018,2023-06-30,EDAC_30_HF_RETURN,4,P3Y -CCN20018,2023-06-30,EDAC_30_PN_TOTAL,61,P3Y -CCN20018,2023-06-30,EDAC_30_PN_RETURN,4,P3Y -CCN20024,2023-06-30,EDAC_30_AMI_TOTAL,,P3Y -CCN20024,2023-06-30,EDAC_30_AMI_RETURN,,P3Y -CCN20024,2023-06-30,EDAC_30_HF_TOTAL,136,P3Y -CCN20024,2023-06-30,EDAC_30_HF_RETURN,60,P3Y -CCN20024,2023-06-30,EDAC_30_PN_TOTAL,125,P3Y -CCN20024,2023-06-30,EDAC_30_PN_RETURN,40,P3Y -CCN20026,2023-06-30,EDAC_30_AMI_TOTAL,,P3Y -CCN20026,2023-06-30,EDAC_30_AMI_RETURN,,P3Y -CCN20026,2023-06-30,EDAC_30_HF_TOTAL,125,P3Y -CCN20026,2023-06-30,EDAC_30_HF_RETURN,35,P3Y -CCN20026,2023-06-30,EDAC_30_PN_TOTAL,145,P3Y -CCN20026,2023-06-30,EDAC_30_PN_RETURN,21,P3Y -CCN21301,2023-06-30,EDAC_30_AMI_TOTAL,,P3Y -CCN21301,2023-06-30,EDAC_30_AMI_RETURN,,P3Y -CCN21301,2023-06-30,EDAC_30_HF_TOTAL,,P3Y -CCN21301,2023-06-30,EDAC_30_HF_RETURN,,P3Y -CCN21301,2023-06-30,EDAC_30_PN_TOTAL,,P3Y -CCN21301,2023-06-30,EDAC_30_PN_RETURN,,P3Y -CCN21302,2023-06-30,EDAC_30_AMI_TOTAL,,P3Y -CCN21302,2023-06-30,EDAC_30_AMI_RETURN,,P3Y -CCN21302,2023-06-30,EDAC_30_HF_TOTAL,,P3Y -CCN21302,2023-06-30,EDAC_30_HF_RETURN,,P3Y -CCN21302,2023-06-30,EDAC_30_PN_TOTAL,,P3Y -CCN21302,2023-06-30,EDAC_30_PN_RETURN,,P3Y -CCN21304,2023-06-30,EDAC_30_AMI_TOTAL,,P3Y -CCN21304,2023-06-30,EDAC_30_AMI_RETURN,,P3Y -CCN21304,2023-06-30,EDAC_30_HF_TOTAL,,P3Y -CCN21304,2023-06-30,EDAC_30_HF_RETURN,,P3Y -CCN21304,2023-06-30,EDAC_30_PN_TOTAL,,P3Y -CCN21304,2023-06-30,EDAC_30_PN_RETURN,,P3Y -CCN21305,2023-06-30,EDAC_30_AMI_TOTAL,,P3Y -CCN21305,2023-06-30,EDAC_30_AMI_RETURN,,P3Y -CCN21305,2023-06-30,EDAC_30_HF_TOTAL,,P3Y -CCN21305,2023-06-30,EDAC_30_HF_RETURN,,P3Y -CCN21305,2023-06-30,EDAC_30_PN_TOTAL,,P3Y -CCN21305,2023-06-30,EDAC_30_PN_RETURN,,P3Y -CCN21306,2023-06-30,EDAC_30_AMI_TOTAL,,P3Y -CCN21306,2023-06-30,EDAC_30_AMI_RETURN,,P3Y -CCN21306,2023-06-30,EDAC_30_HF_TOTAL,,P3Y -CCN21306,2023-06-30,EDAC_30_HF_RETURN,,P3Y -CCN21306,2023-06-30,EDAC_30_PN_TOTAL,,P3Y -CCN21306,2023-06-30,EDAC_30_PN_RETURN,,P3Y -CCN21307,2023-06-30,EDAC_30_AMI_TOTAL,,P3Y -CCN21307,2023-06-30,EDAC_30_AMI_RETURN,,P3Y -CCN21307,2023-06-30,EDAC_30_HF_TOTAL,,P3Y -CCN21307,2023-06-30,EDAC_30_HF_RETURN,,P3Y -CCN21307,2023-06-30,EDAC_30_PN_TOTAL,,P3Y -CCN21307,2023-06-30,EDAC_30_PN_RETURN,,P3Y -CCN21308,2023-06-30,EDAC_30_AMI_TOTAL,,P3Y -CCN21308,2023-06-30,EDAC_30_AMI_RETURN,,P3Y -CCN21308,2023-06-30,EDAC_30_HF_TOTAL,18,P3Y -CCN21308,2023-06-30,EDAC_30_HF_RETURN,10,P3Y -CCN21308,2023-06-30,EDAC_30_PN_TOTAL,,P3Y -CCN21308,2023-06-30,EDAC_30_PN_RETURN,,P3Y -CCN21311,2023-06-30,EDAC_30_AMI_TOTAL,,P3Y -CCN21311,2023-06-30,EDAC_30_AMI_RETURN,,P3Y -CCN21311,2023-06-30,EDAC_30_HF_TOTAL,28,P3Y -CCN21311,2023-06-30,EDAC_30_HF_RETURN,12,P3Y -CCN21311,2023-06-30,EDAC_30_PN_TOTAL,54,P3Y -CCN21311,2023-06-30,EDAC_30_PN_RETURN,15,P3Y -CCN21312,2023-06-30,EDAC_30_AMI_TOTAL,,P3Y -CCN21312,2023-06-30,EDAC_30_AMI_RETURN,,P3Y -CCN21312,2023-06-30,EDAC_30_HF_TOTAL,,P3Y -CCN21312,2023-06-30,EDAC_30_HF_RETURN,,P3Y -CCN21312,2023-06-30,EDAC_30_PN_TOTAL,23,P3Y -CCN21312,2023-06-30,EDAC_30_PN_RETURN,8,P3Y -CCN21313,2023-06-30,EDAC_30_AMI_TOTAL,,P3Y -CCN21313,2023-06-30,EDAC_30_AMI_RETURN,,P3Y -CCN21313,2023-06-30,EDAC_30_HF_TOTAL,,P3Y -CCN21313,2023-06-30,EDAC_30_HF_RETURN,,P3Y -CCN21313,2023-06-30,EDAC_30_PN_TOTAL,50,P3Y -CCN21313,2023-06-30,EDAC_30_PN_RETURN,10,P3Y -CCN21314,2023-06-30,EDAC_30_AMI_TOTAL,,P3Y -CCN21314,2023-06-30,EDAC_30_AMI_RETURN,,P3Y -CCN21314,2023-06-30,EDAC_30_HF_TOTAL,21,P3Y -CCN21314,2023-06-30,EDAC_30_HF_RETURN,5,P3Y -CCN21314,2023-06-30,EDAC_30_PN_TOTAL,38,P3Y -CCN21314,2023-06-30,EDAC_30_PN_RETURN,7,P3Y -CCN21309,2023-06-30,EDAC_30_AMI_TOTAL,,P3Y -CCN21309,2023-06-30,EDAC_30_AMI_RETURN,,P3Y -CCN21309,2023-06-30,EDAC_30_HF_TOTAL,,P3Y -CCN21309,2023-06-30,EDAC_30_HF_RETURN,,P3Y -CCN21309,2023-06-30,EDAC_30_PN_TOTAL,,P3Y -CCN21309,2023-06-30,EDAC_30_PN_RETURN,,P3Y -CCN21310,2023-06-30,EDAC_30_AMI_TOTAL,,P3Y -CCN21310,2023-06-30,EDAC_30_AMI_RETURN,,P3Y -CCN21310,2023-06-30,EDAC_30_HF_TOTAL,,P3Y -CCN21310,2023-06-30,EDAC_30_HF_RETURN,,P3Y -CCN21310,2023-06-30,EDAC_30_PN_TOTAL,,P3Y -CCN21310,2023-06-30,EDAC_30_PN_RETURN,,P3Y +CCN20001,2023-06-30,Count_Patients_HeartAttack,432,P2Y +CCN20001,2023-06-30,Count_ReturnPatients_HeartAttack,92,P2Y +CCN20001,2023-06-30,Count_Patients_HeartFailure,401,P2Y +CCN20001,2023-06-30,Count_ReturnPatients_HeartFailure,124,P2Y +CCN20001,2023-06-30,Count_Patients_Pneumonia,200,P2Y +CCN20001,2023-06-30,Count_ReturnPatients_Pneumonia,54,P2Y +CCN20001,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartAttack,406,P2Y +CCN20001,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartFailure,473,P2Y +CCN20001,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_Pneumonia,276,P2Y +CCN20006,2023-06-30,Count_Patients_HeartAttack,139,P2Y +CCN20006,2023-06-30,Count_ReturnPatients_HeartAttack,42,P2Y +CCN20006,2023-06-30,Count_Patients_HeartFailure,198,P2Y +CCN20006,2023-06-30,Count_ReturnPatients_HeartFailure,69,P2Y +CCN20006,2023-06-30,Count_Patients_Pneumonia,242,P2Y +CCN20006,2023-06-30,Count_ReturnPatients_Pneumonia,69,P2Y +CCN20006,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartAttack,167,P2Y +CCN20006,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartFailure,258,P2Y +CCN20006,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_Pneumonia,307,P2Y +CCN20008,2023-06-30,Count_Patients_HeartAttack,,P2Y +CCN20008,2023-06-30,Count_ReturnPatients_HeartAttack,,P2Y +CCN20008,2023-06-30,Count_Patients_HeartFailure,45,P2Y +CCN20008,2023-06-30,Count_ReturnPatients_HeartFailure,20,P2Y +CCN20008,2023-06-30,Count_Patients_Pneumonia,39,P2Y +CCN20008,2023-06-30,Count_ReturnPatients_Pneumonia,11,P2Y +CCN20008,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartAttack,,P2Y +CCN20008,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartFailure,68,P2Y +CCN20008,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_Pneumonia,56,P2Y +CCN20012,2023-06-30,Count_Patients_HeartAttack,75,P2Y +CCN20012,2023-06-30,Count_ReturnPatients_HeartAttack,17,P2Y +CCN20012,2023-06-30,Count_Patients_HeartFailure,103,P2Y +CCN20012,2023-06-30,Count_ReturnPatients_HeartFailure,20,P2Y +CCN20012,2023-06-30,Count_Patients_Pneumonia,107,P2Y +CCN20012,2023-06-30,Count_ReturnPatients_Pneumonia,26,P2Y +CCN20012,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartAttack,74,P2Y +CCN20012,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartFailure,144,P2Y +CCN20012,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_Pneumonia,154,P2Y +CCN20017,2023-06-30,Count_Patients_HeartAttack,140,P2Y +CCN20017,2023-06-30,Count_ReturnPatients_HeartAttack,38,P2Y +CCN20017,2023-06-30,Count_Patients_HeartFailure,198,P2Y +CCN20017,2023-06-30,Count_ReturnPatients_HeartFailure,71,P2Y +CCN20017,2023-06-30,Count_Patients_Pneumonia,186,P2Y +CCN20017,2023-06-30,Count_ReturnPatients_Pneumonia,51,P2Y +CCN20017,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartAttack,131,P2Y +CCN20017,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartFailure,226,P2Y +CCN20017,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_Pneumonia,296,P2Y +CCN20018,2023-06-30,Count_Patients_HeartAttack,,P2Y +CCN20018,2023-06-30,Count_ReturnPatients_HeartAttack,,P2Y +CCN20018,2023-06-30,Count_Patients_HeartFailure,30,P2Y +CCN20018,2023-06-30,Count_ReturnPatients_HeartFailure,4,P2Y +CCN20018,2023-06-30,Count_Patients_Pneumonia,61,P2Y +CCN20018,2023-06-30,Count_ReturnPatients_Pneumonia,4,P2Y +CCN20018,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartAttack,,P2Y +CCN20018,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartFailure,37,P2Y +CCN20018,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_Pneumonia,85,P2Y +CCN20024,2023-06-30,Count_Patients_HeartAttack,,P2Y +CCN20024,2023-06-30,Count_ReturnPatients_HeartAttack,,P2Y +CCN20024,2023-06-30,Count_Patients_HeartFailure,136,P2Y +CCN20024,2023-06-30,Count_ReturnPatients_HeartFailure,60,P2Y +CCN20024,2023-06-30,Count_Patients_Pneumonia,125,P2Y +CCN20024,2023-06-30,Count_ReturnPatients_Pneumonia,40,P2Y +CCN20024,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartAttack,,P2Y +CCN20024,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartFailure,181,P2Y +CCN20024,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_Pneumonia,169,P2Y +CCN20026,2023-06-30,Count_Patients_HeartAttack,,P2Y +CCN20026,2023-06-30,Count_ReturnPatients_HeartAttack,,P2Y +CCN20026,2023-06-30,Count_Patients_HeartFailure,125,P2Y +CCN20026,2023-06-30,Count_ReturnPatients_HeartFailure,35,P2Y +CCN20026,2023-06-30,Count_Patients_Pneumonia,145,P2Y +CCN20026,2023-06-30,Count_ReturnPatients_Pneumonia,21,P2Y +CCN20026,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartAttack,,P2Y +CCN20026,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartFailure,123,P2Y +CCN20026,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_Pneumonia,179,P2Y +CCN21301,2023-06-30,Count_Patients_HeartAttack,,P2Y +CCN21301,2023-06-30,Count_ReturnPatients_HeartAttack,,P2Y +CCN21301,2023-06-30,Count_Patients_HeartFailure,,P2Y +CCN21301,2023-06-30,Count_ReturnPatients_HeartFailure,,P2Y +CCN21301,2023-06-30,Count_Patients_Pneumonia,,P2Y +CCN21301,2023-06-30,Count_ReturnPatients_Pneumonia,,P2Y +CCN21301,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartAttack,,P2Y +CCN21301,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartFailure,,P2Y +CCN21301,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_Pneumonia,,P2Y +CCN21302,2023-06-30,Count_Patients_HeartAttack,,P2Y +CCN21302,2023-06-30,Count_ReturnPatients_HeartAttack,,P2Y +CCN21302,2023-06-30,Count_Patients_HeartFailure,,P2Y +CCN21302,2023-06-30,Count_ReturnPatients_HeartFailure,,P2Y +CCN21302,2023-06-30,Count_Patients_Pneumonia,,P2Y +CCN21302,2023-06-30,Count_ReturnPatients_Pneumonia,,P2Y +CCN21302,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartAttack,,P2Y +CCN21302,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartFailure,,P2Y +CCN21302,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_Pneumonia,,P2Y +CCN21304,2023-06-30,Count_Patients_HeartAttack,,P2Y +CCN21304,2023-06-30,Count_ReturnPatients_HeartAttack,,P2Y +CCN21304,2023-06-30,Count_Patients_HeartFailure,,P2Y +CCN21304,2023-06-30,Count_ReturnPatients_HeartFailure,,P2Y +CCN21304,2023-06-30,Count_Patients_Pneumonia,,P2Y +CCN21304,2023-06-30,Count_ReturnPatients_Pneumonia,,P2Y +CCN21304,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartAttack,,P2Y +CCN21304,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartFailure,,P2Y +CCN21304,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_Pneumonia,,P2Y +CCN21305,2023-06-30,Count_Patients_HeartAttack,,P2Y +CCN21305,2023-06-30,Count_ReturnPatients_HeartAttack,,P2Y +CCN21305,2023-06-30,Count_Patients_HeartFailure,,P2Y +CCN21305,2023-06-30,Count_ReturnPatients_HeartFailure,,P2Y +CCN21305,2023-06-30,Count_Patients_Pneumonia,,P2Y +CCN21305,2023-06-30,Count_ReturnPatients_Pneumonia,,P2Y +CCN21305,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartAttack,,P2Y +CCN21305,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartFailure,,P2Y +CCN21305,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_Pneumonia,,P2Y +CCN21306,2023-06-30,Count_Patients_HeartAttack,,P2Y +CCN21306,2023-06-30,Count_ReturnPatients_HeartAttack,,P2Y +CCN21306,2023-06-30,Count_Patients_HeartFailure,,P2Y +CCN21306,2023-06-30,Count_ReturnPatients_HeartFailure,,P2Y +CCN21306,2023-06-30,Count_Patients_Pneumonia,,P2Y +CCN21306,2023-06-30,Count_ReturnPatients_Pneumonia,,P2Y +CCN21306,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartAttack,,P2Y +CCN21306,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartFailure,,P2Y +CCN21306,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_Pneumonia,27,P2Y +CCN21307,2023-06-30,Count_Patients_HeartAttack,,P2Y +CCN21307,2023-06-30,Count_ReturnPatients_HeartAttack,,P2Y +CCN21307,2023-06-30,Count_Patients_HeartFailure,,P2Y +CCN21307,2023-06-30,Count_ReturnPatients_HeartFailure,,P2Y +CCN21307,2023-06-30,Count_Patients_Pneumonia,,P2Y +CCN21307,2023-06-30,Count_ReturnPatients_Pneumonia,,P2Y +CCN21307,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartAttack,,P2Y +CCN21307,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartFailure,,P2Y +CCN21307,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_Pneumonia,,P2Y +CCN21308,2023-06-30,Count_Patients_HeartAttack,,P2Y +CCN21308,2023-06-30,Count_ReturnPatients_HeartAttack,,P2Y +CCN21308,2023-06-30,Count_Patients_HeartFailure,18,P2Y +CCN21308,2023-06-30,Count_ReturnPatients_HeartFailure,10,P2Y +CCN21308,2023-06-30,Count_Patients_Pneumonia,,P2Y +CCN21308,2023-06-30,Count_ReturnPatients_Pneumonia,,P2Y +CCN21308,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartAttack,,P2Y +CCN21308,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartFailure,31,P2Y +CCN21308,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_Pneumonia,31,P2Y +CCN21311,2023-06-30,Count_Patients_HeartAttack,,P2Y +CCN21311,2023-06-30,Count_ReturnPatients_HeartAttack,,P2Y +CCN21311,2023-06-30,Count_Patients_HeartFailure,28,P2Y +CCN21311,2023-06-30,Count_ReturnPatients_HeartFailure,12,P2Y +CCN21311,2023-06-30,Count_Patients_Pneumonia,54,P2Y +CCN21311,2023-06-30,Count_ReturnPatients_Pneumonia,15,P2Y +CCN21311,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartAttack,,P2Y +CCN21311,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartFailure,46,P2Y +CCN21311,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_Pneumonia,76,P2Y +CCN21312,2023-06-30,Count_Patients_HeartAttack,,P2Y +CCN21312,2023-06-30,Count_ReturnPatients_HeartAttack,,P2Y +CCN21312,2023-06-30,Count_Patients_HeartFailure,,P2Y +CCN21312,2023-06-30,Count_ReturnPatients_HeartFailure,,P2Y +CCN21312,2023-06-30,Count_Patients_Pneumonia,23,P2Y +CCN21312,2023-06-30,Count_ReturnPatients_Pneumonia,8,P2Y +CCN21312,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartAttack,,P2Y +CCN21312,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartFailure,,P2Y +CCN21312,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_Pneumonia,43,P2Y +CCN21313,2023-06-30,Count_Patients_HeartAttack,,P2Y +CCN21313,2023-06-30,Count_ReturnPatients_HeartAttack,,P2Y +CCN21313,2023-06-30,Count_Patients_HeartFailure,,P2Y +CCN21313,2023-06-30,Count_ReturnPatients_HeartFailure,,P2Y +CCN21313,2023-06-30,Count_Patients_Pneumonia,50,P2Y +CCN21313,2023-06-30,Count_ReturnPatients_Pneumonia,10,P2Y +CCN21313,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartAttack,,P2Y +CCN21313,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartFailure,,P2Y +CCN21313,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_Pneumonia,52,P2Y +CCN21314,2023-06-30,Count_Patients_HeartAttack,,P2Y +CCN21314,2023-06-30,Count_ReturnPatients_HeartAttack,,P2Y +CCN21314,2023-06-30,Count_Patients_HeartFailure,21,P2Y +CCN21314,2023-06-30,Count_ReturnPatients_HeartFailure,5,P2Y +CCN21314,2023-06-30,Count_Patients_Pneumonia,38,P2Y +CCN21314,2023-06-30,Count_ReturnPatients_Pneumonia,7,P2Y +CCN21314,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartAttack,,P2Y +CCN21314,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartFailure,28,P2Y +CCN21314,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_Pneumonia,48,P2Y +CCN21309,2023-06-30,Count_Patients_HeartAttack,,P2Y +CCN21309,2023-06-30,Count_ReturnPatients_HeartAttack,,P2Y +CCN21309,2023-06-30,Count_Patients_HeartFailure,,P2Y +CCN21309,2023-06-30,Count_ReturnPatients_HeartFailure,,P2Y +CCN21309,2023-06-30,Count_Patients_Pneumonia,,P2Y +CCN21309,2023-06-30,Count_ReturnPatients_Pneumonia,,P2Y +CCN21314,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartAttack,,P2Y +CCN21314,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartFailure,28,P2Y +CCN21314,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_Pneumonia,48,P2Y +CCN21310,2023-06-30,Count_Patients_HeartAttack,,P2Y +CCN21310,2023-06-30,Count_ReturnPatients_HeartAttack,,P2Y +CCN21310,2023-06-30,Count_Patients_HeartFailure,,P2Y +CCN21310,2023-06-30,Count_ReturnPatients_HeartFailure,,P2Y +CCN21310,2023-06-30,Count_Patients_Pneumonia,,P2Y +CCN21310,2023-06-30,Count_ReturnPatients_Pneumonia,,P2Y +CCN21310,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartAttack,,P2Y +CCN21310,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartFailure,,P2Y +CCN21310,2023-06-30,Total_Duration_UnplannedHospitalStay_ReturnPatients_Pneumonia,,P2Y \ No newline at end of file diff --git a/custom_dc/sample/entities/schema.mcf b/custom_dc/sample/entities/schema.mcf new file mode 100644 index 0000000000..9254263bb4 --- /dev/null +++ b/custom_dc/sample/entities/schema.mcf @@ -0,0 +1,143 @@ +Node: dcid:AlaskaHospitals +typeOf: dcid:StatVarGroup +name: "Alaska Hospitals" +specializationOf: dcid:dc/g/Root + +Node: dcid:Patient +typeOf: schema:Class +name: "Patient" +subclassOf: schema:Person + +Node: dcid:ReturnPatient +typeOf: schema:Class +name: "Return patient" +subclassOf: dcid:Patient + +Node: dcid:medicalCondition +typeOf: schema:Property +name: "Medical condition" +domainIncludes: dcid:Patient +rangeIncludes: dcs:MedicalConditionIncidentTypeEnum + +Node: dcid:Pneumonia +typeOf: dcs:MedicalConditionIncidentTypeEnum +name: "Pneumonia" + +Node: dcid:HeartFailure +typeOf: dcs:MedicalConditionIncidentTypeEnum +name: "Heart failure" + +Node: dcid:HeartAttack +typeOf: dcs:MedicalConditionIncidentTypeEnum +name: "Heart attack" + +Node: dcid:HospitalStay +typeOf: schema:Class +name: "Hospital stay" +subclassOf: schema: Event + +Node: dcid:UnplannedHospitalStay +typeOf: schema:Class +name: "Unplanned hospital stay in acute care by return patients" +subclassOf: dcid:StatisticalAggregationMethodEnum + +Node: dcid:sum +typeOf: schema:Property +name: "sum" +rangeIncludes: dcs:Sum + +Node: dcid:Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartAttack +typeOf: dcs:StatisticalVariable +name: "Excess days in acute care by return patients" +description: "Total number of days spent in acute care as unplanned visits by return heart attack patients" +populationType: dcid:UnplannedHospitalStay +measuredProperty: dcs:Duration +statType: dcid:sum +unit: dcs:Day +constraintProperties: dcid:medicalCondition +medicalCondition: dcid:HeartAttack +memberOf: dcid:AlaskaHospitals + +Node: dcid:Total_Duration_UnplannedHospitalStay_ReturnPatients_HeartFailure +typeOf: dcs:StatisticalVariable +name: "Excess days in acute care by return patients" +description: "Total number of days spent in acute care as unplanned visits by return heart failure patients" +populationType: dcid:UnplannedHospitalStay +measuredProperty: dcs:Duration +statType: dcid:sum +unit: dcs:Day +constraintProperties: dcid:medicalCondition +medicalCondition: dcid:HeartFailure +memberOf: dcid:AlaskaHospitals + +Node: dcid:Total_Days_UnplannedHospitalStay_ReturnPatients_Pneumonia +typeOf: dcs:StatisticalVariable +name: "Excess days in acute care by return patients" +description: "Total number of days spent in acute care as unplanned visits by return pneumonia patients" +populationType: dcid:UnplannedHospitalStay +measuredProperty: dcs:Duration +statType: dcid:sum +unit: dcs:Day +constraintProperties: dcid:medicalCondition +medicalCondition: dcid:Pneumonia +memberOf: dcid:AlaskaHospitals + +Node: dcid:Count_Patients_HeartAttack +typeOf: dcs:StatisticalVariable +name: "Count of heart attack patients" +description: "Per-hospital total number of heart attack patients" +populationType: dcid:Patient +constraintProperties: dcid:medicalCondition +medicalCondition: dcid:HeartAttack +statType: dcid:count +memberOf: dcid:AlaskaHospitals + +Node: dcid:Count_ReturnPatients_HeartAttack +typeOf: dcs:StatisticalVariable +name: "Count of heart attack patients returned" +description: "Per-hospital number of heart attack patients returned unplanned in a 30-day period" +populationType: dcid:ReturnPatient +constraintProperties: dcid:medicalCondition +medicalCondition: dcid:HeartAttack +statType: dcid:count +memberOf: dcid:AlaskaHospitals + +Node: dcid:Count_Patients_HeartFailure +typeOf: dcs:StatisticalVariable +name: "Count of heart failure patients" +description: "Per-hospital total number of heart failure patients" +populationType: dcid:Patient +constraintProperties: dcid:medicalCondition +medicalCondition: dcid:HeartFailure +statType: dcid:count +memberOf: dcid:AlaskaHospitals + +Node: dcid:Count_ReturnPatients_HeartFailure +typeOf: dcs:StatisticalVariable +name: "Count of heart failure patients returned" +description: "Per-hospital number of heart failure patients returned unplanned in a 30-day period" +populationType: dcid:ReturnPatient +constraintProperties: dcid:medicalCondition +medicalCondition: dcid:HeartFailure +statType: dcid:count +memberOf: dcid:AlaskaHospitals + +Node: dcid:Count_Patients_Pneumonia +typeOf: dcs:StatisticalVariable +name: "Count of pneumonia patients" +description: "Per-hospital number of pneumonia patients" +populationType: dcid:Patient +constraintProperties: dcid:medicalCondition +medicalCondition: dcid:Pneumonia +statType: dcid:count +memberOf: dcid:AlaskaHospitals + +Node: dcid:Count_ReturnPatients_Pneumonia +typeOf: dcs:StatisticalVariable +name: "Count of pneumonia patients returned" +description: "Per-hospital number of pneumonia patients returned unplanned in a 30-day period" +populationType: dcid:ReturnPatient +constraintProperties: dcid:medicalCondition +medicalCondition: dcid:Pneumonia +statType: dcid:count +memberOf: dcid:AlaskaHospitals diff --git a/custom_dc/sample/entities/variables.mcf b/custom_dc/sample/entities/variables.mcf deleted file mode 100644 index cd9f1211e5..0000000000 --- a/custom_dc/sample/entities/variables.mcf +++ /dev/null @@ -1,58 +0,0 @@ -Node: dcid:AlaskaHospitals -typeOf: dcid:StatVarGroup -name: "Alaska Hospitals" -specializationOf: dcid:dc/g/Root - -Node: dcid:EDAC_30_AMI_TOTAL -typeOf: dcid:StatisticalVariable -name: "Count of heart attack patients" -description: "Per-hospital total number of heart attack patients" -populationType: dcid:Person -measuredProperty: dcid:count -statType: dcid:measuredValue -memberOf: dcid:AlaskaHospitals - -Node: dcid:EDAC_30_AMI_RETURN -typeOf: dcid:StatisticalVariable -name: "Count of heart attack patients returned" -description: "Per-hospital number of heart attack patients returned unplanned in a 30-day period" -populationType: dcid:Person -measuredProperty: dcid:count -statType: dcid:measuredValue -memberOf: dcid:AlaskaHospitals - -Node: dcid:EDAC_30_HF_TOTAL -typeOf: dcid:StatisticalVariable -name: "Count of heart failure patients" -description: "Per-hospital number of heart failure patients" -populationType: dcid:Person -measuredProperty: dcid:count -statType: dcid:measuredValue -memberOf: dcid:AlaskaHospitals - -Node: dcid:EDAC_30_HF_RETURN -typeOf: dcid:StatisticalVariable -name: "Count of heart failure patients returned" -description: "Per-hospital number of heart failure patients returned unplanned in a 30-day period" -populationType: dcid:Person -measuredProperty: dcid:count -statType: dcid:measuredValue -memberOf: dcid:AlaskaHospitals - -Node: dcid:EDAC_30_PN_TOTAL -typeOf: dcid:StatisticalVariable -name: "Count of pneumonia patients" -description: "Per-hospital number of pneumonia patients" -populationType: dcid:Person -measuredProperty: dcid:count -statType: dcid:measuredValue -memberOf: dcid:AlaskaHospitals - -Node: dcid:EDAC_30_PN_RETURN -typeOf: dcid:StatisticalVariable -name: "Count of pneumonia patients returned" -description: "Per-hospital number of pneumonia patients returned unplanned in a 30-day period" -populationType: dcid:Person -measuredProperty: dcid:count -statType: dcid:measuredValue -memberOf: dcid:AlaskaHospitals diff --git a/deploy/helm_charts/dc_website/templates/deployment.yaml b/deploy/helm_charts/dc_website/templates/deployment.yaml index 268d230f3d..40bb003988 100644 --- a/deploy/helm_charts/dc_website/templates/deployment.yaml +++ b/deploy/helm_charts/dc_website/templates/deployment.yaml @@ -47,11 +47,6 @@ spec: - name: ingress-config configMap: name: ingress-config - {{- if .Values.nl.enabled }} - - name: nl-config - configMap: - name: nl-config - {{- end }} {{- if .Values.website.redis.enabled }} - name: redis-config configMap: @@ -109,48 +104,6 @@ spec: # or data config change. - name: BOUNCE value: "dummy" - {{- if .Values.nl.enabled }} - - name: nl - image: "gcr.io/datcom-ci/datacommons-nl{{- if .Values.nl.image.tag }}:{{ .Values.nl.image.tag }}{{- end }}" - resources: - limits: - memory: {{ .Values.nl.memory }} - requests: - memory: {{ .Values.nl.memory }} - env: - - name: FLASK_ENV - value: {{ required "Missing: website.flaskEnv" .Values.website.flaskEnv }} - - name: NUM_WORKERS - value: {{ .Values.nl.workers | quote }} - volumeMounts: - - name: nl-config - mountPath: /datacommons/nl - startupProbe: - httpGet: - path: /healthz - port: 6060 - failureThreshold: 30 - periodSeconds: 10 - timeoutSeconds: 5 - readinessProbe: - httpGet: - path: /healthz - port: 6060 - # long timeout here (and in the liveness probe) because NL server - # can only take NUM_WORKERS number of requests at a time, so when - # there's already NUM_WORKERS number of requests, need to wait - # before /healthz can be served. - timeoutSeconds: 300 - periodSeconds: 10 - livenessProbe: - httpGet: - path: /healthz - port: 6060 - timeoutSeconds: 300 - periodSeconds: 10 - ports: - - containerPort: 6060 - {{- end }} {{- if .Values.nodejs.enabled }} --- diff --git a/import b/import index 068dd8e41c..e17d3a3f38 160000 --- a/import +++ b/import @@ -1 +1 @@ -Subproject commit 068dd8e41c6e01c3df3dd5d010ad5989d0230315 +Subproject commit e17d3a3f38540b815345ff4aa43211c49dda0b8b diff --git a/justfile b/justfile index c393424e55..cbad061cf6 100644 --- a/justfile +++ b/justfile @@ -13,7 +13,8 @@ IMAGE := IMAGE_NAME + ":" + IMAGE_TAG DOCKERFILE := "build/cdc_services/Dockerfile" ENV_FILE := "custom_dc/dfo/env.list" ENV_SAMPLE := "custom_dc/dfo/env.list.sample" -UPSTREAM_BRANCH := "customdc_stable" +# Registry path of the Data Commons Platform release images `just sync` reads. +DCP_REGISTRY := "https://gcr.io/v2/datcom-ci/datacommons-services" # Deployment tier. Selects the image tag prefix (dfo--) and the # branch `deploy` expects to be on. Override for a prod cut: @@ -95,7 +96,7 @@ env: set_or_prompt() { local key="$1" prompt="$2" local current - current=$(grep -s "^${key}=" "$TARGET" | head -1 | cut -d= -f2-) + current=$(grep -s "^${key}=" "$TARGET" | head -1 | cut -d= -f2- || true) if [ -z "$current" ]; then local value="${!key:-}" # env-var override (e.g. OUTPUT_DIR=/data just env) [ -n "$value" ] || value=$(ask "$prompt") @@ -119,7 +120,7 @@ env: } set_from_secret_or_prompt() { local key="$1" prompt="$2" filter="$3" current value - current=$(grep -s "^${key}=" "$TARGET" | head -1 | cut -d= -f2-) + current=$(grep -s "^${key}=" "$TARGET" | head -1 | cut -d= -f2- || true) if [ -n "$current" ]; then echo " $key already set."; return; fi value="${!key:-}" # env-var override wins over Secret Manager if [ -n "$value" ]; then @@ -142,7 +143,7 @@ env: # Manager (or env-var override) and leave blank if not found. Used for # optional keys whose absence degrades gracefully (e.g. the Search API). local key="$1" filter="$2" current value - current=$(grep -s "^${key}=" "$TARGET" | head -1 | cut -d= -f2-) + current=$(grep -s "^${key}=" "$TARGET" | head -1 | cut -d= -f2- || true) if [ -n "$current" ]; then echo " $key already set."; return; fi value="${!key:-}" [ -n "$value" ] || value=$(fetch_secret "$filter") @@ -153,10 +154,31 @@ env: fi if [ -n "$value" ]; then echo " Set $key."; else echo " $key left blank (Search API disabled until set)."; fi } + set_default() { + # Fill an empty or missing key with the fixed dfo-dev value. The shell + # environment is ignored, so a stray export cannot pair one project's + # id with another's instance. + local key="$1" value="$2" current + current=$(grep -s "^${key}=" "$TARGET" | head -1 | cut -d= -f2- || true) + if [ -n "$current" ]; then echo " $key already set."; return; fi + if grep -q "^${key}=$" "$TARGET" 2>/dev/null; then + sed -i.bak "s|^${key}=$|${key}=${value}|" "$TARGET" && rm -f "${TARGET}.bak" + else + echo "${key}=${value}" >> "$TARGET" + fi + echo " Set $key=$value." + } set_from_secret_or_prompt "DC_API_KEY" "DC API key" "dfo-dev-dc-api-key" set_from_secret_or_prompt "MAPS_API_KEY" "Maps API key" "dfo-dev-dc-google-maps-api-key" set_from_secret_optional "GEMINI_API_KEY" "dfo-dev-gemini-api-key" set_or_prompt "OUTPUT_DIR" "Output directory (absolute path)" + # run.sh points mixer at the Spanner graph on every boot and exits without a + # project. It passes --host_project, so mixer also embeds query terms through + # Vertex AI in REGION, and calls us-central1 when REGION is empty. + set_default "GCP_PROJECT_ID" "$PROJECT" + set_default "GCP_SPANNER_INSTANCE_ID" "dfo-dev-dc-instance" + set_default "GCP_SPANNER_DATABASE_NAME" "dfo-dev-dc-db" + set_default "REGION" "northamerica-northeast1" echo "" echo "$TARGET is ready. Run 'just run-local' to start." @@ -289,7 +311,7 @@ clean: # ── Deploying ───────────────────────────────────────── # Tag and push image to Artifact Registry (override tag: just IMAGE_TAG=v1.0 push) -push: _check-env +push: @echo "Tagging {{IMAGE}} -> {{DOCKER_REGISTRY}}:{{IMAGE_TAG}}..." docker tag {{IMAGE}} {{DOCKER_REGISTRY}}:{{IMAGE_TAG}} @echo "Pushing to {{DOCKER_REGISTRY}}:{{IMAGE_TAG}}..." @@ -353,156 +375,122 @@ deploy: build # ── Upstream Sync ───────────────────────────────────── -# Fetch upstream and show what's changed since last sync -sync: +# Print the website and mixer commits a DCP release image was built from (e.g. just dcp-pair 1.1.6) +dcp-pair version: #!/usr/bin/env bash set -euo pipefail - CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) - echo "Fetching from upstream..." - git fetch upstream - echo "" - echo "Current branch: $CURRENT_BRANCH" - BEHIND=$(git rev-list --count HEAD..upstream/{{UPSTREAM_BRANCH}}) - echo "Commits behind upstream/{{UPSTREAM_BRANCH}}: $BEHIND" - echo "" - if [ "$BEHIND" -eq 0 ]; then - echo "Already up to date." - else - echo "To merge, run one of:" - echo " just sync-auto # merge, keep both sides (may need manual conflict resolution)" - echo " just sync-theirs # merge, prefer upstream for conflicts (safe for most files)" - echo " just sync-abort # abort a failed merge and start over" + # Each release image records its source commits as WEBSITE_HASH and + # MIXER_HASH env build args in the image config. + MANIFEST=$(curl -fsS --max-time 30 -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \ + "{{DCP_REGISTRY}}/manifests/{{version}}") \ + || { echo "Error: no datacommons-services image for DCP {{version}}." >&2; exit 1; } + CONFIG=$(jq -r '.config.digest // empty' <<< "$MANIFEST") + if [ -z "$CONFIG" ]; then + echo "Error: the DCP {{version}} manifest has no config digest." >&2 + exit 1 fi - -# Merge upstream, stop on conflicts for manual resolution -sync-auto: - #!/usr/bin/env bash - set -euo pipefail - CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) - echo "Fetching from upstream..." - git fetch upstream - echo "" - echo "Merging upstream/{{UPSTREAM_BRANCH}} into $CURRENT_BRANCH..." - if git merge -X no-renames upstream/{{UPSTREAM_BRANCH}}; then - echo "" - # Check for conflict markers that slipped into committed files (rename detection artifacts) - STRAY=$(git diff HEAD~1 HEAD -S'<<<<<<<' --name-only 2>/dev/null || true) - if [ -n "$STRAY" ]; then - echo "═══════════════════════════════════════════════════════" - echo " WARNING Conflict markers found in merged files:" - echo "═══════════════════════════════════════════════════════" - echo "$STRAY" - echo "" - echo "Fix these files, then: git add && git commit --amend --no-edit" - else - echo "Updating submodules..." - ./scripts/update_git_submodules.sh - echo "" - just check-overrides - echo "" - echo "Sync complete. No conflicts." + ENV=$(curl -fsSL --max-time 30 "{{DCP_REGISTRY}}/blobs/$CONFIG" | jq -r '.config.Env[]') \ + || { echo "Error: could not read the DCP {{version}} image config." >&2; exit 1; } + for ARG in WEBSITE_HASH MIXER_HASH; do + VALUE=$(sed -n "s/^$ARG=//p" <<< "$ENV") + if ! [[ "$VALUE" =~ ^[0-9a-f]{7,40}$ ]]; then + echo "Error: the DCP {{version}} image has no usable $ARG build arg (got '$VALUE')." >&2 + exit 1 fi - else - echo "" - CONFLICTS=$(git diff --name-only --diff-filter=U) - COUNT=$(echo "$CONFLICTS" | wc -l | tr -d ' ') - echo "═══════════════════════════════════════════" - echo " $COUNT files with conflicts" - echo "═══════════════════════════════════════════" - echo "" - echo "$CONFLICTS" - echo "" - echo "Options:" - echo " just sync-theirs # accept upstream version for ALL conflicts" - echo " just sync-resolve # accept upstream for most, protect DFO-modified files" - echo " just sync-abort # abort merge and go back to previous state" - fi + echo "$(tr 'A-Z' 'a-z' <<< "${ARG%_HASH}")=$VALUE" + done -# Merge upstream, accept their version for all conflicts -sync-theirs: +# Merge the website commit a DCP release was built from and pin its submodules (e.g. just sync 1.1.6) +sync version: #!/usr/bin/env bash set -euo pipefail - CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) - # Start merge if not already mid-merge - if git rev-parse --verify MERGE_HEAD > /dev/null 2>&1; then - echo "Continuing in-progress merge..." - else - echo "Fetching from upstream..." - git fetch upstream - echo "" - echo "Merging upstream/{{UPSTREAM_BRANCH}} into $CURRENT_BRANCH..." - git merge -X no-renames upstream/{{UPSTREAM_BRANCH}} || true - fi - echo "" - # Resolve each conflict type - # UU = both modified, AA = both added — accept theirs - UU_AA=$(git status --porcelain | grep "^UU\|^AA" | awk '{print $2}' | grep -v "^import$" || true) - if [ -n "$UU_AA" ]; then - COUNT=$(echo "$UU_AA" | wc -l | tr -d ' ') - echo "Accepting upstream version for $COUNT conflicted files..." - echo "$UU_AA" | while read -r file; do - git checkout --theirs -- "$file" 2>/dev/null && git add "$file" - done - echo "" + if git rev-parse --verify -q MERGE_HEAD > /dev/null; then + echo "A merge is already in progress. Finish it with 'just sync-finish' or drop it with 'just sync-abort'." + exit 1 fi - # UD = deleted by upstream, modified by us — remove - UD=$(git status --porcelain | grep "^UD" | awk '{print $2}' || true) - if [ -n "$UD" ]; then - echo "Removing files deleted by upstream..." - echo "$UD" | while read -r file; do - git rm --force "$file" 2>/dev/null || true - done - echo "" + if ! git diff --quiet || ! git diff --cached --quiet; then + echo "Error: commit or set aside local changes before syncing." + exit 1 fi - # DU = deleted by us, modified by upstream — accept theirs - DU=$(git status --porcelain | grep "^DU" | awk '{print $2}' || true) - if [ -n "$DU" ]; then - echo "Restoring files upstream modified that we had deleted..." - echo "$DU" | while read -r file; do - git checkout --theirs -- "$file" 2>/dev/null && git add "$file" 2>/dev/null || true - done - echo "" + PAIR=$(just dcp-pair {{version}}) + WEBSITE_HASH=$(sed -n 's/^website=//p' <<< "$PAIR") + MIXER_HASH=$(sed -n 's/^mixer=//p' <<< "$PAIR") + echo "DCP {{version}}: website $WEBSITE_HASH, mixer $MIXER_HASH" + echo "Fetching from upstream..." + git fetch --tags upstream + WEBSITE=$(git rev-parse --verify -q "$WEBSITE_HASH^{commit}") \ + || { echo "Error: website commit $WEBSITE_HASH is not in upstream."; exit 1; } + TAG=$(git describe --tags --exact-match "$WEBSITE" 2>/dev/null || echo "$WEBSITE_HASH") + # The release image can run a newer mixer than the one the website commit + # pins. Pin the image's mixer and the website's import. + IMPORT=$(git rev-parse "$WEBSITE:import") + PINNED_MIXER=$(git rev-parse "$WEBSITE:mixer") + if [[ "$PINNED_MIXER" == "$MIXER_HASH"* ]]; then + MIXER=$PINNED_MIXER + else + # Resolve the short hash in the mixer submodule and require it on + # upstream master, which every later submodule checkout fetches from. + MIXER_URL=$(git config -f .gitmodules submodule.mixer.url) + git submodule update --init mixer \ + || { echo "Error: could not check out the mixer submodule."; exit 1; } + git -C mixer fetch -q "$MIXER_URL" master \ + || { echo "Error: could not fetch master from $MIXER_URL."; exit 1; } + MIXER=$(git -C mixer rev-parse --verify -q "$MIXER_HASH^{commit}") \ + || { echo "Error: mixer commit $MIXER_HASH is not in $MIXER_URL, or the short hash is ambiguous."; exit 1; } + git -C mixer merge-base --is-ancestor "$MIXER" FETCH_HEAD \ + || { echo "Error: mixer commit $MIXER_HASH is not on master in $MIXER_URL."; exit 1; } + echo "Website $TAG pins mixer ${PINNED_MIXER:0:7}; DCP {{version}} ships mixer $MIXER_HASH. Pinning $MIXER_HASH." fi - # DD = both deleted (rename conflicts) — just remove - DD=$(git status --porcelain | grep "^DD" | awk '{print $2}' || true) - if [ -n "$DD" ]; then - echo "Removing files deleted by both sides..." - echo "$DD" | while read -r file; do - git rm --force "$file" 2>/dev/null || git add "$file" 2>/dev/null || true - done - echo "" + if git merge-base --is-ancestor "$WEBSITE" HEAD; then + if [ "$(git rev-parse HEAD:mixer)" = "$MIXER" ] && [ "$(git rev-parse HEAD:import)" = "$IMPORT" ]; then + echo "Already synced to DCP {{version}}." + exit 0 + fi + git update-index --cacheinfo "160000,$MIXER,mixer" --cacheinfo "160000,$IMPORT,import" + echo "HEAD already contains website $TAG. Staged the DCP {{version}} submodule pointers; commit them, then run 'git submodule update --init --recursive'." + exit 0 fi - # Complete the merge - if git rev-parse --verify MERGE_HEAD > /dev/null 2>&1; then - git commit --no-edit + # .gitattributes keeps README.md ours through this driver; git falls back + # to a 3-way merge in a clone that never registered it. + git config merge.ours.driver true + echo "Merging website $TAG into $(git rev-parse --abbrev-ref HEAD)..." + git merge --no-ff --no-commit -X no-renames \ + -m "chore: sync website $TAG for Data Commons Platform {{version}}" "$WEBSITE" || true + if ! git rev-parse --verify -q MERGE_HEAD > /dev/null; then + echo "Error: git merge did not start. See its output above." + exit 1 fi - echo "" - # Check for conflict markers that slipped into committed files (rename detection artifacts) - STRAY=$(git diff HEAD~1 HEAD -S'<<<<<<<' --name-only 2>/dev/null || true) - if [ -n "$STRAY" ]; then - echo "═══════════════════════════════════════════════════════" - echo " WARNING Conflict markers found in merged files:" - echo "═══════════════════════════════════════════════════════" - echo "$STRAY" + just _sync-keep-workflows + # update-index writes the gitlinks without checking the submodules out, + # and resolves any submodule conflict the merge raised. + git update-index --cacheinfo "160000,$MIXER,mixer" --cacheinfo "160000,$IMPORT,import" + CONFLICTS=$(git diff --name-only --diff-filter=U) + if [ -z "$CONFLICTS" ]; then echo "" - echo "Fix these files, then: git add && git commit --amend --no-edit" - else - echo "Updating submodules..." - ./scripts/update_git_submodules.sh - echo "" - just check-overrides - echo "" - echo "Sync complete. All conflicts resolved using upstream versions." + just sync-finish + exit 0 fi + echo "" + echo "═══════════════════════════════════════════" + echo " $(wc -l <<< "$CONFLICTS" | tr -d ' ') files with conflicts" + echo "═══════════════════════════════════════════" + echo "" + echo "$CONFLICTS" + echo "" + echo "Options:" + echo " just sync-resolve # accept upstream for most, protect DFO-modified files" + echo " just sync-finish # commit once you have resolved and staged every file" + echo " just sync-abort # abort merge and go back to previous state" + exit 1 -# Merge upstream, accept theirs for most files but protect DFO-customized paths +# Accept upstream for conflicts outside .dfo-protected-paths, then finish if none remain sync-resolve: #!/usr/bin/env bash set -euo pipefail PROTECTED_FILE=".dfo-protected-paths" # Check if we're mid-merge if ! git rev-parse --verify MERGE_HEAD > /dev/null 2>&1; then - echo "No merge in progress. Run 'just sync-auto' first." + echo "No merge in progress. Run 'just sync ' first." exit 1 fi # Load protected paths (strip comments and blanks) @@ -527,83 +515,106 @@ sync-resolve: done <<< "$PROTECTED" return 1 } - # Categorize all conflicts - ALL_CONFLICTS=$(git status --porcelain | grep "^UU\|^AA\|^UD\|^DU\|^DD\|^AU\|^UA" || true) + UNMERGED_PATTERN='^(UU|AA|UD|DU|DD|AU|UA) ' + ALL_CONFLICTS=$(git status --porcelain | grep -E "$UNMERGED_PATTERN" || true) AUTO_COUNT=0 - REVIEW_LIST="" while IFS= read -r line; do [ -z "$line" ] && continue status="${line:0:2}" file="${line:3}" - if is_protected "$file"; then - REVIEW_LIST="$REVIEW_LIST"$'\n'" [$status] $file" - continue - fi + is_protected "$file" && continue case "$status" in - "UU"|"AA") - git checkout --theirs -- "$file" 2>/dev/null && git add "$file" - ((AUTO_COUNT++)) || true - ;; - "UD") - git rm --force "$file" 2>/dev/null || true - ((AUTO_COUNT++)) || true - ;; - "DU") - git checkout --theirs -- "$file" 2>/dev/null && git add "$file" 2>/dev/null || true - ((AUTO_COUNT++)) || true - ;; - "DD") - git rm --force "$file" 2>/dev/null || git add "$file" 2>/dev/null || true - ((AUTO_COUNT++)) || true - ;; - "UA"|"AU") - git checkout --theirs -- "$file" 2>/dev/null && git add "$file" 2>/dev/null || true - ((AUTO_COUNT++)) || true - ;; - esac + UU|AA|DU|UA|AU) git checkout --theirs -- "$file" 2>/dev/null && git add -- "$file" ;; + UD) git rm -q --force -- "$file" 2>/dev/null ;; + DD) git rm -q --force -- "$file" 2>/dev/null || git add -- "$file" 2>/dev/null ;; + esac && ((++AUTO_COUNT)) || true done <<< "$ALL_CONFLICTS" echo "Auto-resolved $AUTO_COUNT files using upstream version." echo "" - # Report protected files that still need review - REMAINING=$(git diff --name-only --diff-filter=U 2>/dev/null || true) - REVIEW_LIST=$(echo "$REVIEW_LIST" | sed '/^$/d') - if [ -n "$REMAINING" ] || [ -n "$REVIEW_LIST" ]; then + # Every path still unmerged: protected ones, plus any auto-resolution that failed. + REMAINING=$(git status --porcelain | grep -E "$UNMERGED_PATTERN" || true) + if [ -z "$REMAINING" ]; then + just sync-finish + exit 0 + fi + echo "═══════════════════════════════════════════════════════" + echo " $(wc -l <<< "$REMAINING" | tr -d ' ') files needing manual resolution:" + echo "═══════════════════════════════════════════════════════" + while IFS= read -r line; do + file="${line:3}" + if is_protected "$file"; then + echo " [${line:0:2}] $file (protected)" + else + echo " [${line:0:2}] $file (could not take upstream's version)" + fi + done <<< "$REMAINING" + echo "" + echo "Protected paths loaded from: $PROTECTED_FILE" + echo "" + echo "Resolve these manually, then run:" + echo " git add " + echo " just sync-finish" + exit 1 + +# Commit a resolved sync merge, check out its submodules, and check DFO seam files +sync-finish: + #!/usr/bin/env bash + set -euo pipefail + if ! git rev-parse --verify -q MERGE_HEAD > /dev/null; then + echo "No merge in progress. Run 'just sync ' first." + exit 1 + fi + just _sync-keep-workflows + UNMERGED=$(git diff --name-only --diff-filter=U) + if [ -n "$UNMERGED" ]; then + echo "Resolve and stage these files first:" + echo "$UNMERGED" + exit 1 + fi + # git's whitespace check reports each staged line that starts with a + # conflict marker, in every file type. A marker quoted mid-line passes. + STRAY=$(git diff --cached --check | grep 'leftover conflict marker' || true) + if [ -n "$STRAY" ]; then echo "═══════════════════════════════════════════════════════" - echo " Protected files needing manual review:" + echo " Conflict markers found in staged files:" echo "═══════════════════════════════════════════════════════" - if [ -n "$REVIEW_LIST" ]; then - echo "$REVIEW_LIST" - fi - echo "" - echo "Protected paths loaded from: $PROTECTED_FILE" - echo "" - echo "Resolve these manually, then run:" - echo " git add " - echo " git commit --no-edit" - echo " just check-markers" - echo " just submodules" - echo " just check-overrides" - else - git commit --no-edit + echo "$STRAY" echo "" - # Check for conflict markers that slipped into committed files (rename detection artifacts) - STRAY=$(git diff HEAD~1 HEAD -S'<<<<<<<' --name-only 2>/dev/null || true) - if [ -n "$STRAY" ]; then - echo "═══════════════════════════════════════════════════════" - echo " WARNING Conflict markers found in merged files:" - echo "═══════════════════════════════════════════════════════" - echo "$STRAY" - echo "" - echo "Fix these files, then: git add && git commit --amend --no-edit" - else - echo "Updating submodules..." - ./scripts/update_git_submodules.sh - echo "" - just check-overrides - echo "" - echo "Sync complete." - fi + echo "Fix these files, git add them, and run 'just sync-finish' again." + exit 1 fi + WEBSITE=$(git rev-parse MERGE_HEAD) + BASE=$(git merge-base HEAD MERGE_HEAD) + git commit --no-edit + echo "" + echo "Updating submodules..." + git submodule update --init --recursive + echo "" + just check-overrides "$WEBSITE" "$BASE" + echo "" + echo "Sync complete." + +# Reset .github/workflows/ in a sync merge to HEAD's and list what upstream changed there +_sync-keep-workflows: + #!/usr/bin/env bash + set -euo pipefail + # The fork's CI and deploy workflows are DFO-owned, and any workflow + # upstream adds would run here, so a sync takes nothing from upstream + # under this directory. + DIR=.github/workflows/ + if git diff --cached --quiet HEAD -- "$DIR" && [ -z "$(git ls-files -u -- "$DIR")" ]; then + exit 0 + fi + CHANGED=$(git diff --no-renames --name-status "$(git merge-base HEAD MERGE_HEAD)" MERGE_HEAD -- "$DIR") + git reset -q --no-refresh HEAD -- "$DIR" + git checkout HEAD -- "$DIR" + # Paths upstream added or re-added are untracked now; remove them. + while IFS=$'\t' read -r _ path; do + if [ -n "$path" ] && ! git cat-file -e "HEAD:$path" 2>/dev/null; then rm -f -- "$path"; fi + done <<< "$CHANGED" + echo "Left upstream's changes to $DIR out of the merge (A added, M modified, D deleted):" + sed 's/^/ /' <<< "$CHANGED" + echo "Port any you want into the DFO workflows in a separate PR." # Abort a failed merge and return to previous state sync-abort: @@ -635,20 +646,28 @@ check-markers: submodules: ./scripts/update_git_submodules.sh -# Check if upstream changed files that DFO overrides (run after sync) -check-overrides: +# List DFO seam files upstream changed between base (default: merge-base with HEAD) and website +check-overrides website base="": #!/usr/bin/env bash OVERRIDES_FILE=".dfo-overridden-files" if [ ! -f "$OVERRIDES_FILE" ]; then echo "Warning: $OVERRIDES_FILE not found." exit 0 fi - # Find the merge base with upstream - MERGE_BASE=$(git merge-base HEAD upstream/{{UPSTREAM_BRANCH}} 2>/dev/null) - if [ -z "$MERGE_BASE" ]; then - echo "Could not find merge base with upstream. Run 'git fetch upstream' first." - exit 0 + WEBSITE=$(git rev-parse --verify -q "{{website}}^{commit}") \ + || { echo "Error: {{website}} is not a commit. Run 'git fetch --tags upstream' first."; exit 1; } + if [ -n "{{base}}" ]; then + BASE=$(git rev-parse --verify -q "{{base}}^{commit}") \ + || { echo "Error: {{base}} is not a commit."; exit 1; } + else + BASE=$(git merge-base HEAD "$WEBSITE") + fi + if [ "$BASE" = "$WEBSITE" ]; then + echo "HEAD already contains {{website}}. Pass the upstream commit of the previous sync as base:" + echo " just check-overrides {{website}} " + exit 1 fi + RANGE="$BASE..$WEBSITE" CHANGED_COUNT=0 WARNINGS="" while IFS= read -r line; do @@ -657,14 +676,14 @@ check-overrides: upstream_file=$(echo "$line" | sed 's/ *->.*$//' | xargs) dfo_file=$(echo "$line" | sed 's/^.*-> *//' | xargs) # Check if upstream changed this file since last merge - if git diff --quiet "$MERGE_BASE"..upstream/{{UPSTREAM_BRANCH}} -- "$upstream_file" 2>/dev/null; then + if git diff --quiet "$RANGE" -- "$upstream_file" 2>/dev/null; then continue fi ((CHANGED_COUNT++)) WARNINGS="$WARNINGS\n WARNING $upstream_file" WARNINGS="$WARNINGS\n DFO override/seam: $dfo_file" # Show a short summary of what changed - STAT=$(git diff --stat "$MERGE_BASE"..upstream/{{UPSTREAM_BRANCH}} -- "$upstream_file" 2>/dev/null | tail -1) + STAT=$(git diff --stat "$RANGE" -- "$upstream_file" 2>/dev/null | tail -1) if [ -n "$STAT" ]; then WARNINGS="$WARNINGS\n Changes: $STAT" fi @@ -677,7 +696,7 @@ check-overrides: echo "" echo -e "$WARNINGS" echo "Review these changes and update the DFO seam files if needed:" - echo " git diff $MERGE_BASE..upstream/{{UPSTREAM_BRANCH}} -- " + echo " git diff $RANGE -- " echo "" echo "Seam files carry DFO hooks (Next.js bake-in, nginx routing, start.sh)." echo "Changes upstream may require updating custom_dc/dfo/ seam targets." @@ -694,6 +713,13 @@ _check-env: echo "Run 'just setup' or 'just env' first." exit 1 fi + # run.sh exits at boot without these. + for KEY in GCP_PROJECT_ID GCP_SPANNER_INSTANCE_ID GCP_SPANNER_DATABASE_NAME; do + if ! grep -q "^${KEY}=." "{{ENV_FILE}}"; then + echo "Error: {{ENV_FILE}} has no $KEY. Run 'just env' to fill in the dfo-dev Spanner settings." + exit 1 + fi + done _check-gcloud: #!/usr/bin/env bash diff --git a/mixer b/mixer index 7d8710ef0a..8118587eb8 160000 --- a/mixer +++ b/mixer @@ -1 +1 @@ -Subproject commit 7d8710ef0a44d21227b2241ccdff171f859f3450 +Subproject commit 8118587eb8db5a2bb6f29fe1ea510b4d7d8c7039 diff --git a/run_cdc_dev.sh b/run_cdc_dev.sh index 16522978ad..09c84bfae6 100755 --- a/run_cdc_dev.sh +++ b/run_cdc_dev.sh @@ -34,7 +34,9 @@ exit_with=0 # Kill forked processes, then exit with the status code stored in a variable. # Called on exit via trap, configured below. function cleanup() { + trap - EXIT pkill -P $$ || true + wait || true exit $exit_with } @@ -45,10 +47,6 @@ trap 'exit_with=$?; cleanup' EXIT # when done with it. trap 'exit_with=0; cleanup' SIGINT SIGTERM -if lsof -i :6060 > /dev/null 2>&1; then - log_error "Port 6060 (for NL server) is already in use. Please stop the process using that port." - exit 1 -fi if lsof -i :8080 > /dev/null 2>&1; then log_error "Port 8080 (for website server) is already in use. Please stop the process using that port." exit 1 @@ -163,21 +161,6 @@ ENVOY_PID=$! # cd back to website root. cd .. -# Start NL server. -NL_PID="" -if [[ $ENABLE_MODEL == "true" ]]; then - echo "Starting NL Server..." - nl_command="uv run --project nl_server python3 nl_app.py 6060" - if [[ "$VERBOSE" == "true" ]]; then - eval "$nl_command &" - else - eval "$nl_command > /dev/null 2>&1 &" - fi - NL_PID=$! -else - log_notice "$ENABLE_MODEL is not true, NL server will not be started." -fi - # Start MCP server. MCP_PID="" if [[ $ENABLE_MCP == "true" ]]; then @@ -246,11 +229,6 @@ while true; do exit 1 fi - if [[ -n "$NL_PID" ]] && ! ps -p $NL_PID > /dev/null; then - log_error "NL server exited early. Run with --verbose to debug." - exit 1 - fi - if [[ -n "$MCP_PID" ]] && ! ps -p $MCP_PID > /dev/null; then log_error "MCP server exited early. Run with --verbose to debug." exit 1 diff --git a/run_server.sh b/run_server.sh index e5b36a8a4a..5cdbe0a642 100755 --- a/run_server.sh +++ b/run_server.sh @@ -93,7 +93,7 @@ export GOOGLE_CLOUD_PROJECT=datcom-website-dev export ENABLE_DATAGEMMA=true # Set flask env -if [[ -z "$FLASK_ENV" || "$FLASK_ENV" == "test" ]]; then +if [[ -z "$FLASK_ENV" || "$FLASK_ENV" == "test" || "$FLASK_ENV" == "local" ]]; then export FLASK_ENV="local" if [[ $ENV_PREFIX == "" ]]; then export ENV_PREFIX="DC" diff --git a/run_servers.sh b/run_servers.sh index b59b2a06bc..63169ee049 100755 --- a/run_servers.sh +++ b/run_servers.sh @@ -13,14 +13,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Runs both NL and website servers. +# Runs the website server for integration tests. # # - Assumes that ./run_test.sh -b has already been run, and that environment # variables (FLASK_ENV, ENABLE_MODEL, GOOGLE_CLOUD_PROJECT) are already set. -# - Both servers use different ports than the development server defaults: +# - Uses a different port than the development server default: # - Website server uses port 8090 instead of 8080. -# - NL server uses port 6070 instead of 6060. -# - Server processes are silent unless '--verbose' is specified. +# - Server process is silent unless '--verbose' is specified. source scripts/utils.sh set -e @@ -43,7 +42,9 @@ exit_with=0 # Kill forked processes, then exit with the status code stored in a variable. # Called on exit via trap, configured below. function cleanup() { + trap - EXIT pkill -P $$ || true + wait || true exit $exit_with } @@ -54,10 +55,6 @@ trap 'exit_with=$?; cleanup' EXIT # when done with it. trap 'exit_with=0; cleanup' SIGINT SIGTERM -if lsof -i :6070 > /dev/null 2>&1; then - log_error "Port 6070 (for NL server) is already in use. Please stop the process using that port." - exit 1 -fi if lsof -i :8090 > /dev/null 2>&1; then log_error "Port 8090 (for website server) is already in use. Please stop the process using that port." exit 1 @@ -66,17 +63,6 @@ fi # Check that uv is installed assert_uv -echo "Starting NL Server..." -if [[ $VERBOSE == "true" ]]; then - uv run --project nl_server python3 nl_app.py 6070 & -else - uv run --project nl_server python3 nl_app.py 6070 > /dev/null 2>&1 & -fi -NL_PID=$! - -# Set NL server URL for local website server. -export NL_SERVICE_ROOT_URL="http://localhost:6070" - echo "Starting Website server..." if [[ $VERBOSE == "true" ]]; then uv run --project server python3 web_app.py 8090 & @@ -91,10 +77,5 @@ while true; do exit 1 fi - if [[ -n "$NL_PID" ]] && ! ps -p $NL_PID > /dev/null; then - log_error "NL server exited early. Run with --verbose to debug." - exit 1 - fi - sleep 1 done diff --git a/run_test.sh b/run_test.sh index e65c86d79d..819f93e8cf 100755 --- a/run_test.sh +++ b/run_test.sh @@ -37,7 +37,9 @@ function start_servers() { # Kill forked processes, then exit with the status code stored in a variable. # Called on exit via trap, configured below. function cleanup() { + trap - EXIT pkill -P $$ || true + wait || true exit $exit_with } # On exit, assign status code to a variable and call cleanup. @@ -74,6 +76,7 @@ function start_servers() { function stop_servers() { if ps -p $SERVERS_PID > /dev/null; then kill $SERVERS_PID + wait $SERVERS_PID 2>/dev/null || true fi trap - EXIT } diff --git a/scripts/deploy_mixer_cloud_deploy.sh b/scripts/deploy_mixer_cloud_deploy.sh index 656e90da5b..05113daf3c 100755 --- a/scripts/deploy_mixer_cloud_deploy.sh +++ b/scripts/deploy_mixer_cloud_deploy.sh @@ -29,6 +29,6 @@ gcloud deploy releases create "dev-manual-$TIMESTAMP" \ --delivery-pipeline=$DEPLOY_PIPELINE \ --region=us-central1 \ --skaffold-file=skaffold.yaml \ ---images="gcr.io/datcom-ci/datacommons-mixer=us-docker.pkg.dev/datcom-ci/gcr.io/datacommons-mixer:$MIXER_GITHASH,gcr.io/datcom-ci/datacommons-embeddings-sidecar=us-docker.pkg.dev/datcom-ci/gcr.io/datacommons-nl:mixer-sidecar" \ +--images="gcr.io/datcom-ci/datacommons-mixer=us-docker.pkg.dev/datcom-ci/gcr.io/datacommons-mixer:$MIXER_GITHASH" \ --deploy-parameters="mixer.githash=$MIXER_GITHASH,MIXER_GITHASH=$MIXER_GITHASH" \ --project=datcom-ci diff --git a/scripts/deploy_website_cloud_deploy.sh b/scripts/deploy_website_cloud_deploy.sh index 47da7f4bd7..f2341c9f16 100755 --- a/scripts/deploy_website_cloud_deploy.sh +++ b/scripts/deploy_website_cloud_deploy.sh @@ -30,6 +30,6 @@ gcloud deploy releases create "dev-manual-$TIMESTAMP" \ --delivery-pipeline=$DEPLOY_PIPELINE \ --region=us-central1 \ --skaffold-file=skaffold.yaml \ ---images="gcr.io/datcom-ci/datacommons-website=us-docker.pkg.dev/datcom-ci/gcr.io/datacommons-website:$WEBSITE_GITHASH,gcr.io/datcom-ci/datacommons-mixer=us-docker.pkg.dev/datcom-ci/gcr.io/datacommons-mixer:$MIXER_GITHASH,gcr.io/datcom-ci/datacommons-nodejs=us-docker.pkg.dev/datcom-ci/gcr.io/datacommons-nodejs:$WEBSITE_GITHASH,gcr.io/datcom-ci/datacommons-nl=us-docker.pkg.dev/datcom-ci/gcr.io/datacommons-nl:$WEBSITE_GITHASH,gcr.io/datcom-ci/datacommons-embeddings-sidecar=us-docker.pkg.dev/datcom-ci/gcr.io/datacommons-nl:mixer-sidecar" \ +--images="gcr.io/datcom-ci/datacommons-website=us-docker.pkg.dev/datcom-ci/gcr.io/datacommons-website:$WEBSITE_GITHASH,gcr.io/datcom-ci/datacommons-mixer=us-docker.pkg.dev/datcom-ci/gcr.io/datacommons-mixer:$MIXER_GITHASH,gcr.io/datcom-ci/datacommons-nodejs=us-docker.pkg.dev/datcom-ci/gcr.io/datacommons-nodejs:$WEBSITE_GITHASH" \ --deploy-parameters="mixer.githash=$MIXER_GITHASH,MIXER_GITHASH=$MIXER_GITHASH,website.githash=$WEBSITE_GITHASH" \ --project=datcom-ci \ No newline at end of file diff --git a/scripts/push_cdc_services_image.sh b/scripts/push_cdc_services_image.sh index ace445a79e..60356f85d9 100755 --- a/scripts/push_cdc_services_image.sh +++ b/scripts/push_cdc_services_image.sh @@ -20,10 +20,11 @@ set -e IMAGE_TAG=$1 +PROJECT_ID=${2:-datcom-ci} if [[ $IMAGE_TAG == "" ]]; then echo "No image tag specified." >&2 - echo "Usage ./scripts/push_cdc_services_image.sh my-test-image-tag" >&2 + echo "Usage ./scripts/push_cdc_services_image.sh my-test-image-tag [project-id]" >&2 exit 1 fi @@ -34,7 +35,7 @@ MIXER_HASH=$(git rev-parse --short=7 HEAD:mixer) gcloud builds submit . \ --async \ - --project=datcom-ci \ + --project=$PROJECT_ID \ --config=build/ci/cloudbuild.push_cdc_services_image.yaml \ - --substitutions=_TAG=$IMAGE_TAG,_WEBSITE_HASH=$WEBSITE_HASH,_MIXER_HASH=$MIXER_HASH + --substitutions=_TAG=$IMAGE_TAG,_PROJECT_ID=$PROJECT_ID,_WEBSITE_HASH=$WEBSITE_HASH,_MIXER_HASH=$MIXER_HASH diff --git a/server/__init__.py b/server/__init__.py index ad39d365ce..70dab93bb2 100644 --- a/server/__init__.py +++ b/server/__init__.py @@ -52,8 +52,6 @@ BLOCKLIST_SVG_FILE = "/datacommons/svg/blocklist_svg.json" -DEFAULT_NL_ROOT = "http://127.0.0.1:6060" - # Module-level singleton for the Secret Manager client. # Lazily initialized and used by _get_api_key() to avoid repeated initialization. _secret_client = None @@ -285,7 +283,7 @@ def register_routes_common(app): app.register_blueprint(observation_series.bp) -def create_app(nl_root=DEFAULT_NL_ROOT): +def create_app(): app = Flask(__name__, static_folder='dist', static_url_path='') cfg = lib_config.get_config() @@ -320,9 +318,6 @@ def create_app(nl_root=DEFAULT_NL_ROOT): raise Exception( 'Set environment variable DC_API_KEY for local custom DC development') - # Use NL_SERVICE_ROOT if it's set, otherwise use nl_root argument - app.config['NL_ROOT'] = os.environ.get("NL_SERVICE_ROOT_URL", nl_root) - lib_cache.cache.init_app(app) lib_cache.model_cache.init_app(app) app.config['FEATURE_FLAGS'] = libutil.load_feature_flags() @@ -408,11 +403,6 @@ def create_app(nl_root=DEFAULT_NL_ROOT): # Enable the NL model. if app.config['ENABLE_MODEL']: - # Skip backend check if we are resolving embeddings with Spanner, as the - # local NL server will not be running. - if os.environ.get('RESOLVE_WITH_SPANNER_EMBEDDINGS') != 'true': - libutil.check_backend_ready([app.config['NL_ROOT'] + '/healthz']) - # This also requires disaster and event routes. app.config['NL_DISASTER_CONFIG'] = libutil.get_nl_disaster_config() if app.config['LOG_QUERY']: diff --git a/server/app_env/_base.py b/server/app_env/_base.py index e4670bb2c4..2898689e5b 100644 --- a/server/app_env/_base.py +++ b/server/app_env/_base.py @@ -55,7 +55,7 @@ class Config: # Environment name of the config. ENV = '' # Name of the site. The name is changed for custom instance. - NAME = 'Data Commons' + NAME = 'Data Commons by Google' VERSION = os.environ.get('WEBSITE_HASH', '') API_ROOT = 'http://127.0.0.1:8081' # Port for Kubernetes ESP. SECRET_PROJECT = '' @@ -115,10 +115,6 @@ class Config: # Whether to enable the embeddings playground (/nl/eval/embeddings). # This tool is used for evaluating and debugging embeddings. ENABLE_EMBEDDINGS_PLAYGROUND = False - # Whether to enable DataGemma evaluation tools: - # - /nl/eval/retrieval_generation (RIG Eval) - # - /nl/eval/retrieval_generation_sxs (SxS Eval) - ENABLE_DATAGEMMA_EVAL_TOOLS = False # Target parameter for v2/resolve API calls when resolver=indicator V2_RESOLVE_INDICATORS_TARGET = os.environ.get('V2_RESOLVE_INDICATORS_TARGET', '') diff --git a/server/app_env/autopush.py b/server/app_env/autopush.py index 23bfb7ce08..f7183d9230 100644 --- a/server/app_env/autopush.py +++ b/server/app_env/autopush.py @@ -30,4 +30,3 @@ class Config(_base.Config): LOG_DC_REQUEST_PAYLOAD_PERCENTAGE = 100 DISABLE_CRAWLERS = True ENABLE_EMBEDDINGS_PLAYGROUND = True - ENABLE_DATAGEMMA_EVAL_TOOLS = True diff --git a/server/app_env/local.py b/server/app_env/local.py index b7baaa7fb9..d574f3a9cd 100644 --- a/server/app_env/local.py +++ b/server/app_env/local.py @@ -24,7 +24,6 @@ class Config(_base.Config): LOG_EXTREME_MIXER_CALLS = False LOG_CACHED_MIXER_RESPONSE_USAGE = False ENABLE_EMBEDDINGS_PLAYGROUND = True - ENABLE_DATAGEMMA_EVAL_TOOLS = True class DCConfig(Config): diff --git a/server/integration_tests/test_data/demo2_cities_feb2023/query_3/chart_config.json b/server/integration_tests/test_data/demo2_cities_feb2023/query_3/chart_config.json index 648457df26..e9b880ac72 100644 --- a/server/integration_tests/test_data/demo2_cities_feb2023/query_3/chart_config.json +++ b/server/integration_tests/test_data/demo2_cities_feb2023/query_3/chart_config.json @@ -221,7 +221,7 @@ ], "statVarSpec": { "Mean_CommuteTime_Person_Years16Onwards_WorkCommute_Employed_WorkedOutsideOfHome": { - "name": "Mean Commute Time of Person: Years 16 Onwards, Work Commute, Employed, Worked Outside of Home", + "name": "Mean Commute Time Of Person: Years 16 Onwards, Work Commute, Employed, Worked Outside Of Home", "statVar": "Mean_CommuteTime_Person_Years16Onwards_WorkCommute_Employed_WorkedOutsideOfHome" }, "dc/0gettc3bc60cb_multiple_place_bar_block": { diff --git a/server/integration_tests/test_data/demo2_cities_feb2023/query_4/chart_config.json b/server/integration_tests/test_data/demo2_cities_feb2023/query_4/chart_config.json index 1e9808c9bb..d6067649de 100644 --- a/server/integration_tests/test_data/demo2_cities_feb2023/query_4/chart_config.json +++ b/server/integration_tests/test_data/demo2_cities_feb2023/query_4/chart_config.json @@ -224,7 +224,7 @@ ], "statVarSpec": { "Mean_CommuteTime_Person_Years16Onwards_WorkCommute_Employed_WorkedOutsideOfHome_multiple_place_bar_block": { - "name": "Mean Commute Time of Person: Years 16 Onwards, Work Commute, Employed, Worked Outside of Home", + "name": "Mean Commute Time Of Person: Years 16 Onwards, Work Commute, Employed, Worked Outside Of Home", "statVar": "Mean_CommuteTime_Person_Years16Onwards_WorkCommute_Employed_WorkedOutsideOfHome" }, "dc/0gettc3bc60cb_multiple_place_bar_block": { diff --git a/server/integration_tests/test_data/demo2_cities_feb2023/query_6/chart_config.json b/server/integration_tests/test_data/demo2_cities_feb2023/query_6/chart_config.json index a2d89d1614..c5b241f010 100644 --- a/server/integration_tests/test_data/demo2_cities_feb2023/query_6/chart_config.json +++ b/server/integration_tests/test_data/demo2_cities_feb2023/query_6/chart_config.json @@ -16,10 +16,10 @@ "country/MWI", "country/GMB", "country/ERI", + "country/LBY", "country/MLI", "country/SSD", - "country/CMR", - "country/SEN" + "country/CMR" ], "statVarKey": [ "LifeExpectancy_Person10" @@ -109,11 +109,11 @@ { "tiles": [ { - "placeDcidOverride": "country/MLI", + "placeDcidOverride": "country/LBY", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Mali", + "title": "Libya", "type": "LINE" } ] @@ -121,11 +121,11 @@ { "tiles": [ { - "placeDcidOverride": "country/SSD", + "placeDcidOverride": "country/MLI", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "South Sudan", + "title": "Mali", "type": "LINE" } ] @@ -133,11 +133,11 @@ { "tiles": [ { - "placeDcidOverride": "country/CMR", + "placeDcidOverride": "country/SSD", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Cameroon", + "title": "South Sudan", "type": "LINE" } ] @@ -145,11 +145,11 @@ { "tiles": [ { - "placeDcidOverride": "country/SEN", + "placeDcidOverride": "country/CMR", "statVarKey": [ "LifeExpectancy_Person_growth_abs" ], - "title": "Senegal", + "title": "Cameroon", "type": "LINE" } ] @@ -270,11 +270,11 @@ { "tiles": [ { - "placeDcidOverride": "country/TUN", + "placeDcidOverride": "country/LBY", "statVarKey": [ "LifeExpectancy_Person_growth_pct" ], - "title": "Tunisia", + "title": "Libya", "type": "LINE" } ] diff --git a/server/integration_tests/test_data/demo2_cities_feb2023/query_7/chart_config.json b/server/integration_tests/test_data/demo2_cities_feb2023/query_7/chart_config.json index 1fa553e912..6ebae31893 100644 --- a/server/integration_tests/test_data/demo2_cities_feb2023/query_7/chart_config.json +++ b/server/integration_tests/test_data/demo2_cities_feb2023/query_7/chart_config.json @@ -21,10 +21,10 @@ "country/MWI", "country/GMB", "country/ERI", + "country/LBY", "country/MLI", "country/SSD", - "country/CMR", - "country/SEN" + "country/CMR" ], "statVarKey": [ "FertilityRate_Person_Female_multiple_place_bar_block" @@ -54,10 +54,10 @@ "country/MWI", "country/GMB", "country/ERI", + "country/LBY", "country/MLI", "country/SSD", - "country/CMR", - "country/SEN" + "country/CMR" ], "statVarKey": [ "Count_BirthEvent_LiveBirth_AsFractionOf_Count_Person_multiple_place_bar_block" @@ -88,10 +88,10 @@ "country/MWI", "country/GMB", "country/ERI", + "country/LBY", "country/MLI", "country/SSD", - "country/CMR", - "country/SEN" + "country/CMR" ], "statVarKey": [ "GrowthRate_Count_Person_multiple_place_bar_block" @@ -122,10 +122,10 @@ "country/MWI", "country/GMB", "country/ERI", + "country/LBY", "country/MLI", "country/SSD", - "country/CMR", - "country/SEN" + "country/CMR" ], "statVarKey": [ "sdg/SP_DYN_ADKL.AGE--Y10T14__SEX--F_multiple_place_bar_block", @@ -156,10 +156,10 @@ "country/MWI", "country/GMB", "country/ERI", + "country/LBY", "country/MLI", "country/SSD", - "country/CMR", - "country/SEN" + "country/CMR" ], "statVarKey": [ "Count_Person_multiple_place_bar_block" @@ -189,10 +189,10 @@ "country/TUN", "country/MWI", "country/GMB", + "country/LBY", "country/MLI", "country/SSD", - "country/CMR", - "country/SEN" + "country/CMR" ], "statVarKey": [ "sdg/SL_TLF_UEM.AGE--Y15T24_multiple_place_bar_block", @@ -224,10 +224,10 @@ "country/TUN", "country/MWI", "country/GMB", + "country/LBY", "country/MLI", "country/SSD", - "country/CMR", - "country/SEN" + "country/CMR" ], "statVarKey": [ "sdg/SL_TLF_UEM.AGE--Y15T24__SEX--F_multiple_place_bar_block", @@ -271,7 +271,7 @@ ] } ], - "infoMessage": "Data for \"Algeria, Morocco, Tunisia, Eritrea, Mali, South Sudan, Cameroon and Senegal\" is currently unavailable. See the following statistics on the other places.", + "infoMessage": "Data for \"Algeria, Morocco, Tunisia, Eritrea, Libya, Mali, South Sudan and Cameroon\" is currently unavailable. See the following statistics on the other places.", "title": "Unemployment Rate, by Age - 19th ICLS (%)" }, { @@ -302,7 +302,7 @@ ] } ], - "infoMessage": "Data for \"Algeria, Morocco, Tunisia, Eritrea, Mali, South Sudan, Cameroon and Senegal\" is currently unavailable. See the following statistics on the other places.", + "infoMessage": "Data for \"Algeria, Morocco, Tunisia, Eritrea, Libya, Mali, South Sudan and Cameroon\" is currently unavailable. See the following statistics on the other places.", "title": "Unemployment Rate, by Sex and Age - 19th ICLS (%)" }, { @@ -319,8 +319,7 @@ "country/MAR", "country/MWI", "country/GMB", - "country/CMR", - "country/SEN" + "country/CMR" ], "statVarKey": [ "sdg/SL_TLF_UEMDIS.AGE--Y_GE15_multiple_place_bar_block", @@ -333,7 +332,7 @@ ] } ], - "infoMessage": "Data for \"Algeria, Tunisia, Eritrea, Mali and South Sudan\" is currently unavailable. See the following statistics on the other places.", + "infoMessage": "Data for \"Algeria, Tunisia, Eritrea, Libya, Mali and South Sudan\" is currently unavailable. See the following statistics on the other places.", "title": "Unemployment Rate Amon Population 15 Years Old and Over - 13th ICLS, by Disability Status (%)" }, { @@ -350,8 +349,7 @@ "country/MAR", "country/MWI", "country/GMB", - "country/CMR", - "country/SEN" + "country/CMR" ], "statVarKey": [ "sdg/SL_TLF_UEMDIS.AGE--Y_GE15__SEX--F_multiple_place_bar_block", @@ -364,7 +362,7 @@ ] } ], - "infoMessage": "Data for \"Algeria, Tunisia, Eritrea, Mali and South Sudan\" is currently unavailable. See the following statistics on the other places.", + "infoMessage": "Data for \"Algeria, Tunisia, Eritrea, Libya, Mali and South Sudan\" is currently unavailable. See the following statistics on the other places.", "title": "Unemployment Rate Amon Female Population 15 Years Old and Over - 13th ICLS, by Disability Status (%)" }, { @@ -381,8 +379,7 @@ "country/MAR", "country/MWI", "country/GMB", - "country/CMR", - "country/SEN" + "country/CMR" ], "statVarKey": [ "sdg/SL_TLF_UEMDIS.AGE--Y_GE15__SEX--M_multiple_place_bar_block", @@ -395,7 +392,7 @@ ] } ], - "infoMessage": "Data for \"Algeria, Tunisia, Eritrea, Mali and South Sudan\" is currently unavailable. See the following statistics on the other places.", + "infoMessage": "Data for \"Algeria, Tunisia, Eritrea, Libya, Mali and South Sudan\" is currently unavailable. See the following statistics on the other places.", "title": "Unemployment Rate Amon Male Population 15 Years Old and Over - 13th ICLS, by Disability Status (%)" }, { @@ -423,7 +420,7 @@ ] } ], - "infoMessage": "Data for \"Algeria, Morocco, Tunisia, Eritrea, Mali, South Sudan, Cameroon and Senegal\" is currently unavailable. See the following statistics on the other places.", + "infoMessage": "Data for \"Algeria, Morocco, Tunisia, Eritrea, Libya, Mali, South Sudan and Cameroon\" is currently unavailable. See the following statistics on the other places.", "title": "Unemployment Rate Amon Population 15 Years Old and Over - 19th ICLS, by Disability Status (%)" }, { @@ -451,7 +448,7 @@ ] } ], - "infoMessage": "Data for \"Algeria, Morocco, Tunisia, Eritrea, Mali, South Sudan, Cameroon and Senegal\" is currently unavailable. See the following statistics on the other places.", + "infoMessage": "Data for \"Algeria, Morocco, Tunisia, Eritrea, Libya, Mali, South Sudan and Cameroon\" is currently unavailable. See the following statistics on the other places.", "title": "Unemployment Rate Amon Female Population 15 Years Old and Over - 19th ICLS, by Disability Status (%)" }, { @@ -479,7 +476,7 @@ ] } ], - "infoMessage": "Data for \"Algeria, Morocco, Tunisia, Eritrea, Mali, South Sudan, Cameroon and Senegal\" is currently unavailable. See the following statistics on the other places.", + "infoMessage": "Data for \"Algeria, Morocco, Tunisia, Eritrea, Libya, Mali, South Sudan and Cameroon\" is currently unavailable. See the following statistics on the other places.", "title": "Unemployment Rate Amon Male Population 15 Years Old and Over - 19th ICLS, by Disability Status (%)" } ], @@ -703,6 +700,11 @@ "name": "Eritrea", "place_type": "Country" }, + { + "dcid": "country/LBY", + "name": "Libya", + "place_type": "Country" + }, { "dcid": "country/MLI", "name": "Mali", @@ -717,11 +719,6 @@ "dcid": "country/CMR", "name": "Cameroon", "place_type": "Country" - }, - { - "dcid": "country/SEN", - "name": "Senegal", - "place_type": "Country" } ], "relatedThings": { diff --git a/server/integration_tests/test_data/demo_climatetrace/query_1/chart_config.json b/server/integration_tests/test_data/demo_climatetrace/query_1/chart_config.json index 916aa115fb..31853be0a6 100644 --- a/server/integration_tests/test_data/demo_climatetrace/query_1/chart_config.json +++ b/server/integration_tests/test_data/demo_climatetrace/query_1/chart_config.json @@ -799,7 +799,7 @@ "statVar": "Annual_Emissions_CarbonDioxide_Agriculture" }, "Annual_Emissions_CarbonDioxide_ElectricityGeneration": { - "name": "Annual Amount of Emissions: Electricity Generation, Carbon Dioxide", + "name": "Annual Amount Of Emissions: Electricity Generation, Carbon Dioxide", "statVar": "Annual_Emissions_CarbonDioxide_ElectricityGeneration" }, "Annual_Emissions_CarbonDioxide_FossilFuelOperations_multiple_place_bar_block": { @@ -847,79 +847,79 @@ "statVar": "Annual_Emissions_GreenhouseGas_ElectricityGeneration" }, "Annual_Emissions_GreenhouseGas_ElectricityGenerationFromThermalPowerPlant": { - "name": "Annual Amount of Emissions: Electricity Generation From Thermal Power Plant, Greenhouse Gas", + "name": "Annual Amount Of Emissions: Electricity Generation From Thermal Power Plant, Greenhouse Gas", "statVar": "Annual_Emissions_GreenhouseGas_ElectricityGenerationFromThermalPowerPlant" }, "Annual_Emissions_GreenhouseGas_FuelCombustionForRoadVehicles": { - "name": "Annual Amount of Emissions: Fuel Combustion For Road Vehicles, Greenhouse Gas", + "name": "Annual Amount Of Emissions: Fuel Combustion For Road Vehicles, Greenhouse Gas", "statVar": "Annual_Emissions_GreenhouseGas_FuelCombustionForRoadVehicles" }, "Annual_Emissions_GreenhouseGas_MaritimeShipping": { - "name": "Annual Amount of Emissions: Maritime Shipping, Greenhouse Gas", + "name": "Annual Amount Of Emissions: Maritime Shipping, Greenhouse Gas", "statVar": "Annual_Emissions_GreenhouseGas_MaritimeShipping" }, "Annual_Emissions_GreenhouseGas_OilAndGasProduction": { - "name": "Annual Amount of Emissions: Oil And Gas Production, Greenhouse Gas", + "name": "Annual Amount Of Emissions: Oil And Gas Production, Greenhouse Gas", "statVar": "Annual_Emissions_GreenhouseGas_OilAndGasProduction" }, "Annual_Emissions_GreenhouseGas_OpenBurningWaste": { - "name": "Annual Amount of Emissions: Open Burning Waste, Greenhouse Gas", + "name": "Annual Amount Of Emissions: Open Burning Waste, Greenhouse Gas", "statVar": "Annual_Emissions_GreenhouseGas_OpenBurningWaste" }, "Annual_Emissions_GreenhouseGas_SolidWasteDisposal": { - "name": "Annual Amount of Emissions: Solid Waste Disposal, Greenhouse Gas", + "name": "Annual Amount Of Emissions: Solid Waste Disposal, Greenhouse Gas", "statVar": "Annual_Emissions_GreenhouseGas_SolidWasteDisposal" }, "Annual_Emissions_GreenhouseGas_WastewaterTreatmentAndDischarge": { - "name": "Annual Amount of Emissions: Wastewater Treatment And Discharge, Greenhouse Gas", + "name": "Annual Amount Of Emissions: Wastewater Treatment And Discharge, Greenhouse Gas", "statVar": "Annual_Emissions_GreenhouseGas_WastewaterTreatmentAndDischarge" }, "Annual_Emissions_Methane_Agriculture": { - "name": "Annual Amount of Emissions: Agriculture, Methane", + "name": "Annual Amount Of Emissions: Agriculture, Methane", "statVar": "Annual_Emissions_Methane_Agriculture" }, "Annual_Emissions_Methane_FossilFuelOperations": { - "name": "Annual Amount of Emissions: Fossil Fuel Operations, Methane", + "name": "Annual Amount Of Emissions: Fossil Fuel Operations, Methane", "statVar": "Annual_Emissions_Methane_FossilFuelOperations" }, "Annual_Emissions_Methane_OpenBurningWaste": { - "name": "Annual Amount of Emissions: Open Burning Waste, Methane", + "name": "Annual Amount Of Emissions: Open Burning Waste, Methane", "statVar": "Annual_Emissions_Methane_OpenBurningWaste" }, "Annual_Emissions_Methane_WasteManagement": { - "name": "Annual Amount of Emissions: Waste Management, Methane", + "name": "Annual Amount Of Emissions: Waste Management, Methane", "statVar": "Annual_Emissions_Methane_WasteManagement" }, "Annual_Emissions_NitrousOxide_Agriculture": { - "name": "Annual Amount of Emissions: Agriculture, Nitrous Oxide", + "name": "Annual Amount Of Emissions: Agriculture, Nitrous Oxide", "statVar": "Annual_Emissions_NitrousOxide_Agriculture" }, "Annual_Emissions_NitrousOxide_Agriculture_multiple_place_bar_block": { - "name": "Annual Amount of Emissions: Agriculture, Nitrous Oxide", + "name": "Annual Amount Of Emissions: Agriculture, Nitrous Oxide", "statVar": "Annual_Emissions_NitrousOxide_Agriculture" }, "Annual_Emissions_NitrousOxide_FuelCombustionForResidentialCommercialOnsiteHeating": { - "name": "Annual Amount of Emissions: Fuel Combustion For Residential Commercial Onsite Heating, Nitrous Oxide", + "name": "Annual Amount Of Emissions: Fuel Combustion For Residential Commercial Onsite Heating, Nitrous Oxide", "statVar": "Annual_Emissions_NitrousOxide_FuelCombustionForResidentialCommercialOnsiteHeating" }, "Annual_Emissions_NitrousOxide_FuelCombustionForResidentialCommercialOnsiteHeating_multiple_place_bar_block": { - "name": "Annual Amount of Emissions: Fuel Combustion For Residential Commercial Onsite Heating, Nitrous Oxide", + "name": "Annual Amount Of Emissions: Fuel Combustion For Residential Commercial Onsite Heating, Nitrous Oxide", "statVar": "Annual_Emissions_NitrousOxide_FuelCombustionForResidentialCommercialOnsiteHeating" }, "Annual_Emissions_NitrousOxide_Manufacturing_multiple_place_bar_block": { - "name": "Annual Amount of Emissions: Manufacturing, Nitrous Oxide", + "name": "Annual Amount Of Emissions: Manufacturing, Nitrous Oxide", "statVar": "Annual_Emissions_NitrousOxide_Manufacturing" }, "Annual_Emissions_NitrousOxide_Transportation_multiple_place_bar_block": { - "name": "Annual Amount of Emissions: Transportation, Nitrous Oxide", + "name": "Annual Amount Of Emissions: Transportation, Nitrous Oxide", "statVar": "Annual_Emissions_NitrousOxide_Transportation" }, "Annual_Emissions_NitrousOxide_WasteManagement_multiple_place_bar_block": { - "name": "Annual Amount of Emissions: Waste Management, Nitrous Oxide", + "name": "Annual Amount Of Emissions: Waste Management, Nitrous Oxide", "statVar": "Annual_Emissions_NitrousOxide_WasteManagement" }, "Annual_Emissions_NitrousOxide_WastewaterTreatmentAndDischarge_multiple_place_bar_block": { - "name": "Annual Amount of Emissions: Wastewater Treatment And Discharge, Nitrous Oxide", + "name": "Annual Amount Of Emissions: Wastewater Treatment And Discharge, Nitrous Oxide", "statVar": "Annual_Emissions_NitrousOxide_WastewaterTreatmentAndDischarge" }, "eia/INTL.4008-8-MMTCD.A": { diff --git a/server/integration_tests/test_data/demo_fallback/query_2/chart_config.json b/server/integration_tests/test_data/demo_fallback/query_2/chart_config.json index 0dadd79567..9c7fd2ba14 100644 --- a/server/integration_tests/test_data/demo_fallback/query_2/chart_config.json +++ b/server/integration_tests/test_data/demo_fallback/query_2/chart_config.json @@ -105,6 +105,7 @@ ], "statVarKey": [ "Count_CriminalIncidents_BiasMotivationDisabilityStatus_AggravatedAssault_IsHateCrime_multiple_place_bar_block", + "Count_CriminalIncidents_BiasMotivationDisabilityStatus_AllOtherLarceny_IsHateCrime_multiple_place_bar_block", "Count_CriminalIncidents_BiasMotivationDisabilityStatus_Robbery_IsHateCrime_multiple_place_bar_block" ], "title": "Hate Crime Cases by Type (${date})", @@ -185,11 +186,15 @@ "statVar": "Count_CriminalActivities_ViolentCrime" }, "Count_CriminalIncidents_BiasMotivationDisabilityStatus_AggravatedAssault_IsHateCrime_multiple_place_bar_block": { - "name": "Count of Hate Crime Incidents: Disability Status, Aggravated Assault", + "name": "Count Of Hate Crime Incidents: Disability Status, Aggravated Assault", "statVar": "Count_CriminalIncidents_BiasMotivationDisabilityStatus_AggravatedAssault_IsHateCrime" }, + "Count_CriminalIncidents_BiasMotivationDisabilityStatus_AllOtherLarceny_IsHateCrime_multiple_place_bar_block": { + "name": "Count Of Hate Crime Incidents: Disability Status, UCR All Other Larceny", + "statVar": "Count_CriminalIncidents_BiasMotivationDisabilityStatus_AllOtherLarceny_IsHateCrime" + }, "Count_CriminalIncidents_BiasMotivationDisabilityStatus_Robbery_IsHateCrime_multiple_place_bar_block": { - "name": "Count of Hate Crime Incidents: Disability Status, Robbery", + "name": "Count Of Hate Crime Incidents: Disability Status, Robbery", "statVar": "Count_CriminalIncidents_BiasMotivationDisabilityStatus_Robbery_IsHateCrime" }, "Count_CriminalIncidents_IsHateCrime_multiple_place_bar_block": { @@ -238,6 +243,12 @@ "Count_CriminalIncidents_BiasMotivationDisabilityStatus_AggravatedAssault_IsHateCrime_PhysicalDisability" ] }, + "Count_CriminalIncidents_BiasMotivationDisabilityStatus_Robbery_IsHateCrime": { + "targetedDisabilityStatus": [ + "Count_CriminalIncidents_BiasMotivationDisabilityStatus_Robbery_IsHateCrime_MentalDisability", + "Count_CriminalIncidents_BiasMotivationDisabilityStatus_Robbery_IsHateCrime_PhysicalDisability" + ] + }, "Count_CriminalIncidents_IsHateCrime": { "biasMotivation": [ "Count_CriminalIncidents_BiasMotivationDisabilityStatus_IsHateCrime", @@ -261,16 +272,15 @@ "Count_CriminalIncidents_CrimeAgainstSociety_IsHateCrime", "Count_CriminalIncidents_DestructionOrDamageOrVandalismOfProperty_IsHateCrime", "Count_CriminalIncidents_DrugEquipmentViolations_IsHateCrime", - "Count_CriminalIncidents_DrugOrNarcoticViolations_IsHateCrime", "Count_CriminalIncidents_ExtortionOrBlackmail_IsHateCrime", "Count_CriminalIncidents_FalsePretenseOrSwindleOrConfidenceGame_IsHateCrime", "Count_CriminalIncidents_HackingOrComputerInvasion_IsHateCrime", + "Count_CriminalIncidents_HumanTraffickingInvoluntaryServitude_IsHateCrime", "Count_CriminalIncidents_Impersonation_IsHateCrime", "Count_CriminalIncidents_Intimidation_IsHateCrime", "Count_CriminalIncidents_KidnappingOrAbduction_IsHateCrime", "Count_CriminalIncidents_MotorVehicleTheft_IsHateCrime", - "Count_CriminalIncidents_MurderAndNonNegligentManslaughter_IsHateCrime", - "Count_CriminalIncidents_PornographyOrObsceneMaterial_IsHateCrime" + "Count_CriminalIncidents_MurderAndNonNegligentManslaughter_IsHateCrime" ] } }, diff --git a/server/integration_tests/test_data/demo_fallback/query_3/chart_config.json b/server/integration_tests/test_data/demo_fallback/query_3/chart_config.json index 21da177683..48018bb518 100644 --- a/server/integration_tests/test_data/demo_fallback/query_3/chart_config.json +++ b/server/integration_tests/test_data/demo_fallback/query_3/chart_config.json @@ -99,13 +99,22 @@ { "tiles": [ { + "barTileSpec": { + "maxPlaces": 15, + "maxVariables": 15, + "sort": "DESCENDING" + }, + "comparisonPlaces": [ + "geoId/06" + ], "statVarKey": [ - "Count_CriminalIncidents_BiasMotivationDisabilityStatus_AggravatedAssault_IsHateCrime", - "Count_CriminalIncidents_BiasMotivationDisabilityStatus_Intimidation_IsHateCrime", - "Count_CriminalIncidents_BiasMotivationDisabilityStatus_Robbery_IsHateCrime" + "Count_CriminalIncidents_BiasMotivationDisabilityStatus_AggravatedAssault_IsHateCrime_multiple_place_bar_block", + "Count_CriminalIncidents_BiasMotivationDisabilityStatus_AllOtherLarceny_IsHateCrime_multiple_place_bar_block", + "Count_CriminalIncidents_BiasMotivationDisabilityStatus_Intimidation_IsHateCrime_multiple_place_bar_block", + "Count_CriminalIncidents_BiasMotivationDisabilityStatus_Robbery_IsHateCrime_multiple_place_bar_block" ], - "title": "Hate Crime Cases by Type in California", - "type": "LINE" + "title": "Hate Crime Cases by Type in California (${date})", + "type": "BAR" } ] } @@ -184,16 +193,20 @@ "name": "Violent Crimes", "statVar": "Count_CriminalActivities_ViolentCrime" }, - "Count_CriminalIncidents_BiasMotivationDisabilityStatus_AggravatedAssault_IsHateCrime": { - "name": "Count of Hate Crime Incidents: Disability Status, Aggravated Assault", + "Count_CriminalIncidents_BiasMotivationDisabilityStatus_AggravatedAssault_IsHateCrime_multiple_place_bar_block": { + "name": "Count Of Hate Crime Incidents: Disability Status, Aggravated Assault", "statVar": "Count_CriminalIncidents_BiasMotivationDisabilityStatus_AggravatedAssault_IsHateCrime" }, - "Count_CriminalIncidents_BiasMotivationDisabilityStatus_Intimidation_IsHateCrime": { - "name": "Count of Hate Crime Incidents: Disability Status, Intimidation", + "Count_CriminalIncidents_BiasMotivationDisabilityStatus_AllOtherLarceny_IsHateCrime_multiple_place_bar_block": { + "name": "Count Of Hate Crime Incidents: Disability Status, UCR All Other Larceny", + "statVar": "Count_CriminalIncidents_BiasMotivationDisabilityStatus_AllOtherLarceny_IsHateCrime" + }, + "Count_CriminalIncidents_BiasMotivationDisabilityStatus_Intimidation_IsHateCrime_multiple_place_bar_block": { + "name": "Count Of Hate Crime Incidents: Disability Status, Intimidation", "statVar": "Count_CriminalIncidents_BiasMotivationDisabilityStatus_Intimidation_IsHateCrime" }, - "Count_CriminalIncidents_BiasMotivationDisabilityStatus_Robbery_IsHateCrime": { - "name": "Count of Hate Crime Incidents: Disability Status, Robbery", + "Count_CriminalIncidents_BiasMotivationDisabilityStatus_Robbery_IsHateCrime_multiple_place_bar_block": { + "name": "Count Of Hate Crime Incidents: Disability Status, Robbery", "statVar": "Count_CriminalIncidents_BiasMotivationDisabilityStatus_Robbery_IsHateCrime" }, "Count_CriminalIncidents_IsHateCrime": { @@ -259,6 +272,12 @@ "Count_CriminalIncidents_BiasMotivationDisabilityStatus_Intimidation_IsHateCrime_PhysicalDisability" ] }, + "Count_CriminalIncidents_BiasMotivationDisabilityStatus_Robbery_IsHateCrime": { + "targetedDisabilityStatus": [ + "Count_CriminalIncidents_BiasMotivationDisabilityStatus_Robbery_IsHateCrime_MentalDisability", + "Count_CriminalIncidents_BiasMotivationDisabilityStatus_Robbery_IsHateCrime_PhysicalDisability" + ] + }, "Count_CriminalIncidents_IsHateCrime": { "biasMotivation": [ "Count_CriminalIncidents_BiasMotivationDisabilityStatus_IsHateCrime", @@ -282,15 +301,14 @@ "Count_CriminalIncidents_CrimeAgainstSociety_IsHateCrime", "Count_CriminalIncidents_DestructionOrDamageOrVandalismOfProperty_IsHateCrime", "Count_CriminalIncidents_DrugEquipmentViolations_IsHateCrime", - "Count_CriminalIncidents_DrugOrNarcoticViolations_IsHateCrime", "Count_CriminalIncidents_ExtortionOrBlackmail_IsHateCrime", "Count_CriminalIncidents_FalsePretenseOrSwindleOrConfidenceGame_IsHateCrime", "Count_CriminalIncidents_HackingOrComputerInvasion_IsHateCrime", + "Count_CriminalIncidents_HumanTraffickingInvoluntaryServitude_IsHateCrime", "Count_CriminalIncidents_Impersonation_IsHateCrime", "Count_CriminalIncidents_Intimidation_IsHateCrime", "Count_CriminalIncidents_KidnappingOrAbduction_IsHateCrime", - "Count_CriminalIncidents_MotorVehicleTheft_IsHateCrime", - "Count_CriminalIncidents_MurderAndNonNegligentManslaughter_IsHateCrime" + "Count_CriminalIncidents_MotorVehicleTheft_IsHateCrime" ] } }, 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 78985a00ed..33931e8336 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 @@ -1243,11 +1243,11 @@ "unit": "%" }, "dc/4lvmzr1h1ylk1": { - "name": "Percent of Person: Years 20 Onwards, Female, Obesity", + "name": "Percent Of Person: Years 20 Onwards, Female, Obesity", "statVar": "dc/4lvmzr1h1ylk1" }, "dc/x13tvt8jsgrm4": { - "name": "Percent of Person: Years 20 Onwards, Male, Obesity", + "name": "Percent Of Person: Years 20 Onwards, Male, Obesity", "statVar": "dc/x13tvt8jsgrm4" } } diff --git a/server/integration_tests/test_data/demo_fallback/query_5/chart_config.json b/server/integration_tests/test_data/demo_fallback/query_5/chart_config.json index f397f7dbe8..76476e8795 100644 --- a/server/integration_tests/test_data/demo_fallback/query_5/chart_config.json +++ b/server/integration_tests/test_data/demo_fallback/query_5/chart_config.json @@ -575,7 +575,7 @@ "statVar": "dc/m46wj1egm7j56" }, "dc/qt7ewllmt3826_multiple_place_bar_block": { - "name": "Amount of Economic Activity (Real Value): Gross Domestic Production, NAICS/44-45", + "name": "Amount Of Economic Activity (Real Value): Gross Domestic Production, NAICS/44-45", "statVar": "dc/qt7ewllmt3826" }, "dc/rw3t3r74kv7mc_multiple_place_bar_block": { @@ -595,7 +595,7 @@ "statVar": "dc/zkmdz1rhlt7q8" }, "dc/zz6gwv838v9w_multiple_place_bar_block": { - "name": "Amount of Economic Activity (Real Value): Gross Domestic Production, NAICS/48-49", + "name": "Amount Of Economic Activity (Real Value): Gross Domestic Production, NAICS/48-49", "statVar": "dc/zz6gwv838v9w" } } diff --git a/server/integration_tests/test_data/demo_feb2023/query_1/chart_config.json b/server/integration_tests/test_data/demo_feb2023/query_1/chart_config.json index 98c33a7bbe..2c6017f0f6 100644 --- a/server/integration_tests/test_data/demo_feb2023/query_1/chart_config.json +++ b/server/integration_tests/test_data/demo_feb2023/query_1/chart_config.json @@ -594,7 +594,7 @@ ], "statVarSpec": { "Count_HeatTemperatureEvent": { - "name": "Count of Heat Temperature Event", + "name": "Count Of Heat Temperature Event", "statVar": "Count_HeatTemperatureEvent" }, "DiffRelativeToAvg_1980_2010_MaxTemp_Daily_Hist_95PctProb_Greater_Atleast1DayADecade_CMIP6_Ensemble_SSP245": { diff --git a/server/integration_tests/test_data/demo_feb2023/query_2/chart_config.json b/server/integration_tests/test_data/demo_feb2023/query_2/chart_config.json index 9f9fa7eb90..b379e4a9a4 100644 --- a/server/integration_tests/test_data/demo_feb2023/query_2/chart_config.json +++ b/server/integration_tests/test_data/demo_feb2023/query_2/chart_config.json @@ -387,21 +387,21 @@ ], "statVarSpec": { "Area_FloodEvent": { - "name": "Area of Flood Event", + "name": "Area Of Flood Event", "statVar": "Area_FloodEvent" }, "Area_FloodEvent_9186366975012697583": { "facetId": "9186366975012697583", - "name": "Area of Flood Event", + "name": "Area Of Flood Event", "statVar": "Area_FloodEvent" }, "Count_DenseFogEvent": { - "name": "Count of Dense Fog Event", + "name": "Count Of Dense Fog Event", "statVar": "Count_DenseFogEvent" }, "Count_DenseFogEvent_14343786015636983423": { "facetId": "14343786015636983423", - "name": "Count of Dense Fog Event", + "name": "Count Of Dense Fog Event", "statVar": "Count_DenseFogEvent" }, "Count_DroughtEvent": { @@ -414,21 +414,21 @@ "statVar": "Count_DroughtEvent" }, "Count_FireEvent": { - "name": "Count of Fire Event", + "name": "Count Of Fire Event", "statVar": "Count_FireEvent" }, "Count_FireEvent_12020184095488665110": { "facetId": "12020184095488665110", - "name": "Count of Fire Event", + "name": "Count Of Fire Event", "statVar": "Count_FireEvent" }, "Count_FlashFloodEvent": { - "name": "Count of Flash Flood Event", + "name": "Count Of Flash Flood Event", "statVar": "Count_FlashFloodEvent" }, "Count_FlashFloodEvent_14343786015636983423": { "facetId": "14343786015636983423", - "name": "Count of Flash Flood Event", + "name": "Count Of Flash Flood Event", "statVar": "Count_FlashFloodEvent" }, "Count_FloodEvent": { @@ -442,17 +442,17 @@ }, "Count_HighWindEvent_14343786015636983423": { "facetId": "14343786015636983423", - "name": "Count of High Wind Event", + "name": "Count Of High Wind Event", "statVar": "Count_HighWindEvent" }, "Count_StrongWindEvent_14343786015636983423": { "facetId": "14343786015636983423", - "name": "Count of Strong Wind Event", + "name": "Count Of Strong Wind Event", "statVar": "Count_StrongWindEvent" }, "Count_ThunderstormWindEvent_14343786015636983423": { "facetId": "14343786015636983423", - "name": "Count of Thunderstorm Wind Event", + "name": "Count Of Thunderstorm Wind Event", "statVar": "Count_ThunderstormWindEvent" }, "Count_WildfireEvent": { @@ -466,7 +466,7 @@ }, "Count_WinterStormEvent_14343786015636983423": { "facetId": "14343786015636983423", - "name": "Count of Winter Storm Event", + "name": "Count Of Winter Storm Event", "statVar": "Count_WinterStormEvent" } } diff --git a/server/integration_tests/test_data/demo_feb2023/query_4/chart_config.json b/server/integration_tests/test_data/demo_feb2023/query_4/chart_config.json index a77a90a9ac..9eac3b3ae6 100644 --- a/server/integration_tests/test_data/demo_feb2023/query_4/chart_config.json +++ b/server/integration_tests/test_data/demo_feb2023/query_4/chart_config.json @@ -551,7 +551,7 @@ "statVar": "UnemploymentRate_Person" }, "dc/01yc3k23tsyk_multiple_place_bar_block": { - "name": "Count of BLS Worker: NAICS/1013", + "name": "Count Of BLS Worker: NAICS/1013", "statVar": "dc/01yc3k23tsyk" }, "dc/34t2kjrwbjd31_multiple_place_bar_block": { @@ -563,11 +563,11 @@ "statVar": "dc/8p97n7l96lgg8" }, "dc/e2mpgewwsl60c_multiple_place_bar_block": { - "name": "Count of BLS Worker: NAICS/1011", + "name": "Count Of BLS Worker: NAICS/1011", "statVar": "dc/e2mpgewwsl60c" }, "dc/j4v6keqwsl60h_multiple_place_bar_block": { - "name": "Count of BLS Worker: NAICS/334", + "name": "Count Of BLS Worker: NAICS/334", "statVar": "dc/j4v6keqwsl60h" }, "dc/ndg1xk1e9frc2_multiple_place_bar_block": { @@ -579,7 +579,7 @@ "statVar": "dc/p69tpsldf99h7" }, "dc/w5ve4140t8xsb_multiple_place_bar_block": { - "name": "Count of BLS Worker: NAICS/333", + "name": "Count Of BLS Worker: NAICS/333", "statVar": "dc/w5ve4140t8xsb" } } 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 c61515237c..8b046b03e5 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,18 +12,18 @@ "statVarKey": [ "Count_Worker_NAICSHealthCareSocialAssistance", "dc/p69tpsldf99h7", - "Count_Worker_NAICSConstruction", "Count_Worker_NAICSAccommodationFoodServices", + "Count_Worker_NAICSConstruction", "Count_Worker_NAICSProfessionalScientificTechnicalServices", - "Count_Worker_NAICSEducationalServices", "Count_Worker_NAICSAdministrativeSupportWasteManagementRemediationServices", "Count_Worker_NAICSArtsEntertainmentRecreation", + "Count_Worker_NAICSEducationalServices", "Count_Worker_NAICSOtherServices", "Count_Worker_NAICSFinanceInsurance", "Count_Worker_NAICSPublicAdministration", "Count_Worker_NAICSRealEstateRentalLeasing", - "Count_Worker_NAICSWholesaleTrade", "dc/8p97n7l96lgg8", + "Count_Worker_NAICSWholesaleTrade", "Count_Worker_NAICSUtilities", "Count_Worker_NAICSManagementOfCompaniesEnterprises", "Count_Worker_NAICSNonclassifiable", @@ -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" } ] @@ -100,9 +100,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" } ] @@ -111,9 +111,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSAdministrativeSupportWasteManagementRemediationServices_growth_abs" + "Count_Worker_NAICSArtsEntertainmentRecreation_growth_abs" ], - "title": "Admin / Waste Management Service Industry Workers in Placer County", + "title": "Arts, Entertainment, Recreation Industry Workers in Placer County", "type": "LINE" } ] @@ -122,9 +122,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSArtsEntertainmentRecreation_growth_abs" + "Count_Worker_NAICSEducationalServices_growth_abs" ], - "title": "Arts, Entertainment, Recreation Industry Workers in Placer County", + "title": "Educational Services Industry Workers in Placer County", "type": "LINE" } ] @@ -177,9 +177,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSWholesaleTrade_growth_abs" + "dc/8p97n7l96lgg8_growth_abs" ], - "title": "Wholesale Trade Workers in Placer County", + "title": "Transportation and Warehousing Workers in Placer County", "type": "LINE" } ] @@ -188,9 +188,9 @@ "tiles": [ { "statVarKey": [ - "dc/8p97n7l96lgg8_growth_abs" + "Count_Worker_NAICSWholesaleTrade_growth_abs" ], - "title": "Transportation and Warehousing Workers in Placer County", + "title": "Wholesale Trade Workers in Placer County", "type": "LINE" } ] @@ -293,9 +293,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSArtsEntertainmentRecreation_growth_pct" + "Count_Worker_NAICSAdministrativeSupportWasteManagementRemediationServices_growth_pct" ], - "title": "Arts, Entertainment, Recreation Industry 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" } ] @@ -337,9 +337,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSWholesaleTrade_growth_pct" + "Count_Worker_NAICSOtherServices_growth_pct" ], - "title": "Wholesale Trade Workers in Placer County", + "title": "Other Services (Except Public Admin) Workers in Placer County", "type": "LINE" } ] @@ -348,9 +348,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSOtherServices_growth_pct" + "Count_Worker_NAICSWholesaleTrade_growth_pct" ], - "title": "Other Services (Except Public Admin) Workers in Placer County", + "title": "Wholesale Trade Workers in Placer County", "type": "LINE" } ] @@ -370,9 +370,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSEducationalServices_growth_pct" + "Count_Worker_NAICSFinanceInsurance_growth_pct" ], - "title": "Educational Services Industry Workers in Placer County", + "title": "Finance and Insurance Industry Workers in Placer County", "type": "LINE" } ] @@ -392,9 +392,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSFinanceInsurance_growth_pct" + "Count_Worker_NAICSAccommodationFoodServices_growth_pct" ], - "title": "Finance and Insurance Industry Workers 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" } ] @@ -414,9 +414,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" } ] @@ -425,9 +425,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSPublicAdministration_growth_pct" + "Count_Worker_NAICSEducationalServices_growth_pct" ], - "title": "Public Administration Workers in Placer County", + "title": "Educational Services Industry Workers in Placer County", "type": "LINE" } ] @@ -447,9 +447,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSMiningQuarryingOilGasExtraction_growth_pct" + "Count_Worker_NAICSInformation_growth_pct" ], - "title": "Mining, Quarrying, Oil and Gas Extraction Industry 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" } ] @@ -530,9 +530,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" } ] @@ -541,9 +541,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSAdministrativeSupportWasteManagementRemediationServices_growth_pc" + "Count_Worker_NAICSArtsEntertainmentRecreation_growth_pc" ], - "title": "Admin / Waste Management Service Industry Workers in Placer County", + "title": "Arts, Entertainment, Recreation Industry Workers in Placer County", "type": "LINE" } ] @@ -552,9 +552,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSArtsEntertainmentRecreation_growth_pc" + "Count_Worker_NAICSEducationalServices_growth_pc" ], - "title": "Arts, Entertainment, Recreation Industry Workers in Placer County", + "title": "Educational Services Industry Workers in Placer County", "type": "LINE" } ] @@ -607,9 +607,9 @@ "tiles": [ { "statVarKey": [ - "Count_Worker_NAICSWholesaleTrade_growth_pc" + "dc/8p97n7l96lgg8_growth_pc" ], - "title": "Wholesale Trade Workers in Placer County", + "title": "Transportation and Warehousing Workers in Placer County", "type": "LINE" } ] @@ -618,9 +618,9 @@ "tiles": [ { "statVarKey": [ - "dc/8p97n7l96lgg8_growth_pc" + "Count_Worker_NAICSWholesaleTrade_growth_pc" ], - "title": "Transportation and Warehousing Workers in Placer County", + "title": "Wholesale Trade Workers in Placer County", "type": "LINE" } ] @@ -1297,19 +1297,19 @@ "statVar": "dc/p69tpsldf99h7" }, "dc/w5ve4140t8xsb": { - "name": "Count of BLS Worker: NAICS/333", + "name": "Count Of BLS Worker: NAICS/333", "statVar": "dc/w5ve4140t8xsb" }, "dc/w5ve4140t8xsb_growth_abs": { - "name": "Count of BLS Worker: NAICS/333", + "name": "Count Of BLS Worker: NAICS/333", "statVar": "dc/w5ve4140t8xsb" }, "dc/w5ve4140t8xsb_growth_pc": { - "name": "Count of BLS Worker: NAICS/333", + "name": "Count Of BLS Worker: NAICS/333", "statVar": "dc/w5ve4140t8xsb" }, "dc/w5ve4140t8xsb_growth_pct": { - "name": "Count of BLS Worker: NAICS/333", + "name": "Count Of BLS Worker: NAICS/333", "statVar": "dc/w5ve4140t8xsb" } } 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 8e7db3dc22..74ebe8b954 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 @@ -1454,105 +1454,6 @@ "Count_Person_Female_WhiteAlone" ] }, - "Count_Person_Female_AsianAlone": { - "age": [ - "Count_Person_0To4Years_Female_AsianAlone", - "Count_Person_0Years_Female_AsianAlone", - "Count_Person_10Years_Female_AsianAlone", - "Count_Person_11Years_Female_AsianAlone", - "Count_Person_12Years_Female_AsianAlone", - "Count_Person_13Years_Female_AsianAlone", - "Count_Person_14Years_Female_AsianAlone", - "Count_Person_15To19Years_Female_AsianAlone", - "Count_Person_16Years_Female_AsianAlone", - "Count_Person_17Years_Female_AsianAlone", - "Count_Person_18Years_Female_AsianAlone", - "Count_Person_19Years_Female_AsianAlone", - "Count_Person_1Years_Female_AsianAlone", - "Count_Person_20Years_Female_AsianAlone", - "Count_Person_21Years_Female_AsianAlone", - "Count_Person_22Years_Female_AsianAlone", - "Count_Person_23Years_Female_AsianAlone", - "Count_Person_24Years_Female_AsianAlone", - "Count_Person_25Years_Female_AsianAlone", - "Count_Person_26Years_Female_AsianAlone", - "Count_Person_27Years_Female_AsianAlone", - "Count_Person_28Years_Female_AsianAlone", - "Count_Person_29Years_Female_AsianAlone", - "Count_Person_2Years_Female_AsianAlone", - "Count_Person_30Years_Female_AsianAlone", - "Count_Person_31Years_Female_AsianAlone", - "Count_Person_32Years_Female_AsianAlone", - "Count_Person_33Years_Female_AsianAlone", - "Count_Person_34Years_Female_AsianAlone", - "Count_Person_35To39Years_Female_AsianAlone", - "Count_Person_35Years_Female_AsianAlone", - "Count_Person_36Years_Female_AsianAlone", - "Count_Person_37Years_Female_AsianAlone", - "Count_Person_38Years_Female_AsianAlone", - "Count_Person_39Years_Female_AsianAlone", - "Count_Person_3Years_Female_AsianAlone", - "Count_Person_40To44Years_Female_AsianAlone", - "Count_Person_40Years_Female_AsianAlone", - "Count_Person_41Years_Female_AsianAlone", - "Count_Person_42Years_Female_AsianAlone", - "Count_Person_43Years_Female_AsianAlone", - "Count_Person_44Years_Female_AsianAlone", - "Count_Person_45To49Years_Female_AsianAlone", - "Count_Person_45Years_Female_AsianAlone", - "Count_Person_46Years_Female_AsianAlone", - "Count_Person_47Years_Female_AsianAlone", - "Count_Person_48Years_Female_AsianAlone", - "Count_Person_49Years_Female_AsianAlone", - "Count_Person_4Years_Female_AsianAlone", - "Count_Person_50To54Years_Female_AsianAlone", - "Count_Person_50Years_Female_AsianAlone", - "Count_Person_51Years_Female_AsianAlone", - "Count_Person_52Years_Female_AsianAlone", - "Count_Person_53Years_Female_AsianAlone", - "Count_Person_54Years_Female_AsianAlone", - "Count_Person_55To59Years_Female_AsianAlone", - "Count_Person_55Years_Female_AsianAlone", - "Count_Person_56Years_Female_AsianAlone", - "Count_Person_57Years_Female_AsianAlone", - "Count_Person_58Years_Female_AsianAlone", - "Count_Person_59Years_Female_AsianAlone", - "Count_Person_60To64Years_Female_AsianAlone", - "Count_Person_60Years_Female_AsianAlone", - "Count_Person_61Years_Female_AsianAlone", - "Count_Person_62Years_Female_AsianAlone", - "Count_Person_63Years_Female_AsianAlone", - "Count_Person_64Years_Female_AsianAlone", - "Count_Person_65To69Years_Female_AsianAlone", - "Count_Person_65Years_Female_AsianAlone", - "Count_Person_66Years_Female_AsianAlone", - "Count_Person_67Years_Female_AsianAlone", - "Count_Person_68Years_Female_AsianAlone", - "Count_Person_69Years_Female_AsianAlone", - "Count_Person_6Years_Female_AsianAlone", - "Count_Person_70To74Years_Female_AsianAlone", - "Count_Person_70Years_Female_AsianAlone", - "Count_Person_71Years_Female_AsianAlone", - "Count_Person_72Years_Female_AsianAlone", - "Count_Person_73Years_Female_AsianAlone", - "Count_Person_74Years_Female_AsianAlone", - "Count_Person_75To79Years_Female_AsianAlone", - "Count_Person_75Years_Female_AsianAlone", - "Count_Person_76Years_Female_AsianAlone", - "Count_Person_77Years_Female_AsianAlone", - "Count_Person_78Years_Female_AsianAlone", - "Count_Person_79Years_Female_AsianAlone", - "Count_Person_7Years_Female_AsianAlone", - "Count_Person_80To84Years_Female_AsianAlone", - "Count_Person_80Years_Female_AsianAlone", - "Count_Person_81Years_Female_AsianAlone", - "Count_Person_82Years_Female_AsianAlone", - "Count_Person_83Years_Female_AsianAlone", - "Count_Person_84Years_Female_AsianAlone", - "Count_Person_8Years_Female_AsianAlone", - "Count_Person_9Years_Female_AsianAlone" - ] - }, "Count_Person_Female_AsianOrPacificIslander": { "age": [ "Count_Person_0Years_Female_AsianOrPacificIslander", @@ -1643,309 +1544,6 @@ "Count_Person_9Years_Female_AsianOrPacificIslander" ] }, - "Count_Person_Female_BlackOrAfricanAmericanAlone": { - "age": [ - "Count_Person_0To4Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_0Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_10Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_11Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_12Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_13Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_14Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_16Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_17Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_18Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_19Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_1Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_20Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_21Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_22Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_23Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_24Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_25Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_26Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_27Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_28Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_29Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_2Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_30Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_31Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_32Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_33Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_34Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_35To39Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_35Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_36Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_37Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_38Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_39Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_3Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_40To44Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_40Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_41Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_42Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_43Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_44Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_45To49Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_45Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_46Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_47Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_48Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_49Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_4Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_50To54Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_50Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_51Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_52Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_53Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_54Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_55To59Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_55Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_56Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_57Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_58Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_59Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_60To64Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_60Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_61Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_62Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_63Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_64Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_65To69Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_65Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_66Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_67Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_68Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_69Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_6Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_70To74Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_70Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_71Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_72Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_73Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_74Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_75To79Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_75Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_76Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_77Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_78Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_79Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_7Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_80To84Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_80Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_81Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_82Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_83Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_84Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_8Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_9Years_Female_BlackOrAfricanAmericanAlone" - ] - }, - "Count_Person_Female_HispanicOrLatino": { - "age": [ - "Count_Person_0To4Years_Female_HispanicOrLatino", - "Count_Person_0Years_Female_HispanicOrLatino", - "Count_Person_10Years_Female_HispanicOrLatino", - "Count_Person_11Years_Female_HispanicOrLatino", - "Count_Person_12Years_Female_HispanicOrLatino", - "Count_Person_13Years_Female_HispanicOrLatino", - "Count_Person_14Years_Female_HispanicOrLatino", - "Count_Person_16Years_Female_HispanicOrLatino", - "Count_Person_17Years_Female_HispanicOrLatino", - "Count_Person_18Years_Female_HispanicOrLatino", - "Count_Person_19Years_Female_HispanicOrLatino", - "Count_Person_1Years_Female_HispanicOrLatino", - "Count_Person_20Years_Female_HispanicOrLatino", - "Count_Person_21Years_Female_HispanicOrLatino", - "Count_Person_22Years_Female_HispanicOrLatino", - "Count_Person_23Years_Female_HispanicOrLatino", - "Count_Person_24Years_Female_HispanicOrLatino", - "Count_Person_25Years_Female_HispanicOrLatino", - "Count_Person_26Years_Female_HispanicOrLatino", - "Count_Person_27Years_Female_HispanicOrLatino", - "Count_Person_28Years_Female_HispanicOrLatino", - "Count_Person_29Years_Female_HispanicOrLatino", - "Count_Person_2Years_Female_HispanicOrLatino", - "Count_Person_30Years_Female_HispanicOrLatino", - "Count_Person_31Years_Female_HispanicOrLatino", - "Count_Person_32Years_Female_HispanicOrLatino", - "Count_Person_33Years_Female_HispanicOrLatino", - "Count_Person_34Years_Female_HispanicOrLatino", - "Count_Person_35To39Years_Female_HispanicOrLatino", - "Count_Person_35Years_Female_HispanicOrLatino", - "Count_Person_36Years_Female_HispanicOrLatino", - "Count_Person_37Years_Female_HispanicOrLatino", - "Count_Person_38Years_Female_HispanicOrLatino", - "Count_Person_39Years_Female_HispanicOrLatino", - "Count_Person_3Years_Female_HispanicOrLatino", - "Count_Person_40To44Years_Female_HispanicOrLatino", - "Count_Person_40Years_Female_HispanicOrLatino", - "Count_Person_41Years_Female_HispanicOrLatino", - "Count_Person_42Years_Female_HispanicOrLatino", - "Count_Person_43Years_Female_HispanicOrLatino", - "Count_Person_44Years_Female_HispanicOrLatino", - "Count_Person_45To49Years_Female_HispanicOrLatino", - "Count_Person_45Years_Female_HispanicOrLatino", - "Count_Person_46Years_Female_HispanicOrLatino", - "Count_Person_47Years_Female_HispanicOrLatino", - "Count_Person_48Years_Female_HispanicOrLatino", - "Count_Person_49Years_Female_HispanicOrLatino", - "Count_Person_4Years_Female_HispanicOrLatino", - "Count_Person_50To54Years_Female_HispanicOrLatino", - "Count_Person_50Years_Female_HispanicOrLatino", - "Count_Person_51Years_Female_HispanicOrLatino", - "Count_Person_52Years_Female_HispanicOrLatino", - "Count_Person_53Years_Female_HispanicOrLatino", - "Count_Person_54Years_Female_HispanicOrLatino", - "Count_Person_55To59Years_Female_HispanicOrLatino", - "Count_Person_55Years_Female_HispanicOrLatino", - "Count_Person_56Years_Female_HispanicOrLatino", - "Count_Person_57Years_Female_HispanicOrLatino", - "Count_Person_58Years_Female_HispanicOrLatino", - "Count_Person_59Years_Female_HispanicOrLatino", - "Count_Person_60To64Years_Female_HispanicOrLatino", - "Count_Person_60Years_Female_HispanicOrLatino", - "Count_Person_61Years_Female_HispanicOrLatino", - "Count_Person_62Years_Female_HispanicOrLatino", - "Count_Person_63Years_Female_HispanicOrLatino", - "Count_Person_64Years_Female_HispanicOrLatino", - "Count_Person_65To69Years_Female_HispanicOrLatino", - "Count_Person_65Years_Female_HispanicOrLatino", - "Count_Person_66Years_Female_HispanicOrLatino", - "Count_Person_67Years_Female_HispanicOrLatino", - "Count_Person_68Years_Female_HispanicOrLatino", - "Count_Person_69Years_Female_HispanicOrLatino", - "Count_Person_6Years_Female_HispanicOrLatino", - "Count_Person_70To74Years_Female_HispanicOrLatino", - "Count_Person_70Years_Female_HispanicOrLatino", - "Count_Person_71Years_Female_HispanicOrLatino", - "Count_Person_72Years_Female_HispanicOrLatino", - "Count_Person_73Years_Female_HispanicOrLatino", - "Count_Person_74Years_Female_HispanicOrLatino", - "Count_Person_75To79Years_Female_HispanicOrLatino", - "Count_Person_75Years_Female_HispanicOrLatino", - "Count_Person_76Years_Female_HispanicOrLatino", - "Count_Person_77Years_Female_HispanicOrLatino", - "Count_Person_78Years_Female_HispanicOrLatino", - "Count_Person_79Years_Female_HispanicOrLatino", - "Count_Person_7Years_Female_HispanicOrLatino", - "Count_Person_80To84Years_Female_HispanicOrLatino", - "Count_Person_80Years_Female_HispanicOrLatino", - "Count_Person_81Years_Female_HispanicOrLatino", - "Count_Person_82Years_Female_HispanicOrLatino", - "Count_Person_83Years_Female_HispanicOrLatino", - "Count_Person_84Years_Female_HispanicOrLatino", - "Count_Person_8Years_Female_HispanicOrLatino", - "Count_Person_9Years_Female_HispanicOrLatino" - ] - }, - "Count_Person_Female_NotHispanicOrLatino": { - "age": [ - "Count_Person_0To4Years_Female_NotHispanicOrLatino", - "Count_Person_0Years_Female_NotHispanicOrLatino", - "Count_Person_10To14Years_Female_NotHispanicOrLatino", - "Count_Person_10Years_Female_NotHispanicOrLatino", - "Count_Person_11Years_Female_NotHispanicOrLatino", - "Count_Person_12Years_Female_NotHispanicOrLatino", - "Count_Person_13Years_Female_NotHispanicOrLatino", - "Count_Person_14Years_Female_NotHispanicOrLatino", - "Count_Person_15To19Years_Female_NotHispanicOrLatino", - "Count_Person_15Years_Female_NotHispanicOrLatino", - "Count_Person_16Years_Female_NotHispanicOrLatino", - "Count_Person_17Years_Female_NotHispanicOrLatino", - "Count_Person_18Years_Female_NotHispanicOrLatino", - "Count_Person_19Years_Female_NotHispanicOrLatino", - "Count_Person_1Years_Female_NotHispanicOrLatino", - "Count_Person_20To24Years_Female_NotHispanicOrLatino", - "Count_Person_20Years_Female_NotHispanicOrLatino", - "Count_Person_21Years_Female_NotHispanicOrLatino", - "Count_Person_22Years_Female_NotHispanicOrLatino", - "Count_Person_23Years_Female_NotHispanicOrLatino", - "Count_Person_24Years_Female_NotHispanicOrLatino", - "Count_Person_25To29Years_Female_NotHispanicOrLatino", - "Count_Person_25Years_Female_NotHispanicOrLatino", - "Count_Person_26Years_Female_NotHispanicOrLatino", - "Count_Person_27Years_Female_NotHispanicOrLatino", - "Count_Person_28Years_Female_NotHispanicOrLatino", - "Count_Person_29Years_Female_NotHispanicOrLatino", - "Count_Person_2Years_Female_NotHispanicOrLatino", - "Count_Person_30To34Years_Female_NotHispanicOrLatino", - "Count_Person_30Years_Female_NotHispanicOrLatino", - "Count_Person_31Years_Female_NotHispanicOrLatino", - "Count_Person_32Years_Female_NotHispanicOrLatino", - "Count_Person_33Years_Female_NotHispanicOrLatino", - "Count_Person_34Years_Female_NotHispanicOrLatino", - "Count_Person_35To39Years_Female_NotHispanicOrLatino", - "Count_Person_35Years_Female_NotHispanicOrLatino", - "Count_Person_36Years_Female_NotHispanicOrLatino", - "Count_Person_37Years_Female_NotHispanicOrLatino", - "Count_Person_38Years_Female_NotHispanicOrLatino", - "Count_Person_39Years_Female_NotHispanicOrLatino", - "Count_Person_3Years_Female_NotHispanicOrLatino", - "Count_Person_40To44Years_Female_NotHispanicOrLatino", - "Count_Person_40Years_Female_NotHispanicOrLatino", - "Count_Person_41Years_Female_NotHispanicOrLatino", - "Count_Person_42Years_Female_NotHispanicOrLatino", - "Count_Person_43Years_Female_NotHispanicOrLatino", - "Count_Person_44Years_Female_NotHispanicOrLatino", - "Count_Person_45To49Years_Female_NotHispanicOrLatino", - "Count_Person_45Years_Female_NotHispanicOrLatino", - "Count_Person_46Years_Female_NotHispanicOrLatino", - "Count_Person_47Years_Female_NotHispanicOrLatino", - "Count_Person_48Years_Female_NotHispanicOrLatino", - "Count_Person_49Years_Female_NotHispanicOrLatino", - "Count_Person_4Years_Female_NotHispanicOrLatino", - "Count_Person_50To54Years_Female_NotHispanicOrLatino", - "Count_Person_50Years_Female_NotHispanicOrLatino", - "Count_Person_51Years_Female_NotHispanicOrLatino", - "Count_Person_52Years_Female_NotHispanicOrLatino", - "Count_Person_53Years_Female_NotHispanicOrLatino", - "Count_Person_54Years_Female_NotHispanicOrLatino", - "Count_Person_55To59Years_Female_NotHispanicOrLatino", - "Count_Person_55Years_Female_NotHispanicOrLatino", - "Count_Person_56Years_Female_NotHispanicOrLatino", - "Count_Person_57Years_Female_NotHispanicOrLatino", - "Count_Person_58Years_Female_NotHispanicOrLatino", - "Count_Person_59Years_Female_NotHispanicOrLatino", - "Count_Person_5To9Years_Female_NotHispanicOrLatino", - "Count_Person_5Years_Female_NotHispanicOrLatino", - "Count_Person_60To64Years_Female_NotHispanicOrLatino", - "Count_Person_60Years_Female_NotHispanicOrLatino", - "Count_Person_61Years_Female_NotHispanicOrLatino", - "Count_Person_62Years_Female_NotHispanicOrLatino", - "Count_Person_63Years_Female_NotHispanicOrLatino", - "Count_Person_64Years_Female_NotHispanicOrLatino", - "Count_Person_65To69Years_Female_NotHispanicOrLatino", - "Count_Person_65Years_Female_NotHispanicOrLatino", - "Count_Person_66Years_Female_NotHispanicOrLatino", - "Count_Person_67Years_Female_NotHispanicOrLatino", - "Count_Person_68Years_Female_NotHispanicOrLatino", - "Count_Person_69Years_Female_NotHispanicOrLatino", - "Count_Person_6Years_Female_NotHispanicOrLatino", - "Count_Person_70To74Years_Female_NotHispanicOrLatino", - "Count_Person_70Years_Female_NotHispanicOrLatino", - "Count_Person_71Years_Female_NotHispanicOrLatino", - "Count_Person_72Years_Female_NotHispanicOrLatino", - "Count_Person_73Years_Female_NotHispanicOrLatino", - "Count_Person_74Years_Female_NotHispanicOrLatino", - "Count_Person_75To79Years_Female_NotHispanicOrLatino", - "Count_Person_75Years_Female_NotHispanicOrLatino", - "Count_Person_76Years_Female_NotHispanicOrLatino", - "Count_Person_77Years_Female_NotHispanicOrLatino", - "Count_Person_78Years_Female_NotHispanicOrLatino", - "Count_Person_79Years_Female_NotHispanicOrLatino", - "Count_Person_7Years_Female_NotHispanicOrLatino", - "Count_Person_80To84Years_Female_NotHispanicOrLatino", - "Count_Person_80Years_Female_NotHispanicOrLatino", - "Count_Person_81Years_Female_NotHispanicOrLatino", - "Count_Person_82Years_Female_NotHispanicOrLatino", - "Count_Person_83Years_Female_NotHispanicOrLatino", - "Count_Person_84Years_Female_NotHispanicOrLatino", - "Count_Person_85OrMoreYears_Female_NotHispanicOrLatino", - "Count_Person_8Years_Female_NotHispanicOrLatino", - "Count_Person_9Years_Female_NotHispanicOrLatino" - ] - }, "Count_Person_Male": { "age": [ "Count_Person_15To44Years_Male", 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 dc3f79bd62..3b705ded81 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 @@ -100,7 +100,7 @@ "startDate": "2019" }, "statVarKey": [ - "Count_Person_Female_WhiteAlone_10924048016609238261" + "Count_Person_Female_WhiteAlone_5230523282535389510" ], "title": "Women Identifying as White Alone in California", "type": "LINE" @@ -228,7 +228,7 @@ "startDate": "2019" }, "statVarKey": [ - "Count_Person_Female_AsianAlone_10924048016609238261" + "Count_Person_Female_AsianAlone_5230523282535389510" ], "title": "Asian Monoracial Women in California", "type": "LINE" @@ -610,7 +610,7 @@ "startDate": "2019" }, "statVarKey": [ - "Count_Person_Female_BlackOrAfricanAmericanAlone_10924048016609238261" + "Count_Person_Female_BlackOrAfricanAmericanAlone_5230523282535389510" ], "title": "Black or African American Monoracial Women in California", "type": "LINE" @@ -940,8 +940,8 @@ "name": "Asian Monoracial Women", "statVar": "Count_Person_Female_AsianAlone" }, - "Count_Person_Female_AsianAlone_10924048016609238261": { - "facetId": "10924048016609238261", + "Count_Person_Female_AsianAlone_5230523282535389510": { + "facetId": "5230523282535389510", "name": "Asian Monoracial Women", "statVar": "Count_Person_Female_AsianAlone" }, @@ -949,8 +949,8 @@ "name": "Black or African American Monoracial Women", "statVar": "Count_Person_Female_BlackOrAfricanAmericanAlone" }, - "Count_Person_Female_BlackOrAfricanAmericanAlone_10924048016609238261": { - "facetId": "10924048016609238261", + "Count_Person_Female_BlackOrAfricanAmericanAlone_5230523282535389510": { + "facetId": "5230523282535389510", "name": "Black or African American Monoracial Women", "statVar": "Count_Person_Female_BlackOrAfricanAmericanAlone" }, @@ -994,8 +994,8 @@ "name": "Women Identifying as White Alone", "statVar": "Count_Person_Female_WhiteAlone" }, - "Count_Person_Female_WhiteAlone_10924048016609238261": { - "facetId": "10924048016609238261", + "Count_Person_Female_WhiteAlone_5230523282535389510": { + "facetId": "5230523282535389510", "name": "Women Identifying as White Alone", "statVar": "Count_Person_Female_WhiteAlone" }, @@ -1437,359 +1437,6 @@ "Count_Person_Female_WhiteAlone" ] }, - "Count_Person_Female_AsianAlone": { - "age": [ - "Count_Person_0Years_Female_AsianAlone", - "Count_Person_10Years_Female_AsianAlone", - "Count_Person_11Years_Female_AsianAlone", - "Count_Person_12Years_Female_AsianAlone", - "Count_Person_13Years_Female_AsianAlone", - "Count_Person_14Years_Female_AsianAlone", - "Count_Person_16Years_Female_AsianAlone", - "Count_Person_17Years_Female_AsianAlone", - "Count_Person_18Years_Female_AsianAlone", - "Count_Person_19Years_Female_AsianAlone", - "Count_Person_1Years_Female_AsianAlone", - "Count_Person_20Years_Female_AsianAlone", - "Count_Person_21Years_Female_AsianAlone", - "Count_Person_22Years_Female_AsianAlone", - "Count_Person_23Years_Female_AsianAlone", - "Count_Person_24Years_Female_AsianAlone", - "Count_Person_25Years_Female_AsianAlone", - "Count_Person_26Years_Female_AsianAlone", - "Count_Person_27Years_Female_AsianAlone", - "Count_Person_28Years_Female_AsianAlone", - "Count_Person_29Years_Female_AsianAlone", - "Count_Person_2Years_Female_AsianAlone", - "Count_Person_30Years_Female_AsianAlone", - "Count_Person_31Years_Female_AsianAlone", - "Count_Person_32Years_Female_AsianAlone", - "Count_Person_33Years_Female_AsianAlone", - "Count_Person_34Years_Female_AsianAlone", - "Count_Person_35Years_Female_AsianAlone", - "Count_Person_36Years_Female_AsianAlone", - "Count_Person_37Years_Female_AsianAlone", - "Count_Person_38Years_Female_AsianAlone", - "Count_Person_39Years_Female_AsianAlone", - "Count_Person_3Years_Female_AsianAlone", - "Count_Person_40Years_Female_AsianAlone", - "Count_Person_41Years_Female_AsianAlone", - "Count_Person_42Years_Female_AsianAlone", - "Count_Person_43Years_Female_AsianAlone", - "Count_Person_44Years_Female_AsianAlone", - "Count_Person_45Years_Female_AsianAlone", - "Count_Person_46Years_Female_AsianAlone", - "Count_Person_47Years_Female_AsianAlone", - "Count_Person_48Years_Female_AsianAlone", - "Count_Person_49Years_Female_AsianAlone", - "Count_Person_4Years_Female_AsianAlone", - "Count_Person_50Years_Female_AsianAlone", - "Count_Person_51Years_Female_AsianAlone", - "Count_Person_52Years_Female_AsianAlone", - "Count_Person_53Years_Female_AsianAlone", - "Count_Person_54Years_Female_AsianAlone", - "Count_Person_55Years_Female_AsianAlone", - "Count_Person_56Years_Female_AsianAlone", - "Count_Person_57Years_Female_AsianAlone", - "Count_Person_58Years_Female_AsianAlone", - "Count_Person_59Years_Female_AsianAlone", - "Count_Person_60Years_Female_AsianAlone", - "Count_Person_61Years_Female_AsianAlone", - "Count_Person_62Years_Female_AsianAlone", - "Count_Person_63Years_Female_AsianAlone", - "Count_Person_64Years_Female_AsianAlone", - "Count_Person_65Years_Female_AsianAlone", - "Count_Person_66Years_Female_AsianAlone", - "Count_Person_67Years_Female_AsianAlone", - "Count_Person_68Years_Female_AsianAlone", - "Count_Person_69Years_Female_AsianAlone", - "Count_Person_6Years_Female_AsianAlone", - "Count_Person_70Years_Female_AsianAlone", - "Count_Person_71Years_Female_AsianAlone", - "Count_Person_72Years_Female_AsianAlone", - "Count_Person_73Years_Female_AsianAlone", - "Count_Person_74Years_Female_AsianAlone", - "Count_Person_75Years_Female_AsianAlone", - "Count_Person_76Years_Female_AsianAlone", - "Count_Person_77Years_Female_AsianAlone", - "Count_Person_78Years_Female_AsianAlone", - "Count_Person_79Years_Female_AsianAlone", - "Count_Person_7Years_Female_AsianAlone", - "Count_Person_80Years_Female_AsianAlone", - "Count_Person_81Years_Female_AsianAlone", - "Count_Person_82Years_Female_AsianAlone", - "Count_Person_83Years_Female_AsianAlone", - "Count_Person_84Years_Female_AsianAlone", - "Count_Person_85Years_Female_AsianAlone", - "Count_Person_8Years_Female_AsianAlone", - "Count_Person_9Years_Female_AsianAlone" - ] - }, - "Count_Person_Female_BlackOrAfricanAmericanAlone": { - "age": [ - "Count_Person_0Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_10Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_11Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_12Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_13Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_14Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_16Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_17Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_18Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_19Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_1Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_20Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_21Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_22Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_23Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_24Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_25Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_26Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_27Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_28Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_29Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_2Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_30Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_31Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_32Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_33Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_34Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_35Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_36Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_37Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_38Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_39Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_3Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_40Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_41Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_42Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_43Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_44Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_45Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_46Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_47Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_48Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_49Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_4Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_50Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_51Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_52Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_53Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_54Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_55Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_56Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_57Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_58Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_59Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_60Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_61Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_62Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_63Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_64Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_65Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_66Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_67Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_68Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_69Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_6Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_70Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_71Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_72Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_73Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_74Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_75Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_76Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_77Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_78Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_79Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_7Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_80Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_81Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_82Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_83Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_84Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_85Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_8Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_9Years_Female_BlackOrAfricanAmericanAlone" - ] - }, - "Count_Person_Female_HispanicOrLatino": { - "age": [ - "Count_Person_0Years_Female_HispanicOrLatino", - "Count_Person_10Years_Female_HispanicOrLatino", - "Count_Person_11Years_Female_HispanicOrLatino", - "Count_Person_12Years_Female_HispanicOrLatino", - "Count_Person_13Years_Female_HispanicOrLatino", - "Count_Person_14Years_Female_HispanicOrLatino", - "Count_Person_16Years_Female_HispanicOrLatino", - "Count_Person_17Years_Female_HispanicOrLatino", - "Count_Person_18Years_Female_HispanicOrLatino", - "Count_Person_19Years_Female_HispanicOrLatino", - "Count_Person_1Years_Female_HispanicOrLatino", - "Count_Person_20Years_Female_HispanicOrLatino", - "Count_Person_21Years_Female_HispanicOrLatino", - "Count_Person_22Years_Female_HispanicOrLatino", - "Count_Person_23Years_Female_HispanicOrLatino", - "Count_Person_24Years_Female_HispanicOrLatino", - "Count_Person_25Years_Female_HispanicOrLatino", - "Count_Person_26Years_Female_HispanicOrLatino", - "Count_Person_27Years_Female_HispanicOrLatino", - "Count_Person_28Years_Female_HispanicOrLatino", - "Count_Person_29Years_Female_HispanicOrLatino", - "Count_Person_2Years_Female_HispanicOrLatino", - "Count_Person_30Years_Female_HispanicOrLatino", - "Count_Person_31Years_Female_HispanicOrLatino", - "Count_Person_32Years_Female_HispanicOrLatino", - "Count_Person_33Years_Female_HispanicOrLatino", - "Count_Person_34Years_Female_HispanicOrLatino", - "Count_Person_35Years_Female_HispanicOrLatino", - "Count_Person_36Years_Female_HispanicOrLatino", - "Count_Person_37Years_Female_HispanicOrLatino", - "Count_Person_38Years_Female_HispanicOrLatino", - "Count_Person_39Years_Female_HispanicOrLatino", - "Count_Person_3Years_Female_HispanicOrLatino", - "Count_Person_40Years_Female_HispanicOrLatino", - "Count_Person_41Years_Female_HispanicOrLatino", - "Count_Person_42Years_Female_HispanicOrLatino", - "Count_Person_43Years_Female_HispanicOrLatino", - "Count_Person_44Years_Female_HispanicOrLatino", - "Count_Person_45Years_Female_HispanicOrLatino", - "Count_Person_46Years_Female_HispanicOrLatino", - "Count_Person_47Years_Female_HispanicOrLatino", - "Count_Person_48Years_Female_HispanicOrLatino", - "Count_Person_49Years_Female_HispanicOrLatino", - "Count_Person_4Years_Female_HispanicOrLatino", - "Count_Person_50Years_Female_HispanicOrLatino", - "Count_Person_51Years_Female_HispanicOrLatino", - "Count_Person_52Years_Female_HispanicOrLatino", - "Count_Person_53Years_Female_HispanicOrLatino", - "Count_Person_54Years_Female_HispanicOrLatino", - "Count_Person_55Years_Female_HispanicOrLatino", - "Count_Person_56Years_Female_HispanicOrLatino", - "Count_Person_57Years_Female_HispanicOrLatino", - "Count_Person_58Years_Female_HispanicOrLatino", - "Count_Person_59Years_Female_HispanicOrLatino", - "Count_Person_60Years_Female_HispanicOrLatino", - "Count_Person_61Years_Female_HispanicOrLatino", - "Count_Person_62Years_Female_HispanicOrLatino", - "Count_Person_63Years_Female_HispanicOrLatino", - "Count_Person_64Years_Female_HispanicOrLatino", - "Count_Person_65Years_Female_HispanicOrLatino", - "Count_Person_66Years_Female_HispanicOrLatino", - "Count_Person_67Years_Female_HispanicOrLatino", - "Count_Person_68Years_Female_HispanicOrLatino", - "Count_Person_69Years_Female_HispanicOrLatino", - "Count_Person_6Years_Female_HispanicOrLatino", - "Count_Person_70Years_Female_HispanicOrLatino", - "Count_Person_71Years_Female_HispanicOrLatino", - "Count_Person_72Years_Female_HispanicOrLatino", - "Count_Person_73Years_Female_HispanicOrLatino", - "Count_Person_74Years_Female_HispanicOrLatino", - "Count_Person_75Years_Female_HispanicOrLatino", - "Count_Person_76Years_Female_HispanicOrLatino", - "Count_Person_77Years_Female_HispanicOrLatino", - "Count_Person_78Years_Female_HispanicOrLatino", - "Count_Person_79Years_Female_HispanicOrLatino", - "Count_Person_7Years_Female_HispanicOrLatino", - "Count_Person_80Years_Female_HispanicOrLatino", - "Count_Person_81Years_Female_HispanicOrLatino", - "Count_Person_82Years_Female_HispanicOrLatino", - "Count_Person_83Years_Female_HispanicOrLatino", - "Count_Person_84Years_Female_HispanicOrLatino", - "Count_Person_8Years_Female_HispanicOrLatino", - "Count_Person_9Years_Female_HispanicOrLatino" - ] - }, - "Count_Person_Female_NotHispanicOrLatino": { - "age": [ - "Count_Person_0Years_Female_NotHispanicOrLatino", - "Count_Person_10Years_Female_NotHispanicOrLatino", - "Count_Person_11Years_Female_NotHispanicOrLatino", - "Count_Person_12Years_Female_NotHispanicOrLatino", - "Count_Person_13Years_Female_NotHispanicOrLatino", - "Count_Person_14Years_Female_NotHispanicOrLatino", - "Count_Person_15Years_Female_NotHispanicOrLatino", - "Count_Person_16Years_Female_NotHispanicOrLatino", - "Count_Person_17Years_Female_NotHispanicOrLatino", - "Count_Person_18Years_Female_NotHispanicOrLatino", - "Count_Person_19Years_Female_NotHispanicOrLatino", - "Count_Person_1Years_Female_NotHispanicOrLatino", - "Count_Person_20Years_Female_NotHispanicOrLatino", - "Count_Person_21Years_Female_NotHispanicOrLatino", - "Count_Person_22Years_Female_NotHispanicOrLatino", - "Count_Person_23Years_Female_NotHispanicOrLatino", - "Count_Person_24Years_Female_NotHispanicOrLatino", - "Count_Person_25Years_Female_NotHispanicOrLatino", - "Count_Person_26Years_Female_NotHispanicOrLatino", - "Count_Person_27Years_Female_NotHispanicOrLatino", - "Count_Person_28Years_Female_NotHispanicOrLatino", - "Count_Person_29Years_Female_NotHispanicOrLatino", - "Count_Person_2Years_Female_NotHispanicOrLatino", - "Count_Person_30Years_Female_NotHispanicOrLatino", - "Count_Person_31Years_Female_NotHispanicOrLatino", - "Count_Person_32Years_Female_NotHispanicOrLatino", - "Count_Person_33Years_Female_NotHispanicOrLatino", - "Count_Person_34Years_Female_NotHispanicOrLatino", - "Count_Person_35Years_Female_NotHispanicOrLatino", - "Count_Person_36Years_Female_NotHispanicOrLatino", - "Count_Person_37Years_Female_NotHispanicOrLatino", - "Count_Person_38Years_Female_NotHispanicOrLatino", - "Count_Person_39Years_Female_NotHispanicOrLatino", - "Count_Person_3Years_Female_NotHispanicOrLatino", - "Count_Person_40Years_Female_NotHispanicOrLatino", - "Count_Person_41Years_Female_NotHispanicOrLatino", - "Count_Person_42Years_Female_NotHispanicOrLatino", - "Count_Person_43Years_Female_NotHispanicOrLatino", - "Count_Person_44Years_Female_NotHispanicOrLatino", - "Count_Person_45Years_Female_NotHispanicOrLatino", - "Count_Person_46Years_Female_NotHispanicOrLatino", - "Count_Person_47Years_Female_NotHispanicOrLatino", - "Count_Person_48Years_Female_NotHispanicOrLatino", - "Count_Person_49Years_Female_NotHispanicOrLatino", - "Count_Person_4Years_Female_NotHispanicOrLatino", - "Count_Person_50Years_Female_NotHispanicOrLatino", - "Count_Person_51Years_Female_NotHispanicOrLatino", - "Count_Person_52Years_Female_NotHispanicOrLatino", - "Count_Person_53Years_Female_NotHispanicOrLatino", - "Count_Person_54Years_Female_NotHispanicOrLatino", - "Count_Person_55Years_Female_NotHispanicOrLatino", - "Count_Person_56Years_Female_NotHispanicOrLatino", - "Count_Person_57Years_Female_NotHispanicOrLatino", - "Count_Person_58Years_Female_NotHispanicOrLatino", - "Count_Person_59Years_Female_NotHispanicOrLatino", - "Count_Person_5Years_Female_NotHispanicOrLatino", - "Count_Person_60Years_Female_NotHispanicOrLatino", - "Count_Person_61Years_Female_NotHispanicOrLatino", - "Count_Person_62Years_Female_NotHispanicOrLatino", - "Count_Person_63Years_Female_NotHispanicOrLatino", - "Count_Person_64Years_Female_NotHispanicOrLatino", - "Count_Person_65Years_Female_NotHispanicOrLatino", - "Count_Person_66Years_Female_NotHispanicOrLatino", - "Count_Person_67Years_Female_NotHispanicOrLatino", - "Count_Person_68Years_Female_NotHispanicOrLatino", - "Count_Person_69Years_Female_NotHispanicOrLatino", - "Count_Person_6Years_Female_NotHispanicOrLatino", - "Count_Person_70Years_Female_NotHispanicOrLatino", - "Count_Person_71Years_Female_NotHispanicOrLatino", - "Count_Person_72Years_Female_NotHispanicOrLatino", - "Count_Person_73Years_Female_NotHispanicOrLatino", - "Count_Person_74Years_Female_NotHispanicOrLatino", - "Count_Person_75Years_Female_NotHispanicOrLatino", - "Count_Person_76Years_Female_NotHispanicOrLatino", - "Count_Person_77Years_Female_NotHispanicOrLatino", - "Count_Person_78Years_Female_NotHispanicOrLatino", - "Count_Person_79Years_Female_NotHispanicOrLatino", - "Count_Person_7Years_Female_NotHispanicOrLatino", - "Count_Person_80Years_Female_NotHispanicOrLatino", - "Count_Person_81Years_Female_NotHispanicOrLatino", - "Count_Person_82Years_Female_NotHispanicOrLatino", - "Count_Person_83Years_Female_NotHispanicOrLatino", - "Count_Person_84Years_Female_NotHispanicOrLatino", - "Count_Person_85OrMoreYears_Female_NotHispanicOrLatino", - "Count_Person_8Years_Female_NotHispanicOrLatino", - "Count_Person_9Years_Female_NotHispanicOrLatino" - ] - }, "Count_Person_Male": { "age": [ "Count_Person_15To44Years_Male", 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 ef7c01b87b..d6dd74a440 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 @@ -772,12 +772,12 @@ "statVar": "Count_Death_IntentionalSelfHarm_AsFractionOf_Count_Person" }, "Count_Death_Upto1Years": { - "name": "Count of Mortality Event: Years Upto 1", + "name": "Count Of Mortality Event: Years Upto 1", "statVar": "Count_Death_Upto1Years" }, "Count_Death_Upto1Years_4486658077301201845": { "facetId": "4486658077301201845", - "name": "Count of Mortality Event: Years Upto 1", + "name": "Count Of Mortality Event: Years Upto 1", "statVar": "Count_Death_Upto1Years" }, "LifeExpectancy_Person": { @@ -853,12 +853,12 @@ "statVar": "Median_Age_Person_Male_WhiteAlone" }, "Median_Age_Person_Native": { - "name": "Median Age of Person: USC Native", + "name": "Median Age Of Person: USC Native", "statVar": "Median_Age_Person_Native" }, "Median_Age_Person_Native_5861401611713998024": { "facetId": "5861401611713998024", - "name": "Median Age of Person: USC Native", + "name": "Median Age Of Person: USC Native", "statVar": "Median_Age_Person_Native" }, "sdg/SH_DYN_IMRT.AGE--Y0__SEX--F_13678236933566447286": { diff --git a/server/integration_tests/test_data/e2e_date_range/populationincaliforniaafter2013/chart_config.json b/server/integration_tests/test_data/e2e_date_range/populationincaliforniaafter2013/chart_config.json index b7035eab31..0500c94842 100644 --- a/server/integration_tests/test_data/e2e_date_range/populationincaliforniaafter2013/chart_config.json +++ b/server/integration_tests/test_data/e2e_date_range/populationincaliforniaafter2013/chart_config.json @@ -1200,7 +1200,7 @@ "statVar": "Count_Person_45To54Years" }, "Count_Person_55To64Years_multiple_place_bar_block": { - "name": "Population: Years 55 To 64", + "name": "Population: 55 - 64 Years", "statVar": "Count_Person_55To64Years" }, "Count_Person_5OrMoreYears_AfricanLanguagesSpokenAtHome": { @@ -2123,18 +2123,21 @@ "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_NativeHawaiianOrOtherPacificIslanderAlone", - "Count_Person_NotHispanicOrLatino_AmericanIndianAndAlaskaNativeAloneOrInCombinationWithOneOrMoreOtherRaces", - "Count_Person_NotHispanicOrLatino_AmericanIndianOrAlaskaNativeAlone", + "Count_Person_NotHispanicOrLatino_BlackOrAfricanAmericanAlone", + "Count_Person_NotHispanicOrLatino_TwoOrMoreRaces" + ] + }, + "Count_Person_AsianAlone": { + "ethnicity": [ + "Count_Person_HispanicOrLatino_AsianAlone", "Count_Person_NotHispanicOrLatino_AsianAlone" ] }, diff --git a/server/integration_tests/test_data/e2e_date_range/povertyvsobesityincaliforniabefore2020/chart_config.json b/server/integration_tests/test_data/e2e_date_range/povertyvsobesityincaliforniabefore2020/chart_config.json index d3e4b19d73..5d0559efbd 100644 --- a/server/integration_tests/test_data/e2e_date_range/povertyvsobesityincaliforniabefore2020/chart_config.json +++ b/server/integration_tests/test_data/e2e_date_range/povertyvsobesityincaliforniabefore2020/chart_config.json @@ -14,16 +14,16 @@ }, "statVarKey": [ "Count_Person_BelowPovertyLevelInThePast12Months_scatter_2019", - "Percent_Person_Obesity_scatter_2018" + "dc/4lvmzr1h1ylk1_scatter_2019" ], - "title": "Population Below Poverty Line (${yDate}) Vs. Prevalence of Obesity (${xDate}) in Counties of California", + "title": "Population Below Poverty Line (${yDate}) Vs. Percent of Person: Years 20 Onwards, Female, Obesity (${xDate}) in Counties of California", "type": "SCATTER" } ] } ], "denom": "Count_Person", - "title": "Population Below poverty line vs. Prevalence of Obesity" + "title": "Population Below poverty line vs. Percent Of Person: Years 20 Onwards, Female, Obesity" }, { "columns": [ @@ -62,9 +62,9 @@ "tiles": [ { "statVarKey": [ - "Percent_Person_Obesity_2018" + "dc/4lvmzr1h1ylk1_2019" ], - "title": "Prevalence of Obesity in Counties of California (${date})", + "title": "Percent of Person: Years 20 Onwards, Female, Obesity in Counties of California (${date})", "type": "MAP" } ] @@ -77,15 +77,15 @@ "showHighestLowest": true }, "statVarKey": [ - "Percent_Person_Obesity_2018" + "dc/4lvmzr1h1ylk1_2019" ], - "title": "Prevalence of Obesity in Counties of California (${date})", + "title": "Percent of Person: Years 20 Onwards, Female, Obesity in Counties of California (${date})", "type": "RANKING" } ] } ], - "title": "Prevalence of Obesity in Counties of California" + "title": "Percent of Person: Years 20 Onwards, Female, Obesity in Counties of California" }, { "columns": [ @@ -97,15 +97,15 @@ }, "statVarKey": [ "Count_Person_BelowPovertyLevelInThePast12Months_AsFractionOf_Count_Person_scatter_2000", - "Percent_Person_Obesity_scatter_2018" + "dc/4lvmzr1h1ylk1_scatter_2019" ], - "title": "Population Below Poverty Line (Per Capita) (${yDate}) Vs. Prevalence of Obesity (${xDate}) in Counties of California", + "title": "Population Below Poverty Line (Per Capita) (${yDate}) Vs. Percent of Person: Years 20 Onwards, Female, Obesity (${xDate}) in Counties of California", "type": "SCATTER" } ] } ], - "title": "Population Below poverty line (Per Capita) vs. Prevalence of Obesity" + "title": "Population Below poverty line (Per Capita) vs. Percent Of Person: Years 20 Onwards, Female, Obesity" }, { "columns": [ @@ -148,16 +148,16 @@ }, "statVarKey": [ "Count_Person_Female_BelowPovertyLevelInThePast12Months_scatter_2019", - "Percent_Person_Obesity_scatter_2018" + "dc/4lvmzr1h1ylk1_scatter_2019" ], - "title": "Women Below Poverty Line (${yDate}) Vs. Prevalence of Obesity (${xDate}) in Counties of California", + "title": "Women Below Poverty Line (${yDate}) Vs. Percent of Person: Years 20 Onwards, Female, Obesity (${xDate}) in Counties of California", "type": "SCATTER" } ] } ], "denom": "Count_Person", - "title": "Women below Poverty Line vs. Prevalence of Obesity" + "title": "Women below Poverty Line vs. Percent Of Person: Years 20 Onwards, Female, Obesity" }, { "columns": [ @@ -200,16 +200,16 @@ }, "statVarKey": [ "Count_Person_Male_BelowPovertyLevelInThePast12Months_scatter_2019", - "Percent_Person_Obesity_scatter_2018" + "dc/4lvmzr1h1ylk1_scatter_2019" ], - "title": "Males in Poverty (In Last Year) (${yDate}) Vs. Prevalence of Obesity (${xDate}) in Counties of California", + "title": "Males in Poverty (In Last Year) (${yDate}) Vs. Percent of Person: Years 20 Onwards, Female, Obesity (${xDate}) in Counties of California", "type": "SCATTER" } ] } ], "denom": "Count_Person", - "title": "Males in Poverty (in last year) vs. Prevalence of Obesity" + "title": "Males in Poverty (in last year) vs. Percent Of Person: Years 20 Onwards, Female, Obesity" }, { "columns": [ @@ -242,120 +242,6 @@ ], "title": "Males in Poverty (In Last Year) in Counties of California" }, - { - "columns": [ - { - "tiles": [ - { - "scatterTileSpec": { - "highlightTopRight": true - }, - "statVarKey": [ - "Count_Person_BelowPovertyLevelInThePast12Months_scatter_2019", - "dc/4lvmzr1h1ylk1_scatter_2019" - ], - "title": "Population Below Poverty Line (${yDate}) Vs. Percent of Person: Years 20 Onwards, Female, Obesity (${xDate}) in Counties of California", - "type": "SCATTER" - } - ] - } - ], - "denom": "Count_Person", - "title": "Population Below poverty line vs. Percent of Person: Years 20 Onwards, Female, Obesity" - }, - { - "columns": [ - { - "tiles": [ - { - "statVarKey": [ - "dc/4lvmzr1h1ylk1_2019" - ], - "title": "Percent of Person: Years 20 Onwards, Female, Obesity in Counties of California (${date})", - "type": "MAP" - } - ] - }, - { - "tiles": [ - { - "rankingTileSpec": { - "rankingCount": 5, - "showHighestLowest": true - }, - "statVarKey": [ - "dc/4lvmzr1h1ylk1_2019" - ], - "title": "Percent of Person: Years 20 Onwards, Female, Obesity in Counties of California (${date})", - "type": "RANKING" - } - ] - } - ], - "title": "Percent of Person: Years 20 Onwards, Female, Obesity in Counties of California" - }, - { - "columns": [ - { - "tiles": [ - { - "scatterTileSpec": { - "highlightTopRight": true - }, - "statVarKey": [ - "Count_Person_BelowPovertyLevelInThePast12Months_AsFractionOf_Count_Person_scatter_2000", - "dc/4lvmzr1h1ylk1_scatter_2019" - ], - "title": "Population Below Poverty Line (Per Capita) (${yDate}) Vs. Percent of Person: Years 20 Onwards, Female, Obesity (${xDate}) in Counties of California", - "type": "SCATTER" - } - ] - } - ], - "title": "Population Below poverty line (Per Capita) vs. Percent of Person: Years 20 Onwards, Female, Obesity" - }, - { - "columns": [ - { - "tiles": [ - { - "scatterTileSpec": { - "highlightTopRight": true - }, - "statVarKey": [ - "Count_Person_Female_BelowPovertyLevelInThePast12Months_scatter_2019", - "dc/4lvmzr1h1ylk1_scatter_2019" - ], - "title": "Women Below Poverty Line (${yDate}) Vs. Percent of Person: Years 20 Onwards, Female, Obesity (${xDate}) in Counties of California", - "type": "SCATTER" - } - ] - } - ], - "denom": "Count_Person", - "title": "Women below Poverty Line vs. Percent of Person: Years 20 Onwards, Female, Obesity" - }, - { - "columns": [ - { - "tiles": [ - { - "scatterTileSpec": { - "highlightTopRight": true - }, - "statVarKey": [ - "Count_Person_Male_BelowPovertyLevelInThePast12Months_scatter_2019", - "dc/4lvmzr1h1ylk1_scatter_2019" - ], - "title": "Males in Poverty (In Last Year) (${yDate}) Vs. Percent of Person: Years 20 Onwards, Female, Obesity (${xDate}) in Counties of California", - "type": "SCATTER" - } - ] - } - ], - "denom": "Count_Person", - "title": "Males in Poverty (in last year) vs. Percent of Person: Years 20 Onwards, Female, Obesity" - }, { "columns": [ { @@ -375,7 +261,7 @@ } ], "denom": "Count_Person", - "title": "Population Below poverty line vs. Percent of Person: Years 20 Onwards, Male, Obesity" + "title": "Population Below poverty line vs. Percent Of Person: Years 20 Onwards, Male, Obesity" }, { "columns": [ @@ -428,7 +314,7 @@ } ], "denom": "Count_Person", - "title": "Population Below poverty line (Per Capita) vs. Percent of Person: Years 20 Onwards, Male, Obesity" + "title": "Population Below poverty line (Per Capita) vs. Percent Of Person: Years 20 Onwards, Male, Obesity" }, { "columns": [ @@ -449,7 +335,7 @@ } ], "denom": "Count_Person", - "title": "Women below Poverty Line vs. Percent of Person: Years 20 Onwards, Male, Obesity" + "title": "Women below Poverty Line vs. Percent Of Person: Years 20 Onwards, Male, Obesity" }, { "columns": [ @@ -470,7 +356,7 @@ } ], "denom": "Count_Person", - "title": "Males in Poverty (in last year) vs. Percent of Person: Years 20 Onwards, Male, Obesity" + "title": "Males in Poverty (in last year) vs. Percent Of Person: Years 20 Onwards, Male, Obesity" } ], "statVarSpec": { @@ -515,38 +401,25 @@ "name": "Males in Poverty (in last year)", "statVar": "Count_Person_Male_BelowPovertyLevelInThePast12Months" }, - "Percent_Person_Obesity_2018": { - "date": "2018", - "name": "Prevalence of Obesity", - "statVar": "Percent_Person_Obesity", - "unit": "%" - }, - "Percent_Person_Obesity_scatter_2018": { - "date": "2018", - "name": "Prevalence of Obesity", - "noPerCapita": true, - "statVar": "Percent_Person_Obesity", - "unit": "%" - }, "dc/4lvmzr1h1ylk1_2019": { "date": "2019", - "name": "Percent of Person: Years 20 Onwards, Female, Obesity", + "name": "Percent Of Person: Years 20 Onwards, Female, Obesity", "statVar": "dc/4lvmzr1h1ylk1" }, "dc/4lvmzr1h1ylk1_scatter_2019": { "date": "2019", - "name": "Percent of Person: Years 20 Onwards, Female, Obesity", + "name": "Percent Of Person: Years 20 Onwards, Female, Obesity", "noPerCapita": true, "statVar": "dc/4lvmzr1h1ylk1" }, "dc/x13tvt8jsgrm4_2019": { "date": "2019", - "name": "Percent of Person: Years 20 Onwards, Male, Obesity", + "name": "Percent Of Person: Years 20 Onwards, Male, Obesity", "statVar": "dc/x13tvt8jsgrm4" }, "dc/x13tvt8jsgrm4_scatter_2019": { "date": "2019", - "name": "Percent of Person: Years 20 Onwards, Male, Obesity", + "name": "Percent Of Person: Years 20 Onwards, Male, Obesity", "statVar": "dc/x13tvt8jsgrm4" } } @@ -966,7 +839,8 @@ "Count_Person_60To74Years_BelowPovertyLevelInThePast12Months", "Count_Person_6To11Years_BelowPovertyLevelInThePast12Months", "Count_Person_75To84Years_BelowPovertyLevelInThePast12Months", - "Count_Person_85OrMoreYears_BelowPovertyLevelInThePast12Months" + "Count_Person_85OrMoreYears_BelowPovertyLevelInThePast12Months", + "Count_Person_Upto6Years_BelowPovertyLevelInThePast12Months" ], "gender": [ "Count_Person_Female_BelowPovertyLevelInThePast12Months", @@ -1015,13 +889,6 @@ "types": [ "Topic" ] - }, - { - "dcid": "dc/topic/HealthBehavior", - "name": "Health Behavior", - "types": [ - "Topic" - ] } ], "parentPlaces": [], @@ -1032,13 +899,6 @@ "types": [ "Topic" ] - }, - { - "dcid": "dc/topic/PreventativeHealthAndBehavior", - "name": "Preventive Health and Behavior", - "types": [ - "Topic" - ] } ], "peerPlaces": [ @@ -1435,13 +1295,6 @@ "types": [ "Topic" ] - }, - { - "dcid": "dc/topic/PreventativeHealth", - "name": "Preventive Health", - "types": [ - "Topic" - ] } ] }, diff --git a/server/integration_tests/test_data/e2e_edge_cases/emissionsinhouston/chart_config.json b/server/integration_tests/test_data/e2e_edge_cases/emissionsinhouston/chart_config.json index 71172bd592..c8ed13b6ce 100644 --- a/server/integration_tests/test_data/e2e_edge_cases/emissionsinhouston/chart_config.json +++ b/server/integration_tests/test_data/e2e_edge_cases/emissionsinhouston/chart_config.json @@ -564,7 +564,7 @@ "statVar": "Annual_Emissions_GreenhouseGas_NonBiogenic" }, "Annual_Emissions_Hydrofluorocarbon_NonBiogenic": { - "name": "Annual Amount of Emissions: Non Biogenic Emission Source, Hydrofluorocarbon", + "name": "Annual Amount Of Emissions: Non Biogenic Emission Source, Hydrofluorocarbon", "statVar": "Annual_Emissions_Hydrofluorocarbon_NonBiogenic" }, "Annual_Emissions_Methane_NonBiogenic": { @@ -572,7 +572,7 @@ "statVar": "Annual_Emissions_Methane_NonBiogenic" }, "Annual_Emissions_NitrogenTrifluoride_NonBiogenic": { - "name": "Annual Amount of Emissions: Non Biogenic Emission Source, Nitrogen Trifluoride", + "name": "Annual Amount Of Emissions: Non Biogenic Emission Source, Nitrogen Trifluoride", "statVar": "Annual_Emissions_NitrogenTrifluoride_NonBiogenic" }, "Annual_Emissions_NitrousOxide_NonBiogenic": { @@ -580,15 +580,15 @@ "statVar": "Annual_Emissions_NitrousOxide_NonBiogenic" }, "Annual_Emissions_Perfluorocarbon_NonBiogenic": { - "name": "Annual Amount of Emissions: Non Biogenic Emission Source, Perfluorocarbon", + "name": "Annual Amount Of Emissions: Non Biogenic Emission Source, Perfluorocarbon", "statVar": "Annual_Emissions_Perfluorocarbon_NonBiogenic" }, "Annual_Emissions_SulfurHexafluoride_NonBiogenic": { - "name": "Annual Amount of Emissions: Non Biogenic Emission Source, Sulfur Hexafluoride", + "name": "Annual Amount Of Emissions: Non Biogenic Emission Source, Sulfur Hexafluoride", "statVar": "Annual_Emissions_SulfurHexafluoride_NonBiogenic" }, "Annual_Emissions_SulfurHexafluoride_NonBiogenic_multiple_place_bar_block": { - "name": "Annual Amount of Emissions: Non Biogenic Emission Source, Sulfur Hexafluoride", + "name": "Annual Amount Of Emissions: Non Biogenic Emission Source, Sulfur Hexafluoride", "statVar": "Annual_Emissions_SulfurHexafluoride_NonBiogenic" } } diff --git a/server/integration_tests/test_data/e2e_edge_cases/povertyincaliforniaandcalifornia/chart_config.json b/server/integration_tests/test_data/e2e_edge_cases/povertyincaliforniaandcalifornia/chart_config.json index 0cc83c9e9a..2cdc80b086 100644 --- a/server/integration_tests/test_data/e2e_edge_cases/povertyincaliforniaandcalifornia/chart_config.json +++ b/server/integration_tests/test_data/e2e_edge_cases/povertyincaliforniaandcalifornia/chart_config.json @@ -914,23 +914,23 @@ "statVar": "Count_Household_FamilyHousehold_BelowPovertyLevelInThePast12Months" }, "Count_Household_FamilyHousehold_With0Worker_BelowPovertyLevelInThePast12Months": { - "name": "Count of Household: Family Household, Worker 0, Below Poverty Level In The Past 12 Months", + "name": "Count Of Household: Family Household, Worker 0, Below Poverty Level In The Past 12 Months", "statVar": "Count_Household_FamilyHousehold_With0Worker_BelowPovertyLevelInThePast12Months" }, "Count_Household_FamilyHousehold_With1Worker_BelowPovertyLevelInThePast12Months": { - "name": "Count of Household: Family Household, Worker 1, Below Poverty Level In The Past 12 Months", + "name": "Count Of Household: Family Household, Worker 1, Below Poverty Level In The Past 12 Months", "statVar": "Count_Household_FamilyHousehold_With1Worker_BelowPovertyLevelInThePast12Months" }, "Count_Household_FamilyHousehold_With2Worker_BelowPovertyLevelInThePast12Months": { - "name": "Count of Household: Family Household, Worker 2, Below Poverty Level In The Past 12 Months", + "name": "Count Of Household: Family Household, Worker 2, Below Poverty Level In The Past 12 Months", "statVar": "Count_Household_FamilyHousehold_With2Worker_BelowPovertyLevelInThePast12Months" }, "Count_Household_FamilyHousehold_With3OrMoreWorker_BelowPovertyLevelInThePast12Months": { - "name": "Count of Household: Family Household, Worker 3 Onwards, Below Poverty Level In The Past 12 Months", + "name": "Count Of Household: Family Household, Worker 3 Onwards, Below Poverty Level In The Past 12 Months", "statVar": "Count_Household_FamilyHousehold_With3OrMoreWorker_BelowPovertyLevelInThePast12Months" }, "Count_Household_HouseholderAge65OrMoreYears_FamilyHousehold_BelowPovertyLevelInThePast12Months": { - "name": "Count of Household: Family Household, Years 65 Onwards, Below Poverty Level In The Past 12 Months", + "name": "Count Of Household: Family Household, Years 65 Onwards, Below Poverty Level In The Past 12 Months", "statVar": "Count_Household_HouseholderAge65OrMoreYears_FamilyHousehold_BelowPovertyLevelInThePast12Months" }, "Count_Household_MarriedCoupleFamilyHousehold_BelowPovertyLevelInThePast12Months": { diff --git a/server/integration_tests/test_data/e2e_edge_cases2/californiacountieswiththebiggestincreaseinincomelevels/chart_config.json b/server/integration_tests/test_data/e2e_edge_cases2/californiacountieswiththebiggestincreaseinincomelevels/chart_config.json index 5627c625bb..f3a2e0e4cd 100644 --- a/server/integration_tests/test_data/e2e_edge_cases2/californiacountieswiththebiggestincreaseinincomelevels/chart_config.json +++ b/server/integration_tests/test_data/e2e_edge_cases2/californiacountieswiththebiggestincreaseinincomelevels/chart_config.json @@ -4290,15 +4290,15 @@ { "comparisonPlaces": [ "geoId/06019", - "geoId/06107", "geoId/06021", "geoId/06025", - "geoId/06029", - "geoId/06077", + "geoId/06107", "geoId/06083", - "geoId/06111", + "geoId/06077", "geoId/06011", - "geoId/06099" + "geoId/06111", + "geoId/06099", + "geoId/06029" ], "statVarKey": [ "Income_Farm10" @@ -4329,11 +4329,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/06107", + "placeDcidOverride": "geoId/06021", "statVarKey": [ "Income_Farm_growth_abs" ], - "title": "Tulare County", + "title": "Glenn County", "type": "LINE" } ] @@ -4341,11 +4341,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/06021", + "placeDcidOverride": "geoId/06025", "statVarKey": [ "Income_Farm_growth_abs" ], - "title": "Glenn County", + "title": "Imperial County", "type": "LINE" } ] @@ -4353,11 +4353,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/06025", + "placeDcidOverride": "geoId/06107", "statVarKey": [ "Income_Farm_growth_abs" ], - "title": "Imperial County", + "title": "Tulare County", "type": "LINE" } ] @@ -4365,11 +4365,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/06029", + "placeDcidOverride": "geoId/06083", "statVarKey": [ "Income_Farm_growth_abs" ], - "title": "Kern County", + "title": "Santa Barbara County", "type": "LINE" } ] @@ -4389,11 +4389,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/06083", + "placeDcidOverride": "geoId/06011", "statVarKey": [ "Income_Farm_growth_abs" ], - "title": "Santa Barbara County", + "title": "Colusa County", "type": "LINE" } ] @@ -4413,11 +4413,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/06011", + "placeDcidOverride": "geoId/06099", "statVarKey": [ "Income_Farm_growth_abs" ], - "title": "Colusa County", + "title": "Stanislaus County", "type": "LINE" } ] @@ -4425,11 +4425,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/06099", + "placeDcidOverride": "geoId/06029", "statVarKey": [ "Income_Farm_growth_abs" ], - "title": "Stanislaus County", + "title": "Kern County", "type": "LINE" } ] @@ -4443,11 +4443,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/06085", + "placeDcidOverride": "geoId/06091", "statVarKey": [ "Income_Farm_growth_pct" ], - "title": "Santa Clara County", + "title": "Sierra County", "type": "LINE" } ] @@ -4455,11 +4455,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/06055", + "placeDcidOverride": "geoId/06105", "statVarKey": [ "Income_Farm_growth_pct" ], - "title": "Napa County", + "title": "Trinity County", "type": "LINE" } ] @@ -4467,11 +4467,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/06001", + "placeDcidOverride": "geoId/06081", "statVarKey": [ "Income_Farm_growth_pct" ], - "title": "Alameda County", + "title": "San Mateo County", "type": "LINE" } ] @@ -4479,11 +4479,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/06083", + "placeDcidOverride": "geoId/06009", "statVarKey": [ "Income_Farm_growth_pct" ], - "title": "Santa Barbara County", + "title": "Calaveras County", "type": "LINE" } ] @@ -4491,11 +4491,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/06059", + "placeDcidOverride": "geoId/06055", "statVarKey": [ "Income_Farm_growth_pct" ], - "title": "Orange County", + "title": "Napa County", "type": "LINE" } ] @@ -4503,11 +4503,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/06037", + "placeDcidOverride": "geoId/06027", "statVarKey": [ "Income_Farm_growth_pct" ], - "title": "Los Angeles County", + "title": "Inyo County", "type": "LINE" } ] @@ -4515,11 +4515,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/06081", + "placeDcidOverride": "geoId/06051", "statVarKey": [ "Income_Farm_growth_pct" ], - "title": "San Mateo County", + "title": "Mono County", "type": "LINE" } ] @@ -4527,11 +4527,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/06009", + "placeDcidOverride": "geoId/06049", "statVarKey": [ "Income_Farm_growth_pct" ], - "title": "Calaveras County", + "title": "Modoc County", "type": "LINE" } ] @@ -4551,11 +4551,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/06097", + "placeDcidOverride": "geoId/06025", "statVarKey": [ "Income_Farm_growth_pct" ], - "title": "Sonoma County", + "title": "Imperial County", "type": "LINE" } ] @@ -4641,11 +4641,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/06039", + "placeDcidOverride": "geoId/06091", "statVarKey": [ "Income_Farm_growth_pc" ], - "title": "Madera County", + "title": "Sierra County", "type": "LINE" } ] @@ -4665,11 +4665,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/06091", + "placeDcidOverride": "geoId/06039", "statVarKey": [ "Income_Farm_growth_pc" ], - "title": "Sierra County", + "title": "Madera County", "type": "LINE" } ] @@ -4677,11 +4677,11 @@ { "tiles": [ { - "placeDcidOverride": "geoId/06031", + "placeDcidOverride": "geoId/06113", "statVarKey": [ "Income_Farm_growth_pc" ], - "title": "Kings County", + "title": "Yolo County", "type": "LINE" } ] @@ -4869,15 +4869,15 @@ "statVar": "Median_Income_Person_15OrMoreYears_Male_WithIncome" }, "Median_Income_Person_18OrMoreYears_Civilian_WithIncome10": { - "name": "Median Income of Person: Years 18 Onwards, Civilian, With Income", + "name": "Median Income Of Person: Years 18 Onwards, Civilian, With Income", "statVar": "Median_Income_Person_18OrMoreYears_Civilian_WithIncome" }, "Median_Income_Person_18OrMoreYears_Civilian_WithIncome_growth_abs": { - "name": "Median Income of Person: Years 18 Onwards, Civilian, With Income", + "name": "Median Income Of Person: Years 18 Onwards, Civilian, With Income", "statVar": "Median_Income_Person_18OrMoreYears_Civilian_WithIncome" }, "Median_Income_Person_18OrMoreYears_Civilian_WithIncome_growth_pct": { - "name": "Median Income of Person: Years 18 Onwards, Civilian, With Income", + "name": "Median Income Of Person: Years 18 Onwards, Civilian, With Income", "statVar": "Median_Income_Person_18OrMoreYears_Civilian_WithIncome" }, "Median_Income_Person_growth_abs": { diff --git a/server/integration_tests/test_data/e2e_edge_cases2/whatcrimesareconsideredfeloniesvs.misdemeanorsintheus/chart_config.json b/server/integration_tests/test_data/e2e_edge_cases2/whatcrimesareconsideredfeloniesvs.misdemeanorsintheus/chart_config.json index f857f632dc..7683770c9b 100644 --- a/server/integration_tests/test_data/e2e_edge_cases2/whatcrimesareconsideredfeloniesvs.misdemeanorsintheus/chart_config.json +++ b/server/integration_tests/test_data/e2e_edge_cases2/whatcrimesareconsideredfeloniesvs.misdemeanorsintheus/chart_config.json @@ -23,7 +23,7 @@ } ], "denom": "Count_Person", - "title": "Criminal Activities vs. Count of Incarceration Event (Measured Based On Jurisdiction): Admitted To Prison, Incarcerated, Years 2 Onwards, Sentenced" + "title": "Criminal Activities vs. Count Of Incarceration Event (Measured Based On Jurisdiction): Admitted To Prison, Incarcerated, Years 2 Onwards, Sentenced" }, { "columns": [ @@ -108,7 +108,7 @@ } ], "denom": "Count_Person", - "title": "Aggravated Assault Cases vs. Count of Incarceration Event (Measured Based On Jurisdiction): Admitted To Prison, Male, Incarcerated, Years 2 Onwards, Sentenced" + "title": "Aggravated Assault Cases vs. Count Of Incarceration Event (Measured Based On Jurisdiction): Admitted To Prison, Male, Incarcerated, Years 2 Onwards, Sentenced" }, { "columns": [ @@ -193,7 +193,7 @@ } ], "denom": "Count_Person", - "title": "Criminal Activities vs. Count of Incarceration Event (Measured Based On Jurisdiction): Admitted To Prison, Female, Incarcerated, Years 2 Onwards, Sentenced" + "title": "Criminal Activities vs. Count Of Incarceration Event (Measured Based On Jurisdiction): Admitted To Prison, Female, Incarcerated, Years 2 Onwards, Sentenced" }, { "columns": [ @@ -246,7 +246,7 @@ } ], "denom": "Count_Person", - "title": "Criminal Activities vs. Count of Incarceration Event (Measured Based On Jurisdiction): Admitted To Prison, Male, Incarcerated, Years 2 Onwards, Sentenced" + "title": "Criminal Activities vs. Count Of Incarceration Event (Measured Based On Jurisdiction): Admitted To Prison, Male, Incarcerated, Years 2 Onwards, Sentenced" }, { "columns": [ @@ -267,7 +267,7 @@ } ], "denom": "Count_Person", - "title": "Aggravated Assault Cases vs. Count of Incarceration Event (Measured Based On Jurisdiction): Admitted To Prison, Incarcerated, Years 2 Onwards, Sentenced" + "title": "Aggravated Assault Cases vs. Count Of Incarceration Event (Measured Based On Jurisdiction): Admitted To Prison, Incarcerated, Years 2 Onwards, Sentenced" }, { "columns": [ @@ -288,7 +288,7 @@ } ], "denom": "Count_Person", - "title": "Aggravated Assault Cases vs. Count of Incarceration Event (Measured Based On Jurisdiction): Admitted To Prison, Female, Incarcerated, Years 2 Onwards, Sentenced" + "title": "Aggravated Assault Cases vs. Count Of Incarceration Event (Measured Based On Jurisdiction): Admitted To Prison, Female, Incarcerated, Years 2 Onwards, Sentenced" } ], "statVarSpec": { @@ -309,27 +309,27 @@ "statVar": "Count_CriminalActivities_CombinedCrime" }, "dc/36d93ckypx3bb": { - "name": "Count of Incarceration Event (Measured Based On Jurisdiction): Admitted To Prison, Female, Incarcerated, Years 2 Onwards, Sentenced", + "name": "Count Of Incarceration Event (Measured Based On Jurisdiction): Admitted To Prison, Female, Incarcerated, Years 2 Onwards, Sentenced", "statVar": "dc/36d93ckypx3bb" }, "dc/36d93ckypx3bb_scatter": { - "name": "Count of Incarceration Event (Measured Based On Jurisdiction): Admitted To Prison, Female, Incarcerated, Years 2 Onwards, Sentenced", + "name": "Count Of Incarceration Event (Measured Based On Jurisdiction): Admitted To Prison, Female, Incarcerated, Years 2 Onwards, Sentenced", "statVar": "dc/36d93ckypx3bb" }, "dc/62pg70d2beyh9": { - "name": "Count of Incarceration Event (Measured Based On Jurisdiction): Admitted To Prison, Incarcerated, Years 2 Onwards, Sentenced", + "name": "Count Of Incarceration Event (Measured Based On Jurisdiction): Admitted To Prison, Incarcerated, Years 2 Onwards, Sentenced", "statVar": "dc/62pg70d2beyh9" }, "dc/62pg70d2beyh9_scatter": { - "name": "Count of Incarceration Event (Measured Based On Jurisdiction): Admitted To Prison, Incarcerated, Years 2 Onwards, Sentenced", + "name": "Count Of Incarceration Event (Measured Based On Jurisdiction): Admitted To Prison, Incarcerated, Years 2 Onwards, Sentenced", "statVar": "dc/62pg70d2beyh9" }, "dc/ttms13r578hq9": { - "name": "Count of Incarceration Event (Measured Based On Jurisdiction): Admitted To Prison, Male, Incarcerated, Years 2 Onwards, Sentenced", + "name": "Count Of Incarceration Event (Measured Based On Jurisdiction): Admitted To Prison, Male, Incarcerated, Years 2 Onwards, Sentenced", "statVar": "dc/ttms13r578hq9" }, "dc/ttms13r578hq9_scatter": { - "name": "Count of Incarceration Event (Measured Based On Jurisdiction): Admitted To Prison, Male, Incarcerated, Years 2 Onwards, Sentenced", + "name": "Count Of Incarceration Event (Measured Based On Jurisdiction): Admitted To Prison, Male, Incarcerated, Years 2 Onwards, Sentenced", "statVar": "dc/ttms13r578hq9" } } diff --git a/server/integration_tests/test_data/e2e_edge_cases2/whatistherelationshipbetweenhousingsizeandhomepricesincalifornia/chart_config.json b/server/integration_tests/test_data/e2e_edge_cases2/whatistherelationshipbetweenhousingsizeandhomepricesincalifornia/chart_config.json index 5fff8f5557..444cc747a4 100644 --- a/server/integration_tests/test_data/e2e_edge_cases2/whatistherelationshipbetweenhousingsizeandhomepricesincalifornia/chart_config.json +++ b/server/integration_tests/test_data/e2e_edge_cases2/whatistherelationshipbetweenhousingsizeandhomepricesincalifornia/chart_config.json @@ -23,7 +23,7 @@ } ], "denom": "Count_Person", - "title": "Housing Units vs. Count of Housing Unit: US Dollar Upto 49999, Occupied Housing Unit, Owner Occupied" + "title": "Housing Units vs. Count Of Housing Unit: US Dollar Upto 49999, Occupied Housing Unit, Owner Occupied" }, { "columns": [ @@ -108,7 +108,7 @@ } ], "denom": "Count_Person", - "title": "Owner-Occupied Homes vs. Count of Housing Unit: US Dollar 50000 To 99999, Occupied Housing Unit, Owner Occupied" + "title": "Owner-Occupied Homes vs. Count Of Housing Unit: US Dollar 50000 To 99999, Occupied Housing Unit, Owner Occupied" }, { "columns": [ @@ -193,7 +193,7 @@ } ], "denom": "Count_Person", - "title": "Vacant Housing Units vs. Count of Housing Unit: US Dollar 100000 To 199999, Occupied Housing Unit, Owner Occupied" + "title": "Vacant Housing Units vs. Count Of Housing Unit: US Dollar 100000 To 199999, Occupied Housing Unit, Owner Occupied" }, { "columns": [ @@ -278,7 +278,7 @@ } ], "denom": "Count_Person", - "title": "Median Home Value of Housing Unit: Occupied Housing Unit, Owner Occupied vs. Count of Housing Unit: US Dollar 200000 To 299999, Occupied Housing Unit, Owner Occupied" + "title": "Median Home Value Of Housing Unit: Occupied Housing Unit, Owner Occupied vs. Count Of Housing Unit: US Dollar 200000 To 299999, Occupied Housing Unit, Owner Occupied" }, { "columns": [ @@ -361,7 +361,7 @@ } ], "denom": "Count_Person", - "title": "Housing Units vs. Count of Housing Unit: US Dollar 50000 To 99999, Occupied Housing Unit, Owner Occupied" + "title": "Housing Units vs. Count Of Housing Unit: US Dollar 50000 To 99999, Occupied Housing Unit, Owner Occupied" }, { "columns": [ @@ -382,7 +382,7 @@ } ], "denom": "Count_Person", - "title": "Housing Units vs. Count of Housing Unit: US Dollar 100000 To 199999, Occupied Housing Unit, Owner Occupied" + "title": "Housing Units vs. Count Of Housing Unit: US Dollar 100000 To 199999, Occupied Housing Unit, Owner Occupied" }, { "columns": [ @@ -403,7 +403,7 @@ } ], "denom": "Count_Person", - "title": "Housing Units vs. Count of Housing Unit: US Dollar 200000 To 299999, Occupied Housing Unit, Owner Occupied" + "title": "Housing Units vs. Count Of Housing Unit: US Dollar 200000 To 299999, Occupied Housing Unit, Owner Occupied" }, { "columns": [ @@ -424,7 +424,7 @@ } ], "denom": "Count_Person", - "title": "Owner-Occupied Homes vs. Count of Housing Unit: US Dollar Upto 49999, Occupied Housing Unit, Owner Occupied" + "title": "Owner-Occupied Homes vs. Count Of Housing Unit: US Dollar Upto 49999, Occupied Housing Unit, Owner Occupied" }, { "columns": [ @@ -445,7 +445,7 @@ } ], "denom": "Count_Person", - "title": "Owner-Occupied Homes vs. Count of Housing Unit: US Dollar 100000 To 199999, Occupied Housing Unit, Owner Occupied" + "title": "Owner-Occupied Homes vs. Count Of Housing Unit: US Dollar 100000 To 199999, Occupied Housing Unit, Owner Occupied" }, { "columns": [ @@ -466,7 +466,7 @@ } ], "denom": "Count_Person", - "title": "Owner-Occupied Homes vs. Count of Housing Unit: US Dollar 200000 To 299999, Occupied Housing Unit, Owner Occupied" + "title": "Owner-Occupied Homes vs. Count Of Housing Unit: US Dollar 200000 To 299999, Occupied Housing Unit, Owner Occupied" }, { "columns": [ @@ -487,7 +487,7 @@ } ], "denom": "Count_Person", - "title": "Vacant Housing Units vs. Count of Housing Unit: US Dollar Upto 49999, Occupied Housing Unit, Owner Occupied" + "title": "Vacant Housing Units vs. Count Of Housing Unit: US Dollar Upto 49999, Occupied Housing Unit, Owner Occupied" }, { "columns": [ @@ -508,7 +508,7 @@ } ], "denom": "Count_Person", - "title": "Vacant Housing Units vs. Count of Housing Unit: US Dollar 50000 To 99999, Occupied Housing Unit, Owner Occupied" + "title": "Vacant Housing Units vs. Count Of Housing Unit: US Dollar 50000 To 99999, Occupied Housing Unit, Owner Occupied" }, { "columns": [ @@ -529,7 +529,7 @@ } ], "denom": "Count_Person", - "title": "Vacant Housing Units vs. Count of Housing Unit: US Dollar 200000 To 299999, Occupied Housing Unit, Owner Occupied" + "title": "Vacant Housing Units vs. Count Of Housing Unit: US Dollar 200000 To 299999, Occupied Housing Unit, Owner Occupied" }, { "columns": [ @@ -550,7 +550,7 @@ } ], "denom": "Count_Person", - "title": "Median Home Value of Housing Unit: Occupied Housing Unit, Owner Occupied vs. Count of Housing Unit: US Dollar Upto 49999, Occupied Housing Unit, Owner Occupied" + "title": "Median Home Value Of Housing Unit: Occupied Housing Unit, Owner Occupied vs. Count Of Housing Unit: US Dollar Upto 49999, Occupied Housing Unit, Owner Occupied" }, { "columns": [ @@ -571,7 +571,7 @@ } ], "denom": "Count_Person", - "title": "Median Home Value of Housing Unit: Occupied Housing Unit, Owner Occupied vs. Count of Housing Unit: US Dollar 50000 To 99999, Occupied Housing Unit, Owner Occupied" + "title": "Median Home Value Of Housing Unit: Occupied Housing Unit, Owner Occupied vs. Count Of Housing Unit: US Dollar 50000 To 99999, Occupied Housing Unit, Owner Occupied" } ], "statVarSpec": { @@ -580,35 +580,35 @@ "statVar": "Count_HousingUnit" }, "Count_HousingUnit_HomeValue100000To199999USDollar": { - "name": "Count of Housing Unit: US Dollar 100000 To 199999, Occupied Housing Unit, Owner Occupied", + "name": "Count Of Housing Unit: US Dollar 100000 To 199999, Occupied Housing Unit, Owner Occupied", "statVar": "Count_HousingUnit_HomeValue100000To199999USDollar" }, "Count_HousingUnit_HomeValue100000To199999USDollar_scatter": { - "name": "Count of Housing Unit: US Dollar 100000 To 199999, Occupied Housing Unit, Owner Occupied", + "name": "Count Of Housing Unit: US Dollar 100000 To 199999, Occupied Housing Unit, Owner Occupied", "statVar": "Count_HousingUnit_HomeValue100000To199999USDollar" }, "Count_HousingUnit_HomeValue200000To299999USDollar": { - "name": "Count of Housing Unit: US Dollar 200000 To 299999, Occupied Housing Unit, Owner Occupied", + "name": "Count Of Housing Unit: US Dollar 200000 To 299999, Occupied Housing Unit, Owner Occupied", "statVar": "Count_HousingUnit_HomeValue200000To299999USDollar" }, "Count_HousingUnit_HomeValue200000To299999USDollar_scatter": { - "name": "Count of Housing Unit: US Dollar 200000 To 299999, Occupied Housing Unit, Owner Occupied", + "name": "Count Of Housing Unit: US Dollar 200000 To 299999, Occupied Housing Unit, Owner Occupied", "statVar": "Count_HousingUnit_HomeValue200000To299999USDollar" }, "Count_HousingUnit_HomeValue50000To99999USDollar": { - "name": "Count of Housing Unit: US Dollar 50000 To 99999, Occupied Housing Unit, Owner Occupied", + "name": "Count Of Housing Unit: US Dollar 50000 To 99999, Occupied Housing Unit, Owner Occupied", "statVar": "Count_HousingUnit_HomeValue50000To99999USDollar" }, "Count_HousingUnit_HomeValue50000To99999USDollar_scatter": { - "name": "Count of Housing Unit: US Dollar 50000 To 99999, Occupied Housing Unit, Owner Occupied", + "name": "Count Of Housing Unit: US Dollar 50000 To 99999, Occupied Housing Unit, Owner Occupied", "statVar": "Count_HousingUnit_HomeValue50000To99999USDollar" }, "Count_HousingUnit_HomeValueUpto49999USDollar": { - "name": "Count of Housing Unit: US Dollar Upto 49999, Occupied Housing Unit, Owner Occupied", + "name": "Count Of Housing Unit: US Dollar Upto 49999, Occupied Housing Unit, Owner Occupied", "statVar": "Count_HousingUnit_HomeValueUpto49999USDollar" }, "Count_HousingUnit_HomeValueUpto49999USDollar_scatter": { - "name": "Count of Housing Unit: US Dollar Upto 49999, Occupied Housing Unit, Owner Occupied", + "name": "Count Of Housing Unit: US Dollar Upto 49999, Occupied Housing Unit, Owner Occupied", "statVar": "Count_HousingUnit_HomeValueUpto49999USDollar" }, "Count_HousingUnit_OwnerOccupied": { @@ -632,11 +632,11 @@ "statVar": "Count_HousingUnit" }, "Median_HomeValue_HousingUnit_OccupiedHousingUnit_OwnerOccupied": { - "name": "Median Home Value of Housing Unit: Occupied Housing Unit, Owner Occupied", + "name": "Median Home Value Of Housing Unit: Occupied Housing Unit, Owner Occupied", "statVar": "Median_HomeValue_HousingUnit_OccupiedHousingUnit_OwnerOccupied" }, "Median_HomeValue_HousingUnit_OccupiedHousingUnit_OwnerOccupied_scatter": { - "name": "Median Home Value of Housing Unit: Occupied Housing Unit, Owner Occupied", + "name": "Median Home Value Of Housing Unit: Occupied Housing Unit, Owner Occupied", "noPerCapita": true, "statVar": "Median_HomeValue_HousingUnit_OccupiedHousingUnit_OwnerOccupied" } diff --git a/server/integration_tests/test_data/e2e_electrification_demo/howdotheseplacescomparewiththeusandgermany/chart_config.json b/server/integration_tests/test_data/e2e_electrification_demo/howdotheseplacescomparewiththeusandgermany/chart_config.json index 197f14df77..f0ef6010c9 100644 --- a/server/integration_tests/test_data/e2e_electrification_demo/howdotheseplacescomparewiththeusandgermany/chart_config.json +++ b/server/integration_tests/test_data/e2e_electrification_demo/howdotheseplacescomparewiththeusandgermany/chart_config.json @@ -18,8 +18,8 @@ "country/USA", "country/DEU", "country/MAR", - "country/ETH", "country/KEN", + "country/ETH", "country/GHA", "country/SEN", "country/MLI", @@ -55,8 +55,8 @@ "country/USA", "country/DEU", "country/MAR", - "country/ETH", "country/KEN", + "country/ETH", "country/GHA", "country/SEN", "country/MLI", @@ -91,8 +91,8 @@ "country/USA", "country/DEU", "country/MAR", - "country/ETH", "country/KEN", + "country/ETH", "country/GHA", "country/SEN", "country/MLI", @@ -126,8 +126,8 @@ "country/USA", "country/DEU", "country/MAR", - "country/ETH", "country/KEN", + "country/ETH", "country/GHA", "country/SEN", "country/MLI", @@ -179,7 +179,7 @@ } ], "footnote": "Includes data from the following sources: UNFCCC.", - "infoMessage": "Data for \"Morocco, Ethiopia, Kenya, Ghana, Senegal, Mali, Guinea, Benin, Rwanda and Somalia\" is currently unavailable. See the following statistics on the other places.", + "infoMessage": "Data for \"Morocco, Kenya, Ethiopia, Ghana, Senegal, Mali, Guinea, Benin, Rwanda and Somalia\" is currently unavailable. See the following statistics on the other places.", "title": "Total Greenhouse Gas Emissions Without LULUCF for Annex I Parties" }, { @@ -196,8 +196,8 @@ "country/USA", "country/DEU", "country/MAR", - "country/ETH", "country/KEN", + "country/ETH", "country/GHA", "country/SEN", "country/MLI", @@ -233,8 +233,8 @@ "country/USA", "country/DEU", "country/MAR", - "country/ETH", "country/KEN", + "country/ETH", "country/GHA", "country/SEN", "country/MLI", @@ -270,8 +270,8 @@ "country/USA", "country/DEU", "country/MAR", - "country/ETH", "country/KEN", + "country/ETH", "country/GHA", "country/SEN", "country/MLI", @@ -307,8 +307,8 @@ "country/USA", "country/DEU", "country/MAR", - "country/ETH", "country/KEN", + "country/ETH", "country/GHA", "country/SEN", "country/MLI", @@ -353,7 +353,7 @@ } ], "denom": "Count_Person", - "infoMessage": "Data for \"Germany, Morocco, Ethiopia, Kenya, Senegal, Mali, Guinea, Benin, Rwanda and Somalia\" is currently unavailable. See the following statistics on the other places.", + "infoMessage": "Data for \"Germany, Morocco, Kenya, Ethiopia, Senegal, Mali, Guinea, Benin, Rwanda and Somalia\" is currently unavailable. See the following statistics on the other places.", "title": "Annual Amount of Emissions: Oil and Gas Production, Greenhouse Gas" }, { @@ -370,8 +370,8 @@ "country/USA", "country/DEU", "country/MAR", - "country/ETH", "country/KEN", + "country/ETH", "country/GHA", "country/SEN", "country/MLI", @@ -407,8 +407,8 @@ "country/USA", "country/DEU", "country/MAR", - "country/ETH", "country/KEN", + "country/ETH", "country/GHA", "country/SEN", "country/MLI", @@ -443,8 +443,8 @@ "country/USA", "country/DEU", "country/MAR", - "country/ETH", "country/KEN", + "country/ETH", "country/GHA", "country/SEN", "country/MLI", @@ -479,8 +479,8 @@ "country/USA", "country/DEU", "country/MAR", - "country/ETH", "country/KEN", + "country/ETH", "country/GHA", "country/SEN" ], @@ -511,8 +511,8 @@ "country/USA", "country/DEU", "country/MAR", - "country/ETH", "country/KEN", + "country/ETH", "country/GHA", "country/SEN", "country/MLI", @@ -547,8 +547,8 @@ "country/USA", "country/DEU", "country/MAR", - "country/ETH", "country/KEN", + "country/ETH", "country/GHA", "country/SEN", "country/MLI", @@ -617,7 +617,7 @@ "statVar": "Annual_Emissions_GreenhouseGas_ElectricityGeneration" }, "Annual_Emissions_GreenhouseGas_FuelCombustionForRoadVehicles_multiple_place_bar_block": { - "name": "Annual Amount of Emissions: Fuel Combustion For Road Vehicles, Greenhouse Gas", + "name": "Annual Amount Of Emissions: Fuel Combustion For Road Vehicles, Greenhouse Gas", "statVar": "Annual_Emissions_GreenhouseGas_FuelCombustionForRoadVehicles" }, "Annual_Emissions_GreenhouseGas_Manufacturing_multiple_place_bar_block": { @@ -625,19 +625,19 @@ "statVar": "Annual_Emissions_GreenhouseGas_Manufacturing" }, "Annual_Emissions_GreenhouseGas_MaritimeShipping_multiple_place_bar_block": { - "name": "Annual Amount of Emissions: Maritime Shipping, Greenhouse Gas", + "name": "Annual Amount Of Emissions: Maritime Shipping, Greenhouse Gas", "statVar": "Annual_Emissions_GreenhouseGas_MaritimeShipping" }, "Annual_Emissions_GreenhouseGas_OilAndGasProduction_multiple_place_bar_block": { - "name": "Annual Amount of Emissions: Oil And Gas Production, Greenhouse Gas", + "name": "Annual Amount Of Emissions: Oil And Gas Production, Greenhouse Gas", "statVar": "Annual_Emissions_GreenhouseGas_OilAndGasProduction" }, "Annual_Emissions_GreenhouseGas_OilAndGas_multiple_place_bar_block": { - "name": "Annual Amount of Emissions: Oil And Gas, Greenhouse Gas", + "name": "Annual Amount Of Emissions: Oil And Gas, Greenhouse Gas", "statVar": "Annual_Emissions_GreenhouseGas_OilAndGas" }, "Annual_Emissions_GreenhouseGas_SolidWasteDisposal_multiple_place_bar_block": { - "name": "Annual Amount of Emissions: Solid Waste Disposal, Greenhouse Gas", + "name": "Annual Amount Of Emissions: Solid Waste Disposal, Greenhouse Gas", "statVar": "Annual_Emissions_GreenhouseGas_SolidWasteDisposal" }, "Annual_Emissions_GreenhouseGas_Transportation_multiple_place_bar_block": { @@ -649,7 +649,7 @@ "statVar": "Annual_Emissions_GreenhouseGas_WasteManagement" }, "Annual_Emissions_GreenhouseGas_WastewaterTreatmentAndDischarge_multiple_place_bar_block": { - "name": "Annual Amount of Emissions: Wastewater Treatment And Discharge, Greenhouse Gas", + "name": "Annual Amount Of Emissions: Wastewater Treatment And Discharge, Greenhouse Gas", "statVar": "Annual_Emissions_GreenhouseGas_WastewaterTreatmentAndDischarge" }, "Annual_Emissions_GreenhouseGas_multiple_place_bar_block": { @@ -701,13 +701,13 @@ "place_type": "Country" }, { - "dcid": "country/ETH", - "name": "Ethiopia", + "dcid": "country/KEN", + "name": "Kenya", "place_type": "Country" }, { - "dcid": "country/KEN", - "name": "Kenya", + "dcid": "country/ETH", + "name": "Ethiopia", "place_type": "Country" }, { diff --git a/server/integration_tests/test_data/e2e_electrification_demo/howhaspovertychangedovertimeinthesecountries/chart_config.json b/server/integration_tests/test_data/e2e_electrification_demo/howhaspovertychangedovertimeinthesecountries/chart_config.json index 8fa8a53203..c855656b0f 100644 --- a/server/integration_tests/test_data/e2e_electrification_demo/howhaspovertychangedovertimeinthesecountries/chart_config.json +++ b/server/integration_tests/test_data/e2e_electrification_demo/howhaspovertychangedovertimeinthesecountries/chart_config.json @@ -910,11 +910,11 @@ { "tiles": [ { - "placeDcidOverride": "country/SEN", + "placeDcidOverride": "country/KEN", "statVarKey": [ "GiniIndex_EconomicActivity_growth_pct" ], - "title": "Senegal", + "title": "Kenya", "type": "LINE" } ] @@ -922,11 +922,11 @@ { "tiles": [ { - "placeDcidOverride": "country/KEN", + "placeDcidOverride": "country/SEN", "statVarKey": [ "GiniIndex_EconomicActivity_growth_pct" ], - "title": "Kenya", + "title": "Senegal", "type": "LINE" } ] diff --git a/server/integration_tests/test_data/e2e_electrification_demo/howhasthegdpgrown/chart_config.json b/server/integration_tests/test_data/e2e_electrification_demo/howhasthegdpgrown/chart_config.json index 7090110d3d..501da228e0 100644 --- a/server/integration_tests/test_data/e2e_electrification_demo/howhasthegdpgrown/chart_config.json +++ b/server/integration_tests/test_data/e2e_electrification_demo/howhasthegdpgrown/chart_config.json @@ -11,8 +11,8 @@ { "comparisonPlaces": [ "country/MAR", - "country/ETH", "country/KEN", + "country/ETH", "country/GHA", "country/SEN", "country/MLI", @@ -51,11 +51,11 @@ { "tiles": [ { - "placeDcidOverride": "country/ETH", + "placeDcidOverride": "country/KEN", "statVarKey": [ "Amount_EconomicActivity_GrossDomesticProduction_Nominal_growth_abs" ], - "title": "Ethiopia", + "title": "Kenya", "type": "LINE" } ] @@ -63,11 +63,11 @@ { "tiles": [ { - "placeDcidOverride": "country/KEN", + "placeDcidOverride": "country/ETH", "statVarKey": [ "Amount_EconomicActivity_GrossDomesticProduction_Nominal_growth_abs" ], - "title": "Kenya", + "title": "Ethiopia", "type": "LINE" } ] @@ -214,11 +214,11 @@ { "tiles": [ { - "placeDcidOverride": "country/ETH", + "placeDcidOverride": "country/GHA", "statVarKey": [ "Amount_EconomicActivity_GrossDomesticProduction_Nominal_growth_pct" ], - "title": "Ethiopia", + "title": "Ghana", "type": "LINE" } ] @@ -238,11 +238,11 @@ { "tiles": [ { - "placeDcidOverride": "country/GHA", + "placeDcidOverride": "country/ETH", "statVarKey": [ "Amount_EconomicActivity_GrossDomesticProduction_Nominal_growth_pct" ], - "title": "Ghana", + "title": "Ethiopia", "type": "LINE" } ] @@ -377,11 +377,11 @@ { "tiles": [ { - "placeDcidOverride": "country/ETH", + "placeDcidOverride": "country/RWA", "statVarKey": [ "Amount_EconomicActivity_GrossDomesticProduction_Nominal_growth_pc" ], - "title": "Ethiopia", + "title": "Rwanda", "type": "LINE" } ] @@ -389,11 +389,11 @@ { "tiles": [ { - "placeDcidOverride": "country/RWA", + "placeDcidOverride": "country/ETH", "statVarKey": [ "Amount_EconomicActivity_GrossDomesticProduction_Nominal_growth_pc" ], - "title": "Rwanda", + "title": "Ethiopia", "type": "LINE" } ] @@ -460,13 +460,13 @@ "place_type": "Country" }, { - "dcid": "country/ETH", - "name": "Ethiopia", + "dcid": "country/KEN", + "name": "Kenya", "place_type": "Country" }, { - "dcid": "country/KEN", - "name": "Kenya", + "dcid": "country/ETH", + "name": "Ethiopia", "place_type": "Country" }, { diff --git a/server/integration_tests/test_data/e2e_electrification_demo/whatisthegreenhousegasemissionsfromtheseplaces/chart_config.json b/server/integration_tests/test_data/e2e_electrification_demo/whatisthegreenhousegasemissionsfromtheseplaces/chart_config.json index 692fb25f31..9c14a4efac 100644 --- a/server/integration_tests/test_data/e2e_electrification_demo/whatisthegreenhousegasemissionsfromtheseplaces/chart_config.json +++ b/server/integration_tests/test_data/e2e_electrification_demo/whatisthegreenhousegasemissionsfromtheseplaces/chart_config.json @@ -16,8 +16,8 @@ }, "comparisonPlaces": [ "country/MAR", - "country/ETH", "country/KEN", + "country/ETH", "country/GHA", "country/SEN", "country/MLI", @@ -51,8 +51,8 @@ }, "comparisonPlaces": [ "country/MAR", - "country/ETH", "country/KEN", + "country/ETH", "country/GHA", "country/SEN", "country/MLI", @@ -85,8 +85,8 @@ }, "comparisonPlaces": [ "country/MAR", - "country/ETH", "country/KEN", + "country/ETH", "country/GHA", "country/SEN", "country/MLI", @@ -118,8 +118,8 @@ }, "comparisonPlaces": [ "country/MAR", - "country/ETH", "country/KEN", + "country/ETH", "country/GHA", "country/SEN", "country/MLI", @@ -190,8 +190,8 @@ }, "comparisonPlaces": [ "country/MAR", - "country/ETH", "country/KEN", + "country/ETH", "country/GHA", "country/SEN", "country/MLI", @@ -235,8 +235,8 @@ }, "comparisonPlaces": [ "country/MAR", - "country/ETH", "country/KEN", + "country/ETH", "country/GHA", "country/SEN", "country/MLI", @@ -269,8 +269,8 @@ }, "comparisonPlaces": [ "country/MAR", - "country/ETH", "country/KEN", + "country/ETH", "country/GHA", "country/SEN", "country/MLI", @@ -303,8 +303,8 @@ }, "comparisonPlaces": [ "country/MAR", - "country/ETH", "country/KEN", + "country/ETH", "country/GHA", "country/SEN" ], @@ -333,8 +333,8 @@ }, "comparisonPlaces": [ "country/MAR", - "country/ETH", "country/KEN", + "country/ETH", "country/GHA", "country/SEN", "country/MLI", @@ -367,8 +367,8 @@ }, "comparisonPlaces": [ "country/MAR", - "country/ETH", "country/KEN", + "country/ETH", "country/GHA", "country/SEN", "country/MLI", @@ -401,8 +401,8 @@ }, "comparisonPlaces": [ "country/MAR", - "country/ETH", "country/KEN", + "country/ETH", "country/GHA", "country/SEN" ], @@ -431,8 +431,8 @@ }, "comparisonPlaces": [ "country/MAR", - "country/ETH", "country/KEN", + "country/ETH", "country/GHA", "country/SEN", "country/MLI", @@ -479,7 +479,7 @@ } ], "denom": "Count_Person", - "infoMessage": "Data for \"Ethiopia, Kenya, Mali, Guinea, Rwanda and Somalia\" is currently unavailable. See the following statistics on the other places.", + "infoMessage": "Data for \"Kenya, Ethiopia, Mali, Guinea, Rwanda and Somalia\" is currently unavailable. See the following statistics on the other places.", "title": "Annual Amount of Emissions: Oil and Gas Production, Carbon Dioxide" }, { @@ -526,8 +526,8 @@ "sort": "DESCENDING" }, "comparisonPlaces": [ - "country/ETH", - "country/KEN" + "country/KEN", + "country/ETH" ], "statVarKey": [ "Annual_Emissions_GreenhouseGas_PetrochemicalProduction_multiple_place_bar_block" @@ -553,7 +553,7 @@ "statVar": "Annual_Emissions_CarbonDioxide_Agriculture" }, "Annual_Emissions_CarbonDioxide_ElectricityGeneration_multiple_place_bar_block": { - "name": "Annual Amount of Emissions: Electricity Generation, Carbon Dioxide", + "name": "Annual Amount Of Emissions: Electricity Generation, Carbon Dioxide", "statVar": "Annual_Emissions_CarbonDioxide_ElectricityGeneration" }, "Annual_Emissions_CarbonDioxide_FossilFuelOperations_multiple_place_bar_block": { @@ -573,7 +573,7 @@ "statVar": "Annual_Emissions_CarbonDioxide_MineralExtraction" }, "Annual_Emissions_CarbonDioxide_OilAndGasProduction_multiple_place_bar_block": { - "name": "Annual Amount of Emissions: Oil And Gas Production, Carbon Dioxide", + "name": "Annual Amount Of Emissions: Oil And Gas Production, Carbon Dioxide", "statVar": "Annual_Emissions_CarbonDioxide_OilAndGasProduction" }, "Annual_Emissions_CarbonDioxide_Power_multiple_place_bar_block": { @@ -593,11 +593,11 @@ "statVar": "Annual_Emissions_GreenhouseGas_Agriculture" }, "Annual_Emissions_GreenhouseGas_CementProduction_multiple_place_bar_block": { - "name": "Annual Amount of Emissions: Cement Production, Greenhouse Gas", + "name": "Annual Amount Of Emissions: Cement Production, Greenhouse Gas", "statVar": "Annual_Emissions_GreenhouseGas_CementProduction" }, "Annual_Emissions_GreenhouseGas_ElectricityGenerationFromThermalPowerPlant_multiple_place_bar_block": { - "name": "Annual Amount of Emissions: Electricity Generation From Thermal Power Plant, Greenhouse Gas", + "name": "Annual Amount Of Emissions: Electricity Generation From Thermal Power Plant, Greenhouse Gas", "statVar": "Annual_Emissions_GreenhouseGas_ElectricityGenerationFromThermalPowerPlant" }, "Annual_Emissions_GreenhouseGas_ElectricityGeneration_multiple_place_bar_block": { @@ -605,7 +605,7 @@ "statVar": "Annual_Emissions_GreenhouseGas_ElectricityGeneration" }, "Annual_Emissions_GreenhouseGas_ForestFire_multiple_place_bar_block": { - "name": "Annual Amount of Emissions: Forest Fire, Greenhouse Gas", + "name": "Annual Amount Of Emissions: Forest Fire, Greenhouse Gas", "statVar": "Annual_Emissions_GreenhouseGas_ForestFire" }, "Annual_Emissions_GreenhouseGas_ForestryAndLandUse_multiple_place_bar_block": { @@ -613,11 +613,11 @@ "statVar": "Annual_Emissions_GreenhouseGas_ForestryAndLandUse" }, "Annual_Emissions_GreenhouseGas_FuelCombustionForRailways_multiple_place_bar_block": { - "name": "Annual Amount of Emissions: Fuel Combustion For Railways, Greenhouse Gas", + "name": "Annual Amount Of Emissions: Fuel Combustion For Railways, Greenhouse Gas", "statVar": "Annual_Emissions_GreenhouseGas_FuelCombustionForRailways" }, "Annual_Emissions_GreenhouseGas_FuelCombustionForRoadVehicles_multiple_place_bar_block": { - "name": "Annual Amount of Emissions: Fuel Combustion For Road Vehicles, Greenhouse Gas", + "name": "Annual Amount Of Emissions: Fuel Combustion For Road Vehicles, Greenhouse Gas", "statVar": "Annual_Emissions_GreenhouseGas_FuelCombustionForRoadVehicles" }, "Annual_Emissions_GreenhouseGas_FuelCombustionInBuildings_multiple_place_bar_block": { @@ -629,11 +629,11 @@ "statVar": "Annual_Emissions_GreenhouseGas_Manufacturing" }, "Annual_Emissions_GreenhouseGas_MaritimeShipping_multiple_place_bar_block": { - "name": "Annual Amount of Emissions: Maritime Shipping, Greenhouse Gas", + "name": "Annual Amount Of Emissions: Maritime Shipping, Greenhouse Gas", "statVar": "Annual_Emissions_GreenhouseGas_MaritimeShipping" }, "Annual_Emissions_GreenhouseGas_MaritimeTransport_multiple_place_bar_block": { - "name": "Annual Amount of Emissions: Maritime Transport, Greenhouse Gas", + "name": "Annual Amount Of Emissions: Maritime Transport, Greenhouse Gas", "statVar": "Annual_Emissions_GreenhouseGas_MaritimeTransport" }, "Annual_Emissions_GreenhouseGas_MineralExtraction_multiple_place_bar_block": { @@ -641,19 +641,19 @@ "statVar": "Annual_Emissions_GreenhouseGas_MineralExtraction" }, "Annual_Emissions_GreenhouseGas_OilAndGas_multiple_place_bar_block": { - "name": "Annual Amount of Emissions: Oil And Gas, Greenhouse Gas", + "name": "Annual Amount Of Emissions: Oil And Gas, Greenhouse Gas", "statVar": "Annual_Emissions_GreenhouseGas_OilAndGas" }, "Annual_Emissions_GreenhouseGas_PetrochemicalProduction_multiple_place_bar_block": { - "name": "Annual Amount of Emissions: Petrochemical Production, Greenhouse Gas", + "name": "Annual Amount Of Emissions: Petrochemical Production, Greenhouse Gas", "statVar": "Annual_Emissions_GreenhouseGas_PetrochemicalProduction" }, "Annual_Emissions_GreenhouseGas_SolidWasteDisposal_multiple_place_bar_block": { - "name": "Annual Amount of Emissions: Solid Waste Disposal, Greenhouse Gas", + "name": "Annual Amount Of Emissions: Solid Waste Disposal, Greenhouse Gas", "statVar": "Annual_Emissions_GreenhouseGas_SolidWasteDisposal" }, "Annual_Emissions_GreenhouseGas_SteelManufacturing_multiple_place_bar_block": { - "name": "Annual Amount of Emissions: Steel Manufacturing, Greenhouse Gas", + "name": "Annual Amount Of Emissions: Steel Manufacturing, Greenhouse Gas", "statVar": "Annual_Emissions_GreenhouseGas_SteelManufacturing" }, "Annual_Emissions_GreenhouseGas_Transportation_multiple_place_bar_block": { @@ -665,7 +665,7 @@ "statVar": "Annual_Emissions_GreenhouseGas_WasteManagement" }, "Annual_Emissions_GreenhouseGas_WastewaterTreatmentAndDischarge_multiple_place_bar_block": { - "name": "Annual Amount of Emissions: Wastewater Treatment And Discharge, Greenhouse Gas", + "name": "Annual Amount Of Emissions: Wastewater Treatment And Discharge, Greenhouse Gas", "statVar": "Annual_Emissions_GreenhouseGas_WastewaterTreatmentAndDischarge" }, "Annual_Emissions_GreenhouseGas_multiple_place_bar_block": { @@ -707,13 +707,13 @@ "place_type": "Country" }, { - "dcid": "country/ETH", - "name": "Ethiopia", + "dcid": "country/KEN", + "name": "Kenya", "place_type": "Country" }, { - "dcid": "country/KEN", - "name": "Kenya", + "dcid": "country/ETH", + "name": "Ethiopia", "place_type": "Country" }, { diff --git a/server/integration_tests/test_data/e2e_fallbacks/lifeexpectancyinuscounties/chart_config.json b/server/integration_tests/test_data/e2e_fallbacks/lifeexpectancyinuscounties/chart_config.json index fd66ca5355..7f1ffbe5a9 100644 --- a/server/integration_tests/test_data/e2e_fallbacks/lifeexpectancyinuscounties/chart_config.json +++ b/server/integration_tests/test_data/e2e_fallbacks/lifeexpectancyinuscounties/chart_config.json @@ -875,7 +875,7 @@ "statVar": "Count_Death_DiseasesOfTheRespiratorySystem" }, "Count_Death_Female": { - "name": "Count of Mortality Event: Female", + "name": "Count Of Mortality Event: Female", "statVar": "Count_Death_Female" }, "Count_Death_IntentionalSelfHarm_AsFractionOf_Count_Person_multiple_place_bar_block": { @@ -891,7 +891,7 @@ "statVar": "Count_Death_Neoplasms" }, "Count_Death_Upto1Years": { - "name": "Count of Mortality Event: Years Upto 1", + "name": "Count Of Mortality Event: Years Upto 1", "statVar": "Count_Death_Upto1Years" }, "Count_Death_Upto1Years_AbnormalNotClassfied_multiple_place_bar_block": { diff --git a/server/integration_tests/test_data/e2e_high_sv_threshold/chart_config.json b/server/integration_tests/test_data/e2e_high_sv_threshold/chart_config.json index dc119827eb..651fed29e0 100644 --- a/server/integration_tests/test_data/e2e_high_sv_threshold/chart_config.json +++ b/server/integration_tests/test_data/e2e_high_sv_threshold/chart_config.json @@ -211,19 +211,19 @@ ], "statVarSpec": { "Count_Death_LessThan1Year_AsAFractionOf_Count_BirthEvent": { - "name": "Count of Mortality Event: Years Upto 1 (As fraction of Count Birth Event)", + "name": "Count Of Mortality Event: Years Upto 1 (As Fraction Of Count Birth Event)", "statVar": "Count_Death_LessThan1Year_AsAFractionOf_Count_BirthEvent" }, "Count_Death_LessThan1Year_Female_AsAFractionOf_Count_BirthEvent_Female": { - "name": "Count of Mortality Event: Years Upto 1, Female (As fraction of Count Birth Event Female)", + "name": "Count Of Mortality Event: Years Upto 1, Female (As Fraction Of Count Birth Event Female)", "statVar": "Count_Death_LessThan1Year_Female_AsAFractionOf_Count_BirthEvent_Female" }, "Count_Death_LessThan1Year_Male_AsAFractionOf_Count_BirthEvent_Male": { - "name": "Count of Mortality Event: Years Upto 1, Male (As fraction of Count Birth Event Male)", + "name": "Count Of Mortality Event: Years Upto 1, Male (As Fraction Of Count Birth Event Male)", "statVar": "Count_Death_LessThan1Year_Male_AsAFractionOf_Count_BirthEvent_Male" }, "Count_Death_Upto1Years": { - "name": "Count of Mortality Event: Years Upto 1", + "name": "Count Of Mortality Event: Years Upto 1", "statVar": "Count_Death_Upto1Years" }, "Count_Death_Upto1Years_AbnormalNotClassfied": { diff --git a/server/integration_tests/test_data/e2e_india_demo/howmuchhasinfantmortalitychangedovertimeinthesestates/chart_config.json b/server/integration_tests/test_data/e2e_india_demo/howmuchhasinfantmortalitychangedovertimeinthesestates/chart_config.json index cb890c321f..f90ef60ca3 100644 --- a/server/integration_tests/test_data/e2e_india_demo/howmuchhasinfantmortalitychangedovertimeinthesestates/chart_config.json +++ b/server/integration_tests/test_data/e2e_india_demo/howmuchhasinfantmortalitychangedovertimeinthesestates/chart_config.json @@ -709,14 +709,14 @@ "statVarKey": [ "Count_BirthEvent_LiveBirth10" ], - "title": "Count of Live Births", + "title": "Total Number of Reported Live Births", "type": "LINE" } ] } ], "denom": "Count_Person", - "title": "Count of Live Births" + "title": "Total Number of Reported Live Births" }, { "columns": [ @@ -842,7 +842,7 @@ } ], "denom": "Count_Person", - "title": "Change in Count of Live Births Over Time (Absolute Change)" + "title": "Change in Total Number of Reported Live Births Over Time (Absolute Change)" }, { "columns": [ @@ -968,7 +968,7 @@ } ], "denom": "Count_Person", - "title": "Change in Count of Live Births Over Time (Percent Change)" + "title": "Change in Total Number of Reported Live Births Over Time (Percent Change)" }, { "columns": [ @@ -1094,24 +1094,24 @@ } ], "denom": "Count_Person", - "title": "Change in Count of Live Births Over Time (Per Capita Change)" + "title": "Change in Total Number of Reported Live Births Over Time (Per Capita Change)" } ], "statVarSpec": { "Count_BirthEvent_LiveBirth10": { - "name": "Count of live births", + "name": "Total number of reported live births", "statVar": "Count_BirthEvent_LiveBirth" }, "Count_BirthEvent_LiveBirth_growth_abs": { - "name": "Count of live births", + "name": "Total number of reported live births", "statVar": "Count_BirthEvent_LiveBirth" }, "Count_BirthEvent_LiveBirth_growth_pc": { - "name": "Count of live births", + "name": "Total number of reported live births", "statVar": "Count_BirthEvent_LiveBirth" }, "Count_BirthEvent_LiveBirth_growth_pct": { - "name": "Count of live births", + "name": "Total number of reported live births", "statVar": "Count_BirthEvent_LiveBirth" }, "Count_Death_Infant10": { @@ -1131,15 +1131,15 @@ "statVar": "Count_Death_Infant" }, "Count_Death_LessThan1Year_AsAFractionOf_Count_BirthEvent10": { - "name": "Count of Mortality Event: Years Upto 1 (As fraction of Count Birth Event)", + "name": "Count Of Mortality Event: Years Upto 1 (As Fraction Of Count Birth Event)", "statVar": "Count_Death_LessThan1Year_AsAFractionOf_Count_BirthEvent" }, "Count_Death_LessThan1Year_AsAFractionOf_Count_BirthEvent_growth_abs": { - "name": "Count of Mortality Event: Years Upto 1 (As fraction of Count Birth Event)", + "name": "Count Of Mortality Event: Years Upto 1 (As Fraction Of Count Birth Event)", "statVar": "Count_Death_LessThan1Year_AsAFractionOf_Count_BirthEvent" }, "Count_Death_LessThan1Year_AsAFractionOf_Count_BirthEvent_growth_pct": { - "name": "Count of Mortality Event: Years Upto 1 (As fraction of Count Birth Event)", + "name": "Count Of Mortality Event: Years Upto 1 (As Fraction Of Count Birth Event)", "statVar": "Count_Death_LessThan1Year_AsAFractionOf_Count_BirthEvent" } } 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 0abb9c80af..a31a0d74a6 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 @@ -1349,120 +1349,6 @@ "Count_Person_Female_WhiteAlone" ] }, - "Count_Person_Female_AsianAlone": { - "age": [ - "Count_Person_0To4Years_Female_AsianAlone", - "Count_Person_0Years_Female_AsianAlone", - "Count_Person_10Years_Female_AsianAlone", - "Count_Person_11Years_Female_AsianAlone", - "Count_Person_12Years_Female_AsianAlone", - "Count_Person_13Years_Female_AsianAlone", - "Count_Person_14Years_Female_AsianAlone", - "Count_Person_15To19Years_Female_AsianAlone", - "Count_Person_16Years_Female_AsianAlone", - "Count_Person_17Years_Female_AsianAlone", - "Count_Person_18Years_Female_AsianAlone", - "Count_Person_19Years_Female_AsianAlone", - "Count_Person_1Years_Female_AsianAlone", - "Count_Person_20Years_Female_AsianAlone", - "Count_Person_21Years_Female_AsianAlone", - "Count_Person_22Years_Female_AsianAlone", - "Count_Person_23Years_Female_AsianAlone", - "Count_Person_24Years_Female_AsianAlone", - "Count_Person_25Years_Female_AsianAlone", - "Count_Person_26Years_Female_AsianAlone", - "Count_Person_27Years_Female_AsianAlone", - "Count_Person_28Years_Female_AsianAlone", - "Count_Person_29Years_Female_AsianAlone", - "Count_Person_2Years_Female_AsianAlone", - "Count_Person_30Years_Female_AsianAlone", - "Count_Person_31Years_Female_AsianAlone", - "Count_Person_32Years_Female_AsianAlone", - "Count_Person_33Years_Female_AsianAlone", - "Count_Person_34Years_Female_AsianAlone", - "Count_Person_35To39Years_Female_AsianAlone", - "Count_Person_35Years_Female_AsianAlone", - "Count_Person_36Years_Female_AsianAlone", - "Count_Person_37Years_Female_AsianAlone", - "Count_Person_38Years_Female_AsianAlone", - "Count_Person_39Years_Female_AsianAlone", - "Count_Person_3Years_Female_AsianAlone", - "Count_Person_40To44Years_Female_AsianAlone", - "Count_Person_40Years_Female_AsianAlone", - "Count_Person_41Years_Female_AsianAlone", - "Count_Person_42Years_Female_AsianAlone", - "Count_Person_43Years_Female_AsianAlone", - "Count_Person_44Years_Female_AsianAlone", - "Count_Person_45To49Years_Female_AsianAlone", - "Count_Person_45Years_Female_AsianAlone", - "Count_Person_46Years_Female_AsianAlone", - "Count_Person_47Years_Female_AsianAlone", - "Count_Person_48Years_Female_AsianAlone", - "Count_Person_49Years_Female_AsianAlone", - "Count_Person_4Years_Female_AsianAlone", - "Count_Person_50To54Years_Female_AsianAlone", - "Count_Person_50Years_Female_AsianAlone", - "Count_Person_51Years_Female_AsianAlone", - "Count_Person_52Years_Female_AsianAlone", - "Count_Person_53Years_Female_AsianAlone", - "Count_Person_54Years_Female_AsianAlone", - "Count_Person_55To59Years_Female_AsianAlone", - "Count_Person_55Years_Female_AsianAlone", - "Count_Person_56Years_Female_AsianAlone", - "Count_Person_57Years_Female_AsianAlone", - "Count_Person_58Years_Female_AsianAlone", - "Count_Person_59Years_Female_AsianAlone", - "Count_Person_60To64Years_Female_AsianAlone", - "Count_Person_60Years_Female_AsianAlone", - "Count_Person_61Years_Female_AsianAlone", - "Count_Person_62Years_Female_AsianAlone", - "Count_Person_63Years_Female_AsianAlone", - "Count_Person_64Years_Female_AsianAlone", - "Count_Person_65To69Years_Female_AsianAlone", - "Count_Person_65Years_Female_AsianAlone", - "Count_Person_66Years_Female_AsianAlone", - "Count_Person_67Years_Female_AsianAlone", - "Count_Person_68Years_Female_AsianAlone", - "Count_Person_69Years_Female_AsianAlone", - "Count_Person_6Years_Female_AsianAlone", - "Count_Person_70To74Years_Female_AsianAlone", - "Count_Person_70Years_Female_AsianAlone", - "Count_Person_71Years_Female_AsianAlone", - "Count_Person_72Years_Female_AsianAlone", - "Count_Person_73Years_Female_AsianAlone", - "Count_Person_74Years_Female_AsianAlone", - "Count_Person_75To79Years_Female_AsianAlone", - "Count_Person_75Years_Female_AsianAlone", - "Count_Person_76Years_Female_AsianAlone", - "Count_Person_77Years_Female_AsianAlone", - "Count_Person_78Years_Female_AsianAlone", - "Count_Person_79Years_Female_AsianAlone", - "Count_Person_7Years_Female_AsianAlone", - "Count_Person_80To84Years_Female_AsianAlone", - "Count_Person_80Years_Female_AsianAlone", - "Count_Person_81Years_Female_AsianAlone", - "Count_Person_82Years_Female_AsianAlone", - "Count_Person_83Years_Female_AsianAlone", - "Count_Person_84Years_Female_AsianAlone", - "Count_Person_85Years_Female_AsianAlone", - "Count_Person_86Years_Female_AsianAlone", - "Count_Person_87Years_Female_AsianAlone", - "Count_Person_88Years_Female_AsianAlone", - "Count_Person_89Years_Female_AsianAlone", - "Count_Person_8Years_Female_AsianAlone", - "Count_Person_90Years_Female_AsianAlone", - "Count_Person_91Years_Female_AsianAlone", - "Count_Person_92Years_Female_AsianAlone", - "Count_Person_93Years_Female_AsianAlone", - "Count_Person_94Years_Female_AsianAlone", - "Count_Person_95Years_Female_AsianAlone", - "Count_Person_96Years_Female_AsianAlone", - "Count_Person_97Years_Female_AsianAlone", - "Count_Person_98Years_Female_AsianAlone", - "Count_Person_99Years_Female_AsianAlone", - "Count_Person_9Years_Female_AsianAlone" - ] - }, "Count_Person_Female_AsianOrPacificIslander": { "age": [ "Count_Person_0Years_Female_AsianOrPacificIslander", @@ -1569,123 +1455,9 @@ "Count_Person_9Years_Female_AsianOrPacificIslander" ] }, - "Count_Person_Female_BlackOrAfricanAmericanAlone": { - "age": [ - "Count_Person_0To4Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_0Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_10Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_11Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_12Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_13Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_14Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_16Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_17Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_18Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_19Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_1Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_20Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_21Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_22Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_23Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_24Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_25Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_26Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_27Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_28Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_29Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_2Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_30Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_31Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_32Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_33Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_34Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_35To39Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_35Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_36Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_37Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_38Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_39Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_3Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_40To44Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_40Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_41Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_42Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_43Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_44Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_45To49Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_45Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_46Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_47Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_48Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_49Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_4Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_50To54Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_50Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_51Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_52Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_53Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_54Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_55To59Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_55Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_56Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_57Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_58Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_59Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_60To64Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_60Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_61Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_62Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_63Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_64Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_65To69Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_65Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_66Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_67Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_68Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_69Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_6Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_70To74Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_70Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_71Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_72Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_73Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_74Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_75To79Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_75Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_76Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_77Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_78Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_79Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_7Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_80To84Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_80Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_81Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_82Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_83Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_84Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_85Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_86Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_87Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_88Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_89Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_8Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_90Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_91Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_92Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_93Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_94Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_95Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_96Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_97Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_98Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_99Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_9Years_Female_BlackOrAfricanAmericanAlone" - ] - }, "Count_Person_Female_HispanicOrLatino": { "age": [ "Count_Person_0Years_Female_HispanicOrLatino", - "Count_Person_100OrMoreYears_Female_HispanicOrLatino", "Count_Person_10Years_Female_HispanicOrLatino", "Count_Person_11Years_Female_HispanicOrLatino", "Count_Person_12Years_Female_HispanicOrLatino", @@ -1879,7 +1651,6 @@ "Count_Person_Female_NotHispanicOrLatino": { "age": [ "Count_Person_0Years_Female_NotHispanicOrLatino", - "Count_Person_100OrMoreYears_Female_NotHispanicOrLatino", "Count_Person_10Years_Female_NotHispanicOrLatino", "Count_Person_11Years_Female_NotHispanicOrLatino", "Count_Person_12Years_Female_NotHispanicOrLatino", @@ -1962,7 +1733,6 @@ "Count_Person_82Years_Female_NotHispanicOrLatino", "Count_Person_83Years_Female_NotHispanicOrLatino", "Count_Person_84Years_Female_NotHispanicOrLatino", - "Count_Person_85OrMoreYears_Female_NotHispanicOrLatino", "Count_Person_85Years_Female_NotHispanicOrLatino", "Count_Person_86Years_Female_NotHispanicOrLatino", "Count_Person_87Years_Female_NotHispanicOrLatino", diff --git a/server/integration_tests/test_data/e2e_single_date/hispanicwomenincaliforniain2001/chart_config.json b/server/integration_tests/test_data/e2e_single_date/hispanicwomenincaliforniain2001/chart_config.json index 7332d3f7df..0a8aae3823 100644 --- a/server/integration_tests/test_data/e2e_single_date/hispanicwomenincaliforniain2001/chart_config.json +++ b/server/integration_tests/test_data/e2e_single_date/hispanicwomenincaliforniain2001/chart_config.json @@ -68,111 +68,6 @@ "denom": "Count_Person", "title": "Hispanic Women in Counties of California" }, - { - "columns": [ - { - "tiles": [ - { - "barTileSpec": { - "maxPlaces": 15, - "maxVariables": 15 - }, - "comparisonPlaces": [ - "geoId/06" - ], - "statVarKey": [ - "Count_Person_0To4Years_Female_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_10To14Years_Female_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_15To19Years_Female_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_20To24Years_Female_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_25To29Years_Female_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_30To34Years_Female_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_35To39Years_Female_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_40To44Years_Female_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_45To49Years_Female_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_50To54Years_Female_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_55To59Years_Female_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_5To9Years_Female_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_60To64Years_Female_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_65To69Years_Female_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_70To74Years_Female_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_75To79Years_Female_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_80To84Years_Female_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_85OrMoreYears_Female_HispanicOrLatino_multiple_place_bar_block_2001" - ], - "title": "Hispanic or Latino Female Population by Age in California (${date})", - "type": "BAR" - } - ] - } - ], - "denom": "Count_Person", - "title": "Hispanic or Latino Female Population by Age" - }, - { - "columns": [ - { - "tiles": [ - { - "statVarKey": [ - "Count_Person_0To4Years_Female_HispanicOrLatino_2001" - ], - "title": "Population: Years 0 to 4, Female, Hispanic or Latino in Counties of California (${date})", - "type": "MAP" - } - ] - }, - { - "tiles": [ - { - "rankingTileSpec": { - "rankingCount": 5, - "showHighestLowest": true - }, - "statVarKey": [ - "Count_Person_0To4Years_Female_HispanicOrLatino_2001" - ], - "title": "Population: Years 0 to 4, Female, Hispanic or Latino in Counties of California (${date})", - "type": "RANKING" - } - ] - } - ], - "denom": "Count_Person", - "title": "Population: Years 0 to 4, Female, Hispanic or Latino in Counties of California" - }, - { - "columns": [ - { - "tiles": [ - { - "statVarKey": [ - "Count_Person_10To14Years_Female_HispanicOrLatino_2001" - ], - "title": "Population: Years 10 to 14, Female, Hispanic or Latino in Counties of California (${date})", - "type": "MAP" - } - ] - }, - { - "tiles": [ - { - "rankingTileSpec": { - "rankingCount": 5, - "showHighestLowest": true - }, - "statVarKey": [ - "Count_Person_10To14Years_Female_HispanicOrLatino_2001" - ], - "title": "Population: Years 10 to 14, Female, Hispanic or Latino in Counties of California (${date})", - "type": "RANKING" - } - ] - } - ], - "denom": "Count_Person", - "title": "Population: Years 10 to 14, Female, Hispanic or Latino in Counties of California" - }, { "columns": [ { @@ -365,111 +260,6 @@ "denom": "Count_Person", "title": "Hispanic Men in Counties of California" }, - { - "columns": [ - { - "tiles": [ - { - "barTileSpec": { - "maxPlaces": 15, - "maxVariables": 15 - }, - "comparisonPlaces": [ - "geoId/06" - ], - "statVarKey": [ - "Count_Person_0To4Years_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_10To14Years_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_15To19Years_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_20To24Years_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_25To29Years_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_30To34Years_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_35To39Years_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_40To44Years_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_45To49Years_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_50To54Years_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_55To59Years_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_5To9Years_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_60To64Years_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_65To69Years_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_70To74Years_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_75To79Years_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_80To84Years_HispanicOrLatino_multiple_place_bar_block_2001", - "Count_Person_85OrMoreYears_HispanicOrLatino_multiple_place_bar_block_2001" - ], - "title": "Hispanic or Latino Population by Age in California (${date})", - "type": "BAR" - } - ] - } - ], - "denom": "Count_Person", - "title": "Hispanic or Latino Population by Age" - }, - { - "columns": [ - { - "tiles": [ - { - "statVarKey": [ - "Count_Person_0To4Years_HispanicOrLatino_2001" - ], - "title": "Population: Years 0 to 4, Hispanic or Latino in Counties of California (${date})", - "type": "MAP" - } - ] - }, - { - "tiles": [ - { - "rankingTileSpec": { - "rankingCount": 5, - "showHighestLowest": true - }, - "statVarKey": [ - "Count_Person_0To4Years_HispanicOrLatino_2001" - ], - "title": "Population: Years 0 to 4, Hispanic or Latino in Counties of California (${date})", - "type": "RANKING" - } - ] - } - ], - "denom": "Count_Person", - "title": "Population: Years 0 to 4, Hispanic or Latino in Counties of California" - }, - { - "columns": [ - { - "tiles": [ - { - "statVarKey": [ - "Count_Person_10To14Years_HispanicOrLatino_2001" - ], - "title": "Population: Years 10 to 14, Hispanic or Latino in Counties of California (${date})", - "type": "MAP" - } - ] - }, - { - "tiles": [ - { - "rankingTileSpec": { - "rankingCount": 5, - "showHighestLowest": true - }, - "statVarKey": [ - "Count_Person_10To14Years_HispanicOrLatino_2001" - ], - "title": "Population: Years 10 to 14, Hispanic or Latino in Counties of California (${date})", - "type": "RANKING" - } - ] - } - ], - "denom": "Count_Person", - "title": "Population: Years 10 to 14, Hispanic or Latino in Counties of California" - }, { "columns": [ { @@ -792,206 +582,6 @@ } ], "statVarSpec": { - "Count_Person_0To4Years_Female_HispanicOrLatino_2001": { - "date": "2001", - "name": "Population: Years 0 To 4, Female, Hispanic Or Latino", - "statVar": "Count_Person_0To4Years_Female_HispanicOrLatino" - }, - "Count_Person_0To4Years_Female_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 0 To 4, Female, Hispanic Or Latino", - "statVar": "Count_Person_0To4Years_Female_HispanicOrLatino" - }, - "Count_Person_0To4Years_HispanicOrLatino_2001": { - "date": "2001", - "name": "Population: Years 0 To 4, Hispanic Or Latino", - "statVar": "Count_Person_0To4Years_HispanicOrLatino" - }, - "Count_Person_0To4Years_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 0 To 4, Hispanic Or Latino", - "statVar": "Count_Person_0To4Years_HispanicOrLatino" - }, - "Count_Person_10To14Years_Female_HispanicOrLatino_2001": { - "date": "2001", - "name": "Population: Years 10 To 14, Female, Hispanic Or Latino", - "statVar": "Count_Person_10To14Years_Female_HispanicOrLatino" - }, - "Count_Person_10To14Years_Female_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 10 To 14, Female, Hispanic Or Latino", - "statVar": "Count_Person_10To14Years_Female_HispanicOrLatino" - }, - "Count_Person_10To14Years_HispanicOrLatino_2001": { - "date": "2001", - "name": "Population: Years 10 To 14, Hispanic Or Latino", - "statVar": "Count_Person_10To14Years_HispanicOrLatino" - }, - "Count_Person_10To14Years_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 10 To 14, Hispanic Or Latino", - "statVar": "Count_Person_10To14Years_HispanicOrLatino" - }, - "Count_Person_15To19Years_Female_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 15 To 19, Female, Hispanic Or Latino", - "statVar": "Count_Person_15To19Years_Female_HispanicOrLatino" - }, - "Count_Person_15To19Years_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 15 To 19, Hispanic Or Latino", - "statVar": "Count_Person_15To19Years_HispanicOrLatino" - }, - "Count_Person_20To24Years_Female_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 20 To 24, Female, Hispanic Or Latino", - "statVar": "Count_Person_20To24Years_Female_HispanicOrLatino" - }, - "Count_Person_20To24Years_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 20 To 24, Hispanic Or Latino", - "statVar": "Count_Person_20To24Years_HispanicOrLatino" - }, - "Count_Person_25To29Years_Female_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 25 To 29, Female, Hispanic Or Latino", - "statVar": "Count_Person_25To29Years_Female_HispanicOrLatino" - }, - "Count_Person_25To29Years_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 25 To 29, Hispanic Or Latino", - "statVar": "Count_Person_25To29Years_HispanicOrLatino" - }, - "Count_Person_30To34Years_Female_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 30 To 34, Female, Hispanic Or Latino", - "statVar": "Count_Person_30To34Years_Female_HispanicOrLatino" - }, - "Count_Person_30To34Years_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 30 To 34, Hispanic Or Latino", - "statVar": "Count_Person_30To34Years_HispanicOrLatino" - }, - "Count_Person_35To39Years_Female_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 35 To 39, Female, Hispanic Or Latino", - "statVar": "Count_Person_35To39Years_Female_HispanicOrLatino" - }, - "Count_Person_35To39Years_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 35 To 39, Hispanic Or Latino", - "statVar": "Count_Person_35To39Years_HispanicOrLatino" - }, - "Count_Person_40To44Years_Female_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 40 To 44, Female, Hispanic Or Latino", - "statVar": "Count_Person_40To44Years_Female_HispanicOrLatino" - }, - "Count_Person_40To44Years_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 40 To 44, Hispanic Or Latino", - "statVar": "Count_Person_40To44Years_HispanicOrLatino" - }, - "Count_Person_45To49Years_Female_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 45 To 49, Female, Hispanic Or Latino", - "statVar": "Count_Person_45To49Years_Female_HispanicOrLatino" - }, - "Count_Person_45To49Years_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 45 To 49, Hispanic Or Latino", - "statVar": "Count_Person_45To49Years_HispanicOrLatino" - }, - "Count_Person_50To54Years_Female_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 50 To 54, Female, Hispanic Or Latino", - "statVar": "Count_Person_50To54Years_Female_HispanicOrLatino" - }, - "Count_Person_50To54Years_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 50 To 54, Hispanic Or Latino", - "statVar": "Count_Person_50To54Years_HispanicOrLatino" - }, - "Count_Person_55To59Years_Female_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 55 To 59, Female, Hispanic Or Latino", - "statVar": "Count_Person_55To59Years_Female_HispanicOrLatino" - }, - "Count_Person_55To59Years_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 55 To 59, Hispanic Or Latino", - "statVar": "Count_Person_55To59Years_HispanicOrLatino" - }, - "Count_Person_5To9Years_Female_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 5 To 9, Female, Hispanic Or Latino", - "statVar": "Count_Person_5To9Years_Female_HispanicOrLatino" - }, - "Count_Person_5To9Years_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 5 To 9, Hispanic Or Latino", - "statVar": "Count_Person_5To9Years_HispanicOrLatino" - }, - "Count_Person_60To64Years_Female_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 60 To 64, Female, Hispanic Or Latino", - "statVar": "Count_Person_60To64Years_Female_HispanicOrLatino" - }, - "Count_Person_60To64Years_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 60 To 64, Hispanic Or Latino", - "statVar": "Count_Person_60To64Years_HispanicOrLatino" - }, - "Count_Person_65To69Years_Female_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 65 To 69, Female, Hispanic Or Latino", - "statVar": "Count_Person_65To69Years_Female_HispanicOrLatino" - }, - "Count_Person_65To69Years_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 65 To 69, Hispanic Or Latino", - "statVar": "Count_Person_65To69Years_HispanicOrLatino" - }, - "Count_Person_70To74Years_Female_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 70 To 74, Female, Hispanic Or Latino", - "statVar": "Count_Person_70To74Years_Female_HispanicOrLatino" - }, - "Count_Person_70To74Years_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 70 To 74, Hispanic Or Latino", - "statVar": "Count_Person_70To74Years_HispanicOrLatino" - }, - "Count_Person_75To79Years_Female_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 75 To 79, Female, Hispanic Or Latino", - "statVar": "Count_Person_75To79Years_Female_HispanicOrLatino" - }, - "Count_Person_75To79Years_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 75 To 79, Hispanic Or Latino", - "statVar": "Count_Person_75To79Years_HispanicOrLatino" - }, - "Count_Person_80To84Years_Female_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 80 To 84, Female, Hispanic Or Latino", - "statVar": "Count_Person_80To84Years_Female_HispanicOrLatino" - }, - "Count_Person_80To84Years_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 80 To 84, Hispanic Or Latino", - "statVar": "Count_Person_80To84Years_HispanicOrLatino" - }, - "Count_Person_85OrMoreYears_Female_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 85 Onwards, Female, Hispanic Or Latino", - "statVar": "Count_Person_85OrMoreYears_Female_HispanicOrLatino" - }, - "Count_Person_85OrMoreYears_HispanicOrLatino_multiple_place_bar_block_2001": { - "date": "2001", - "name": "Population: Years 85 Onwards, Hispanic Or Latino", - "statVar": "Count_Person_85OrMoreYears_HispanicOrLatino" - }, "Count_Person_Female_AsianAlone_2001": { "date": "2001", "name": "Asian Monoracial Women", @@ -1478,459 +1068,56 @@ }, "childTopics": [], "exploreMore": { - "Count_Person_0To4Years_HispanicOrLatino": { - "gender": [ - "Count_Person_0To4Years_Female_HispanicOrLatino", - "Count_Person_0To4Years_Male_HispanicOrLatino" - ] - }, - "Count_Person_10To14Years_HispanicOrLatino": { - "gender": [ - "Count_Person_10To14Years_Female_HispanicOrLatino", - "Count_Person_10To14Years_Male_HispanicOrLatino" - ] - }, - "Count_Person_15To19Years_HispanicOrLatino": { - "gender": [ - "Count_Person_15To19Years_Female_HispanicOrLatino", - "Count_Person_15To19Years_Male_HispanicOrLatino" - ] - }, - "Count_Person_35To39Years_HispanicOrLatino": { - "gender": [ - "Count_Person_35To39Years_Female_HispanicOrLatino", - "Count_Person_35To39Years_Male_HispanicOrLatino" - ] - }, - "Count_Person_40To44Years_HispanicOrLatino": { - "gender": [ - "Count_Person_40To44Years_Female_HispanicOrLatino", - "Count_Person_40To44Years_Male_HispanicOrLatino" - ] - }, - "Count_Person_45To49Years_HispanicOrLatino": { - "gender": [ - "Count_Person_45To49Years_Female_HispanicOrLatino", - "Count_Person_45To49Years_Male_HispanicOrLatino" - ] - }, - "Count_Person_50To54Years_HispanicOrLatino": { - "gender": [ - "Count_Person_50To54Years_Female_HispanicOrLatino", - "Count_Person_50To54Years_Male_HispanicOrLatino" - ] - }, "Count_Person_Female_AsianAlone": { "age": [ "Count_Person_0To4Years_Female_AsianAlone", - "Count_Person_10To14Years_Female_AsianAlone", - "Count_Person_15To19Years_Female_AsianAlone", - "Count_Person_35To39Years_Female_AsianAlone", - "Count_Person_40To44Years_Female_AsianAlone", - "Count_Person_45To49Years_Female_AsianAlone", - "Count_Person_50To54Years_Female_AsianAlone", - "Count_Person_55To59Years_Female_AsianAlone", - "Count_Person_60To64Years_Female_AsianAlone", - "Count_Person_65To69Years_Female_AsianAlone", - "Count_Person_70To74Years_Female_AsianAlone", - "Count_Person_75To79Years_Female_AsianAlone", - "Count_Person_80To84Years_Female_AsianAlone" + "Count_Person_10To14Years_Female_AsianAlone" ] }, "Count_Person_Female_BlackOrAfricanAmericanAlone": { "age": [ "Count_Person_0To4Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_10To14Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_15To19Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_35To39Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_40To44Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_45To49Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_50To54Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_55To59Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_60To64Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_65To69Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_70To74Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_75To79Years_Female_BlackOrAfricanAmericanAlone", - "Count_Person_80To84Years_Female_BlackOrAfricanAmericanAlone" - ] - }, - "Count_Person_Female_HispanicOrLatino": { - "age": [ - "Count_Person_0To4Years_Female_HispanicOrLatino", - "Count_Person_0Years_Female_HispanicOrLatino", - "Count_Person_10To14Years_Female_HispanicOrLatino", - "Count_Person_10Years_Female_HispanicOrLatino", - "Count_Person_11Years_Female_HispanicOrLatino", - "Count_Person_12Years_Female_HispanicOrLatino", - "Count_Person_13Years_Female_HispanicOrLatino", - "Count_Person_14Years_Female_HispanicOrLatino", - "Count_Person_15To19Years_Female_HispanicOrLatino", - "Count_Person_15Years_Female_HispanicOrLatino", - "Count_Person_16Years_Female_HispanicOrLatino", - "Count_Person_17Years_Female_HispanicOrLatino", - "Count_Person_18Years_Female_HispanicOrLatino", - "Count_Person_19Years_Female_HispanicOrLatino", - "Count_Person_1Years_Female_HispanicOrLatino", - "Count_Person_20To24Years_Female_HispanicOrLatino", - "Count_Person_20Years_Female_HispanicOrLatino", - "Count_Person_21Years_Female_HispanicOrLatino", - "Count_Person_22Years_Female_HispanicOrLatino", - "Count_Person_23Years_Female_HispanicOrLatino", - "Count_Person_24Years_Female_HispanicOrLatino", - "Count_Person_25To29Years_Female_HispanicOrLatino", - "Count_Person_25Years_Female_HispanicOrLatino", - "Count_Person_26Years_Female_HispanicOrLatino", - "Count_Person_27Years_Female_HispanicOrLatino", - "Count_Person_28Years_Female_HispanicOrLatino", - "Count_Person_29Years_Female_HispanicOrLatino", - "Count_Person_2Years_Female_HispanicOrLatino", - "Count_Person_30To34Years_Female_HispanicOrLatino", - "Count_Person_30Years_Female_HispanicOrLatino", - "Count_Person_31Years_Female_HispanicOrLatino", - "Count_Person_32Years_Female_HispanicOrLatino", - "Count_Person_33Years_Female_HispanicOrLatino", - "Count_Person_34Years_Female_HispanicOrLatino", - "Count_Person_35To39Years_Female_HispanicOrLatino", - "Count_Person_35Years_Female_HispanicOrLatino", - "Count_Person_36Years_Female_HispanicOrLatino", - "Count_Person_37Years_Female_HispanicOrLatino", - "Count_Person_38Years_Female_HispanicOrLatino", - "Count_Person_39Years_Female_HispanicOrLatino", - "Count_Person_3Years_Female_HispanicOrLatino", - "Count_Person_40To44Years_Female_HispanicOrLatino", - "Count_Person_40Years_Female_HispanicOrLatino", - "Count_Person_41Years_Female_HispanicOrLatino", - "Count_Person_42Years_Female_HispanicOrLatino", - "Count_Person_43Years_Female_HispanicOrLatino", - "Count_Person_44Years_Female_HispanicOrLatino", - "Count_Person_45To49Years_Female_HispanicOrLatino", - "Count_Person_45Years_Female_HispanicOrLatino", - "Count_Person_46Years_Female_HispanicOrLatino", - "Count_Person_47Years_Female_HispanicOrLatino", - "Count_Person_48Years_Female_HispanicOrLatino", - "Count_Person_49Years_Female_HispanicOrLatino", - "Count_Person_4Years_Female_HispanicOrLatino", - "Count_Person_50To54Years_Female_HispanicOrLatino", - "Count_Person_50Years_Female_HispanicOrLatino", - "Count_Person_51Years_Female_HispanicOrLatino", - "Count_Person_52Years_Female_HispanicOrLatino", - "Count_Person_53Years_Female_HispanicOrLatino", - "Count_Person_54Years_Female_HispanicOrLatino", - "Count_Person_55To59Years_Female_HispanicOrLatino", - "Count_Person_55Years_Female_HispanicOrLatino", - "Count_Person_56Years_Female_HispanicOrLatino", - "Count_Person_57Years_Female_HispanicOrLatino", - "Count_Person_58Years_Female_HispanicOrLatino", - "Count_Person_59Years_Female_HispanicOrLatino", - "Count_Person_5To9Years_Female_HispanicOrLatino", - "Count_Person_5Years_Female_HispanicOrLatino", - "Count_Person_60To64Years_Female_HispanicOrLatino", - "Count_Person_60Years_Female_HispanicOrLatino", - "Count_Person_61Years_Female_HispanicOrLatino", - "Count_Person_62Years_Female_HispanicOrLatino", - "Count_Person_63Years_Female_HispanicOrLatino", - "Count_Person_64Years_Female_HispanicOrLatino", - "Count_Person_65To69Years_Female_HispanicOrLatino", - "Count_Person_65Years_Female_HispanicOrLatino", - "Count_Person_66Years_Female_HispanicOrLatino", - "Count_Person_67Years_Female_HispanicOrLatino", - "Count_Person_68Years_Female_HispanicOrLatino", - "Count_Person_69Years_Female_HispanicOrLatino", - "Count_Person_6Years_Female_HispanicOrLatino", - "Count_Person_70To74Years_Female_HispanicOrLatino", - "Count_Person_70Years_Female_HispanicOrLatino", - "Count_Person_71Years_Female_HispanicOrLatino", - "Count_Person_72Years_Female_HispanicOrLatino", - "Count_Person_73Years_Female_HispanicOrLatino", - "Count_Person_74Years_Female_HispanicOrLatino", - "Count_Person_75To79Years_Female_HispanicOrLatino", - "Count_Person_75Years_Female_HispanicOrLatino", - "Count_Person_76Years_Female_HispanicOrLatino", - "Count_Person_77Years_Female_HispanicOrLatino", - "Count_Person_78Years_Female_HispanicOrLatino", - "Count_Person_79Years_Female_HispanicOrLatino", - "Count_Person_7Years_Female_HispanicOrLatino", - "Count_Person_80To84Years_Female_HispanicOrLatino", - "Count_Person_80Years_Female_HispanicOrLatino", - "Count_Person_81Years_Female_HispanicOrLatino", - "Count_Person_82Years_Female_HispanicOrLatino", - "Count_Person_83Years_Female_HispanicOrLatino", - "Count_Person_84Years_Female_HispanicOrLatino", - "Count_Person_85OrMoreYears_Female_HispanicOrLatino", - "Count_Person_8Years_Female_HispanicOrLatino", - "Count_Person_9Years_Female_HispanicOrLatino" + "Count_Person_10To14Years_Female_BlackOrAfricanAmericanAlone" ] }, "Count_Person_Female_NativeHawaiianAndOtherPacificIslanderAlone": { "age": [ "Count_Person_0To4Years_Female_NativeHawaiianAndOtherPacificIslanderAlone", - "Count_Person_10To14Years_Female_NativeHawaiianAndOtherPacificIslanderAlone", - "Count_Person_15To19Years_Female_NativeHawaiianAndOtherPacificIslanderAlone", - "Count_Person_20To24Years_Female_NativeHawaiianAndOtherPacificIslanderAlone", - "Count_Person_25To29Years_Female_NativeHawaiianAndOtherPacificIslanderAlone", - "Count_Person_30To34Years_Female_NativeHawaiianAndOtherPacificIslanderAlone", - "Count_Person_35To39Years_Female_NativeHawaiianAndOtherPacificIslanderAlone", - "Count_Person_40To44Years_Female_NativeHawaiianAndOtherPacificIslanderAlone", - "Count_Person_45To49Years_Female_NativeHawaiianAndOtherPacificIslanderAlone", - "Count_Person_50To54Years_Female_NativeHawaiianAndOtherPacificIslanderAlone", - "Count_Person_55To59Years_Female_NativeHawaiianAndOtherPacificIslanderAlone", - "Count_Person_5To9Years_Female_NativeHawaiianAndOtherPacificIslanderAlone", - "Count_Person_60To64Years_Female_NativeHawaiianAndOtherPacificIslanderAlone", - "Count_Person_65To69Years_Female_NativeHawaiianAndOtherPacificIslanderAlone", - "Count_Person_70To74Years_Female_NativeHawaiianAndOtherPacificIslanderAlone", - "Count_Person_75To79Years_Female_NativeHawaiianAndOtherPacificIslanderAlone", - "Count_Person_80To84Years_Female_NativeHawaiianAndOtherPacificIslanderAlone", - "Count_Person_85OrMoreYears_Female_NativeHawaiianAndOtherPacificIslanderAlone" - ] - }, - "Count_Person_Female_NotHispanicOrLatino": { - "age": [ - "Count_Person_0To4Years_Female_NotHispanicOrLatino", - "Count_Person_0Years_Female_NotHispanicOrLatino", - "Count_Person_10To14Years_Female_NotHispanicOrLatino", - "Count_Person_10Years_Female_NotHispanicOrLatino", - "Count_Person_11Years_Female_NotHispanicOrLatino", - "Count_Person_12Years_Female_NotHispanicOrLatino", - "Count_Person_13Years_Female_NotHispanicOrLatino", - "Count_Person_14Years_Female_NotHispanicOrLatino", - "Count_Person_15To19Years_Female_NotHispanicOrLatino", - "Count_Person_15Years_Female_NotHispanicOrLatino", - "Count_Person_16Years_Female_NotHispanicOrLatino", - "Count_Person_17Years_Female_NotHispanicOrLatino", - "Count_Person_18Years_Female_NotHispanicOrLatino", - "Count_Person_19Years_Female_NotHispanicOrLatino", - "Count_Person_1Years_Female_NotHispanicOrLatino", - "Count_Person_20To24Years_Female_NotHispanicOrLatino", - "Count_Person_20Years_Female_NotHispanicOrLatino", - "Count_Person_21Years_Female_NotHispanicOrLatino", - "Count_Person_22Years_Female_NotHispanicOrLatino", - "Count_Person_23Years_Female_NotHispanicOrLatino", - "Count_Person_24Years_Female_NotHispanicOrLatino", - "Count_Person_25To29Years_Female_NotHispanicOrLatino", - "Count_Person_25Years_Female_NotHispanicOrLatino", - "Count_Person_26Years_Female_NotHispanicOrLatino", - "Count_Person_27Years_Female_NotHispanicOrLatino", - "Count_Person_28Years_Female_NotHispanicOrLatino", - "Count_Person_29Years_Female_NotHispanicOrLatino", - "Count_Person_2Years_Female_NotHispanicOrLatino", - "Count_Person_30To34Years_Female_NotHispanicOrLatino", - "Count_Person_30Years_Female_NotHispanicOrLatino", - "Count_Person_31Years_Female_NotHispanicOrLatino", - "Count_Person_32Years_Female_NotHispanicOrLatino", - "Count_Person_33Years_Female_NotHispanicOrLatino", - "Count_Person_34Years_Female_NotHispanicOrLatino", - "Count_Person_35To39Years_Female_NotHispanicOrLatino", - "Count_Person_35Years_Female_NotHispanicOrLatino", - "Count_Person_36Years_Female_NotHispanicOrLatino", - "Count_Person_37Years_Female_NotHispanicOrLatino", - "Count_Person_38Years_Female_NotHispanicOrLatino", - "Count_Person_39Years_Female_NotHispanicOrLatino", - "Count_Person_3Years_Female_NotHispanicOrLatino", - "Count_Person_40To44Years_Female_NotHispanicOrLatino", - "Count_Person_40Years_Female_NotHispanicOrLatino", - "Count_Person_41Years_Female_NotHispanicOrLatino", - "Count_Person_42Years_Female_NotHispanicOrLatino", - "Count_Person_43Years_Female_NotHispanicOrLatino", - "Count_Person_44Years_Female_NotHispanicOrLatino", - "Count_Person_45To49Years_Female_NotHispanicOrLatino", - "Count_Person_45Years_Female_NotHispanicOrLatino", - "Count_Person_46Years_Female_NotHispanicOrLatino", - "Count_Person_47Years_Female_NotHispanicOrLatino", - "Count_Person_48Years_Female_NotHispanicOrLatino", - "Count_Person_49Years_Female_NotHispanicOrLatino", - "Count_Person_4Years_Female_NotHispanicOrLatino", - "Count_Person_50To54Years_Female_NotHispanicOrLatino", - "Count_Person_50Years_Female_NotHispanicOrLatino", - "Count_Person_51Years_Female_NotHispanicOrLatino", - "Count_Person_52Years_Female_NotHispanicOrLatino", - "Count_Person_53Years_Female_NotHispanicOrLatino", - "Count_Person_54Years_Female_NotHispanicOrLatino", - "Count_Person_55To59Years_Female_NotHispanicOrLatino", - "Count_Person_55Years_Female_NotHispanicOrLatino", - "Count_Person_56Years_Female_NotHispanicOrLatino", - "Count_Person_57Years_Female_NotHispanicOrLatino", - "Count_Person_58Years_Female_NotHispanicOrLatino", - "Count_Person_59Years_Female_NotHispanicOrLatino", - "Count_Person_5To9Years_Female_NotHispanicOrLatino", - "Count_Person_5Years_Female_NotHispanicOrLatino", - "Count_Person_60To64Years_Female_NotHispanicOrLatino", - "Count_Person_60Years_Female_NotHispanicOrLatino", - "Count_Person_61Years_Female_NotHispanicOrLatino", - "Count_Person_62Years_Female_NotHispanicOrLatino", - "Count_Person_63Years_Female_NotHispanicOrLatino", - "Count_Person_64Years_Female_NotHispanicOrLatino", - "Count_Person_65To69Years_Female_NotHispanicOrLatino", - "Count_Person_65Years_Female_NotHispanicOrLatino", - "Count_Person_66Years_Female_NotHispanicOrLatino", - "Count_Person_67Years_Female_NotHispanicOrLatino", - "Count_Person_68Years_Female_NotHispanicOrLatino", - "Count_Person_69Years_Female_NotHispanicOrLatino", - "Count_Person_6Years_Female_NotHispanicOrLatino", - "Count_Person_70To74Years_Female_NotHispanicOrLatino", - "Count_Person_70Years_Female_NotHispanicOrLatino", - "Count_Person_71Years_Female_NotHispanicOrLatino", - "Count_Person_72Years_Female_NotHispanicOrLatino", - "Count_Person_73Years_Female_NotHispanicOrLatino", - "Count_Person_74Years_Female_NotHispanicOrLatino", - "Count_Person_75To79Years_Female_NotHispanicOrLatino", - "Count_Person_75Years_Female_NotHispanicOrLatino", - "Count_Person_76Years_Female_NotHispanicOrLatino", - "Count_Person_77Years_Female_NotHispanicOrLatino", - "Count_Person_78Years_Female_NotHispanicOrLatino", - "Count_Person_79Years_Female_NotHispanicOrLatino", - "Count_Person_7Years_Female_NotHispanicOrLatino", - "Count_Person_80To84Years_Female_NotHispanicOrLatino", - "Count_Person_80Years_Female_NotHispanicOrLatino", - "Count_Person_81Years_Female_NotHispanicOrLatino", - "Count_Person_82Years_Female_NotHispanicOrLatino", - "Count_Person_83Years_Female_NotHispanicOrLatino", - "Count_Person_84Years_Female_NotHispanicOrLatino", - "Count_Person_85OrMoreYears_Female_NotHispanicOrLatino", - "Count_Person_8Years_Female_NotHispanicOrLatino", - "Count_Person_9Years_Female_NotHispanicOrLatino" + "Count_Person_10To14Years_Female_NativeHawaiianAndOtherPacificIslanderAlone" ] }, "Count_Person_Female_WhiteAlone": { "age": [ "Count_Person_0To4Years_Female_WhiteAlone", - "Count_Person_10To14Years_Female_WhiteAlone", - "Count_Person_15To19Years_Female_WhiteAlone", - "Count_Person_35To39Years_Female_WhiteAlone", - "Count_Person_40To44Years_Female_WhiteAlone", - "Count_Person_45To49Years_Female_WhiteAlone", - "Count_Person_50To54Years_Female_WhiteAlone" + "Count_Person_10To14Years_Female_WhiteAlone" ] }, "Count_Person_HispanicOrLatino": { - "age": [ - "Count_Person_0To4Years_HispanicOrLatino", - "Count_Person_10To14Years_HispanicOrLatino", - "Count_Person_15To19Years_HispanicOrLatino", - "Count_Person_20To24Years_HispanicOrLatino", - "Count_Person_25To29Years_HispanicOrLatino", - "Count_Person_30To34Years_HispanicOrLatino", - "Count_Person_35To39Years_HispanicOrLatino", - "Count_Person_40To44Years_HispanicOrLatino", - "Count_Person_45To49Years_HispanicOrLatino", - "Count_Person_50To54Years_HispanicOrLatino" - ], "gender": [ "Count_Person_Female_HispanicOrLatino", "Count_Person_Male_HispanicOrLatino" ] - }, - "Count_Person_Male_HispanicOrLatino": { - "age": [ - "Count_Person_0To4Years_Male_HispanicOrLatino", - "Count_Person_0Years_Male_HispanicOrLatino", - "Count_Person_10To14Years_Male_HispanicOrLatino", - "Count_Person_10Years_Male_HispanicOrLatino", - "Count_Person_11Years_Male_HispanicOrLatino", - "Count_Person_12Years_Male_HispanicOrLatino", - "Count_Person_13Years_Male_HispanicOrLatino", - "Count_Person_14Years_Male_HispanicOrLatino", - "Count_Person_15To19Years_Male_HispanicOrLatino", - "Count_Person_16Years_Male_HispanicOrLatino", - "Count_Person_17Years_Male_HispanicOrLatino", - "Count_Person_18Years_Male_HispanicOrLatino", - "Count_Person_19Years_Male_HispanicOrLatino", - "Count_Person_1Years_Male_HispanicOrLatino", - "Count_Person_20Years_Male_HispanicOrLatino", - "Count_Person_21Years_Male_HispanicOrLatino", - "Count_Person_22Years_Male_HispanicOrLatino", - "Count_Person_23Years_Male_HispanicOrLatino", - "Count_Person_24Years_Male_HispanicOrLatino", - "Count_Person_25Years_Male_HispanicOrLatino", - "Count_Person_26Years_Male_HispanicOrLatino", - "Count_Person_27Years_Male_HispanicOrLatino", - "Count_Person_28Years_Male_HispanicOrLatino", - "Count_Person_29Years_Male_HispanicOrLatino", - "Count_Person_2Years_Male_HispanicOrLatino", - "Count_Person_30Years_Male_HispanicOrLatino", - "Count_Person_31Years_Male_HispanicOrLatino", - "Count_Person_32Years_Male_HispanicOrLatino", - "Count_Person_33Years_Male_HispanicOrLatino", - "Count_Person_34Years_Male_HispanicOrLatino", - "Count_Person_35To39Years_Male_HispanicOrLatino", - "Count_Person_35Years_Male_HispanicOrLatino", - "Count_Person_36Years_Male_HispanicOrLatino", - "Count_Person_37Years_Male_HispanicOrLatino", - "Count_Person_38Years_Male_HispanicOrLatino", - "Count_Person_39Years_Male_HispanicOrLatino", - "Count_Person_3Years_Male_HispanicOrLatino", - "Count_Person_40To44Years_Male_HispanicOrLatino", - "Count_Person_40Years_Male_HispanicOrLatino", - "Count_Person_41Years_Male_HispanicOrLatino", - "Count_Person_42Years_Male_HispanicOrLatino", - "Count_Person_43Years_Male_HispanicOrLatino", - "Count_Person_44Years_Male_HispanicOrLatino", - "Count_Person_45To49Years_Male_HispanicOrLatino", - "Count_Person_45Years_Male_HispanicOrLatino", - "Count_Person_46Years_Male_HispanicOrLatino", - "Count_Person_47Years_Male_HispanicOrLatino", - "Count_Person_48Years_Male_HispanicOrLatino", - "Count_Person_49Years_Male_HispanicOrLatino", - "Count_Person_4Years_Male_HispanicOrLatino", - "Count_Person_50To54Years_Male_HispanicOrLatino", - "Count_Person_50Years_Male_HispanicOrLatino", - "Count_Person_51Years_Male_HispanicOrLatino", - "Count_Person_52Years_Male_HispanicOrLatino", - "Count_Person_53Years_Male_HispanicOrLatino", - "Count_Person_54Years_Male_HispanicOrLatino", - "Count_Person_55To59Years_Male_HispanicOrLatino", - "Count_Person_55Years_Male_HispanicOrLatino", - "Count_Person_56Years_Male_HispanicOrLatino", - "Count_Person_57Years_Male_HispanicOrLatino", - "Count_Person_58Years_Male_HispanicOrLatino", - "Count_Person_59Years_Male_HispanicOrLatino", - "Count_Person_60To64Years_Male_HispanicOrLatino", - "Count_Person_60Years_Male_HispanicOrLatino", - "Count_Person_61Years_Male_HispanicOrLatino", - "Count_Person_62Years_Male_HispanicOrLatino", - "Count_Person_63Years_Male_HispanicOrLatino", - "Count_Person_64Years_Male_HispanicOrLatino", - "Count_Person_65To69Years_Male_HispanicOrLatino", - "Count_Person_65Years_Male_HispanicOrLatino", - "Count_Person_66Years_Male_HispanicOrLatino", - "Count_Person_67Years_Male_HispanicOrLatino", - "Count_Person_68Years_Male_HispanicOrLatino", - "Count_Person_69Years_Male_HispanicOrLatino", - "Count_Person_6Years_Male_HispanicOrLatino", - "Count_Person_70To74Years_Male_HispanicOrLatino", - "Count_Person_70Years_Male_HispanicOrLatino", - "Count_Person_71Years_Male_HispanicOrLatino", - "Count_Person_72Years_Male_HispanicOrLatino", - "Count_Person_73Years_Male_HispanicOrLatino", - "Count_Person_74Years_Male_HispanicOrLatino", - "Count_Person_75To79Years_Male_HispanicOrLatino", - "Count_Person_75Years_Male_HispanicOrLatino", - "Count_Person_76Years_Male_HispanicOrLatino", - "Count_Person_77Years_Male_HispanicOrLatino", - "Count_Person_78Years_Male_HispanicOrLatino", - "Count_Person_79Years_Male_HispanicOrLatino", - "Count_Person_7Years_Male_HispanicOrLatino", - "Count_Person_80To84Years_Male_HispanicOrLatino", - "Count_Person_80Years_Male_HispanicOrLatino", - "Count_Person_81Years_Male_HispanicOrLatino", - "Count_Person_82Years_Male_HispanicOrLatino", - "Count_Person_83Years_Male_HispanicOrLatino", - "Count_Person_84Years_Male_HispanicOrLatino", - "Count_Person_8Years_Male_HispanicOrLatino", - "Count_Person_9Years_Male_HispanicOrLatino" - ] } }, "mainTopics": [ { - "dcid": "dc/topic/HispanicOrLatinoFemalePopulationByAge", - "name": "Hispanic or Latino Female Population by Age", + "dcid": "dc/topic/Race", + "name": "Population by Race", "types": [ "Topic" ] } ], "parentPlaces": [], - "parentTopics": [], + "parentTopics": [ + { + "dcid": "dc/topic/Demographics", + "name": "Demographics", + "types": [ + "Topic" + ] + } + ], "peerPlaces": [ { "dcid": "geoId/01", @@ -2283,7 +1470,50 @@ ] } ], - "peerTopics": [] + "peerTopics": [ + { + "dcid": "dc/topic/Age", + "name": "Age", + "types": [ + "Topic" + ] + }, + { + "dcid": "dc/topic/Gender", + "name": "Gender", + "types": [ + "Topic" + ] + }, + { + "dcid": "dc/topic/Language", + "name": "Language Spoken At Home", + "types": [ + "Topic" + ] + }, + { + "dcid": "dc/topic/MaritalStatus", + "name": "Marital Status", + "types": [ + "Topic" + ] + }, + { + "dcid": "dc/topic/Nationality", + "name": "Nationality", + "types": [ + "Topic" + ] + }, + { + "dcid": "dc/topic/Veterans", + "name": "Veterans", + "types": [ + "Topic" + ] + } + ] }, "svSource": "CURRENT_QUERY", "userMessages": [] 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 6254b44ea3..d533a5c5cf 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 @@ -1052,13 +1052,13 @@ }, "Count_Death_Female_2018": { "date": "2018", - "name": "Count of Mortality Event: Female", + "name": "Count Of Mortality Event: Female", "statVar": "Count_Death_Female" }, "Count_Death_Female_2018_10899698974849786843": { "date": "2018", "facetId": "10899698974849786843", - "name": "Count of Mortality Event: Female", + "name": "Count Of Mortality Event: Female", "statVar": "Count_Death_Female" }, "Count_Death_IntentionalSelfHarm_AsFractionOf_Count_Person_multiple_place_bar_block_2018": { 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 fc8743e157..6c0dfc8250 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 @@ -68,6 +68,102 @@ "description": "The total number of people in a population.", "title": "Population in States of United States" }, + { + "columns": [ + { + "tiles": [ + { + "lineTileSpec": { + "startDate": "2025" + }, + "statVarKey": [ + "GrowthRate_Count_Person_18369491376878146239" + ], + "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" + } + ] + } + ], + "description": "The percentage change in the total number of people in a population over a specific period.", + "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": [ { @@ -164,24 +260,16 @@ "startDate": "2025" }, "statVarKey": [ - "Count_Person_HispanicOrLatino_2615007932339303024" + "Count_Person_WhiteAlone_13407364759665129811", + "Count_Person_BlackOrAfricanAmericanAlone_13407364759665129811", + "Count_Person_HispanicOrLatino_2615007932339303024", + "Count_Person_AsianAlone_13407364759665129811", + "Count_Person_AmericanIndianAndAlaskaNativeAlone_13407364759665129811" ], - "title": "Hispanic Population in United States", + "title": "Monoracial Breakdown in United States", "type": "LINE" } ] - }, - { - "tiles": [ - { - "description": "Hispanic Population in United States", - "statVarKey": [ - "Count_Person_HispanicOrLatino" - ], - "title": "Hispanic Population in United States", - "type": "HIGHLIGHT" - } - ] } ], "denom": "Count_Person", @@ -251,6 +339,94 @@ "denom": "Count_Person", "title": "Black Monoracial Population in States of United States" }, + { + "columns": [ + { + "tiles": [ + { + "lineTileSpec": { + "startDate": "2025" + }, + "statVarKey": [ + "Count_Person_AmericanIndianAndAlaskaNativeAloneOrInCombinationWithOneOrMoreOtherRaces_13407364759665129811", + "Count_Person_AsianAloneOrInCombinationWithOneOrMoreOtherRaces_13407364759665129811", + "Count_Person_BlackOrAfricanAmericanAloneOrInCombinationWithOneOrMoreOtherRaces_13407364759665129811", + "Count_Person_NativeHawaiianAndOtherPacificIslanderAloneOrInCombinationWithOneOrMoreOtherRaces_13407364759665129811", + "Count_Person_WhiteAloneOrInCombinationWithOneOrMoreOtherRaces_13407364759665129811" + ], + "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": "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": [ { @@ -512,6 +688,39 @@ "denom": "Count_Person", "title": "Population With Current Employment in States of United States" }, + { + "columns": [ + { + "tiles": [ + { + "lineTileSpec": { + "startDate": "2025" + }, + "statVarKey": [ + "Count_Person_Urban_11768624408104514605" + ], + "title": "Population Living in Urban Areas in United States", + "type": "LINE" + } + ] + }, + { + "tiles": [ + { + "description": "Population Living in Urban Areas in United States", + "statVarKey": [ + "Count_Person_Urban" + ], + "title": "Population Living in Urban Areas in United States", + "type": "HIGHLIGHT" + } + ] + } + ], + "denom": "Count_Person", + "description": "Urban population refers to people living in urban areas as defined by national statistical offices. It is calculated using world bank population estimates and urban ratios from the united nations world urbanization prospects. Aggregation of urban and rural population may not add up to total population because of different country coverages. World bank staff estimates based on the united nations population Division's world urbanization prospects: 2018 revision.", + "title": "Population Living in Urban Areas" + }, { "columns": [ { @@ -550,15 +759,61 @@ "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_8912910856362438925": { "facetId": "8912910856362438925", "name": "Population", "statVar": "Count_Person" }, + "Count_Person_AmericanIndianAndAlaskaNativeAloneOrInCombinationWithOneOrMoreOtherRaces": { + "name": "American Indian and Alaska Native Population, Monoracial/Multiracial", + "statVar": "Count_Person_AmericanIndianAndAlaskaNativeAloneOrInCombinationWithOneOrMoreOtherRaces" + }, + "Count_Person_AmericanIndianAndAlaskaNativeAloneOrInCombinationWithOneOrMoreOtherRaces_13407364759665129811": { + "facetId": "13407364759665129811", + "name": "American Indian and Alaska Native Population, Monoracial/Multiracial", + "statVar": "Count_Person_AmericanIndianAndAlaskaNativeAloneOrInCombinationWithOneOrMoreOtherRaces" + }, + "Count_Person_AmericanIndianAndAlaskaNativeAlone_13407364759665129811": { + "facetId": "13407364759665129811", + "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_13407364759665129811": { + "facetId": "13407364759665129811", + "name": "Asian Population, Monoracial/Multiracial", + "statVar": "Count_Person_AsianAloneOrInCombinationWithOneOrMoreOtherRaces" + }, + "Count_Person_AsianAlone_13407364759665129811": { + "facetId": "13407364759665129811", + "name": "Population Asian Alone", + "statVar": "Count_Person_AsianAlone" + }, "Count_Person_BlackOrAfricanAmericanAlone": { "name": "Black Monoracial Population", "statVar": "Count_Person_BlackOrAfricanAmericanAlone" }, + "Count_Person_BlackOrAfricanAmericanAloneOrInCombinationWithOneOrMoreOtherRaces_13407364759665129811": { + "facetId": "13407364759665129811", + "name": "Black Population, Monoracial/Multiracial", + "statVar": "Count_Person_BlackOrAfricanAmericanAloneOrInCombinationWithOneOrMoreOtherRaces" + }, + "Count_Person_BlackOrAfricanAmericanAlone_13407364759665129811": { + "facetId": "13407364759665129811", + "name": "Black Monoracial Population", + "statVar": "Count_Person_BlackOrAfricanAmericanAlone" + }, "Count_Person_Employed": { "name": "Population With Current Employment", "statVar": "Count_Person_Employed" @@ -577,10 +832,6 @@ "name": "Women", "statVar": "Count_Person_Female" }, - "Count_Person_HispanicOrLatino": { - "name": "Hispanic Population", - "statVar": "Count_Person_HispanicOrLatino" - }, "Count_Person_HispanicOrLatino_2615007932339303024": { "facetId": "2615007932339303024", "name": "Hispanic Population", @@ -643,6 +894,11 @@ "name": "Men", "statVar": "Count_Person_Male" }, + "Count_Person_NativeHawaiianAndOtherPacificIslanderAloneOrInCombinationWithOneOrMoreOtherRaces_13407364759665129811": { + "facetId": "13407364759665129811", + "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" @@ -696,6 +952,15 @@ "name": "Total number of people residing in households", "statVar": "Count_Person_ResidesInHousehold" }, + "Count_Person_Urban": { + "name": "Population Living in Urban Areas", + "statVar": "Count_Person_Urban" + }, + "Count_Person_Urban_11768624408104514605": { + "facetId": "11768624408104514605", + "name": "Population Living in Urban Areas", + "statVar": "Count_Person_Urban" + }, "Count_Person_WhiteAlone": { "name": "White Monoracial Population", "statVar": "Count_Person_WhiteAlone" @@ -707,6 +972,25 @@ "Count_Person_WhiteAloneNotHispanicOrLatino_multiple_place_bar_block": { "name": "White Hispanic Monoracial Population", "statVar": "Count_Person_WhiteAloneNotHispanicOrLatino" + }, + "Count_Person_WhiteAloneOrInCombinationWithOneOrMoreOtherRaces_13407364759665129811": { + "facetId": "13407364759665129811", + "name": "White Population, Monoracial/Multiracial", + "statVar": "Count_Person_WhiteAloneOrInCombinationWithOneOrMoreOtherRaces" + }, + "Count_Person_WhiteAlone_13407364759665129811": { + "facetId": "13407364759665129811", + "name": "White Monoracial Population", + "statVar": "Count_Person_WhiteAlone" + }, + "GrowthRate_Count_Person": { + "name": "Rate of Population Growth", + "statVar": "GrowthRate_Count_Person" + }, + "GrowthRate_Count_Person_18369491376878146239": { + "facetId": "18369491376878146239", + "name": "Rate of Population Growth", + "statVar": "GrowthRate_Count_Person" } } } @@ -1151,27 +1435,39 @@ "Count_Person_Male" ], "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_WhiteAloneNotHispanicOrLatino" + "Count_Person_WhiteAlone", + "Count_Person_WhiteAloneNotHispanicOrLatino", + "Count_Person_WhiteAloneOrInCombinationWithOneOrMoreOtherRaces" + ] + }, + "Count_Person_AsianAlone": { + "ethnicity": [ + "Count_Person_HispanicOrLatino_AsianAlone", + "Count_Person_NotHispanicOrLatino_AsianAlone" ] } }, diff --git a/server/integration_tests/test_data/e2e_single_date/whatwastheaveragehousepricefor2brhouseinmountainviewdecadeago/chart_config.json b/server/integration_tests/test_data/e2e_single_date/whatwastheaveragehousepricefor2brhouseinmountainviewdecadeago/chart_config.json index fe868f7bf3..c92869ce70 100644 --- a/server/integration_tests/test_data/e2e_single_date/whatwastheaveragehousepricefor2brhouseinmountainviewdecadeago/chart_config.json +++ b/server/integration_tests/test_data/e2e_single_date/whatwastheaveragehousepricefor2brhouseinmountainviewdecadeago/chart_config.json @@ -488,7 +488,7 @@ }, "Count_HousingUnit_HomeValue100000To199999USDollar_multiple_place_bar_block_2016": { "date": "2016", - "name": "Count of Housing Unit: US Dollar 100000 To 199999, Occupied Housing Unit, Owner Occupied", + "name": "Count Of Housing Unit: US Dollar 100000 To 199999, Occupied Housing Unit, Owner Occupied", "statVar": "Count_HousingUnit_HomeValue100000To199999USDollar" }, "Count_HousingUnit_HomeValue1500000To1999999USDollar_multiple_place_bar_block_2016": { @@ -531,7 +531,7 @@ }, "Count_HousingUnit_HomeValue200000To299999USDollar_multiple_place_bar_block_2016": { "date": "2016", - "name": "Count of Housing Unit: US Dollar 200000 To 299999, Occupied Housing Unit, Owner Occupied", + "name": "Count Of Housing Unit: US Dollar 200000 To 299999, Occupied Housing Unit, Owner Occupied", "statVar": "Count_HousingUnit_HomeValue200000To299999USDollar" }, "Count_HousingUnit_HomeValue20000To24999USDollar_2016": { @@ -580,7 +580,7 @@ }, "Count_HousingUnit_HomeValue300000To499999USDollar_multiple_place_bar_block_2016": { "date": "2016", - "name": "Count of Housing Unit: US Dollar 300000 To 499999, Occupied Housing Unit, Owner Occupied", + "name": "Count Of Housing Unit: US Dollar 300000 To 499999, Occupied Housing Unit, Owner Occupied", "statVar": "Count_HousingUnit_HomeValue300000To499999USDollar" }, "Count_HousingUnit_HomeValue30000To34999USDollar_2016": { @@ -596,12 +596,12 @@ }, "Count_HousingUnit_HomeValue500000To999999USDollar_multiple_place_bar_block_2016": { "date": "2016", - "name": "Count of Housing Unit: US Dollar 500000 To 999999, Occupied Housing Unit, Owner Occupied", + "name": "Count Of Housing Unit: US Dollar 500000 To 999999, Occupied Housing Unit, Owner Occupied", "statVar": "Count_HousingUnit_HomeValue500000To999999USDollar" }, "Count_HousingUnit_HomeValue50000To99999USDollar_multiple_place_bar_block_2016": { "date": "2016", - "name": "Count of Housing Unit: US Dollar 50000 To 99999, Occupied Housing Unit, Owner Occupied", + "name": "Count Of Housing Unit: US Dollar 50000 To 99999, Occupied Housing Unit, Owner Occupied", "statVar": "Count_HousingUnit_HomeValue50000To99999USDollar" }, "Count_HousingUnit_HomeValue70000To79999USDollar_2016": { @@ -639,78 +639,78 @@ }, "Count_HousingUnit_HomeValueUpto49999USDollar_multiple_place_bar_block_2016": { "date": "2016", - "name": "Count of Housing Unit: US Dollar Upto 49999, Occupied Housing Unit, Owner Occupied", + "name": "Count Of Housing Unit: US Dollar Upto 49999, Occupied Housing Unit, Owner Occupied", "statVar": "Count_HousingUnit_HomeValueUpto49999USDollar" }, "Count_HousingUnit_WithTotal2Rooms_2016": { "date": "2016", - "name": "Count of Housing Unit: Rooms 2", + "name": "Count Of Housing Unit: Rooms 2", "statVar": "Count_HousingUnit_WithTotal2Rooms" }, "Count_HousingUnit_WithTotal2Rooms_2016_10169881228856630405": { "date": "2016", "facetId": "10169881228856630405", - "name": "Count of Housing Unit: Rooms 2", + "name": "Count Of Housing Unit: Rooms 2", "statVar": "Count_HousingUnit_WithTotal2Rooms" }, "dc/065dmg2ls1heb_multiple_place_bar_block_2016": { "date": "2016", - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 1500 To 1999", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 1500 To 1999", "statVar": "dc/065dmg2ls1heb" }, "dc/5jy4dp16mtssg_multiple_place_bar_block_2016": { "date": "2016", - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 0", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 0", "statVar": "dc/5jy4dp16mtssg" }, "dc/9b9gqxj27fqwc_multiple_place_bar_block_2016": { "date": "2016", - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 3000 Onwards", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 3000 Onwards", "statVar": "dc/9b9gqxj27fqwc" }, "dc/c9cl49nnrv5x4_multiple_place_bar_block_2016": { "date": "2016", - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 1500 To 1999", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 1500 To 1999", "statVar": "dc/c9cl49nnrv5x4" }, "dc/ejpm616jd1pq1_multiple_place_bar_block_2016": { "date": "2016", - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 2000 To 2999", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 2000 To 2999", "statVar": "dc/ejpm616jd1pq1" }, "dc/g0yn22m8r3639_multiple_place_bar_block_2016": { "date": "2016", - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar Upto 800", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar Upto 800", "statVar": "dc/g0yn22m8r3639" }, "dc/h34ge8t21h9m1_multiple_place_bar_block_2016": { "date": "2016", - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 800 To 1499", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 800 To 1499", "statVar": "dc/h34ge8t21h9m1" }, "dc/m60n94sqql2d3_multiple_place_bar_block_2016": { "date": "2016", - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 3000 Onwards", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 3000 Onwards", "statVar": "dc/m60n94sqql2d3" }, "dc/nrh9sl7zy12bf_multiple_place_bar_block_2016": { "date": "2016", - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 800 To 1499", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 800 To 1499", "statVar": "dc/nrh9sl7zy12bf" }, "dc/q0p7fcll1lv8c_multiple_place_bar_block_2016": { "date": "2016", - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar Upto 800", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar Upto 800", "statVar": "dc/q0p7fcll1lv8c" }, "dc/rkq1jgk08zfs7_multiple_place_bar_block_2016": { "date": "2016", - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 0", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 0", "statVar": "dc/rkq1jgk08zfs7" }, "dc/ye0f3ej72hhj7_multiple_place_bar_block_2016": { "date": "2016", - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 2000 To 2999", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 2000 To 2999", "statVar": "dc/ye0f3ej72hhj7" } } diff --git a/server/integration_tests/test_data/e2e_superlatives/asthmainnevada/chart_config.json b/server/integration_tests/test_data/e2e_superlatives/asthmainnevada/chart_config.json index 813d41d558..d20f9ffd6c 100644 --- a/server/integration_tests/test_data/e2e_superlatives/asthmainnevada/chart_config.json +++ b/server/integration_tests/test_data/e2e_superlatives/asthmainnevada/chart_config.json @@ -263,6 +263,11 @@ "childTopics": [], "exploreMore": { "Percent_Person_WithAsthma": { + "educationalAttainment": [ + "Percent_Person_Years18Onwards_EducationalAttainmentCollegeGraduate_WithAsthma", + "Percent_Person_Years18Onwards_EducationalAttainmentHighSchoolGraduateGedOrAlternative_WithAsthma", + "Percent_Person_Years18Onwards_EducationalAttainmentNotHighSchoolGraduateOrAlternative_WithAsthma" + ], "gender": [ "Percent_Person_Years18Onwards_Female_WithAsthma", "Percent_Person_Years18Onwards_Male_WithAsthma" diff --git a/server/integration_tests/test_data/e2e_superlatives/richestcountiesincalifornia/chart_config.json b/server/integration_tests/test_data/e2e_superlatives/richestcountiesincalifornia/chart_config.json index 9d937463ea..fe4bd85992 100644 --- a/server/integration_tests/test_data/e2e_superlatives/richestcountiesincalifornia/chart_config.json +++ b/server/integration_tests/test_data/e2e_superlatives/richestcountiesincalifornia/chart_config.json @@ -810,7 +810,7 @@ "statVar": "Count_HousingUnit_HomeValue1000000To1499999USDollar" }, "Count_HousingUnit_HomeValue100000To199999USDollar": { - "name": "Count of Housing Unit: US Dollar 100000 To 199999, Occupied Housing Unit, Owner Occupied", + "name": "Count Of Housing Unit: US Dollar 100000 To 199999, Occupied Housing Unit, Owner Occupied", "statVar": "Count_HousingUnit_HomeValue100000To199999USDollar" }, "Count_HousingUnit_HomeValue1500000To1999999USDollar": { @@ -818,23 +818,23 @@ "statVar": "Count_HousingUnit_HomeValue1500000To1999999USDollar" }, "Count_HousingUnit_HomeValue200000To299999USDollar": { - "name": "Count of Housing Unit: US Dollar 200000 To 299999, Occupied Housing Unit, Owner Occupied", + "name": "Count Of Housing Unit: US Dollar 200000 To 299999, Occupied Housing Unit, Owner Occupied", "statVar": "Count_HousingUnit_HomeValue200000To299999USDollar" }, "Count_HousingUnit_HomeValue300000To499999USDollar": { - "name": "Count of Housing Unit: US Dollar 300000 To 499999, Occupied Housing Unit, Owner Occupied", + "name": "Count Of Housing Unit: US Dollar 300000 To 499999, Occupied Housing Unit, Owner Occupied", "statVar": "Count_HousingUnit_HomeValue300000To499999USDollar" }, "Count_HousingUnit_HomeValue500000To999999USDollar": { - "name": "Count of Housing Unit: US Dollar 500000 To 999999, Occupied Housing Unit, Owner Occupied", + "name": "Count Of Housing Unit: US Dollar 500000 To 999999, Occupied Housing Unit, Owner Occupied", "statVar": "Count_HousingUnit_HomeValue500000To999999USDollar" }, "Count_HousingUnit_HomeValue50000To99999USDollar": { - "name": "Count of Housing Unit: US Dollar 50000 To 99999, Occupied Housing Unit, Owner Occupied", + "name": "Count Of Housing Unit: US Dollar 50000 To 99999, Occupied Housing Unit, Owner Occupied", "statVar": "Count_HousingUnit_HomeValue50000To99999USDollar" }, "Count_HousingUnit_HomeValueUpto49999USDollar": { - "name": "Count of Housing Unit: US Dollar Upto 49999, Occupied Housing Unit, Owner Occupied", + "name": "Count Of Housing Unit: US Dollar Upto 49999, Occupied Housing Unit, Owner Occupied", "statVar": "Count_HousingUnit_HomeValueUpto49999USDollar" }, "Count_Person_IncomeOf10000To14999USDollar": { @@ -866,15 +866,15 @@ "statVar": "Count_Person_IncomeOfUpto9999USDollar" }, "Median_Cost_HousingUnit_WithMortgage_OccupiedHousingUnit_OwnerOccupied_SelectedMonthlyOwnerCosts": { - "name": "Median Cost of Housing Unit (Selected Monthly Owner Costs): With Mortgage, Occupied Housing Unit, Owner Occupied", + "name": "Median Cost Of Housing Unit (Selected Monthly Owner Costs): With Mortgage, Occupied Housing Unit, Owner Occupied", "statVar": "Median_Cost_HousingUnit_WithMortgage_OccupiedHousingUnit_OwnerOccupied_SelectedMonthlyOwnerCosts" }, "Median_Cost_HousingUnit_WithoutMortgage_OccupiedHousingUnit_OwnerOccupied_SelectedMonthlyOwnerCosts": { - "name": "Median Cost of Housing Unit (Selected Monthly Owner Costs): Without Mortgage, Occupied Housing Unit, Owner Occupied", + "name": "Median Cost Of Housing Unit (Selected Monthly Owner Costs): Without Mortgage, Occupied Housing Unit, Owner Occupied", "statVar": "Median_Cost_HousingUnit_WithoutMortgage_OccupiedHousingUnit_OwnerOccupied_SelectedMonthlyOwnerCosts" }, "Median_HomeValue_HousingUnit_OccupiedHousingUnit_OwnerOccupied": { - "name": "Median Home Value of Housing Unit: Occupied Housing Unit, Owner Occupied", + "name": "Median Home Value Of Housing Unit: Occupied Housing Unit, Owner Occupied", "statVar": "Median_HomeValue_HousingUnit_OccupiedHousingUnit_OwnerOccupied" }, "Median_Income_Household": { @@ -902,7 +902,7 @@ "statVar": "dc/015d58s9xh8kd" }, "dc/065dmg2ls1heb": { - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 1500 To 1999", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 1500 To 1999", "statVar": "dc/065dmg2ls1heb" }, "dc/2wgh04kx6es88": { @@ -922,7 +922,7 @@ "statVar": "dc/5f3gkej4mrq24" }, "dc/5jy4dp16mtssg": { - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 0", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 0", "statVar": "dc/5jy4dp16mtssg" }, "dc/7jqw95h5wbelb": { @@ -930,7 +930,7 @@ "statVar": "dc/7jqw95h5wbelb" }, "dc/9b9gqxj27fqwc": { - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 3000 Onwards", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 3000 Onwards", "statVar": "dc/9b9gqxj27fqwc" }, "dc/9pmyhk89dj3pf": { @@ -942,19 +942,19 @@ "statVar": "dc/b4dj4sbgqybh7" }, "dc/c9cl49nnrv5x4": { - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 1500 To 1999", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 1500 To 1999", "statVar": "dc/c9cl49nnrv5x4" }, "dc/ejpm616jd1pq1": { - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 2000 To 2999", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 2000 To 2999", "statVar": "dc/ejpm616jd1pq1" }, "dc/g0yn22m8r3639": { - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar Upto 800", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar Upto 800", "statVar": "dc/g0yn22m8r3639" }, "dc/h34ge8t21h9m1": { - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 800 To 1499", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 800 To 1499", "statVar": "dc/h34ge8t21h9m1" }, "dc/jefhcs9qxc971": { @@ -970,19 +970,19 @@ "statVar": "dc/m07n4w3ywjzs3" }, "dc/m60n94sqql2d3": { - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 3000 Onwards", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 3000 Onwards", "statVar": "dc/m60n94sqql2d3" }, "dc/nrh9sl7zy12bf": { - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 800 To 1499", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 800 To 1499", "statVar": "dc/nrh9sl7zy12bf" }, "dc/q0p7fcll1lv8c": { - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar Upto 800", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar Upto 800", "statVar": "dc/q0p7fcll1lv8c" }, "dc/rkq1jgk08zfs7": { - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 0", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 0", "statVar": "dc/rkq1jgk08zfs7" }, "dc/t6m99mqmqxjbc": { @@ -994,7 +994,7 @@ "statVar": "dc/xj2nk2bg60fg" }, "dc/ye0f3ej72hhj7": { - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 2000 To 2999", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 2000 To 2999", "statVar": "dc/ye0f3ej72hhj7" }, "dc/yw52qqrrb2w11": { diff --git a/server/integration_tests/test_data/e2e_toolformer_rag_mode/foreignbornvs.nativeborninsunnyvale/chart_config.json b/server/integration_tests/test_data/e2e_toolformer_rag_mode/foreignbornvs.nativeborninsunnyvale/chart_config.json index b2d630df22..4eab75779b 100644 --- a/server/integration_tests/test_data/e2e_toolformer_rag_mode/foreignbornvs.nativeborninsunnyvale/chart_config.json +++ b/server/integration_tests/test_data/e2e_toolformer_rag_mode/foreignbornvs.nativeborninsunnyvale/chart_config.json @@ -518,7 +518,7 @@ ], "statVarSpec": { "Count_Household_ForeignBorn_PlaceOfBirthEurope": { - "name": "Count of Household: USC Foreign Born, Europe", + "name": "Count Of Household: USC Foreign Born, Europe", "statVar": "Count_Household_ForeignBorn_PlaceOfBirthEurope" }, "Count_Person_15OrMoreYears_MarriedAndNotSeparated_ForeignBorn": { @@ -570,7 +570,7 @@ "statVar": "Count_Person_USCitizenByNaturalization" }, "Median_Age_Person_ForeignBorn": { - "name": "Median Age of Person: USC Foreign Born", + "name": "Median Age Of Person: USC Foreign Born", "statVar": "Median_Age_Person_ForeignBorn" }, "dc/1lm9k2vdxj4c6": { diff --git a/server/integration_tests/test_data/e2e_toolformer_rag_mode/whichcaliforniacountieshavetheyoungestrecentmothers/chart_config.json b/server/integration_tests/test_data/e2e_toolformer_rag_mode/whichcaliforniacountieshavetheyoungestrecentmothers/chart_config.json index 8baef3df8c..f00e233a4c 100644 --- a/server/integration_tests/test_data/e2e_toolformer_rag_mode/whichcaliforniacountieshavetheyoungestrecentmothers/chart_config.json +++ b/server/integration_tests/test_data/e2e_toolformer_rag_mode/whichcaliforniacountieshavetheyoungestrecentmothers/chart_config.json @@ -484,19 +484,19 @@ "statVar": "Count_BirthEvent_LiveBirth_MotherLessThan9ThGrade" }, "Count_Person_15To19Years_BirthInThePast12Months_Female_AsAFractionOf_Count_Person_15To19Years_Female": { - "name": "Population: Years 15 To 19, Birth In The Past 12 Months, Female (As fraction of Count Person 15 To 19 Years Female)", + "name": "Population: Years 15 To 19, Birth In The Past 12 Months, Female (As Fraction Of Count Person 15 To 19 Years Female)", "statVar": "Count_Person_15To19Years_BirthInThePast12Months_Female_AsAFractionOf_Count_Person_15To19Years_Female" }, "Count_Person_15To50Years_BirthInThePast12Months_Female_AsAFractionOf_Count_Person_15To50Years_Female": { - "name": "Population: Years 15 To 50, Birth In The Past 12 Months, Female (As fraction of Count Person 15 To 50 Years Female)", + "name": "Population: Years 15 To 50, Birth In The Past 12 Months, Female (As Fraction Of Count Person 15 To 50 Years Female)", "statVar": "Count_Person_15To50Years_BirthInThePast12Months_Female_AsAFractionOf_Count_Person_15To50Years_Female" }, "Count_Person_16To50Years_BirthInThePast12Months_Female_AsAFractionOf_Count_Person_16To50Years_Female": { - "name": "Population: Years 16 To 50, Birth In The Past 12 Months, Female (As fraction of Count Person 16 To 50 Years Female)", + "name": "Population: Years 16 To 50, Birth In The Past 12 Months, Female (As Fraction Of Count Person 16 To 50 Years Female)", "statVar": "Count_Person_16To50Years_BirthInThePast12Months_Female_AsAFractionOf_Count_Person_16To50Years_Female" }, "Count_Person_35To50Years_BirthInThePast12Months_Female_AsAFractionOf_Count_Person_35To50Years_Female": { - "name": "Population: Years 35 To 50, Birth In The Past 12 Months, Female (As fraction of Count Person 35 To 50 Years Female)", + "name": "Population: Years 35 To 50, Birth In The Past 12 Months, Female (As Fraction Of Count Person 35 To 50 Years Female)", "statVar": "Count_Person_35To50Years_BirthInThePast12Months_Female_AsAFractionOf_Count_Person_35To50Years_Female" }, "Count_Person_WithOwnChildrenUnder18": { diff --git a/server/integration_tests/test_data/e2e_toolformer_rig_mode/whatistheinfantmortalityrateinmassachusetts/chart_config.json b/server/integration_tests/test_data/e2e_toolformer_rig_mode/whatistheinfantmortalityrateinmassachusetts/chart_config.json index 1e9e189702..50e26424c3 100644 --- a/server/integration_tests/test_data/e2e_toolformer_rig_mode/whatistheinfantmortalityrateinmassachusetts/chart_config.json +++ b/server/integration_tests/test_data/e2e_toolformer_rig_mode/whatistheinfantmortalityrateinmassachusetts/chart_config.json @@ -247,15 +247,15 @@ ], "statVarSpec": { "Count_Death_LessThan1Year_AsAFractionOf_Count_BirthEvent": { - "name": "Count of Mortality Event: Years Upto 1 (As fraction of Count Birth Event)", + "name": "Count Of Mortality Event: Years Upto 1 (As Fraction Of Count Birth Event)", "statVar": "Count_Death_LessThan1Year_AsAFractionOf_Count_BirthEvent" }, "Count_Death_LessThan1Year_Female_AsAFractionOf_Count_BirthEvent_Female": { - "name": "Count of Mortality Event: Years Upto 1, Female (As fraction of Count Birth Event Female)", + "name": "Count Of Mortality Event: Years Upto 1, Female (As Fraction Of Count Birth Event Female)", "statVar": "Count_Death_LessThan1Year_Female_AsAFractionOf_Count_BirthEvent_Female" }, "Count_Death_LessThan1Year_Male_AsAFractionOf_Count_BirthEvent_Male": { - "name": "Count of Mortality Event: Years Upto 1, Male (As fraction of Count Birth Event Male)", + "name": "Count Of Mortality Event: Years Upto 1, Male (As Fraction Of Count Birth Event Male)", "statVar": "Count_Death_LessThan1Year_Male_AsAFractionOf_Count_BirthEvent_Male" }, "Count_Death_Upto1Years_CertainConditionsOriginatingInThePerinatalPeriod": { diff --git a/server/integration_tests/test_data/e2e_us_demo/howdoobesityratescomparewithratesofdiabetesinusacounties/chart_config.json b/server/integration_tests/test_data/e2e_us_demo/howdoobesityratescomparewithratesofdiabetesinusacounties/chart_config.json index e410c97fcd..c8658b6778 100644 --- a/server/integration_tests/test_data/e2e_us_demo/howdoobesityratescomparewithratesofdiabetesinusacounties/chart_config.json +++ b/server/integration_tests/test_data/e2e_us_demo/howdoobesityratescomparewithratesofdiabetesinusacounties/chart_config.json @@ -106,7 +106,7 @@ ], "denom": "Count_Person", "startWithDenom": true, - "title": "Percent of Person: Years 20 Onwards, Male, Obesity vs. Diabetes" + "title": "Percent Of Person: Years 20 Onwards, Male, Obesity vs. Diabetes" }, { "columns": [ @@ -164,11 +164,11 @@ "unit": "%" }, "dc/x13tvt8jsgrm4": { - "name": "Percent of Person: Years 20 Onwards, Male, Obesity", + "name": "Percent Of Person: Years 20 Onwards, Male, Obesity", "statVar": "dc/x13tvt8jsgrm4" }, "dc/x13tvt8jsgrm4_scatter": { - "name": "Percent of Person: Years 20 Onwards, Male, Obesity", + "name": "Percent Of Person: Years 20 Onwards, Male, Obesity", "statVar": "dc/x13tvt8jsgrm4" } } diff --git a/server/integration_tests/test_data/e2e_us_demo/whatisthedemographicbreakdownofeastcarrollparish,la/chart_config.json b/server/integration_tests/test_data/e2e_us_demo/whatisthedemographicbreakdownofeastcarrollparish,la/chart_config.json index 96613d99ee..3bb6289c99 100644 --- a/server/integration_tests/test_data/e2e_us_demo/whatisthedemographicbreakdownofeastcarrollparish,la/chart_config.json +++ b/server/integration_tests/test_data/e2e_us_demo/whatisthedemographicbreakdownofeastcarrollparish,la/chart_config.json @@ -1111,7 +1111,7 @@ "statVar": "Count_Person_45To54Years" }, "Count_Person_55To64Years_multiple_place_bar_block": { - "name": "Population: Years 55 To 64", + "name": "Population: 55 - 64 Years", "statVar": "Count_Person_55To64Years" }, "Count_Person_5OrMoreYears_AfricanLanguagesSpokenAtHome": { @@ -1594,20 +1594,17 @@ "Count_Person_HispanicOrLatino", "Count_Person_HispanicOrLatino_AmericanIndianAndAlaskaNativeAloneOrInCombinationWithOneOrMoreOtherRaces", "Count_Person_HispanicOrLatino_AmericanIndianOrAlaskaNativeAlone", - "Count_Person_HispanicOrLatino_AsianAlone", "Count_Person_HispanicOrLatino_AsianAloneOrInCombinationWithOneOrMoreOtherRaces", "Count_Person_HispanicOrLatino_AsianOrPacificIslander", "Count_Person_HispanicOrLatino_BlackOrAfricanAmericanAlone", - "Count_Person_HispanicOrLatino_NativeHawaiianAndOtherPacificIslanderAloneOrInCombinationWithOneOrMoreOtherRaces", - "Count_Person_HispanicOrLatino_NativeHawaiianOrOtherPacificIslanderAlone", "Count_Person_HispanicOrLatino_TwoOrMoreRaces", - "Count_Person_HispanicOrLatino_WhiteAlone" + "Count_Person_NotHispanicOrLatino_BlackOrAfricanAmericanAlone" ] }, - "Count_Person_Divorced": { - "gender": [ - "Count_Person_Female_Divorced", - "Count_Person_Male_Divorced" + "Count_Person_AsianAlone": { + "ethnicity": [ + "Count_Person_HispanicOrLatino_AsianAlone", + "Count_Person_NotHispanicOrLatino_AsianAlone" ] }, "Median_Age_Person": { diff --git a/server/integration_tests/test_data/e2e_us_demo/whatisthemedianhouseholdincomeineastcarrollparish,la/chart_config.json b/server/integration_tests/test_data/e2e_us_demo/whatisthemedianhouseholdincomeineastcarrollparish,la/chart_config.json index b2adb5e57b..c48a551937 100644 --- a/server/integration_tests/test_data/e2e_us_demo/whatisthemedianhouseholdincomeineastcarrollparish,la/chart_config.json +++ b/server/integration_tests/test_data/e2e_us_demo/whatisthemedianhouseholdincomeineastcarrollparish,la/chart_config.json @@ -957,7 +957,7 @@ "statVar": "Median_Income_Household_HouseholderRaceHispanicOrLatino" }, "Median_Income_Household_HouseholderRaceTwoOrMoreRaces_multiple_place_bar_block": { - "name": "Median Income of Household: Two Or More Races", + "name": "Median Income Of Household: Two Or More Races", "statVar": "Median_Income_Household_HouseholderRaceTwoOrMoreRaces" }, "Median_Income_Household_HouseholderRaceWhiteAlone": { @@ -965,7 +965,7 @@ "statVar": "Median_Income_Household_HouseholderRaceWhiteAlone" }, "Median_Income_Household_HouseholderRaceWhiteAloneNotHispanicOrLatino_multiple_place_bar_block": { - "name": "Median Income of Household: White Alone Not Hispanic Or Latino", + "name": "Median Income Of Household: White Alone Not Hispanic Or Latino", "statVar": "Median_Income_Household_HouseholderRaceWhiteAloneNotHispanicOrLatino" }, "Median_Income_Household_HouseholderRaceWhiteAlone_multiple_place_bar_block": { @@ -993,7 +993,7 @@ "statVar": "Median_Income_Person_15OrMoreYears_Male_WithIncome" }, "Median_Income_Person_18OrMoreYears_Civilian_WithIncome": { - "name": "Median Income of Person: Years 18 Onwards, Civilian, With Income", + "name": "Median Income Of Person: Years 18 Onwards, Civilian, With Income", "statVar": "Median_Income_Person_18OrMoreYears_Civilian_WithIncome" } } diff --git a/server/integration_tests/test_data/explore_strict_multi_verb/howdoibuildandconstructahouseandsellitincaliforniawithlowincome/chart_config.json b/server/integration_tests/test_data/explore_strict_multi_verb/howdoibuildandconstructahouseandsellitincaliforniawithlowincome/chart_config.json index fbdc8f978e..aef966cce1 100644 --- a/server/integration_tests/test_data/explore_strict_multi_verb/howdoibuildandconstructahouseandsellitincaliforniawithlowincome/chart_config.json +++ b/server/integration_tests/test_data/explore_strict_multi_verb/howdoibuildandconstructahouseandsellitincaliforniawithlowincome/chart_config.json @@ -1,25 +1,51 @@ { "client": "test_detect-and-fulfill", - "config": {}, + "config": { + "categories": [ + { + "blocks": [ + { + "columns": [ + { + "tiles": [ + { + "type": "PLACE_OVERVIEW" + } + ] + } + ] + } + ] + } + ], + "metadata": { + "placeDcid": [ + "geoId/06" + ] + } + }, "context": {}, "debug": {}, "entities": [], "pastSourceContext": "", "place": { - "dcid": "", - "name": "", - "place_type": "" + "dcid": "geoId/06", + "name": "California", + "place_type": "State" }, "placeFallback": {}, - "placeSource": "UNRECOGNIZED", + "placeSource": "CURRENT_QUERY", "places": [ { - "dcid": "", - "name": "", - "place_type": "" + "dcid": "geoId/06", + "name": "California", + "place_type": "State" } ], "relatedThings": {}, - "svSource": "UNKNOWN", - "userMessages": [] + "showForm": true, + "svSource": "UNRECOGNIZED", + "userMessages": [ + "Could not recognize any topic from the query. See available topic categories for California." + ] } \ No newline at end of file diff --git a/server/integration_tests/test_data/explore_strict_multi_verb/tellmeasiancaliforniapopulationwithlowincome/chart_config.json b/server/integration_tests/test_data/explore_strict_multi_verb/tellmeasiancaliforniapopulationwithlowincome/chart_config.json index 3e37cfd523..a74d87ad92 100644 --- a/server/integration_tests/test_data/explore_strict_multi_verb/tellmeasiancaliforniapopulationwithlowincome/chart_config.json +++ b/server/integration_tests/test_data/explore_strict_multi_verb/tellmeasiancaliforniapopulationwithlowincome/chart_config.json @@ -998,15 +998,15 @@ ], "statVarSpec": { "Count_Household_WithEarnings_ForeignBorn_PlaceOfBirthAsia": { - "name": "Count of Household: With Earnings, USC Foreign Born, Asia", + "name": "Count Of Household: With Earnings, USC Foreign Born, Asia", "statVar": "Count_Household_WithEarnings_ForeignBorn_PlaceOfBirthAsia" }, "Count_Household_WithEarnings_ForeignBorn_PlaceOfBirthEasternAsia": { - "name": "Count of Household: With Earnings, USC Foreign Born, Eastern Asia", + "name": "Count Of Household: With Earnings, USC Foreign Born, Eastern Asia", "statVar": "Count_Household_WithEarnings_ForeignBorn_PlaceOfBirthEasternAsia" }, "Count_Household_WithRetirementIncomeInThePast12Months_ForeignBorn_PlaceOfBirthAsia": { - "name": "Count of Household: With Retirement Income In The Past 12 Months, USC Foreign Born, Asia", + "name": "Count Of Household: With Retirement Income In The Past 12 Months, USC Foreign Born, Asia", "statVar": "Count_Household_WithRetirementIncomeInThePast12Months_ForeignBorn_PlaceOfBirthAsia" }, "Count_Person_0To4Years_AsianAlone": { @@ -1182,15 +1182,15 @@ "statVar": "Count_Person_BelowPovertyLevelInThePast12Months_AsianAlone" }, "Mean_Earnings_Household_ForeignBorn_PlaceOfBirthAsia": { - "name": "Mean Earnings of Household: USC Foreign Born, Asia", + "name": "Mean Earnings Of Household: USC Foreign Born, Asia", "statVar": "Mean_Earnings_Household_ForeignBorn_PlaceOfBirthAsia" }, "Mean_Earnings_Household_ForeignBorn_PlaceOfBirthEasternAsia": { - "name": "Mean Earnings of Household: USC Foreign Born, Eastern Asia", + "name": "Mean Earnings Of Household: USC Foreign Born, Eastern Asia", "statVar": "Mean_Earnings_Household_ForeignBorn_PlaceOfBirthEasternAsia" }, "Mean_RetirementIncome_Household_ForeignBorn_PlaceOfBirthAsia": { - "name": "Mean Retirement Income of Household: USC Foreign Born, Asia", + "name": "Mean Retirement Income Of Household: USC Foreign Born, Asia", "statVar": "Mean_RetirementIncome_Household_ForeignBorn_PlaceOfBirthAsia" }, "Median_Age_Person_AsianAlone": { @@ -1198,11 +1198,11 @@ "statVar": "Median_Age_Person_AsianAlone" }, "Median_Income_Household_ForeignBorn_PlaceOfBirthAsia": { - "name": "Median Income of Household: USC Foreign Born, Asia", + "name": "Median Income Of Household: USC Foreign Born, Asia", "statVar": "Median_Income_Household_ForeignBorn_PlaceOfBirthAsia" }, "Median_Income_Household_ForeignBorn_PlaceOfBirthEasternAsia": { - "name": "Median Income of Household: USC Foreign Born, Eastern Asia", + "name": "Median Income Of Household: USC Foreign Born, Eastern Asia", "statVar": "Median_Income_Household_ForeignBorn_PlaceOfBirthEasternAsia" }, "Median_Income_Household_HouseholderRaceAsianAlone": { diff --git a/server/integration_tests/test_data/filter_query_disabled/chart_config.json b/server/integration_tests/test_data/filter_query_disabled/chart_config.json index 68b0710d95..786d30e109 100644 --- a/server/integration_tests/test_data/filter_query_disabled/chart_config.json +++ b/server/integration_tests/test_data/filter_query_disabled/chart_config.json @@ -955,7 +955,7 @@ "statVar": "Count_Person_45To54Years" }, "Count_Person_55To64Years_multiple_place_bar_block": { - "name": "Population: Years 55 To 64", + "name": "Population: 55 - 64 Years", "statVar": "Count_Person_55To64Years" }, "Count_Person_5To17Years": { @@ -999,7 +999,7 @@ "statVar": "Median_Age_Person_Female_WhiteAlone" }, "Median_Age_Person_ForeignBorn": { - "name": "Median Age of Person: USC Foreign Born", + "name": "Median Age Of Person: USC Foreign Born", "statVar": "Median_Age_Person_ForeignBorn" }, "Median_Age_Person_HispanicOrLatino": { diff --git a/server/integration_tests/test_data/fulfillment_api_basic/chart_config.json b/server/integration_tests/test_data/fulfillment_api_basic/chart_config.json index 602d045df2..d0a2f344e6 100644 --- a/server/integration_tests/test_data/fulfillment_api_basic/chart_config.json +++ b/server/integration_tests/test_data/fulfillment_api_basic/chart_config.json @@ -542,7 +542,7 @@ ], "statVarSpec": { "Mean_CommuteTime_Person_Years16Onwards_WorkCommute_Employed_WorkedOutsideOfHome": { - "name": "Mean Commute Time of Person: Years 16 Onwards, Work Commute, Employed, Worked Outside of Home", + "name": "Mean Commute Time Of Person: Years 16 Onwards, Work Commute, Employed, Worked Outside Of Home", "statVar": "Mean_CommuteTime_Person_Years16Onwards_WorkCommute_Employed_WorkedOutsideOfHome" }, "dc/0gettc3bc60cb": { diff --git a/server/integration_tests/test_data/fulfillment_api_comparison/chart_config.json b/server/integration_tests/test_data/fulfillment_api_comparison/chart_config.json index d75862cb03..54703b2525 100644 --- a/server/integration_tests/test_data/fulfillment_api_comparison/chart_config.json +++ b/server/integration_tests/test_data/fulfillment_api_comparison/chart_config.json @@ -193,7 +193,7 @@ ], "statVarSpec": { "Mean_CommuteTime_Person_Years16Onwards_WorkCommute_Employed_WorkedOutsideOfHome_multiple_place_bar_block": { - "name": "Mean Commute Time of Person: Years 16 Onwards, Work Commute, Employed, Worked Outside of Home", + "name": "Mean Commute Time Of Person: Years 16 Onwards, Work Commute, Employed, Worked Outside Of Home", "statVar": "Mean_CommuteTime_Person_Years16Onwards_WorkCommute_Employed_WorkedOutsideOfHome" }, "dc/0gettc3bc60cb_multiple_place_bar_block": { diff --git a/server/integration_tests/test_data/fulfillment_api_correlation/chart_config.json b/server/integration_tests/test_data/fulfillment_api_correlation/chart_config.json index 296b0a2200..bec59da644 100644 --- a/server/integration_tests/test_data/fulfillment_api_correlation/chart_config.json +++ b/server/integration_tests/test_data/fulfillment_api_correlation/chart_config.json @@ -817,6 +817,11 @@ ], "exploreMore": { "Percent_Person_WithAsthma": { + "educationalAttainment": [ + "Percent_Person_Years18Onwards_EducationalAttainmentCollegeGraduate_WithAsthma", + "Percent_Person_Years18Onwards_EducationalAttainmentHighSchoolGraduateGedOrAlternative_WithAsthma", + "Percent_Person_Years18Onwards_EducationalAttainmentNotHighSchoolGraduateOrAlternative_WithAsthma" + ], "gender": [ "Percent_Person_Years18Onwards_Female_WithAsthma", "Percent_Person_Years18Onwards_Male_WithAsthma" diff --git a/server/integration_tests/test_data/fulfillment_api_explore_more/chart_config.json b/server/integration_tests/test_data/fulfillment_api_explore_more/chart_config.json index a4d38c96fc..eb1b788541 100644 --- a/server/integration_tests/test_data/fulfillment_api_explore_more/chart_config.json +++ b/server/integration_tests/test_data/fulfillment_api_explore_more/chart_config.json @@ -564,10 +564,6 @@ "childTopics": [], "exploreMore": { "Count_Person_Divorced": { - "gender": [ - "Count_Person_Female_Divorced", - "Count_Person_Male_Divorced" - ], "nativity": [ "Count_Person_15OrMoreYears_Divorced_ForeignBorn", "Count_Person_15OrMoreYears_Divorced_Native" @@ -584,6 +580,18 @@ "Count_Person_15OrMoreYears_Divorced_WhiteAlone", "Count_Person_15OrMoreYears_Divorced_WhiteAloneNotHispanicOrLatino" ] + }, + "Count_Person_Female_Divorced": { + "age": [ + "Count_Person_15To19Years_Female_Divorced", + "Count_Person_16OrMoreYears_Female_Divorced" + ] + }, + "Count_Person_Male_Divorced": { + "age": [ + "Count_Person_15To19Years_Male_Divorced", + "Count_Person_16OrMoreYears_Male_Divorced" + ] } }, "mainTopics": [ diff --git a/server/integration_tests/test_data/international/query_1/chart_config.json b/server/integration_tests/test_data/international/query_1/chart_config.json index 3a6b6390a2..c01b65326b 100644 --- a/server/integration_tests/test_data/international/query_1/chart_config.json +++ b/server/integration_tests/test_data/international/query_1/chart_config.json @@ -734,7 +734,7 @@ ], "statVarSpec": { "Count_Household_Houseless_Rural": { - "name": "Count of Household: Houseless, Rural", + "name": "Count Of Household: Houseless, Rural", "statVar": "Count_Household_Houseless_Rural" }, "Count_Household_Rural": { diff --git a/server/integration_tests/test_data/international/query_4/chart_config.json b/server/integration_tests/test_data/international/query_4/chart_config.json index 03ed47f9eb..8f6efe3bf4 100644 --- a/server/integration_tests/test_data/international/query_4/chart_config.json +++ b/server/integration_tests/test_data/international/query_4/chart_config.json @@ -659,11 +659,11 @@ ], "statVarSpec": { "Count_BirthEvent": { - "name": "Count of Birth Event", + "name": "Count Of Birth Event", "statVar": "Count_BirthEvent" }, "Count_BirthEvent_AsAFractionOfCount_Person": { - "name": "Count of Birth Event (Per capita)", + "name": "Count Of Birth Event (Per Capita)", "statVar": "Count_BirthEvent_AsAFractionOfCount_Person" }, "Count_BirthEvent_LiveBirth_AsFractionOf_Count_Person": { diff --git a/server/integration_tests/test_data/international/query_5/chart_config.json b/server/integration_tests/test_data/international/query_5/chart_config.json index 6215579392..bbc67123d8 100644 --- a/server/integration_tests/test_data/international/query_5/chart_config.json +++ b/server/integration_tests/test_data/international/query_5/chart_config.json @@ -208,7 +208,7 @@ ], "statVarSpec": { "Area_FloodEvent": { - "name": "Area of Flood Event", + "name": "Area Of Flood Event", "statVar": "Area_FloodEvent" }, "Count_DroughtEvent": { @@ -220,11 +220,11 @@ "statVar": "Count_FloodEvent" }, "Max_Rainfall": { - "name": "Max Rainfall of Place", + "name": "Max Rainfall Of Place", "statVar": "Max_Rainfall" }, "Min_Rainfall": { - "name": "Min Rainfall of Place", + "name": "Min Rainfall Of Place", "statVar": "Min_Rainfall" } } diff --git a/server/integration_tests/test_data/international/query_6/chart_config.json b/server/integration_tests/test_data/international/query_6/chart_config.json index 31aa654331..5165f54131 100644 --- a/server/integration_tests/test_data/international/query_6/chart_config.json +++ b/server/integration_tests/test_data/international/query_6/chart_config.json @@ -339,11 +339,11 @@ ], "statVarSpec": { "Area_DroughtEvent": { - "name": "Area of Drought Event", + "name": "Area Of Drought Event", "statVar": "Area_DroughtEvent" }, "Area_FloodEvent": { - "name": "Area of Flood Event", + "name": "Area Of Flood Event", "statVar": "Area_FloodEvent" }, "Count_DroughtEvent": { @@ -355,15 +355,15 @@ "statVar": "Count_FloodEvent" }, "Max_Rainfall": { - "name": "Max Rainfall of Place", + "name": "Max Rainfall Of Place", "statVar": "Max_Rainfall" }, "Mean_Rainfall": { - "name": "Mean Rainfall of Place", + "name": "Mean Rainfall Of Place", "statVar": "Mean_Rainfall" }, "Min_Rainfall": { - "name": "Min Rainfall of Place", + "name": "Min Rainfall Of Place", "statVar": "Min_Rainfall" } } diff --git a/server/integration_tests/test_data/multisv/query_1/chart_config.json b/server/integration_tests/test_data/multisv/query_1/chart_config.json index e6dc601c4f..29d076bd9c 100644 --- a/server/integration_tests/test_data/multisv/query_1/chart_config.json +++ b/server/integration_tests/test_data/multisv/query_1/chart_config.json @@ -261,7 +261,7 @@ } ], "denom": "Count_Person", - "title": "Population Below poverty line vs. Percent of Person: Years 20 Onwards, Female, Obesity" + "title": "Population Below poverty line vs. Percent Of Person: Years 20 Onwards, Female, Obesity" }, { "columns": [ @@ -312,7 +312,7 @@ ] } ], - "title": "Population Below poverty line (Per Capita) vs. Percent of Person: Years 20 Onwards, Female, Obesity" + "title": "Population Below poverty line (Per Capita) vs. Percent Of Person: Years 20 Onwards, Female, Obesity" }, { "columns": [ @@ -333,7 +333,7 @@ } ], "denom": "Count_Person", - "title": "Women below Poverty Line vs. Percent of Person: Years 20 Onwards, Female, Obesity" + "title": "Women below Poverty Line vs. Percent Of Person: Years 20 Onwards, Female, Obesity" }, { "columns": [ @@ -354,7 +354,7 @@ } ], "denom": "Count_Person", - "title": "Males in Poverty (in last year) vs. Percent of Person: Years 20 Onwards, Female, Obesity" + "title": "Males in Poverty (in last year) vs. Percent Of Person: Years 20 Onwards, Female, Obesity" }, { "columns": [ @@ -375,7 +375,7 @@ } ], "denom": "Count_Person", - "title": "Population Below poverty line vs. Percent of Person: Years 20 Onwards, Male, Obesity" + "title": "Population Below poverty line vs. Percent Of Person: Years 20 Onwards, Male, Obesity" }, { "columns": [ @@ -428,7 +428,7 @@ } ], "denom": "Count_Person", - "title": "Population Below poverty line (Per Capita) vs. Percent of Person: Years 20 Onwards, Male, Obesity" + "title": "Population Below poverty line (Per Capita) vs. Percent Of Person: Years 20 Onwards, Male, Obesity" }, { "columns": [ @@ -449,7 +449,7 @@ } ], "denom": "Count_Person", - "title": "Women below Poverty Line vs. Percent of Person: Years 20 Onwards, Male, Obesity" + "title": "Women below Poverty Line vs. Percent Of Person: Years 20 Onwards, Male, Obesity" }, { "columns": [ @@ -470,7 +470,7 @@ } ], "denom": "Count_Person", - "title": "Males in Poverty (in last year) vs. Percent of Person: Years 20 Onwards, Male, Obesity" + "title": "Males in Poverty (in last year) vs. Percent Of Person: Years 20 Onwards, Male, Obesity" } ], "statVarSpec": { @@ -519,20 +519,20 @@ "unit": "%" }, "dc/4lvmzr1h1ylk1": { - "name": "Percent of Person: Years 20 Onwards, Female, Obesity", + "name": "Percent Of Person: Years 20 Onwards, Female, Obesity", "statVar": "dc/4lvmzr1h1ylk1" }, "dc/4lvmzr1h1ylk1_scatter": { - "name": "Percent of Person: Years 20 Onwards, Female, Obesity", + "name": "Percent Of Person: Years 20 Onwards, Female, Obesity", "noPerCapita": true, "statVar": "dc/4lvmzr1h1ylk1" }, "dc/x13tvt8jsgrm4": { - "name": "Percent of Person: Years 20 Onwards, Male, Obesity", + "name": "Percent Of Person: Years 20 Onwards, Male, Obesity", "statVar": "dc/x13tvt8jsgrm4" }, "dc/x13tvt8jsgrm4_scatter": { - "name": "Percent of Person: Years 20 Onwards, Male, Obesity", + "name": "Percent Of Person: Years 20 Onwards, Male, Obesity", "statVar": "dc/x13tvt8jsgrm4" } } diff --git a/server/integration_tests/test_data/multisv/query_2/chart_config.json b/server/integration_tests/test_data/multisv/query_2/chart_config.json index 046909cf29..ae03c0035a 100644 --- a/server/integration_tests/test_data/multisv/query_2/chart_config.json +++ b/server/integration_tests/test_data/multisv/query_2/chart_config.json @@ -255,7 +255,7 @@ "statVar": "Count_Household_FamilyHousehold_BelowPovertyLevelInThePast12Months" }, "Count_Household_HouseholderAge65OrMoreYears_FamilyHousehold_BelowPovertyLevelInThePast12Months_multiple_place_bar_block": { - "name": "Count of Household: Family Household, Years 65 Onwards, Below Poverty Level In The Past 12 Months", + "name": "Count Of Household: Family Household, Years 65 Onwards, Below Poverty Level In The Past 12 Months", "statVar": "Count_Household_HouseholderAge65OrMoreYears_FamilyHousehold_BelowPovertyLevelInThePast12Months" }, "Count_Household_MarriedCoupleFamilyHousehold_BelowPovertyLevelInThePast12Months_multiple_place_bar_block": { diff --git a/server/integration_tests/test_data/multisv/query_3/chart_config.json b/server/integration_tests/test_data/multisv/query_3/chart_config.json index 53fb53620f..3cce37e558 100644 --- a/server/integration_tests/test_data/multisv/query_3/chart_config.json +++ b/server/integration_tests/test_data/multisv/query_3/chart_config.json @@ -427,30 +427,13 @@ "exploreMore": { "Count_Person_HispanicOrLatino": { "age": [ - "Count_Person_0To4Years_HispanicOrLatino", - "Count_Person_0Years_HispanicOrLatino", - "Count_Person_10To14Years_HispanicOrLatino", - "Count_Person_10Years_HispanicOrLatino", - "Count_Person_11Years_HispanicOrLatino", - "Count_Person_12Years_HispanicOrLatino", - "Count_Person_13Years_HispanicOrLatino", - "Count_Person_14Years_HispanicOrLatino", "Count_Person_15OrMoreYears_HispanicOrLatino", "Count_Person_15To19Years_HispanicOrLatino", - "Count_Person_15Years_HispanicOrLatino", "Count_Person_16OrMoreYears_HispanicOrLatino", "Count_Person_16To19Years_HispanicOrLatino", - "Count_Person_16Years_HispanicOrLatino", - "Count_Person_17Years_HispanicOrLatino", "Count_Person_18To64Years_HispanicOrLatino", - "Count_Person_18Years_HispanicOrLatino", - "Count_Person_19Years_HispanicOrLatino", "Count_Person_1OrMoreYears_HispanicOrLatino", - "Count_Person_1Years_HispanicOrLatino", - "Count_Person_20To24Years_HispanicOrLatino", - "Count_Person_20Years_HispanicOrLatino", - "Count_Person_21To64Years_HispanicOrLatino", - "Count_Person_21Years_HispanicOrLatino" + "Count_Person_21To64Years_HispanicOrLatino" ] } }, diff --git a/server/integration_tests/test_data/place_detection_e2e_dc/query_2/chart_config.json b/server/integration_tests/test_data/place_detection_e2e_dc/query_2/chart_config.json index a0191ab887..fcb66b145c 100644 --- a/server/integration_tests/test_data/place_detection_e2e_dc/query_2/chart_config.json +++ b/server/integration_tests/test_data/place_detection_e2e_dc/query_2/chart_config.json @@ -1050,79 +1050,79 @@ "statVar": "Count_HousingUnit_HomeValueUpto10000USDollar" }, "Count_HousingUnit_HomeValueUpto49999USDollar": { - "name": "Count of Housing Unit: US Dollar Upto 49999, Occupied Housing Unit, Owner Occupied", + "name": "Count Of Housing Unit: US Dollar Upto 49999, Occupied Housing Unit, Owner Occupied", "statVar": "Count_HousingUnit_HomeValueUpto49999USDollar" }, "Median_Cost_HousingUnit_WithMortgage_OccupiedHousingUnit_OwnerOccupied_SelectedMonthlyOwnerCosts": { - "name": "Median Cost of Housing Unit (Selected Monthly Owner Costs): With Mortgage, Occupied Housing Unit, Owner Occupied", + "name": "Median Cost Of Housing Unit (Selected Monthly Owner Costs): With Mortgage, Occupied Housing Unit, Owner Occupied", "statVar": "Median_Cost_HousingUnit_WithMortgage_OccupiedHousingUnit_OwnerOccupied_SelectedMonthlyOwnerCosts" }, "Median_Cost_HousingUnit_WithoutMortgage_OccupiedHousingUnit_OwnerOccupied_SelectedMonthlyOwnerCosts": { - "name": "Median Cost of Housing Unit (Selected Monthly Owner Costs): Without Mortgage, Occupied Housing Unit, Owner Occupied", + "name": "Median Cost Of Housing Unit (Selected Monthly Owner Costs): Without Mortgage, Occupied Housing Unit, Owner Occupied", "statVar": "Median_Cost_HousingUnit_WithoutMortgage_OccupiedHousingUnit_OwnerOccupied_SelectedMonthlyOwnerCosts" }, "dc/065dmg2ls1heb": { - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 1500 To 1999", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 1500 To 1999", "statVar": "dc/065dmg2ls1heb" }, "dc/065dmg2ls1heb_multiple_place_bar_block": { - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 1500 To 1999", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 1500 To 1999", "statVar": "dc/065dmg2ls1heb" }, "dc/5jy4dp16mtssg": { - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 0", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 0", "statVar": "dc/5jy4dp16mtssg" }, "dc/5jy4dp16mtssg_multiple_place_bar_block": { - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 0", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 0", "statVar": "dc/5jy4dp16mtssg" }, "dc/9b9gqxj27fqwc": { - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 3000 Onwards", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 3000 Onwards", "statVar": "dc/9b9gqxj27fqwc" }, "dc/9b9gqxj27fqwc_multiple_place_bar_block": { - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 3000 Onwards", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 3000 Onwards", "statVar": "dc/9b9gqxj27fqwc" }, "dc/c9cl49nnrv5x4": { - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 1500 To 1999", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 1500 To 1999", "statVar": "dc/c9cl49nnrv5x4" }, "dc/c9cl49nnrv5x4_multiple_place_bar_block": { - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 1500 To 1999", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 1500 To 1999", "statVar": "dc/c9cl49nnrv5x4" }, "dc/ejpm616jd1pq1_multiple_place_bar_block": { - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 2000 To 2999", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 2000 To 2999", "statVar": "dc/ejpm616jd1pq1" }, "dc/g0yn22m8r3639_multiple_place_bar_block": { - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar Upto 800", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar Upto 800", "statVar": "dc/g0yn22m8r3639" }, "dc/h34ge8t21h9m1_multiple_place_bar_block": { - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 800 To 1499", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 800 To 1499", "statVar": "dc/h34ge8t21h9m1" }, "dc/m60n94sqql2d3_multiple_place_bar_block": { - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 3000 Onwards", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 3000 Onwards", "statVar": "dc/m60n94sqql2d3" }, "dc/nrh9sl7zy12bf_multiple_place_bar_block": { - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 800 To 1499", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 800 To 1499", "statVar": "dc/nrh9sl7zy12bf" }, "dc/q0p7fcll1lv8c_multiple_place_bar_block": { - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar Upto 800", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar Upto 800", "statVar": "dc/q0p7fcll1lv8c" }, "dc/rkq1jgk08zfs7_multiple_place_bar_block": { - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 0", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 0", "statVar": "dc/rkq1jgk08zfs7" }, "dc/ye0f3ej72hhj7_multiple_place_bar_block": { - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 2000 To 2999", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 2000 To 2999", "statVar": "dc/ye0f3ej72hhj7" } } diff --git a/server/integration_tests/test_data/place_detection_e2e_dc/query_3/chart_config.json b/server/integration_tests/test_data/place_detection_e2e_dc/query_3/chart_config.json index 68c3bfc97b..00082a9657 100644 --- a/server/integration_tests/test_data/place_detection_e2e_dc/query_3/chart_config.json +++ b/server/integration_tests/test_data/place_detection_e2e_dc/query_3/chart_config.json @@ -1050,79 +1050,79 @@ "statVar": "Count_HousingUnit_HomeValueUpto10000USDollar" }, "Count_HousingUnit_HomeValueUpto49999USDollar": { - "name": "Count of Housing Unit: US Dollar Upto 49999, Occupied Housing Unit, Owner Occupied", + "name": "Count Of Housing Unit: US Dollar Upto 49999, Occupied Housing Unit, Owner Occupied", "statVar": "Count_HousingUnit_HomeValueUpto49999USDollar" }, "Median_Cost_HousingUnit_WithMortgage_OccupiedHousingUnit_OwnerOccupied_SelectedMonthlyOwnerCosts": { - "name": "Median Cost of Housing Unit (Selected Monthly Owner Costs): With Mortgage, Occupied Housing Unit, Owner Occupied", + "name": "Median Cost Of Housing Unit (Selected Monthly Owner Costs): With Mortgage, Occupied Housing Unit, Owner Occupied", "statVar": "Median_Cost_HousingUnit_WithMortgage_OccupiedHousingUnit_OwnerOccupied_SelectedMonthlyOwnerCosts" }, "Median_Cost_HousingUnit_WithoutMortgage_OccupiedHousingUnit_OwnerOccupied_SelectedMonthlyOwnerCosts": { - "name": "Median Cost of Housing Unit (Selected Monthly Owner Costs): Without Mortgage, Occupied Housing Unit, Owner Occupied", + "name": "Median Cost Of Housing Unit (Selected Monthly Owner Costs): Without Mortgage, Occupied Housing Unit, Owner Occupied", "statVar": "Median_Cost_HousingUnit_WithoutMortgage_OccupiedHousingUnit_OwnerOccupied_SelectedMonthlyOwnerCosts" }, "dc/065dmg2ls1heb": { - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 1500 To 1999", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 1500 To 1999", "statVar": "dc/065dmg2ls1heb" }, "dc/065dmg2ls1heb_multiple_place_bar_block": { - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 1500 To 1999", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 1500 To 1999", "statVar": "dc/065dmg2ls1heb" }, "dc/5jy4dp16mtssg": { - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 0", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 0", "statVar": "dc/5jy4dp16mtssg" }, "dc/5jy4dp16mtssg_multiple_place_bar_block": { - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 0", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 0", "statVar": "dc/5jy4dp16mtssg" }, "dc/9b9gqxj27fqwc": { - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 3000 Onwards", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 3000 Onwards", "statVar": "dc/9b9gqxj27fqwc" }, "dc/9b9gqxj27fqwc_multiple_place_bar_block": { - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 3000 Onwards", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 3000 Onwards", "statVar": "dc/9b9gqxj27fqwc" }, "dc/c9cl49nnrv5x4": { - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 1500 To 1999", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 1500 To 1999", "statVar": "dc/c9cl49nnrv5x4" }, "dc/c9cl49nnrv5x4_multiple_place_bar_block": { - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 1500 To 1999", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 1500 To 1999", "statVar": "dc/c9cl49nnrv5x4" }, "dc/ejpm616jd1pq1_multiple_place_bar_block": { - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 2000 To 2999", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 2000 To 2999", "statVar": "dc/ejpm616jd1pq1" }, "dc/g0yn22m8r3639_multiple_place_bar_block": { - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar Upto 800", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar Upto 800", "statVar": "dc/g0yn22m8r3639" }, "dc/h34ge8t21h9m1_multiple_place_bar_block": { - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 800 To 1499", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 800 To 1499", "statVar": "dc/h34ge8t21h9m1" }, "dc/m60n94sqql2d3_multiple_place_bar_block": { - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 3000 Onwards", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 3000 Onwards", "statVar": "dc/m60n94sqql2d3" }, "dc/nrh9sl7zy12bf_multiple_place_bar_block": { - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 800 To 1499", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 800 To 1499", "statVar": "dc/nrh9sl7zy12bf" }, "dc/q0p7fcll1lv8c_multiple_place_bar_block": { - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar Upto 800", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar Upto 800", "statVar": "dc/q0p7fcll1lv8c" }, "dc/rkq1jgk08zfs7_multiple_place_bar_block": { - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 0", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 0", "statVar": "dc/rkq1jgk08zfs7" }, "dc/ye0f3ej72hhj7_multiple_place_bar_block": { - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 2000 To 2999", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 2000 To 2999", "statVar": "dc/ye0f3ej72hhj7" } } diff --git a/server/integration_tests/test_data/place_detection_e2e_dc/query_4/chart_config.json b/server/integration_tests/test_data/place_detection_e2e_dc/query_4/chart_config.json index ebc43a6bae..4576efa41c 100644 --- a/server/integration_tests/test_data/place_detection_e2e_dc/query_4/chart_config.json +++ b/server/integration_tests/test_data/place_detection_e2e_dc/query_4/chart_config.json @@ -456,63 +456,63 @@ "statVar": "Count_HousingUnit_HomeValueUpto10000USDollar" }, "Count_HousingUnit_HomeValueUpto49999USDollar_multiple_place_bar_block": { - "name": "Count of Housing Unit: US Dollar Upto 49999, Occupied Housing Unit, Owner Occupied", + "name": "Count Of Housing Unit: US Dollar Upto 49999, Occupied Housing Unit, Owner Occupied", "statVar": "Count_HousingUnit_HomeValueUpto49999USDollar" }, "Median_Cost_HousingUnit_WithMortgage_OccupiedHousingUnit_OwnerOccupied_SelectedMonthlyOwnerCosts_multiple_place_bar_block": { - "name": "Median Cost of Housing Unit (Selected Monthly Owner Costs): With Mortgage, Occupied Housing Unit, Owner Occupied", + "name": "Median Cost Of Housing Unit (Selected Monthly Owner Costs): With Mortgage, Occupied Housing Unit, Owner Occupied", "statVar": "Median_Cost_HousingUnit_WithMortgage_OccupiedHousingUnit_OwnerOccupied_SelectedMonthlyOwnerCosts" }, "Median_Cost_HousingUnit_WithoutMortgage_OccupiedHousingUnit_OwnerOccupied_SelectedMonthlyOwnerCosts_multiple_place_bar_block": { - "name": "Median Cost of Housing Unit (Selected Monthly Owner Costs): Without Mortgage, Occupied Housing Unit, Owner Occupied", + "name": "Median Cost Of Housing Unit (Selected Monthly Owner Costs): Without Mortgage, Occupied Housing Unit, Owner Occupied", "statVar": "Median_Cost_HousingUnit_WithoutMortgage_OccupiedHousingUnit_OwnerOccupied_SelectedMonthlyOwnerCosts" }, "dc/065dmg2ls1heb_multiple_place_bar_block": { - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 1500 To 1999", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 1500 To 1999", "statVar": "dc/065dmg2ls1heb" }, "dc/5jy4dp16mtssg_multiple_place_bar_block": { - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 0", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 0", "statVar": "dc/5jy4dp16mtssg" }, "dc/9b9gqxj27fqwc_multiple_place_bar_block": { - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 3000 Onwards", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 3000 Onwards", "statVar": "dc/9b9gqxj27fqwc" }, "dc/c9cl49nnrv5x4_multiple_place_bar_block": { - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 1500 To 1999", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 1500 To 1999", "statVar": "dc/c9cl49nnrv5x4" }, "dc/ejpm616jd1pq1_multiple_place_bar_block": { - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 2000 To 2999", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 2000 To 2999", "statVar": "dc/ejpm616jd1pq1" }, "dc/g0yn22m8r3639_multiple_place_bar_block": { - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar Upto 800", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar Upto 800", "statVar": "dc/g0yn22m8r3639" }, "dc/h34ge8t21h9m1_multiple_place_bar_block": { - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 800 To 1499", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 800 To 1499", "statVar": "dc/h34ge8t21h9m1" }, "dc/m60n94sqql2d3_multiple_place_bar_block": { - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 3000 Onwards", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 3000 Onwards", "statVar": "dc/m60n94sqql2d3" }, "dc/nrh9sl7zy12bf_multiple_place_bar_block": { - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 800 To 1499", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 800 To 1499", "statVar": "dc/nrh9sl7zy12bf" }, "dc/q0p7fcll1lv8c_multiple_place_bar_block": { - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar Upto 800", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar Upto 800", "statVar": "dc/q0p7fcll1lv8c" }, "dc/rkq1jgk08zfs7_multiple_place_bar_block": { - "name": "Count of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 0", + "name": "Count Of Housing Unit: With Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 0", "statVar": "dc/rkq1jgk08zfs7" }, "dc/ye0f3ej72hhj7_multiple_place_bar_block": { - "name": "Count of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 2000 To 2999", + "name": "Count Of Housing Unit: Without Mortgage, Occupied Housing Unit, Owner Occupied, US Dollar 2000 To 2999", "statVar": "dc/ye0f3ej72hhj7" } } diff --git a/server/integration_tests/test_data/place_detection_e2e_dc/query_5/chart_config.json b/server/integration_tests/test_data/place_detection_e2e_dc/query_5/chart_config.json index 809c138376..43c879c9e8 100644 --- a/server/integration_tests/test_data/place_detection_e2e_dc/query_5/chart_config.json +++ b/server/integration_tests/test_data/place_detection_e2e_dc/query_5/chart_config.json @@ -204,18 +204,18 @@ { "tiles": [ { - "description": "Population: Years 65 Onwards in Mexico City", + "description": "Population: 65 Years or More in Mexico City", "statVarKey": [ "Count_Person_65OrMoreYears" ], - "title": "Population: Years 65 Onwards in Mexico City", + "title": "Population: 65 Years or More in Mexico City", "type": "HIGHLIGHT" } ] } ], "denom": "Count_Person", - "title": "Population: Years 65 Onwards" + "title": "Population: 65 Years or More" }, { "columns": [ @@ -229,19 +229,19 @@ "statVarKey": [ "Count_Person_65OrMoreYears" ], - "title": "Population: Years 65 Onwards in Administrative Area 2 Places of Mexico City (${date})", + "title": "Population: 65 Years or More in Administrative Area 2 Places of Mexico City (${date})", "type": "RANKING" } ] } ], "denom": "Count_Person", - "title": "Population: Years 65 Onwards in Administrative Area 2 Places of Mexico City" + "title": "Population: 65 Years or More in Administrative Area 2 Places of Mexico City" } ], "statVarSpec": { "Count_BirthEvent": { - "name": "Count of Birth Event", + "name": "Count Of Birth Event", "statVar": "Count_BirthEvent" }, "Count_Person": { @@ -249,7 +249,7 @@ "statVar": "Count_Person" }, "Count_Person_65OrMoreYears": { - "name": "Population: Years 65 Onwards", + "name": "Population: 65 Years or More", "statVar": "Count_Person_65OrMoreYears" }, "Count_Person_Female": { diff --git a/server/integration_tests/test_data/place_detection_e2e_dc/query_6/chart_config.json b/server/integration_tests/test_data/place_detection_e2e_dc/query_6/chart_config.json index 4a7f107342..67bd8cb2da 100644 --- a/server/integration_tests/test_data/place_detection_e2e_dc/query_6/chart_config.json +++ b/server/integration_tests/test_data/place_detection_e2e_dc/query_6/chart_config.json @@ -971,23 +971,23 @@ "statVar": "Count_Household_FamilyHousehold_BelowPovertyLevelInThePast12Months" }, "Count_Household_FamilyHousehold_With0Worker_BelowPovertyLevelInThePast12Months": { - "name": "Count of Household: Family Household, Worker 0, Below Poverty Level In The Past 12 Months", + "name": "Count Of Household: Family Household, Worker 0, Below Poverty Level In The Past 12 Months", "statVar": "Count_Household_FamilyHousehold_With0Worker_BelowPovertyLevelInThePast12Months" }, "Count_Household_FamilyHousehold_With1Worker_BelowPovertyLevelInThePast12Months": { - "name": "Count of Household: Family Household, Worker 1, Below Poverty Level In The Past 12 Months", + "name": "Count Of Household: Family Household, Worker 1, Below Poverty Level In The Past 12 Months", "statVar": "Count_Household_FamilyHousehold_With1Worker_BelowPovertyLevelInThePast12Months" }, "Count_Household_FamilyHousehold_With2Worker_BelowPovertyLevelInThePast12Months": { - "name": "Count of Household: Family Household, Worker 2, Below Poverty Level In The Past 12 Months", + "name": "Count Of Household: Family Household, Worker 2, Below Poverty Level In The Past 12 Months", "statVar": "Count_Household_FamilyHousehold_With2Worker_BelowPovertyLevelInThePast12Months" }, "Count_Household_FamilyHousehold_With3OrMoreWorker_BelowPovertyLevelInThePast12Months": { - "name": "Count of Household: Family Household, Worker 3 Onwards, Below Poverty Level In The Past 12 Months", + "name": "Count Of Household: Family Household, Worker 3 Onwards, Below Poverty Level In The Past 12 Months", "statVar": "Count_Household_FamilyHousehold_With3OrMoreWorker_BelowPovertyLevelInThePast12Months" }, "Count_Household_HouseholderAge65OrMoreYears_FamilyHousehold_BelowPovertyLevelInThePast12Months": { - "name": "Count of Household: Family Household, Years 65 Onwards, Below Poverty Level In The Past 12 Months", + "name": "Count Of Household: Family Household, Years 65 Onwards, Below Poverty Level In The Past 12 Months", "statVar": "Count_Household_HouseholderAge65OrMoreYears_FamilyHousehold_BelowPovertyLevelInThePast12Months" }, "Count_Household_MarriedCoupleFamilyHousehold_BelowPovertyLevelInThePast12Months": { diff --git a/server/integration_tests/test_data/strict_multi_verb/query_1/chart_config.json b/server/integration_tests/test_data/strict_multi_verb/query_1/chart_config.json index eed1f836c1..7ff9d2a8df 100644 --- a/server/integration_tests/test_data/strict_multi_verb/query_1/chart_config.json +++ b/server/integration_tests/test_data/strict_multi_verb/query_1/chart_config.json @@ -1,25 +1,51 @@ { "client": "test", - "config": {}, + "config": { + "categories": [ + { + "blocks": [ + { + "columns": [ + { + "tiles": [ + { + "type": "PLACE_OVERVIEW" + } + ] + } + ] + } + ] + } + ], + "metadata": { + "placeDcid": [ + "geoId/06" + ] + } + }, "context": {}, "debug": {}, "entities": [], "pastSourceContext": "", "place": { - "dcid": "", - "name": "", - "place_type": "" + "dcid": "geoId/06", + "name": "California", + "place_type": "State" }, "placeFallback": {}, - "placeSource": "UNRECOGNIZED", + "placeSource": "CURRENT_QUERY", "places": [ { - "dcid": "", - "name": "", - "place_type": "" + "dcid": "geoId/06", + "name": "California", + "place_type": "State" } ], "relatedThings": {}, - "svSource": "UNKNOWN", - "userMessages": [] + "showForm": true, + "svSource": "UNRECOGNIZED", + "userMessages": [ + "Could not recognize any topic from the query. See available topic categories for California." + ] } \ No newline at end of file diff --git a/server/integration_tests/test_data/strict_multi_verb/query_2/chart_config.json b/server/integration_tests/test_data/strict_multi_verb/query_2/chart_config.json index f5fc2f6819..1c93ef20f3 100644 --- a/server/integration_tests/test_data/strict_multi_verb/query_2/chart_config.json +++ b/server/integration_tests/test_data/strict_multi_verb/query_2/chart_config.json @@ -998,15 +998,15 @@ ], "statVarSpec": { "Count_Household_WithEarnings_ForeignBorn_PlaceOfBirthAsia": { - "name": "Count of Household: With Earnings, USC Foreign Born, Asia", + "name": "Count Of Household: With Earnings, USC Foreign Born, Asia", "statVar": "Count_Household_WithEarnings_ForeignBorn_PlaceOfBirthAsia" }, "Count_Household_WithEarnings_ForeignBorn_PlaceOfBirthEasternAsia": { - "name": "Count of Household: With Earnings, USC Foreign Born, Eastern Asia", + "name": "Count Of Household: With Earnings, USC Foreign Born, Eastern Asia", "statVar": "Count_Household_WithEarnings_ForeignBorn_PlaceOfBirthEasternAsia" }, "Count_Household_WithRetirementIncomeInThePast12Months_ForeignBorn_PlaceOfBirthAsia": { - "name": "Count of Household: With Retirement Income In The Past 12 Months, USC Foreign Born, Asia", + "name": "Count Of Household: With Retirement Income In The Past 12 Months, USC Foreign Born, Asia", "statVar": "Count_Household_WithRetirementIncomeInThePast12Months_ForeignBorn_PlaceOfBirthAsia" }, "Count_Person_0To4Years_AsianAlone": { @@ -1182,15 +1182,15 @@ "statVar": "Count_Person_BelowPovertyLevelInThePast12Months_AsianAlone" }, "Mean_Earnings_Household_ForeignBorn_PlaceOfBirthAsia": { - "name": "Mean Earnings of Household: USC Foreign Born, Asia", + "name": "Mean Earnings Of Household: USC Foreign Born, Asia", "statVar": "Mean_Earnings_Household_ForeignBorn_PlaceOfBirthAsia" }, "Mean_Earnings_Household_ForeignBorn_PlaceOfBirthEasternAsia": { - "name": "Mean Earnings of Household: USC Foreign Born, Eastern Asia", + "name": "Mean Earnings Of Household: USC Foreign Born, Eastern Asia", "statVar": "Mean_Earnings_Household_ForeignBorn_PlaceOfBirthEasternAsia" }, "Mean_RetirementIncome_Household_ForeignBorn_PlaceOfBirthAsia": { - "name": "Mean Retirement Income of Household: USC Foreign Born, Asia", + "name": "Mean Retirement Income Of Household: USC Foreign Born, Asia", "statVar": "Mean_RetirementIncome_Household_ForeignBorn_PlaceOfBirthAsia" }, "Median_Age_Person_AsianAlone": { @@ -1198,11 +1198,11 @@ "statVar": "Median_Age_Person_AsianAlone" }, "Median_Income_Household_ForeignBorn_PlaceOfBirthAsia": { - "name": "Median Income of Household: USC Foreign Born, Asia", + "name": "Median Income Of Household: USC Foreign Born, Asia", "statVar": "Median_Income_Household_ForeignBorn_PlaceOfBirthAsia" }, "Median_Income_Household_ForeignBorn_PlaceOfBirthEasternAsia": { - "name": "Median Income of Household: USC Foreign Born, Eastern Asia", + "name": "Median Income Of Household: USC Foreign Born, Eastern Asia", "statVar": "Median_Income_Household_ForeignBorn_PlaceOfBirthEasternAsia" }, "Median_Income_Household_HouseholderRaceAsianAlone": { diff --git a/server/integration_tests/test_data/textbox_sample/query_1/chart_config.json b/server/integration_tests/test_data/textbox_sample/query_1/chart_config.json index be9b715fa2..47db673149 100644 --- a/server/integration_tests/test_data/textbox_sample/query_1/chart_config.json +++ b/server/integration_tests/test_data/textbox_sample/query_1/chart_config.json @@ -802,7 +802,7 @@ ], "statVarSpec": { "Count_Household_FamilyHousehold_With3OrMoreWorker": { - "name": "Count of Household: Family Household, Worker 3 Onwards", + "name": "Count Of Household: Family Household, Worker 3 Onwards", "statVar": "Count_Household_FamilyHousehold_With3OrMoreWorker" }, "Count_Person_15OrMoreYears_WithIncome": { diff --git a/server/integration_tests/test_data/usa_map_types/query_2/chart_config.json b/server/integration_tests/test_data/usa_map_types/query_2/chart_config.json index 23ea32b877..a2bd42dd5a 100644 --- a/server/integration_tests/test_data/usa_map_types/query_2/chart_config.json +++ b/server/integration_tests/test_data/usa_map_types/query_2/chart_config.json @@ -942,11 +942,11 @@ "statVar": "Median_Income_Household_HouseholderRaceNativeHawaiianOrOtherPacificIslanderAlone" }, "Median_Income_Household_HouseholderRaceSomeOtherRaceAlone_multiple_place_bar_block": { - "name": "Median Income of Household: Some Other Race Alone", + "name": "Median Income Of Household: Some Other Race Alone", "statVar": "Median_Income_Household_HouseholderRaceSomeOtherRaceAlone" }, "Median_Income_Household_HouseholderRaceTwoOrMoreRaces_multiple_place_bar_block": { - "name": "Median Income of Household: Two Or More Races", + "name": "Median Income Of Household: Two Or More Races", "statVar": "Median_Income_Household_HouseholderRaceTwoOrMoreRaces" }, "Median_Income_Household_HouseholderRaceWhiteAlone": { @@ -954,7 +954,7 @@ "statVar": "Median_Income_Household_HouseholderRaceWhiteAlone" }, "Median_Income_Household_HouseholderRaceWhiteAloneNotHispanicOrLatino_multiple_place_bar_block": { - "name": "Median Income of Household: White Alone Not Hispanic Or Latino", + "name": "Median Income Of Household: White Alone Not Hispanic Or Latino", "statVar": "Median_Income_Household_HouseholderRaceWhiteAloneNotHispanicOrLatino" }, "Median_Income_Household_HouseholderRaceWhiteAlone_multiple_place_bar_block": { @@ -982,7 +982,7 @@ "statVar": "Median_Income_Person_15OrMoreYears_Male_WithIncome" }, "Median_Income_Person_18OrMoreYears_Civilian_WithIncome": { - "name": "Median Income of Person: Years 18 Onwards, Civilian, With Income", + "name": "Median Income Of Person: Years 18 Onwards, Civilian, With Income", "statVar": "Median_Income_Person_18OrMoreYears_Civilian_WithIncome" } } diff --git a/server/lib/cache.py b/server/lib/cache.py index b8c073ca39..2950482417 100644 --- a/server/lib/cache.py +++ b/server/lib/cache.py @@ -17,6 +17,7 @@ import logging import os from pathlib import Path +import tempfile from typing import Callable, Optional, Union from flask import g @@ -149,6 +150,16 @@ def cohort_aware_redis_cache_factory(app, config, args, kwargs): db = config.get("CACHE_REDIS_DB") if db is not None: url_kwargs["db"] = db + password = config.get("CACHE_REDIS_PASSWORD") + if password: + url_kwargs["password"] = password + ca_cert = config.get("CACHE_REDIS_CA_CERT") + if ca_cert: + with tempfile.NamedTemporaryFile(mode="w", suffix=".pem", + delete=False) as ca_file: + ca_file.write(ca_cert) + ca_cert_path = ca_file.name + url_kwargs["ssl_ca_certs"] = ca_cert_path kwargs["host"] = redis_from_url(redis_url, **url_kwargs) return CohortAwareRedisCache(*args, **kwargs) @@ -189,12 +200,23 @@ def cohort_aware_null_cache_factory(app, config, args, kwargs): if redis_config: redis_host = redis_config['host'] redis_port = redis_config['port'] + redis_password = redis_config.get('password') or None + redis_ca_cert = redis_config.get('ca_cert') or None + redis_scheme = 'rediss' if redis_ca_cert else 'redis' _redis_cache = Cache( config={ - 'CACHE_TYPE': 'server.lib.cache.cohort_aware_redis_cache_factory', - 'CACHE_REDIS_HOST': redis_host, - 'CACHE_REDIS_PORT': redis_port, - 'CACHE_REDIS_URL': 'redis://{}:{}'.format(redis_host, redis_port) + 'CACHE_TYPE': + 'server.lib.cache.cohort_aware_redis_cache_factory', + 'CACHE_REDIS_HOST': + redis_host, + 'CACHE_REDIS_PORT': + redis_port, + 'CACHE_REDIS_PASSWORD': + redis_password, + 'CACHE_REDIS_CA_CERT': + redis_ca_cert, + 'CACHE_REDIS_URL': + '{}://{}:{}'.format(redis_scheme, redis_host, redis_port) }) model_cache = _redis_cache else: diff --git a/server/lib/feature_flags.py b/server/lib/feature_flags.py index 38c11f90a5..cea6e41207 100644 --- a/server/lib/feature_flags.py +++ b/server/lib/feature_flags.py @@ -35,8 +35,6 @@ ENABLE_STAT_VAR_AUTOCOMPLETE = 'enable_stat_var_autocomplete' ENABLE_NL_AGENT_DETECTOR = 'enable_nl_agent_detector' NEW_RANKING_PAGE = 'new_ranking_page' -# This flag controls the switching of detect-and-fulfill API to use v2/resolve from current nl search vars -USE_V2_RESOLVE_FOR_NL_SEARCH_VARS = 'use_v2_resolve_for_nl_search_vars' ENABLE_NL_V2NODE_FETCHALL = 'enable_nl_v2node_fetchall' CROISSANT_JSON_LD_FEATURE = 'show_croissant_json_ld' CROISSANT_EXTENDED_FEATURE = 'show_croissant_extended_feature' diff --git a/server/lib/nl/detection/variable.py b/server/lib/nl/detection/variable.py index 75670cff33..51a7122420 100644 --- a/server/lib/nl/detection/variable.py +++ b/server/lib/nl/detection/variable.py @@ -22,7 +22,6 @@ from server.lib.feature_flags import is_feature_enabled from server.lib.feature_flags import USE_CONFIG_THRESHOLD_FOR_SPANNER_EMBEDDING -from server.lib.feature_flags import USE_V2_RESOLVE_FOR_NL_SEARCH_VARS from server.lib.nl.common.counters import Counters from server.lib.nl.detection import query_util from server.lib.nl.detection.types import DetectionArgs @@ -85,33 +84,6 @@ def _detect_vars_with_resolve( return query2results, threshold -def _detect_vars_with_nl_search( - all_queries: List[str], dargs: DetectionArgs, debug_logs: Dict, - counters: Counters) -> tuple[Dict[str, vars.VarCandidates], float]: - """ - Detects variables using the traditional nl_search_vars API. - - Args - ---- - all_queries: A list of query strings. - dargs: Detection arguments including embedding indices and reranker. - debug_logs: A dictionary for logging debug information. - - Returns - ------- - A tuple containing the mapping of queries to candidates and the threshold. - - """ - resp = dc.nl_search_vars(all_queries, dargs.embeddings_index_types, - dargs.reranker) - query2results = { - q: vars.dict_to_var_candidates(r) for q, r in resp['queryResults'].items() - } - debug_logs.update(resp.get('debugLogs', {})) - counters.info("detect_variable_path", 'nl_search_vars') - return query2results, resp['scoreThreshold'] - - def detect_vars(orig_query: str, debug_logs: Dict, dargs: DetectionArgs, counters: Counters) -> vars.VarDetectionResult: @@ -150,13 +122,9 @@ def detect_vars(orig_query: str, debug_logs: Dict, dargs: DetectionArgs, # # 2. Lookup embeddings with both single-var and multi-var queries. # - # Make API call to the NL models/embeddings server. - if is_feature_enabled(USE_V2_RESOLVE_FOR_NL_SEARCH_VARS): - query2results, model_threshold = _detect_vars_with_resolve( - all_queries, debug_logs, counters) - else: - query2results, model_threshold = _detect_vars_with_nl_search( - all_queries, dargs, debug_logs, counters) + # Make API call to the Mixer resolve API. + query2results, model_threshold = _detect_vars_with_resolve( + all_queries, debug_logs, counters) # # 3. Prepare result candidates. diff --git a/server/lib/redis.py b/server/lib/redis.py index 8967d74a0a..918ae0fc70 100644 --- a/server/lib/redis.py +++ b/server/lib/redis.py @@ -22,12 +22,19 @@ _REDIS_CONFIG = '/datacommons/redis/redis.json' REDIS_HOST = os.environ.get('REDIS_HOST', '') REDIS_PORT = os.environ.get('REDIS_PORT', '6379') +REDIS_PASSWORD = os.environ.get('REDIS_PASSWORD', '') +REDIS_CA_CERT = os.environ.get('REDIS_CA_CERT', '') def get_redis_config(): # First check environment for redis configuration if REDIS_HOST: - return {"host": REDIS_HOST, "port": REDIS_PORT} + return { + "host": REDIS_HOST, + "port": REDIS_PORT, + "password": REDIS_PASSWORD, + "ca_cert": REDIS_CA_CERT, + } # Next try local redis config file (used in gke) if not os.path.isfile(_REDIS_CONFIG): return None @@ -42,4 +49,11 @@ def get_redis_config(): return None host = redis[region]["host"] port = redis[region]["port"] - return {"host": host, "port": port} + password = redis[region].get("password", REDIS_PASSWORD) + ca_cert = redis[region].get("ca_cert", REDIS_CA_CERT) + return { + "host": host, + "port": port, + "password": password, + "ca_cert": ca_cert + } diff --git a/server/routes/nl/html.py b/server/routes/nl/html.py index 1a05c18e0a..768c7f0ec1 100644 --- a/server/routes/nl/html.py +++ b/server/routes/nl/html.py @@ -14,22 +14,16 @@ """Data Commons NL Experimentation routes""" import json -import os import flask from flask import Blueprint from flask import current_app -from flask import redirect from flask import render_template -from flask import request -from flask import url_for import server.services.datacommons as dc bp = Blueprint('nl', __name__, url_prefix='/nl') -_TEST_SHEET_ID = '1egx7AzQ47wxxQL_7oawWnnD-oIblx1i9xGmjslabZic' - @bp.route('/eval/embeddings') def eval_embeddings(): @@ -38,33 +32,3 @@ def eval_embeddings(): server_config = dc.nl_server_config() return render_template('/eval_embeddings.html', server_config=json.dumps(server_config)) - - -@bp.route('/eval/rig') -def eval_rig(): - return redirect(url_for('nl.eval_retrieval_generation'), code=302) - - -@bp.route('/eval/retrieval_generation') -def eval_retrieval_generation(): - if not current_app.config.get('ENABLE_DATAGEMMA_EVAL_TOOLS', False): - flask.abort(404) - sheet_id = request.args.get('sheet_id') - if not sheet_id: - return redirect(url_for('nl.eval_retrieval_generation', - sheet_id=_TEST_SHEET_ID), - code=302) - return render_template('/eval_retrieval_generation.html', sheet_id=sheet_id) - - -@bp.route('/eval/retrieval_generation_sxs') -def eval_retrieval_generation_sxs(): - if not current_app.config.get('ENABLE_DATAGEMMA_EVAL_TOOLS', False): - flask.abort(404) - sheet_id_a = request.args.get('sheetIdA', '') - sheet_id_b = request.args.get('sheetIdB', '') - session_id = request.args.get('sessionId', '') - return render_template('/eval_retrieval_generation_sxs.html', - sheet_id_a=sheet_id_a, - sheet_id_b=sheet_id_b, - session_id=session_id) diff --git a/server/services/datacommons.py b/server/services/datacommons.py index e7ff075ea0..08ec3a7b45 100644 --- a/server/services/datacommons.py +++ b/server/services/datacommons.py @@ -683,6 +683,7 @@ def resolve(nodes, prop, resolver="place", target=None): return post(url, req) +# TODO: Delete when removing nl_server code & artifacts. def nl_search_vars( queries, index_types: List[str], @@ -690,59 +691,33 @@ def nl_search_vars( skip_topics="", ): """Search sv from NL server.""" - idx_params = ",".join(index_types) - nl_root = current_app.config["NL_ROOT"] - url = f"{nl_root}/api/search_vars?idx={idx_params}" - if reranker: - url = f"{url}&reranker={reranker}" - if skip_topics: - url = f"{url}&skip_topics={skip_topics}" - return post(url, {"queries": queries}) + return {} +# TODO: Delete when removing nl_server code & artifacts. async def nl_search_vars_in_parallel( queries: list[str], index_types: list[str], skip_topics: bool = False) -> dict[str, dict]: - """Search sv from NL server in parallel for multiple indexes. - - Args: - queries: A list of query strings. - index_types: A list of index names to query. - skip_topics: A boolean to skip topic-based SVs. - - Returns: - A dictionary mapping from index name to the search result from that index. - """ - - async def search_for_index(index): - result = await asyncio.to_thread( - nl_search_vars, - queries=queries, - index_types=[index], - skip_topics="true" if skip_topics else "", - ) - return index, result - - tasks = [search_for_index(index) for index in index_types] - results = await asyncio.gather(*tasks) - return {index: result for index, result in results} + """Search sv from NL server in parallel for multiple indexes.""" + return {} +# TODO: Delete when removing nl_server code & artifacts. def nl_detect_verbs(query): """Detect verbs from NL server.""" - url = f"{current_app.config['NL_ROOT']}/api/detect_verbs?q={query}" - return get(url) + return [] +# TODO: Delete when removing nl_server code & artifacts. def nl_encode(model, queries): """Encode queries from NL server.""" - url = f"{current_app.config['NL_ROOT']}/api/encode" - return post(url, {"model": model, "queries": queries}) + return [] +# TODO: Delete when removing nl_server code & artifacts. def nl_server_config(): - return get(f"{current_app.config['NL_ROOT']}/api/server_config") + return {} # ======================= V0 V0 V0 ================================ diff --git a/server/templates/eval_retrieval_generation.html b/server/templates/eval_retrieval_generation.html deleted file mode 100644 index 4b3d5a6aa7..0000000000 --- a/server/templates/eval_retrieval_generation.html +++ /dev/null @@ -1,34 +0,0 @@ -{# - Copyright 2024 Google LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -#} -{%- extends BASE_HTML -%} - -{% set main_id = 'eval-rig' %} -{% set page_id = 'eval-rig' %} -{% set title = 'DC RIG Eval Tool' %} - -{% block head %} - - -{% endblock %} - -{% block content %} -
-
-{% endblock %} - -{% block footer %} - -{% endblock %} diff --git a/server/templates/eval_retrieval_generation_sxs.html b/server/templates/eval_retrieval_generation_sxs.html deleted file mode 100644 index 93955e58a6..0000000000 --- a/server/templates/eval_retrieval_generation_sxs.html +++ /dev/null @@ -1,34 +0,0 @@ -{# - Copyright 2024 Google LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - #} - {%- extends BASE_HTML -%} - - {% set main_id = 'eval-sxs' %} - {% set page_id = 'eval-sxs' %} - {% set title = 'DC SXS Eval Tool' %} - - {% block head %} - - - {% endblock %} - - {% block content %} -
-
- {% endblock %} - - {% block footer %} - - {% endblock %} diff --git a/server/tests/services/datacommons_test.py b/server/tests/services/datacommons_test.py index 6585fed6f1..0b300495d5 100644 --- a/server/tests/services/datacommons_test.py +++ b/server/tests/services/datacommons_test.py @@ -191,49 +191,18 @@ class TestServiceDataCommonsNLSearchVars(unittest.TestCase): def setUp(self): self.app = Flask(__name__) - self.app.config["NL_ROOT"] = "fake_root" self.app_context = self.app.app_context() self.app_context.push() def tearDown(self): self.app_context.pop() - @mock.patch("server.services.datacommons.post") - def test_without_skip_topics(self, mock_post): - idx_param = "fake_index" - - def side_effect(url, data, headers=None): - assert url.endswith(f"/api/search_vars?idx={idx_param}") - self.assertEqual(data, {"queries": ["foo", "bar"]}) - return {} - - mock_post.side_effect = side_effect - - nl_search_vars( - queries=["foo", "bar"], - index_types=[idx_param], - ) - - assert mock_post.call_count == 1 - - @mock.patch("server.services.datacommons.post") - def test_with_skip_topics(self, mock_post): - idx_param = "fake_index" - - def side_effect(url, data, headers=None): - assert url.endswith(f"/api/search_vars?idx={idx_param}&skip_topics=true") - self.assertEqual(data, {"queries": ["foo", "bar"]}) - return {} - - mock_post.side_effect = side_effect - - nl_search_vars( + def test_nl_search_vars(self): + result = nl_search_vars( queries=["foo", "bar"], - index_types=[idx_param], - skip_topics="true", + index_types=["fake_index"], ) - - assert mock_post.call_count == 1 + self.assertEqual(result, {}) class TestServiceDataCommonsResolveIndicator(unittest.TestCase): @@ -432,7 +401,6 @@ class TestServiceDataCommonsNLSearchVarsInParallel( def setUp(self): self.app = Flask(__name__) - self.app.config["NL_ROOT"] = "fake_root" self.app.config["DC_API_KEY"] = "fake_key" self.app_context = self.app.app_context() self.app_context.push() @@ -443,59 +411,10 @@ def tearDown(self): self.app_context.pop() async def test_basic(self): - - # The function is called for each index type. - idx1_result = { - "queryResults": { - "foo": { - "SV": ["Count_Person"], - "CosineScore": [0.9], - "SV_to_Sentences": { - "Count_Person": [{ - "sentence": "person count", - "score": 0.9 - }] - }, - } - }, - "scoreThreshold": 0.7, - "debugLogs": { - "sv_detection_query_index_types": ["idx1"] - } - } - idx2_result = { - "queryResults": { - "foo": { - "SV": ["Count_Criminal"], - "CosineScore": [0.8] - } - }, - "scoreThreshold": 0.7, - } - - def side_effect(url, *args, **kwargs): - resp = Response() - resp.status_code = 200 - - if "idx1" in url: - # Setting the ._content attribute automatically makes both resp.json() and resp.text available. - resp._content = json.dumps(idx1_result).encode('utf-8') - - else: - resp._content = json.dumps(idx2_result).encode('utf-8') - - return resp - - with mock.patch('requests.post') as mock_post: - with self.app.test_request_context(): - mock_post.side_effect = side_effect - - result = await nl_search_vars_in_parallel(queries=["foo"], - index_types=["idx1", "idx2"], - skip_topics=True) - - self.assertEqual(result, {"idx1": idx1_result, "idx2": idx2_result}) - self.assertEqual(mock_post.call_count, 2) + result = await nl_search_vars_in_parallel(queries=["foo"], + index_types=["idx1", "idx2"], + skip_topics=True) + self.assertEqual(result, {}) class TestGetBestType(unittest.TestCase): diff --git a/server/webdriver/tests/homepage_test.py b/server/webdriver/tests/homepage_test.py index a14f6956eb..625fcb96bf 100644 --- a/server/webdriver/tests/homepage_test.py +++ b/server/webdriver/tests/homepage_test.py @@ -38,7 +38,7 @@ def test_homepage_en_by_css(self): self.assertTrue( find_elem(self.driver, by=By.ID, value='hero').text.startswith( - "Data Commons brings together the world's public data, making it simple to explore" + "Data Commons by Google brings together the world's public data, making it simple to explore" )) def test_homepage_it(self): @@ -52,7 +52,7 @@ def test_homepage_it(self): self.assertTrue( find_elem(self.driver, by=By.ID, value='hero').text.startswith( - "Data Commons brings together the world's public data, making it simple to explore" + "Data Commons by Google brings together the world's public data, making it simple to explore" )) # def test_hero_all_langs(self): diff --git a/skaffold.yaml b/skaffold.yaml index 744f055701..a4e49dbfbd 100644 --- a/skaffold.yaml +++ b/skaffold.yaml @@ -52,13 +52,6 @@ build: # Artifacts for Cloud Deploy - image: gcr.io/datcom-ci/datacommons-website context: build/web_server - - image: gcr.io/datcom-ci/datacommons-nl - context: build/nl_server - # This is an alias for the datacommons-nl image (tagged as mixer-sidecar). - # We use a separate artifact name here so Skaffold can track it independently - # from the main datacommons-nl artifact used by the website. - - image: gcr.io/datcom-ci/datacommons-embeddings-sidecar - context: build/nl_server - image: gcr.io/datcom-ci/datacommons-nodejs context: build/nodejs_server - image: gcr.io/datcom-ci/datacommons-mixer @@ -133,7 +126,7 @@ profiles: project: "datcom-website-dev" mixer.serviceName: "website-esp.endpoints.datcom-website-dev.cloud.goog" serviceGroups.recon.enableEmbeddingsSidecar: "false" - serviceGroups.default.enableEmbeddingsSidecar: "true" + serviceGroups.default.enableEmbeddingsSidecar: "false" mixer.githash: ${MIXER_GITHASH} - name: mixer-dev customActions: @@ -219,7 +212,7 @@ profiles: mixer.hostProject: "datcom-website-autopush" mixer.serviceName: "website-esp.endpoints.datcom-website-autopush.cloud.goog" serviceGroups.recon.enableEmbeddingsSidecar: "false" - serviceGroups.default.enableEmbeddingsSidecar: "true" + serviceGroups.default.enableEmbeddingsSidecar: "false" - name: mixer-autopush customActions: - name: deploy-cloud-esp-mixer-autopush @@ -326,7 +319,7 @@ profiles: project: "datcom-website-staging" mixer.serviceName: "website-esp.endpoints.datcom-website-staging.cloud.goog" serviceGroups.recon.enableEmbeddingsSidecar: "false" - serviceGroups.default.enableEmbeddingsSidecar: "true" + serviceGroups.default.enableEmbeddingsSidecar: "false" - name: mixer-staging customActions: - name: deploy-cloud-esp-mixer-staging @@ -460,4 +453,4 @@ profiles: project: "datcom-website-prod" mixer.serviceName: "website-esp.endpoints.datcom-website-prod.cloud.goog" serviceGroups.recon.enableEmbeddingsSidecar: "false" - serviceGroups.default.enableEmbeddingsSidecar: "true" + serviceGroups.default.enableEmbeddingsSidecar: "false" diff --git a/static/css/eval_retrieval_generation.scss b/static/css/eval_retrieval_generation.scss deleted file mode 100644 index e5ab00263a..0000000000 --- a/static/css/eval_retrieval_generation.scss +++ /dev/null @@ -1,653 +0,0 @@ -/** - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -@import "base"; - -header, -footer { - display: none; -} - -.main-content { - margin: 0; -} - -#dc-eval-retrieval-generation { - padding: 20px; - height: 100vh; - display: flex; - flex-direction: column; -} - -.google-sheet-link { - width: fit-content; -} - -#query-section, -.query-header { - text-wrap: wrap; - word-break: break-word; - font-size: 14px; -} - -.table-pane { - overflow: auto; - padding: 11px 24px; - width: 100%; - border-top: solid 1px var(--gm-3-sys-light-outline-variant); - flex-grow: 1; - - .Collapsible__trigger.is-open + .Collapsible__contentOuter { - overflow-x: visible !important; - overflow-y: hidden !important; - width: fit-content; - min-width: 100%; - } - - .table-title { - display: flex; - cursor: pointer; - font-size: 14px; - } - - .table-content { - height: 100%; - margin: 16px 0; - border-top: 1px solid var(--gm-3-ref-neutral-neutral-70); - - table { - height: 100%; - width: 100%; - font-size: 14px; - - thead { - border-bottom: 1px solid var(--gm-3-ref-neutral-neutral-20); - } - - th { - padding: 8px 6px; - font-weight: 500; - line-height: 20px; - } - - td { - line-height: 30px; - font-weight: 400; - padding: 0 6px; - } - - tr:not(:first-child) { - border-top: 1px solid var(--gm-3-ref-neutral-neutral-90); - } - } - } -} - -label { - display: block; -} - -.app-content { - display: flex; - flex-grow: 1; - overflow: auto; -} - -#query-section { - width: 50%; - max-width: 50%; - padding: 16px; - overflow: auto; /* This allows the div to scroll */ - - /* hack: markdown converts the footnotes title into h4 but we want it to be - the same as all our other titles */ - h4 { - font-size: $h3-font-size; - } - - hr { - display: none; - } -} - -.btn { - border-radius: 100px; - padding: 11px 24px 11px 16px; - div { - display: flex; - gap: 8px; - align-items: center; - font-size: 14px; - } -} - -.btn-transparent { - background-color: transparent; - border-color: var(--gm-3-sys-light-outline); - color: var(--link-color); -} - -.btn-transparent:hover { - background-color: rgba(#0b57d0, 0.08); - color: var(--link-color); -} - -.btn-blue { - background-color: var(--link-color); - color: white; - border: none; -} - -.btn-blue:hover { - background-color: var(--dc-primary); -} - -.feedback-pane { - display: flex; - flex-direction: column; - background-color: #f8fafd; - border-left: solid 1px var(--gm-3-sys-light-outline-variant); - width: 50%; - padding: 16px 0; - position: relative; - - .content { - display: flex; - flex-direction: column; - flex-grow: 1; - overflow: hidden; - } - - .button-section, - #question-section, - .feedback-nav-section { - padding: 0 24px; - } - - .button-section { - padding-bottom: 12px; - display: flex; - justify-content: space-between; - flex-wrap: wrap; - gap: 12px; - - .btn { - background-color: #d3e3fd; - color: #001d35; - border: none; - } - - .btn:hover { - box-shadow: 0px 1px 3px 1px #00000026; - } - } - - #question-section { - border-top: solid 1px var(--gm-3-sys-light-outline-variant); - padding: 16px 24px; - overflow: auto; - flex-shrink: 0; - - .question-section .title { - font-size: 11px; - font-weight: 500; - color: var(--gm-3-ref-neutral-neutral-50); - line-height: 16px; - } - - .question-section .subtitle { - font-size: 16px; - font-weight: 500; - line-height: 24px; - display: flex; - flex-direction: column; - margin-bottom: 6px; - - span { - width: fit-content; - } - } - } - - .feedback-nav-section { - padding-top: 24px; - display: flex; - align-items: center; - border-top: solid 1px var(--gm-3-sys-light-outline-variant); - - .nav-info .highlight { - font-size: 22px; - line-height: 28px; - color: #5e5e5e; - } - - .nav-info .regular { - font-size: 11px; - line-height: 16px; - color: #757575; - } - - .nav-buttons { - display: flex; - flex-grow: 1; - justify-content: flex-end; - gap: 8px; - } - } -} - -.modal-dialog.eval-list-modal { - height: 80%; - max-width: none; - width: 80%; - - .modal-content { - border-radius: 28px; - height: 100%; - } - - .modal-content .header { - border-bottom: solid 1px var(--gm-3-sys-light-outline-variant); - flex-grow: 0; - padding: 24px 24px 8px 24px; - - .title { - font-size: 24px; - font-weight: 500; - } - - .subtitle { - display: flex; - flex-wrap: wrap; - font-size: 14px; - font-weight: 400; - justify-content: space-between; - } - } - - .modal-content .body { - flex-grow: 1; - overflow-y: auto; - padding: 0 24px; - - .eval-list-query { - align-items: center; - border-bottom: solid 1px var(--gm-3-sys-light-outline-variant); - display: flex; - padding: 14px 0; - - .material-icons, - .material-icons-outlined, - .user { - flex-grow: 0; - padding: 0 16px; - } - - .query-name { - flex-grow: 1; - } - - .query-name, - .user { - font-size: 14px; - font-weight: 500; - } - - .material-icons, - .material-icons-outlined, - .query-name { - color: var(--link-color); - } - } - - .eval-list-query:hover { - cursor: pointer; - } - - .eval-list-query.completed { - - .material-icons, - .material-icons-outlined, - .query-name { - color: #146c2e; - } - } - - .eval-list-query.current { - .query-name { - font-weight: 800; - } - } - } - - .modal-content .footer { - display: flex; - flex-grow: 0; - justify-content: flex-end; - padding: 24px; - } -} - -.dc-stat { - background-color: #e2f6fd; -} - -.llm-stat { - background-color: #fccab6; -} - -.annotation.highlight { - font-size: 16px; - font-weight: 500; -} - -.annotation-rag .dc-stat, -.annotation-rag .dc-question { - background-color: transparent; -} - -.question-section .dc-stat, -.highlight .dc-stat { - background-color: lightblue; -} - -.question-section .llm-stat, -.highlight .llm-stat, -.question-section .dc-question, -.highlight .dc-question { - background-color: lightsalmon; -} - -#page-screen { - display: none; - position: absolute; - left: 0; - top: 0; - background: rgba(0, 0, 0, 0.6); - z-index: 100; - width: 100%; - height: 100%; -} - -.one-question { - display: flex; - align-items: center; - gap: 4px; - font-size: 14px; - - .question { - width: 157px; - font-weight: 500; - margin-bottom: 0.5rem; - padding: 20px 0; - } - - .options { - font-weight: 400; - padding: 16px 8px; - - input { - margin-right: 8px; - } - } -} - -.apply-to-next { - font-size: 14px; - font-weight: 400; - - input { - margin-right: 8px; - } -} - -.block-evaluation { - margin-bottom: 20px; - - .disabled { - opacity: 0.5; - } - - .counter-group { - display: flex; - flex-direction: row; - align-items: center; - - .counter { - flex: 1; - justify-content: center; - margin-top: 4px; - - .claim-text { - margin: 0 10px; - font-weight: 500; - } - - .button-container { - display: flex; - flex-direction: row; - align-items: center; - font-size: 16px; - - button { - border: none; - background-color: transparent; - cursor: pointer; - font-size: 24px; - width: 36px; - color: #007bff; - } - - .count-text { - font-size: 1.2em; - color: white; - width: 36px; - height: 26px; - border-radius: 4px; - display: flex; - justify-content: space-around; - align-items: center; - background-color: #007bff; - } - } - } - } -} - -/* SXS eval specific styling */ - -#dc-eval-sxs { - padding: 0; - height: 100vh; - display: flex; - flex-direction: column; -} - -.banner { - padding: 20px 20px 0; -} - -.sxs-app-content { - display: flex; - flex-direction: column; - flex: 1 1 100%; - height: 0; -} - -.query-header { - border-top: solid 1px var(--gm-3-sys-light-outline-variant); - border-bottom: solid 1px var(--gm-3-sys-light-outline-variant); - padding: 20px; -} - -.sxs-panes { - display: flex; - flex-direction: row; - overflow: auto; - flex: 1 1 100%; -} - -.sxs-app-content .divider { - flex: 0 0 1px; - background-color: var(--gm-3-sys-light-outline-variant); -} - -.sxs-pane-scroll-wrapper { - overflow: auto; - height: 100%; - flex: 1 1 100%; - width: 0; -} - -.annotation.inline-stat { - padding: 1px 2px; - border-radius: 4px; - - .llm-stat { - background-color: unset; - } - - &.annotation-no-dc-stat { - background-color: var(--gm-3-sys-light-surface-container-highest); - - .material-icons-outlined { - color: var(--gm-3-sys-on-surface-secondary); - } - } - - &:not(annotation-no-dc-stat) { - background-color: var(--gm-3-sys-light-primary-90); - - .material-icons-outlined { - color: #0842A0; - } - } -} - -.dc-stat-tooltip { - display: none; // Changes to inline-flex when tooltip is visible. - flex-direction: column; - gap: 4px; - - z-index: 999; - position: absolute; - top: 0; - // X position is set with JS when the tooltip is activated. - transform: translateY(calc(-100% - 6px)); - - background-color: var(--gm-3-sys-light-surface-container); - box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.30); - - border-radius: 12px; - padding: 12px 16px; - - text-align: left; - text-wrap: wrap; - word-break: normal; - width: max-content; - max-width: 312px; - - font-style: normal; - font-weight: normal; - line-height: normal; - font-size: 12px; - color: var(--gm-3-sys-light-on-surface-variant); - - .dc-stat-tooltip-title, - .dc-stat-tooltip-link { - font-weight: 500 - } - .dc-stat-tooltip-link { - padding: 4px 0; - } -} - -.llm-stat { - display: inline-flex; - gap: 2px; - pointer-events: none; // Let events hit .annotation parent instead - - .material-icons, - .material-icons-outlined { - font-size: inherit; - line-height: inherit; - padding: 0; - } -} - -.annotation { - // Use relative position so tooltip can be absolutely positioned. - position: relative; -} - -// Show tooltip and tooltip arrow on hover. -.annotation.annotation-active { - - .dc-stat-tooltip { - display: inline-flex; - } -} - -.sxs-pane { - display: flex; - flex-direction: column; - - - #query-section { - max-width: 100%; - width: 100%; - flex-shrink: 0; - } -} - -.feedback-pane.feedback-pane-footer { - width: 100%; - align-self: flex-end; - border-left: none; - border-top: solid 1px var(--gm-3-sys-light-outline-variant); - padding: 24px; - - .content { - padding: 0 0 24px; - } - - .feedback-nav-section { - border: none; - padding: 0; - } -} - -.sxs-feedback-form { - display: flex; - flex-direction: row; - align-items: center; - justify-content: center; - gap: 50px; - - .one-question { - align-items: center; - - .question { - margin: 0; - padding: 0 20px 0 0; - width: unset; - } - - .options { - padding: 0; - } -} -} diff --git a/static/js/apps/datagemma/app.tsx b/static/js/apps/datagemma/app.tsx index 6a9bdd1707..c10afba569 100644 --- a/static/js/apps/datagemma/app.tsx +++ b/static/js/apps/datagemma/app.tsx @@ -33,7 +33,25 @@ import remarkGfm from "remark-gfm"; import theme from "../../theme/theme"; import { stringifyFn } from "../../utils/axios"; import { updateHash } from "../../utils/url_utils"; -import { processTableText } from "../eval_retrieval_generation/util"; +// Assume a sequence of three or more dashes is the table divider. +const TABLE_DIVIDER_PATTERN = /[-]{3,}/g; +// Assume any sequence of 1 or more characters that are not pipes is a table +// header value. +const TABLE_HEADER_TEXT_PATTERN = /[^|]+/g; + +function processTableText(text: string): string { + if (!text) { + return ""; + } + // Get a copy of the table header + const tableHeader = _.cloneDeep(text).split("\n", 1)[0]; + // Replace all the text in the header with "-" to create the table divider + // example: abc | cd -> -|- + const tableDivider = tableHeader.replace(TABLE_HEADER_TEXT_PATTERN, "-"); + // Replace the table divider that's originally in the text with the one just + // created + return text.replace(TABLE_DIVIDER_PATTERN, tableDivider); +} // Constants for query modes const RIG_MODE = "rig"; diff --git a/static/js/apps/eval_retrieval_generation/app.tsx b/static/js/apps/eval_retrieval_generation/app.tsx deleted file mode 100644 index f7ff62ffe4..0000000000 --- a/static/js/apps/eval_retrieval_generation/app.tsx +++ /dev/null @@ -1,162 +0,0 @@ -/** - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { OAuthCredential, User } from "firebase/auth"; -import { GoogleSpreadsheet } from "google-spreadsheet"; -import React, { useContext, useEffect, useState } from "react"; - -import { signInWithGoogle } from "../../utils/google_signin"; -import { CallFeedback } from "./call_feedback"; -import { AppContext, SessionContext } from "./context"; -import { OverallFeedback } from "./overall_feedback"; -import { QuerySection } from "./query_section"; -import { RagAnsFeedback } from "./rag_ans_feedback"; -import { AllQuery, DcCalls, EvalType, FeedbackStage, Query } from "./types"; -import { getDocInfo, getFirstFeedbackStage } from "./util"; - -interface AppPropType { - sheetId: string; -} - -// Get first query to show which should be the first question of this user or a -// question with no user. -function getFirstQuery(allQuery: AllQuery, userEmail: string): number { - let queryId: number = null; - let nullQueryId: number = null; - const sortedQueryIds = Object.keys(allQuery) - .map((qKey) => Number(qKey)) - .sort((a, b) => a - b); - for (const qId of sortedQueryIds) { - if (allQuery[qId].user === userEmail) { - queryId = qId; - break; - } - if (nullQueryId === null && allQuery[qId].user === null) { - nullQueryId = qId; - } - } - if (queryId === null && nullQueryId !== null) { - queryId = nullQueryId; - } - if (queryId !== null) { - return queryId; - } else { - return sortedQueryIds[0]; - } -} - -export function App(props: AppPropType): JSX.Element { - const { - setSessionQueryId, - setFeedbackStage, - feedbackStage, - sessionQueryId, - sessionCallId, - } = useContext(SessionContext); - const [user, setUser] = useState(null); - const [doc, setDoc] = useState(null); - const [allQuery, setAllQuery] = useState>(null); - const [allCall, setAllCall] = useState>(null); - const [evalType, setEvalType] = useState(null); - - // Sign in automatically. - useEffect(() => { - const scopes = ["https://www.googleapis.com/auth/spreadsheets"]; - - const handleUserSignIn = async ( - user: User, - credential: OAuthCredential - ): Promise => { - if (credential.accessToken) { - setUser(user); // Set the user state to the signed-in user - const doc = new GoogleSpreadsheet(props.sheetId, { - token: credential.accessToken, - }); - await doc.loadInfo(); - setDoc(doc); - getDocInfo(doc).then((docInfo) => { - setAllCall(docInfo.allCall); - setAllQuery(docInfo.allQuery); - setFeedbackStage(getFirstFeedbackStage(docInfo.evalType)); - setEvalType(docInfo.evalType); - setSessionQueryId(getFirstQuery(docInfo.allQuery, user.email)); - }); - } - }; - - signInWithGoogle(scopes, handleUserSignIn); - }, [props.sheetId, setFeedbackStage, setSessionQueryId]); - - const initialLoadCompleted = - allQuery && allCall && doc && sessionQueryId && evalType; - return ( - <> - {!user && ( -
-

Signing you in...

-

- If you are not signed in after a few seconds, check that pop-ups are - allowed and refresh the page. -

-
- )} - - {user && ( - <> - - Google Sheet Link - -

Signed in as {user.email}

- {!initialLoadCompleted &&

Loading query...

} - {initialLoadCompleted && ( - -
- - {(feedbackStage === FeedbackStage.OVERALL_ANS || - feedbackStage === FeedbackStage.OVERALL_QUESTIONS) && ( - - )} - {feedbackStage === FeedbackStage.CALLS && } - {feedbackStage === FeedbackStage.RAG_ANS && } -
-
- )} - - )} - - ); -} diff --git a/static/js/apps/eval_retrieval_generation/call_feedback.tsx b/static/js/apps/eval_retrieval_generation/call_feedback.tsx deleted file mode 100644 index 25adb65a2c..0000000000 --- a/static/js/apps/eval_retrieval_generation/call_feedback.tsx +++ /dev/null @@ -1,283 +0,0 @@ -/** - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* Component to record feedback for a call within a query */ - -import React, { FormEvent, useContext, useEffect, useState } from "react"; - -import { loadSpinner, removeSpinner } from "../../shared/util"; -import { - DC_QUESTION_FEEDBACK_COL, - DC_RESPONSE_FEEDBACK_COL, - FEEDBACK_PANE_ID, - LLM_STAT_FEEDBACK_COL, -} from "./constants"; -import { AppContext, SessionContext } from "./context"; -import { getCallData, saveToSheet, saveToStore } from "./data_store"; -import { FeedbackWrapper } from "./feedback_wrapper"; -import { OneQuestion } from "./one_question"; -import { DcCallInfo, EvalInfo, EvalType, Response } from "./types"; - -const EMPTY_RESPONSE = { - [EvalType.RIG]: { - dcResponse: "", - llmStat: "", - question: "", - }, - [EvalType.RAG]: { - dcResponse: "", - question: "", - }, -}; -const DC_RESPONSE_OPTIONS = { - [EvalType.RIG]: { - DC_ANSWER_IRRELEVANT: "Does not match the question", - DC_ANSWER_RELEVANT_INACCURATE: "Relevant, but inaccurate", - DC_ANSWER_RELEVANT_UNSURE: "Relevant, but unsure if it is accurate", - DC_ANSWER_RELEVANT_ACCURATE: "Relevant and accurate", - }, - [EvalType.RAG]: { - DC_ANSWER_IRRELEVANT: "Does not match the question", - DC_ANSWER_RELEVANT: "Matches the question", - }, -}; - -export enum FormStatus { - NotStarted = 1, - InProgress = 2, - Completed = 3, - Submitted = 4, -} - -export function CallFeedback(): JSX.Element { - const { allCall, doc, sheetId, userEmail, evalType } = useContext(AppContext); - const { sessionQueryId, sessionCallId } = useContext(SessionContext); - - const [evalInfo, setEvalInfo] = useState(null); - const [response, setResponse] = useState(EMPTY_RESPONSE[evalType]); - const [status, setStatus] = useState(null); - const [applyToNext, setApplyToNext] = useState(false); - - useEffect(() => { - getCallData(sheetId, sessionQueryId, sessionCallId).then((data) => { - if (data) { - setResponse(data as Response); - setStatus(FormStatus.Submitted); - } else { - // If applyToNext has been set, we should just use the state of the - // previous question for the next question - if (applyToNext) { - return; - } - setResponse(EMPTY_RESPONSE[evalType]); - setStatus(FormStatus.NotStarted); - } - }); - }, [sheetId, sessionQueryId, sessionCallId, applyToNext, evalType]); - - useEffect(() => { - if (!(sessionQueryId in allCall)) { - setEvalInfo(null); - return; - } - const callInfo: DcCallInfo | null = allCall[sessionQueryId][sessionCallId]; - if (callInfo) { - const tableResponse = - evalType === EvalType.RIG ? "" : ` \xb7 Table ${sessionCallId}`; - setEvalInfo({ - dcResponse: `${callInfo.dcResponse}${tableResponse}`, - dcStat: callInfo.dcStat, - llmStat: callInfo.llmStat, - question: callInfo.question, - }); - } else { - setEvalInfo(null); - } - }, [doc, allCall, sessionQueryId, sessionCallId, evalType]); - - const checkAndSubmit = async (): Promise => { - if (status === FormStatus.InProgress) { - alert("Please fill in all fields"); - return false; - } - if (status === FormStatus.Completed) { - loadSpinner(FEEDBACK_PANE_ID); - const sheetValues = { - [DC_QUESTION_FEEDBACK_COL]: response.question, - [DC_RESPONSE_FEEDBACK_COL]: response.dcResponse, - [LLM_STAT_FEEDBACK_COL]: response.llmStat || "", - }; - return Promise.all([ - saveToStore( - userEmail, - sheetId, - sessionQueryId, - sessionCallId, - response - ), - saveToSheet(userEmail, doc, sessionQueryId, sessionCallId, sheetValues), - ]) - .then(() => { - return true; - }) - .catch((error) => { - alert("Error submitting response: " + error); - return false; - }) - .finally(() => { - removeSpinner(FEEDBACK_PANE_ID); - }); - } - // Otherwise form status is Submitted or NotStarted. Just proceed with - // any action. - return true; - }; - - const handleApplyToNextChange = (): void => { - setApplyToNext(!applyToNext); - }; - - const handleChange = (event: FormEvent): void => { - const { name, value } = event.target as HTMLInputElement; - setResponse((prevState) => { - const newState = { - ...prevState, - [name]: value, - }; - let tmpStatus = FormStatus.Completed; - for (const value of Object.values(newState)) { - if (value === "") { - tmpStatus = FormStatus.InProgress; - break; - } - } - setStatus(tmpStatus); - return newState; - }); - }; - - const enableReeval = (): void => { - setResponse(EMPTY_RESPONSE[evalType]); - setStatus(FormStatus.NotStarted); - }; - - let dcResponseOptions; - let dcResponseQuestion; - if (evalInfo) { - if (evalInfo.dcStat) { - dcResponseQuestion = "Response from Data Commons"; - dcResponseOptions = DC_RESPONSE_OPTIONS[evalType]; - } else { - dcResponseQuestion = "Reason for empty Data Commons response"; - dcResponseOptions = { - DC_ANSWER_EMPTY_BADNL: "Data exists, but NL fails to respond", - DC_ANSWER_EMPTY_NODATA: "Query asks for data that doesn't exist in DC", - DC_ANSWER_EMPTY_OUTOFSCOPE: - "Query asks for data that is out-of-scope for DC", - }; - } - } - - return ( - - {evalInfo && ( - <> -
-
-
-
GEMMA MODEL QUESTION EVALUATION
-
- - {evalInfo.question} - -
- -
- {evalType === EvalType.RIG && ( -
-
GEMMA MODEL STAT EVALUATION
-
- {evalInfo.llmStat} -
- -
- )} - -
-
DATA COMMONS EVALUATION
-
- - {evalInfo.dcResponse} - - {evalType === EvalType.RIG && ( - {evalInfo.dcStat} - )} -
- -
-
-
- -
- -
- - )} -
- ); -} diff --git a/static/js/apps/eval_retrieval_generation/claim_counter.tsx b/static/js/apps/eval_retrieval_generation/claim_counter.tsx deleted file mode 100644 index 8e2c4e629b..0000000000 --- a/static/js/apps/eval_retrieval_generation/claim_counter.tsx +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* Component to count the number of claims */ - -import React from "react"; - -interface ClaimCounterPropType { - count: number; - onCountUpdated: (count: number) => void; - label: string; - disabled?: boolean; -} - -export function ClaimCounter(props: ClaimCounterPropType): JSX.Element { - return ( - <> -
{props.label}
-
- - {props.count} - -
- - ); -} diff --git a/static/js/apps/eval_retrieval_generation/constants.tsx b/static/js/apps/eval_retrieval_generation/constants.tsx deleted file mode 100644 index 4d63af19d3..0000000000 --- a/static/js/apps/eval_retrieval_generation/constants.tsx +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { EvalType, FeedbackStage } from "./types"; - -// TODO: think about cleaning up all these constants - -export const QA_SHEET = "query_and_answer"; -export const DC_CALL_SHEET = "dc_calls"; -export const DC_FEEDBACK_SHEET = "feedback"; -export const DC_METADATA_SHEET = "metadata"; - -export const QUERY_ID_COL = "query_id"; -export const USER_COL = "user"; -export const QUERY_COL = "query"; -export const ANSWER_COL = "answer"; - -export const CALL_ID_COL = "call_id"; -export const DC_QUESTION_COL = "dc_question"; -export const DC_RESPONSE_COL = "dc_response"; -export const LLM_STAT_COL = "llm_stat"; -export const DC_STAT_COL = "dc_stat"; - -export const METADATA_KEY_COL = "metadata_key"; -export const METADATA_VAL_COL = "metadata_value"; -export const METADATA_KEY_TYPE = "type"; - -const FB_SUFFIX = "_feedback"; - -export const DC_QUESTION_FEEDBACK_COL = DC_QUESTION_COL + FB_SUFFIX; -export const DC_RESPONSE_FEEDBACK_COL = DC_RESPONSE_COL + FB_SUFFIX; -export const LLM_STAT_FEEDBACK_COL = LLM_STAT_COL + FB_SUFFIX; -export const DC_STAT_FEEDBACK_COL = DC_STAT_COL + FB_SUFFIX; -export const QUERY_OVERALL_FEEDBACK_COL = "overall" + FB_SUFFIX; - -// Call Id to use for a new query -export const NEW_QUERY_CALL_ID = 1; -// The key used in firestore to save the query overall feedback -export const QUERY_OVERALL_ANS_KEY = "overall"; -// The key used in firestore to save the query overall questions feedback -export const QUERY_OVERALL_QUESTIONS_KEY = "overallQuestions"; -// Firestore keys used to save claims feedback -export const RAG_CLAIM_KEYS = { - // total stat claims - QUERY_TOTAL_STAT_CLAIMS_KEY: "totalStatClaims", - // false stat claims - QUERY_FALSE_STAT_CLAIMS_KEY: "falseStatClaims", - // total inferred claims - QUERY_TOTAL_INF_CLAIMS_KEY: "totalInferredClaims", - // false inferred claims - QUERY_FALSE_INF_CLAIMS_KEY: "falseInferredClaims", - // unsubstantiated inferred claims - QUERY_UNSUB_INF_CLAIMS_KEY: "unsubInferredClaims", - // total tables used in claims - QUERY_TABLES_USED_KEY: "tablesUsed", -}; -// Options for the query overall feedback -export const QUERY_OVERALL_OPTION_HALLUCINATION = "LLM_ANSWER_HALLUCINATION"; -export const QUERY_OVERALL_OPTION_OK = "LLM_ANSWER_OKAY"; -export const QUERY_OVERALL_OPTION_IRRELEVANT = "LLM_ANSWER_IRRELEVANT"; -export const QUERY_OVERALL_OPTION_SOMEWHAT_RELEVANT = - "LLM_ANSWER_SOMEWHAT_RELEVANT"; -export const QUERY_OVERALL_OPTION_RELEVANT = "LLM_ANSWER_RELEVANT"; -// Options for the query calls overall feedback -export const OVERALL_QUESTIONS_OPTION_HAS_MISSING = "LLM_QUESTIONS_MISSING"; -export const OVERALL_QUESTIONS_OPTION_NONE_MISSING = - "LLM_QUESTIONS_NONE_MISSING"; - -export const FEEDBACK_STAGE_LIST: Record = { - [EvalType.RIG]: [FeedbackStage.OVERALL_ANS, FeedbackStage.CALLS], - [EvalType.RAG]: [ - FeedbackStage.OVERALL_QUESTIONS, - FeedbackStage.CALLS, - FeedbackStage.OVERALL_ANS, - FeedbackStage.RAG_ANS, - ], - [EvalType.BASELINE]: [ - // Only used for SXS eval which does not have stages. - ], -}; - -export const FEEDBACK_PANE_ID = "feedback-pane-container"; diff --git a/static/js/apps/eval_retrieval_generation/context.tsx b/static/js/apps/eval_retrieval_generation/context.tsx deleted file mode 100644 index 80e9d7dded..0000000000 --- a/static/js/apps/eval_retrieval_generation/context.tsx +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { GoogleSpreadsheet } from "google-spreadsheet"; -import React, { createContext, useState } from "react"; - -import { NEW_QUERY_CALL_ID } from "./constants"; -import { AllQuery, DcCalls, EvalType, FeedbackStage } from "./types"; - -interface AppContextType { - doc: GoogleSpreadsheet; - sheetId: string; - userEmail: string; - // Key is query id, value is the query object. - allQuery: AllQuery; - // Key is query id, value is the call mapping (call id to call info). - allCall: Record; - evalType: EvalType; -} - -/** - * The AppContext contains static state that does not change when using the - * tool. This includes the doc, sheet id, and the user email. - */ -export const AppContext = createContext({ - allCall: null, - allQuery: null, - doc: null, - evalType: null, - sheetId: "", - userEmail: "", -}); - -/** - * Session context contains fields that can be set within child components and - * are changed when the user interacts with the tool. - */ -interface SessionContextType { - sessionQueryId: number; - sessionCallId: number; - feedbackStage: FeedbackStage; - setSessionQueryId: (queryId: number) => void; - setSessionCallId: (callId: number) => void; - setFeedbackStage: (FeedbackStage: FeedbackStage) => void; -} - -export const SessionContext = createContext({ - sessionCallId: 1, - sessionQueryId: null, - feedbackStage: null, - setSessionCallId: () => void {}, - setSessionQueryId: () => void {}, - setFeedbackStage: () => void {}, -}); - -export function SessionContextProvider({ - children, -}: { - children: JSX.Element; -}): JSX.Element { - const [sessionQueryId, setSessionQueryId] = useState(1); - const [sessionCallId, setSessionCallId] = useState(NEW_QUERY_CALL_ID); - const [feedbackStage, setFeedbackStage] = useState(null); - return ( - - {children} - - ); -} diff --git a/static/js/apps/eval_retrieval_generation/data_store.tsx b/static/js/apps/eval_retrieval_generation/data_store.tsx deleted file mode 100644 index 84e7cbdc7a..0000000000 --- a/static/js/apps/eval_retrieval_generation/data_store.tsx +++ /dev/null @@ -1,223 +0,0 @@ -/** - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// Check the firestore rules in https://firebase.corp.google.com/project/datcom-website-autopush/firestore/databases/-default-/rules - -import { - addDoc, - collection, - doc, - DocumentData, - getCountFromServer, - getDoc, - getDocs, - orderBy, - query, - setDoc, -} from "firebase/firestore"; -import { - GoogleSpreadsheet, - GoogleSpreadsheetRow, - GoogleSpreadsheetWorksheet, -} from "google-spreadsheet"; -import _ from "lodash"; - -import { db } from "../../utils/firebase"; -import { - CALL_ID_COL, - DC_FEEDBACK_SHEET, - QUERY_ID_COL, - USER_COL, -} from "./constants"; -import { Response } from "./types"; - -// Gets the document path for a specific query or call -export function getPath( - sheetId: string, - queryId?: number, - callId?: number -): string { - const path = ["sheets", sheetId]; - if (queryId) { - path.push(...["queries", String(queryId)]); - } - if (callId) { - path.push(...["calls", String(callId)]); - } - return path.join("/"); -} - -// Sets a field in a doc at the specified path -export async function setFields( - path: string, - fields: Record -): Promise { - const docRef = doc(db, path); - setDoc(docRef, fields, { merge: true }); -} - -// Gets all the fields for a specified path -export async function getAllFields(path: string): Promise { - const docRef = doc(db, path); - const snapshot = await getDoc(docRef); - return snapshot.data() || {}; -} - -// Gets a field from a doc at the specified path -export async function getField( - path: string, - fieldKey: string -): Promise { - const docData = await getAllFields(path); - return docData ? docData[fieldKey] : ""; -} - -// Add a new doc for a call -async function addCallToStore( - sheetId: string, - queryId: number, - callId: number -): Promise { - const docRef = doc( - db, - "sheets", - sheetId, - "queries", - String(queryId), - "calls", - String(callId) - ); - // Need to set a field in order to create the document - setDoc(docRef, { id: callId }, { merge: true }); -} - -// Save response to Firestore -export async function saveToStore( - userEmail: string, - sheetId: string, - queryId: number, - callId: number, - response: Response -): Promise { - await addCallToStore(sheetId, queryId, callId); - const docRef = collection( - db, - "sheets", - sheetId, - "queries", - String(queryId), - "calls", - String(callId), - "responses" - ); - const savedResponse = { ...response, userEmail, timestamp: new Date() }; - addDoc(docRef, savedResponse); -} - -export async function getCallData( - sheetId: string, - queryId: number, - callId: number -): Promise { - console.log("database: get call data"); - // Define the document reference - const collectionRef = collection( - db, - "sheets", - sheetId, - "queries", - String(queryId), - "calls", - String(callId), - "responses" - ); - // Get the latest response. - const snapshot = await getDocs( - query(collectionRef, orderBy("timestamp", "desc")) - ); - const numDocs = snapshot.docs.length; - if (numDocs === 0) { - return null; - } - return snapshot.docs[0].data(); -} - -export async function saveToSheet( - userEmail: string, - doc: GoogleSpreadsheet, - queryId: number, - callId: number, - cellValues: Record -): Promise { - const sheet = doc.sheetsByTitle[DC_FEEDBACK_SHEET]; - sheet.addRow({ - ...cellValues, - [QUERY_ID_COL]: queryId, - [CALL_ID_COL]: callId, - [USER_COL]: userEmail, - }); -} - -/** - * Gets the number of calls for a query - * @param sheetId the sheet id - * @param queryId the query id - */ -export async function getCallCount( - sheetId: string, - queryId: number -): Promise { - // Define the document reference - const collectionRef = collection( - db, - "sheets", - sheetId, - "queries", - String(queryId), - "calls" - ); - const snapshot = await getCountFromServer(collectionRef); - return snapshot.data().count; -} - -/** - * Returns a promise to get a record of row idx to google sheet row - * @param sheet the sheet to get rows from - * @param rowIdxList the list of rows to get from the sheet - */ -export async function getSheetsRows( - sheet: GoogleSpreadsheetWorksheet, - rowIdxList: number[] -): Promise> { - if (_.isEmpty(rowIdxList)) { - return Promise.resolve({}); - } - rowIdxList.sort((a, b) => a - b); - const firstRowIdx = rowIdxList[0]; - const lastRowIdx = rowIdxList[rowIdxList.length - 1]; - return sheet - .getRows({ - offset: firstRowIdx - 1, - limit: lastRowIdx - firstRowIdx + 1, - }) - .then((rows) => { - const result = {}; - rows.forEach((row, i) => { - result[firstRowIdx + i] = row; - }); - return result; - }); -} diff --git a/static/js/apps/eval_retrieval_generation/eval_list.tsx b/static/js/apps/eval_retrieval_generation/eval_list.tsx deleted file mode 100644 index 7a318d778a..0000000000 --- a/static/js/apps/eval_retrieval_generation/eval_list.tsx +++ /dev/null @@ -1,161 +0,0 @@ -/** - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* Component to show the full list of evaluation queries */ - -import React, { useContext, useState } from "react"; -import { Button, Input, Modal } from "reactstrap"; - -import { - NEW_QUERY_CALL_ID, - QUERY_OVERALL_ANS_KEY, - QUERY_OVERALL_QUESTIONS_KEY, - RAG_CLAIM_KEYS, -} from "./constants"; -import { AppContext, SessionContext } from "./context"; -import { getAllFields, getCallCount, getPath } from "./data_store"; -import { EvalType, Query } from "./types"; -import { getFirstFeedbackStage } from "./util"; - -export function EvalList(): JSX.Element { - const { allCall, allQuery, userEmail, sheetId, evalType } = - useContext(AppContext); - const { setSessionCallId, setSessionQueryId, setFeedbackStage } = - useContext(SessionContext); - - const [userEvalsOnly, setUserEvalsOnly] = useState(false); - const [modalOpen, setModalOpen] = useState(false); - const [queryCompletionStatus, setQueryCompletionStatus] = useState({}); - - const toggleModal = (): void => setModalOpen(!modalOpen); - - const orderedQueries: Query[] = Object.keys(allQuery) - .sort((a, b) => { - return Number(a) - Number(b); - }) - .map((queryId) => allQuery[queryId]); - - const openModal = (): void => { - setModalOpen(true); - const queryFeedbackPromises = Promise.all( - orderedQueries.map((query) => getAllFields(getPath(sheetId, query.id))) - ); - const callCountPromises = Promise.all( - orderedQueries.map((query) => getCallCount(sheetId, query.id)) - ); - const queryCompletionStatus = {}; - Promise.all([callCountPromises, queryFeedbackPromises]) - .then(([callCountResults, queryFeedbackResults]) => { - orderedQueries.forEach((query, i) => { - // A query might not have any calls. - const calls = allCall[query.id] || {}; - let completed = callCountResults[i] === Object.keys(calls).length; - // If no overall feedback value, set completed to false - if (!queryFeedbackResults[i][QUERY_OVERALL_ANS_KEY]) { - completed = false; - } - // For RAG eval type, also check that additional feedback is completed - if (evalType === EvalType.RAG) { - [ - ...Object.values(RAG_CLAIM_KEYS), - QUERY_OVERALL_QUESTIONS_KEY, - ].forEach((countKey) => { - if (!(countKey in queryFeedbackResults[i])) { - completed = false; - } - }); - } - queryCompletionStatus[query.id] = completed; - }); - setQueryCompletionStatus(queryCompletionStatus); - }) - .finally(() => { - setQueryCompletionStatus(queryCompletionStatus); - }); - }; - - return ( - <> - - -
-
Choose a query to start evaluating from
-
-
- Select a query to start evaluating, evaluated queries are marked - in green. -
-
- { - setUserEvalsOnly(!userEvalsOnly); - }} - /> - Show my questions only -
-
-
-
- {orderedQueries.map((query) => { - if (userEvalsOnly && query.user !== userEmail) { - return null; - } - const completed = queryCompletionStatus[query.id]; - return ( -
{ - setFeedbackStage(getFirstFeedbackStage(evalType)); - setSessionQueryId(query.id); - setSessionCallId(NEW_QUERY_CALL_ID); - setModalOpen(false); - }} - key={query.id} - > -
- {completed ? "check" : "chevron_right"} -
-
- Q{query.id} · {query.text} -
-
{query.user}
-
- ); - })} -
-
- -
-
- - ); -} diff --git a/static/js/apps/eval_retrieval_generation/feedback_navigation.tsx b/static/js/apps/eval_retrieval_generation/feedback_navigation.tsx deleted file mode 100644 index f8b9937226..0000000000 --- a/static/js/apps/eval_retrieval_generation/feedback_navigation.tsx +++ /dev/null @@ -1,309 +0,0 @@ -/** - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* Component with buttons for navigating the feedback pages */ - -import _ from "lodash"; -import React, { useContext } from "react"; -import { Button } from "reactstrap"; - -import { FEEDBACK_STAGE_LIST, NEW_QUERY_CALL_ID } from "./constants"; -import { AppContext, SessionContext } from "./context"; -import { FeedbackStage } from "./types"; -import { getFirstFeedbackStage } from "./util"; - -enum ButtonType { - PREV_QUERY = "PREV_QUERY", - PREV = "PREV", - PREV_EVAL_STAGE = "PREV_EVAL_STAGE", - NEXT_QUERY = "NEXT_QUERY", - NEXT = "NEXT", - NEXT_EVAL_STAGE = "NEXT_EVAL_STAGE", - FINISH = "FINISH", - EMPTY = "EMPTY", -} - -interface ButtonConfig { - text: string; - themeClassName: string; - icon?: string; -} - -// button type to its config -const BUTTON_CONFIGS: Record = { - [ButtonType.PREV_QUERY]: { - text: "Previous query", - themeClassName: "btn-transparent", - }, - [ButtonType.PREV]: { - icon: "keyboard_arrow_left", - text: "Previous", - themeClassName: "btn-transparent", - }, - [ButtonType.PREV_EVAL_STAGE]: { - text: "Previous eval stage", - themeClassName: "btn-transparent", - }, - [ButtonType.NEXT_QUERY]: { - text: "Continue to next query", - themeClassName: "btn-blue", - }, - [ButtonType.NEXT]: { - icon: "keyboard_arrow_right", - text: "Next", - themeClassName: "btn-blue", - }, - [ButtonType.NEXT_EVAL_STAGE]: { - text: "Next eval stage", - themeClassName: "btn-blue", - }, - [ButtonType.FINISH]: { - text: "Finish", - themeClassName: "btn-blue", - }, -}; - -// Whether or not we are at the last page of a feedback stage -function isEndOfStage( - feedbackStage: FeedbackStage, - sessionCallId: number, - numCalls: number -): boolean { - if (feedbackStage === FeedbackStage.CALLS) { - return sessionCallId >= numCalls; - } - // feedback stages besides CALLS only have one page - return true; -} - -// Whether or not we are at the first page of a feedback stage -function isStartOfStage( - feedbackStage: FeedbackStage, - sessionCallId: number, - numCalls: number -): boolean { - if (feedbackStage === FeedbackStage.CALLS) { - return sessionCallId === NEW_QUERY_CALL_ID || numCalls < sessionCallId; - } - // feedback stages besides CALLS only have one page - return true; -} - -// Whether or not to include a stage in the list of stages to show -function shouldIncludeStage( - feedbackStage: FeedbackStage, - numCalls: number -): boolean { - if (feedbackStage === FeedbackStage.CALLS) { - return numCalls > 0; - } - return true; -} - -interface FeedbackNavigationPropType { - checkAndSubmit: () => Promise; -} - -export function FeedbackNavigation( - props: FeedbackNavigationPropType -): JSX.Element { - const { allQuery, allCall, userEmail, evalType } = useContext(AppContext); - const { - sessionQueryId, - setSessionQueryId, - sessionCallId, - setSessionCallId, - feedbackStage, - setFeedbackStage, - } = useContext(SessionContext); - - const userQuery = Object.keys(allQuery) - .filter( - (qId) => allQuery[qId].user === userEmail || allQuery[qId].user === null - ) - .reduce((obj, qId) => { - obj[qId] = allQuery[qId]; - return obj; - }, {}); - - const sortedQueryIds = Object.keys(userQuery) - .map((qKey) => Number(qKey)) - .sort((a, b) => a - b); - - const numCalls = Object.keys(allCall[sessionQueryId] || {}).length; - const feedbackStageList = FEEDBACK_STAGE_LIST[evalType].filter((stage) => - shouldIncludeStage(stage, numCalls) - ); - const currStageIdx = feedbackStageList.indexOf(feedbackStage); - - // Button Actions - const prevQuery = async (): Promise => { - if (await props.checkAndSubmit()) { - let targetId = sessionQueryId - 1; - while (!(targetId in userQuery)) { - targetId -= 1; - } - setFeedbackStage(getFirstFeedbackStage(evalType)); - setSessionQueryId(targetId); - setSessionCallId(NEW_QUERY_CALL_ID); - } - }; - - const prev = async (): Promise => { - if (await props.checkAndSubmit()) { - if (feedbackStage === FeedbackStage.CALLS) { - setSessionCallId(sessionCallId - 1); - } - } - }; - - const prevEvalStage = async (): Promise => { - if (await props.checkAndSubmit()) { - setFeedbackStage(feedbackStageList[currStageIdx - 1]); - } - }; - - const next = async (): Promise => { - if (await props.checkAndSubmit()) { - if (feedbackStage === FeedbackStage.CALLS) { - setSessionCallId(sessionCallId + 1); - } - } - }; - - const nextQuery = async (): Promise => { - if (await props.checkAndSubmit()) { - let targetId = sessionQueryId + 1; - while (!(targetId in userQuery)) { - targetId += 1; - } - setFeedbackStage(getFirstFeedbackStage(evalType)); - setSessionQueryId(targetId); - setSessionCallId(NEW_QUERY_CALL_ID); - } - }; - - const nextEvalStage = async (): Promise => { - if (await props.checkAndSubmit()) { - setFeedbackStage(feedbackStageList[currStageIdx + 1]); - setSessionCallId(NEW_QUERY_CALL_ID); - } - }; - - const finish = async (): Promise => { - if (await props.checkAndSubmit()) { - alert("All evaluations completed."); - } - }; - - // Button Conditions - - function getNextButtonType(): ButtonType { - if (isEndOfStage(feedbackStage, sessionCallId, numCalls)) { - if (currStageIdx < feedbackStageList.length - 1) { - return ButtonType.NEXT_EVAL_STAGE; - } - const hasMoreQueries = - !_.isEmpty(sortedQueryIds) && - sessionQueryId < sortedQueryIds[sortedQueryIds.length - 1]; - return hasMoreQueries ? ButtonType.NEXT_QUERY : ButtonType.FINISH; - } else { - return ButtonType.NEXT; - } - } - - function getPrevButtonType(): ButtonType { - if (isStartOfStage(feedbackStage, sessionCallId, numCalls)) { - if (currStageIdx > 0) { - return ButtonType.PREV_EVAL_STAGE; - } - const hasPrevQuery = - !_.isEmpty(sortedQueryIds) && sessionQueryId > sortedQueryIds[0]; - return hasPrevQuery ? ButtonType.PREV_QUERY : ButtonType.EMPTY; - } else { - return ButtonType.PREV; - } - } - - function getOnClickFunction(buttonType: ButtonType): () => void { - switch (buttonType) { - case ButtonType.PREV_QUERY: - return prevQuery; - case ButtonType.PREV: - return prev; - case ButtonType.PREV_EVAL_STAGE: - return prevEvalStage; - case ButtonType.NEXT_QUERY: - return nextQuery; - case ButtonType.NEXT: - return next; - case ButtonType.NEXT_EVAL_STAGE: - return nextEvalStage; - case ButtonType.FINISH: - return finish; - default: - return _.noop; - } - } - const prevButtonType = getPrevButtonType(); - const nextButtonType = getNextButtonType(); - - return ( -
-
- {feedbackStage === FeedbackStage.CALLS && ( -
- {sessionCallId} - / {numCalls} ITEMS IN THIS QUERY -
- )} -
EVAL STAGE {currStageIdx + 1}
-
-
- {prevButtonType !== ButtonType.EMPTY && ( - - )} - {nextButtonType !== ButtonType.EMPTY && ( - - )} -
-
- ); -} diff --git a/static/js/apps/eval_retrieval_generation/feedback_wrapper.tsx b/static/js/apps/eval_retrieval_generation/feedback_wrapper.tsx deleted file mode 100644 index 44e63bf01f..0000000000 --- a/static/js/apps/eval_retrieval_generation/feedback_wrapper.tsx +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* Wrapper component around all the right hand side feedback pane components */ - -import React, { useContext } from "react"; -import { Button } from "reactstrap"; - -import { FEEDBACK_PANE_ID } from "./constants"; -import { AppContext, SessionContext } from "./context"; -import { EvalList } from "./eval_list"; -import { FeedbackNavigation } from "./feedback_navigation"; -import { TablePane } from "./table_pane"; -import { EvalType } from "./types"; - -interface FeedbackWrapperPropType { - onReEval: () => void; - checkAndSubmit: () => Promise; - children?: React.ReactNode; -} - -export function FeedbackWrapper(props: FeedbackWrapperPropType): JSX.Element { - const { evalType, allCall } = useContext(AppContext); - const { sessionQueryId } = useContext(SessionContext); - - return ( -
-
- - -
-
-
{props.children}
- {evalType === EvalType.RAG && ( - - )} -
- -
-
-
-
- ); -} diff --git a/static/js/apps/eval_retrieval_generation/main.ts b/static/js/apps/eval_retrieval_generation/main.ts deleted file mode 100644 index 308bf8d61e..0000000000 --- a/static/js/apps/eval_retrieval_generation/main.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Entrypoint for retrieval generation eval page. - */ - -import React from "react"; -import ReactDOM from "react-dom"; - -import { App } from "./app"; -import { SessionContextProvider } from "./context"; - -window.addEventListener("load", (): void => { - renderPage(); -}); - -function renderPage(): void { - const sheetId = document.getElementById("metadata").dataset.sheetId; - ReactDOM.render( - React.createElement( - SessionContextProvider, - null, - React.createElement(App, { - sheetId, - }) - ), - document.getElementById("dc-eval-retrieval-generation") - ); -} diff --git a/static/js/apps/eval_retrieval_generation/one_question.tsx b/static/js/apps/eval_retrieval_generation/one_question.tsx deleted file mode 100644 index 2356d873b0..0000000000 --- a/static/js/apps/eval_retrieval_generation/one_question.tsx +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Component for rendering one question (with radio buttons) - */ - -import React, { FormEvent } from "react"; - -interface OneQuestionProps { - name: string; - question: string; - options: Record; // Map from ENUM to displayed string - handleChange: (event: FormEvent) => void; - responseField: string; - disabled: boolean; -} - -export function OneQuestion(props: OneQuestionProps): JSX.Element { - return ( -
-
{props.question}
-
- {Object.keys(props.options).map((key) => { - const value = props.options[key]; - return ( - - ); - })} -
-
- ); -} diff --git a/static/js/apps/eval_retrieval_generation/overall_feedback.tsx b/static/js/apps/eval_retrieval_generation/overall_feedback.tsx deleted file mode 100644 index 5964f9d0d5..0000000000 --- a/static/js/apps/eval_retrieval_generation/overall_feedback.tsx +++ /dev/null @@ -1,242 +0,0 @@ -/** - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* Component to record overall feedback for a query */ - -import React, { FormEvent, useContext, useEffect, useState } from "react"; - -import { loadSpinner, removeSpinner } from "../../shared/util"; -import { - FEEDBACK_PANE_ID, - OVERALL_QUESTIONS_OPTION_HAS_MISSING, - OVERALL_QUESTIONS_OPTION_NONE_MISSING, - QUERY_OVERALL_ANS_KEY, - QUERY_OVERALL_FEEDBACK_COL, - QUERY_OVERALL_OPTION_HALLUCINATION, - QUERY_OVERALL_OPTION_IRRELEVANT, - QUERY_OVERALL_OPTION_OK, - QUERY_OVERALL_OPTION_RELEVANT, - QUERY_OVERALL_OPTION_SOMEWHAT_RELEVANT, - QUERY_OVERALL_QUESTIONS_KEY, -} from "./constants"; -import { AppContext, SessionContext } from "./context"; -import { getAllFields, getPath, saveToSheet, setFields } from "./data_store"; -import { FeedbackWrapper } from "./feedback_wrapper"; -import { OneQuestion } from "./one_question"; -import { EvalType, FeedbackStage } from "./types"; - -// object to hold information about a question -interface QuestionConfig { - title: string; - questions: { - firestoreKey: string; - question: string; - responseOptions: Record; - }[]; -} - -// Dictionary of feedback stage -> eval type -> question config -const QUESTION_CONFIG: Record> = { - [FeedbackStage.OVERALL_QUESTIONS]: { - [EvalType.RAG]: { - questions: [ - { - firestoreKey: QUERY_OVERALL_QUESTIONS_KEY, - question: - "Do the generated questions seem sufficient to answer the query?", - responseOptions: { - [OVERALL_QUESTIONS_OPTION_HAS_MISSING]: "Missing obvious questions", - [OVERALL_QUESTIONS_OPTION_NONE_MISSING]: - "No obvious questions missing", - }, - }, - ], - title: "QUESTIONS EVALUATION", - }, - }, - [FeedbackStage.OVERALL_ANS]: { - [EvalType.RIG]: { - questions: [ - { - firestoreKey: QUERY_OVERALL_ANS_KEY, - question: "How is the overall answer?", - responseOptions: { - [QUERY_OVERALL_OPTION_HALLUCINATION]: "Found factual inaccuracies", - [QUERY_OVERALL_OPTION_OK]: "No obvious factual inaccuracies", - }, - }, - ], - title: "OVERALL EVALUATION", - }, - [EvalType.RAG]: { - questions: [ - { - firestoreKey: QUERY_OVERALL_ANS_KEY, - question: "How well does the LLM answer the user query??", - responseOptions: { - [QUERY_OVERALL_OPTION_IRRELEVANT]: "Does not answer the query", - [QUERY_OVERALL_OPTION_SOMEWHAT_RELEVANT]: - "Partially answers the query", - [QUERY_OVERALL_OPTION_RELEVANT]: "Fully answers the query", - }, - }, - ], - title: "OVERALL EVALUATION", - }, - }, -}; - -// Get sheets column to use for a given firestore key -function getSheetsCol(evalType: EvalType, firestoreKey: string): string { - // Only for RIG eval, the sheets column is different from the firestore key - if (evalType === EvalType.RIG && firestoreKey === QUERY_OVERALL_ANS_KEY) { - return QUERY_OVERALL_FEEDBACK_COL; - } - return firestoreKey; -} - -// Gets an empty response object -function getEmptyResponse( - evalType: EvalType, - feedbackStage: FeedbackStage -): Record { - const emptyResponse = {}; - const questionConfigs = QUESTION_CONFIG[feedbackStage][evalType].questions; - questionConfigs.forEach((config) => { - emptyResponse[config.firestoreKey] = ""; - }); - return emptyResponse; -} - -export function OverallFeedback(): JSX.Element { - const { doc, sheetId, userEmail, evalType } = useContext(AppContext); - const { sessionQueryId, sessionCallId, feedbackStage } = - useContext(SessionContext); - // the key is the firestoreKey for the question and value is the response - const [response, setResponse] = useState>(null); - const [isSubmitted, setIsSubmitted] = useState(null); - - useEffect(() => { - loadSpinner(FEEDBACK_PANE_ID); - let subscribed = true; - getAllFields(getPath(sheetId, sessionQueryId)) - .then((data) => { - if (!subscribed) return; - const newResponse = getEmptyResponse(evalType, feedbackStage); - let newIsSubmitted = true; - Object.keys(newResponse).forEach((key) => { - if (!(key in data)) { - newIsSubmitted = false; - return; - } - newResponse[key] = data[key]; - }); - setResponse(newResponse); - setIsSubmitted(newIsSubmitted); - }) - .finally(() => removeSpinner(FEEDBACK_PANE_ID)); - return () => void (subscribed = false); - }, [sheetId, sessionQueryId, sessionCallId, feedbackStage, evalType]); - - const checkAndSubmit = async (): Promise => { - if (isSubmitted) { - return Promise.resolve(true); - } - const numEmptyResponses = Object.values(response).filter( - (val) => val === "" - ).length; - if (numEmptyResponses > 0) { - // If there are some empty responses and some answered, alert user to fill - // out all fields - if (numEmptyResponses < Object.keys(response).length) { - alert("Please fill in all fields"); - return Promise.resolve(false); - } - // If all responses are empty, allow user to move on, but don't save the - // answer. - return Promise.resolve(true); - } - loadSpinner(FEEDBACK_PANE_ID); - const sheetsResponse = {}; - Object.keys(response).forEach((responseKey) => { - sheetsResponse[getSheetsCol(evalType, responseKey)] = - response[responseKey]; - }); - return Promise.all([ - setFields(getPath(sheetId, sessionQueryId), response), - saveToSheet( - userEmail, - doc, - sessionQueryId, - sessionCallId, - sheetsResponse - ), - ]) - .then(() => { - return true; - }) - .catch((error) => { - alert("Error submitting response: " + error); - return false; - }) - .finally(() => { - removeSpinner(FEEDBACK_PANE_ID); - }); - }; - - const handleChange = (event: FormEvent): void => { - const { name, value } = event.target as HTMLInputElement; - setResponse((prevState) => { - return { ...prevState, [name]: value }; - }); - }; - - const enableReeval = (): void => { - setResponse(getEmptyResponse(evalType, feedbackStage)); - setIsSubmitted(false); - }; - - if (response === null) { - return null; - } - - const questionConfig = QUESTION_CONFIG[feedbackStage][evalType]; - - return ( - -
-
-
-
{questionConfig.title}
- {questionConfig.questions.map((question) => { - return ( - - ); - })} -
-
-
-
- ); -} diff --git a/static/js/apps/eval_retrieval_generation/query_section.tsx b/static/js/apps/eval_retrieval_generation/query_section.tsx deleted file mode 100644 index c02ae10283..0000000000 --- a/static/js/apps/eval_retrieval_generation/query_section.tsx +++ /dev/null @@ -1,307 +0,0 @@ -/** - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { GoogleSpreadsheet } from "google-spreadsheet"; -import _ from "lodash"; -import React, { useEffect, useRef, useState } from "react"; -import ReactMarkdown from "react-markdown"; -import rehypeRaw from "rehype-raw"; -import remarkGfm from "remark-gfm"; - -import { DcCallInfo, DcCalls, EvalType, FeedbackStage, Query } from "./types"; -import { getAnswerFromQueryAndAnswerSheet, processText } from "./util"; - -const ANSWER_LOADING_MESSAGE = "Loading answer..."; -const ACTIVE_ANNOTATION_CLASSNAME = "annotation-active"; - -interface AnswerMetadata { - evalType: EvalType; - feedbackStage: FeedbackStage; - queryId: number; -} - -function getFormattedRagCallAnswer( - dcQuestion: string, - dcResponse: string, - tableId: string -): string { - const formattedQuestion = `**${dcQuestion}**`; - const formattedStat = `${dcResponse} \xb7 Table ${tableId}`; - return `${formattedQuestion}
${formattedStat}
`; -} - -function getAnswerFromRagCalls( - allCall: Record, - queryId: number -): string { - if (!allCall[queryId]) { - return "No questions were generated."; - } - const tableIds = Object.keys(allCall[queryId]).sort( - (a, b) => Number(a) - Number(b) - ); - const answers = []; - tableIds.forEach((tableId) => { - const tableInfo: DcCallInfo | null = allCall[queryId][tableId]; - if (tableInfo) { - answers.push( - getFormattedRagCallAnswer( - tableInfo.question, - tableInfo.dcResponse, - tableId - ) - ); - } - }); - return answers.join("\n\n"); -} - -function getAnswer( - doc: GoogleSpreadsheet, - query: Query, - allCall: Record, - evalType: EvalType, - feedbackStage: FeedbackStage -): Promise<{ answer: string; metadata: AnswerMetadata }> { - const metadata = { - evalType, - feedbackStage, - queryId: query.id, - }; - let answerPromise = null; - if ( - evalType === EvalType.RAG && - (feedbackStage === FeedbackStage.CALLS || - feedbackStage === FeedbackStage.OVERALL_QUESTIONS) - ) { - answerPromise = (): Promise => - Promise.resolve(getAnswerFromRagCalls(allCall, query.id)); - } else { - answerPromise = (): Promise => - getAnswerFromQueryAndAnswerSheet(doc, query); - } - if (!answerPromise) { - return Promise.resolve({ answer: "", metadata }); - } - return answerPromise() - .then((answer) => { - return { answer, metadata }; - }) - .catch((e) => { - alert(e); - return { answer: "", metadata }; - }); -} - -/** - * Absolutely positions the tooltip within the given annotation so it fits - * within the parent query section. - */ -function adjustTooltipPosition(annotationEl: Element): void { - const tooltipEl = annotationEl.querySelector( - ".dc-stat-tooltip" - ) as HTMLDivElement; - const parentSection = annotationEl.closest("#query-section"); - const sectionRect = parentSection.getBoundingClientRect(); - const sectionBorderWidth = 1; - - // Limit tooltip width to section width. - if ( - tooltipEl.getBoundingClientRect().width > - sectionRect.width - 2 * sectionBorderWidth - ) { - tooltipEl.style.maxWidth = `${ - sectionRect.width - 2 * sectionBorderWidth - }px`; - } - - // Re-calculate since tooltip width may have changed. - const tooltipRect = tooltipEl.getBoundingClientRect(); - const tooltipWidth = tooltipRect.width; - - // All tooltip positioning is relative to the annotation el's left edge. - const annotationRect = annotationEl.getBoundingClientRect(); - const tooltipReferencePoint = annotationRect.left; - - // By default, center tooltip over annotation. - let newTooltipLeft = -0.5 * (tooltipWidth - annotationRect.width); - if ( - newTooltipLeft + tooltipReferencePoint < - sectionRect.left + sectionBorderWidth - ) { - // Shift tooltip if it is cut off by the left edge of the section. - newTooltipLeft = - sectionRect.left + sectionBorderWidth - tooltipReferencePoint; - } else if ( - newTooltipLeft + tooltipReferencePoint + tooltipWidth > - sectionRect.right - sectionBorderWidth - ) { - // Shift tooltip if it is cut off by the right edge of the section. - newTooltipLeft = - sectionRect.right - - sectionBorderWidth - - tooltipWidth - - tooltipReferencePoint; - } - tooltipEl.style.left = `${newTooltipLeft}px`; -} - -/** - * Removes any absolute positioning applied by adjustTooltipPosition. - */ -function resetTooltipPosition(annotationEl: Element): void { - const tooltipEl = annotationEl.querySelector( - ".dc-stat-tooltip" - ) as HTMLDivElement; - tooltipEl.style.left = null; - tooltipEl.style.maxWidth = null; -} - -interface QuerySectionPropType { - doc: GoogleSpreadsheet; - evalType: EvalType; - feedbackStage: FeedbackStage; - query: Query; - callId?: number; - allCall?: Record; - hideIdAndQuestion?: boolean; -} - -export function QuerySection(props: QuerySectionPropType): JSX.Element { - const [displayedAnswer, setDisplayedAnswer] = useState( - ANSWER_LOADING_MESSAGE - ); - const prevHighlightedRef = useRef(null); - const answerMetadata = useRef(null); - - // Add window-level click handling for showing/hiding annotation tooltips. - useEffect(() => { - // Only show tooltips for RIG evals. - if (props.evalType !== EvalType.RIG) return; - - const onClick = (e: MouseEvent): void => { - const clickedEl = e.target as Element; - - // Don't change active annotation if the tooltip itself is clicked. - if (clickedEl.closest(".dc-stat-tooltip")) return; - - const activeAnnotationEl = document.querySelector( - `.${ACTIVE_ANNOTATION_CLASSNAME}` - ) as HTMLSpanElement | null; - - // Deactivate any active annotation. - if (activeAnnotationEl) { - activeAnnotationEl.classList.remove(ACTIVE_ANNOTATION_CLASSNAME); - resetTooltipPosition(activeAnnotationEl); - } - - // If the previously active annotation was clicked, don't reactivate it. - if (clickedEl === activeAnnotationEl) return; - - // Otherwise, if an annotation was clicked, activate it. - if (clickedEl.classList.contains("annotation")) { - clickedEl.classList.add(ACTIVE_ANNOTATION_CLASSNAME); - adjustTooltipPosition(clickedEl); - } - }; - - window.addEventListener("click", onClick); - - // Remove the event listener when the component unmounts. - return () => { - if (props.evalType !== EvalType.RIG) return; - window.removeEventListener("click", onClick); - }; - }, [props.evalType]); - - useEffect(() => { - // Remove highlight from previous annotation - if (prevHighlightedRef.current) { - prevHighlightedRef.current.classList.remove("highlight"); - } - - // Only highlight calls in call stage - if (props.feedbackStage !== FeedbackStage.CALLS) { - return; - } - - // Highlight the new annotation. Note the display index is 1 based. - const newHighlighted = document.querySelector( - `.annotation-${props.callId}` - ) as HTMLSpanElement; - if (newHighlighted) { - newHighlighted.classList.add("highlight"); - prevHighlightedRef.current = newHighlighted; - } - }, [displayedAnswer, props.callId, props.feedbackStage]); - - useEffect(() => { - if (!props.query) { - setDisplayedAnswer(""); - return; - } - setDisplayedAnswer(ANSWER_LOADING_MESSAGE); - answerMetadata.current = { - evalType: props.evalType, - feedbackStage: props.feedbackStage, - queryId: props.query.id, - }; - let subscribed = true; - getAnswer( - props.doc, - props.query, - props.allCall, - props.evalType, - props.feedbackStage - ) - .then(({ answer, metadata }) => { - if (!subscribed) return; - // Only set answer if it matches the current answer metadata - if (_.isEqual(answerMetadata.current, metadata)) { - const calls = - props.query && props.allCall ? props.allCall[props.query.id] : null; - setDisplayedAnswer(processText(answer, calls)); - } - }) - .catch(() => void setDisplayedAnswer("Failed to load answer.")); - return () => void (subscribed = false); - }, [props]); - - if (!props.query) { - return null; - } - - const answerHeading = - (props.feedbackStage === FeedbackStage.CALLS && - props.evalType === EvalType.RAG) || - props.feedbackStage === FeedbackStage.OVERALL_QUESTIONS - ? "Questions to Data Commons" - : "Answer"; - - return ( -
- {!props.hideIdAndQuestion &&

Query {props.query.id}

} - {!props.hideIdAndQuestion &&

{props.query.text}

} -

{answerHeading}

- - {displayedAnswer} - -
- ); -} diff --git a/static/js/apps/eval_retrieval_generation/rag_ans_feedback.tsx b/static/js/apps/eval_retrieval_generation/rag_ans_feedback.tsx deleted file mode 100644 index 2a237c1beb..0000000000 --- a/static/js/apps/eval_retrieval_generation/rag_ans_feedback.tsx +++ /dev/null @@ -1,197 +0,0 @@ -/** - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* Component to record feedback for a rag answer */ - -import React, { useContext, useEffect, useState } from "react"; - -import { loadSpinner, removeSpinner } from "../../shared/util"; -import { ClaimCounter } from "./claim_counter"; -import { FEEDBACK_PANE_ID, RAG_CLAIM_KEYS } from "./constants"; -import { AppContext, SessionContext } from "./context"; -import { getAllFields, getPath, saveToSheet, setFields } from "./data_store"; -import { FeedbackWrapper } from "./feedback_wrapper"; - -const EMPTY_COUNTS = { - [RAG_CLAIM_KEYS.QUERY_TOTAL_STAT_CLAIMS_KEY]: 0, - [RAG_CLAIM_KEYS.QUERY_FALSE_STAT_CLAIMS_KEY]: 0, - [RAG_CLAIM_KEYS.QUERY_TOTAL_INF_CLAIMS_KEY]: 0, - [RAG_CLAIM_KEYS.QUERY_FALSE_INF_CLAIMS_KEY]: 0, - [RAG_CLAIM_KEYS.QUERY_UNSUB_INF_CLAIMS_KEY]: 0, - [RAG_CLAIM_KEYS.QUERY_TABLES_USED_KEY]: 0, -}; -const COUNTER_LABELS = { - [RAG_CLAIM_KEYS.QUERY_TOTAL_STAT_CLAIMS_KEY]: "Total claims", - [RAG_CLAIM_KEYS.QUERY_FALSE_STAT_CLAIMS_KEY]: "False claims", - [RAG_CLAIM_KEYS.QUERY_TOTAL_INF_CLAIMS_KEY]: "Total claims", - [RAG_CLAIM_KEYS.QUERY_FALSE_INF_CLAIMS_KEY]: "False claims", - [RAG_CLAIM_KEYS.QUERY_UNSUB_INF_CLAIMS_KEY]: "Unsubstantiated claims", - [RAG_CLAIM_KEYS.QUERY_TABLES_USED_KEY]: "Unique tables used", -}; - -interface RagAnsResponse { - // where key is the firestore key used to store the count for that thing and - // value is the count - counts: Record; - isSubmitted: boolean; -} - -export function RagAnsFeedback(): JSX.Element { - const { doc, sheetId, userEmail } = useContext(AppContext); - const { sessionQueryId, sessionCallId } = useContext(SessionContext); - const [response, setResponse] = useState(null); - - useEffect(() => { - loadSpinner(FEEDBACK_PANE_ID); - getAllFields(getPath(sheetId, sessionQueryId)) - .then((data) => { - let complete = true; - const counts = EMPTY_COUNTS; - for (const countKey of Object.keys(counts)) { - if (!(countKey in data)) { - complete = false; - continue; - } - counts[countKey] = Number(data[countKey]); - } - setResponse({ - counts, - isSubmitted: complete, - }); - }) - .finally(() => { - removeSpinner(FEEDBACK_PANE_ID); - }); - }, [sheetId, sessionQueryId, sessionCallId]); - - const checkAndSubmit = async (): Promise => { - if (response === null) { - return Promise.resolve(false); - } - if (response.isSubmitted) { - return Promise.resolve(true); - } - const countsAsStrings = {}; - Object.keys(response.counts).forEach((countKey) => { - countsAsStrings[countKey] = String(response.counts[countKey]); - }); - loadSpinner(FEEDBACK_PANE_ID); - return Promise.all([ - setFields(getPath(sheetId, sessionQueryId), countsAsStrings), - saveToSheet( - userEmail, - doc, - sessionQueryId, - sessionCallId, - response.counts - ), - ]) - .then(() => { - return true; - }) - .catch((error) => { - alert("Error submitting response: " + error); - return false; - }) - .finally(() => { - removeSpinner(FEEDBACK_PANE_ID); - }); - }; - - const enableReeval = (): void => { - setResponse({ - counts: EMPTY_COUNTS, - isSubmitted: false, - }); - }; - - const onCountUpdated = (count: number, countKey: string): void => { - if (response.isSubmitted) { - return; - } - setResponse((prevState) => { - return { - ...prevState, - counts: { ...prevState.counts, [countKey]: count }, - }; - }); - }; - - if (response === null) { - return null; - } - - return ( - -
-
STATISTICAL CLAIMS EVALUATION
-
- Statistical claims total count (e.g., a number retrieved from a table) -
-
- {[ - RAG_CLAIM_KEYS.QUERY_TOTAL_STAT_CLAIMS_KEY, - RAG_CLAIM_KEYS.QUERY_FALSE_STAT_CLAIMS_KEY, - RAG_CLAIM_KEYS.QUERY_TABLES_USED_KEY, - ].map((cntKey) => { - return ( -
- - onCountUpdated(count, cntKey) - } - label={COUNTER_LABELS[cntKey]} - /> -
- ); - })} -
-
-
-
INFERRED CLAIMS EVALUATION
-
- Inferred claims total count (e.g., X is better than Y) -
-
- {[ - RAG_CLAIM_KEYS.QUERY_TOTAL_INF_CLAIMS_KEY, - RAG_CLAIM_KEYS.QUERY_FALSE_INF_CLAIMS_KEY, - RAG_CLAIM_KEYS.QUERY_UNSUB_INF_CLAIMS_KEY, - ].map((cntKey) => { - return ( -
- - onCountUpdated(count, cntKey) - } - label={COUNTER_LABELS[cntKey]} - /> -
- ); - })} -
-
-
- ); -} diff --git a/static/js/apps/eval_retrieval_generation/sxs/answer_with_tables.tsx b/static/js/apps/eval_retrieval_generation/sxs/answer_with_tables.tsx deleted file mode 100644 index 4d26a6ae7d..0000000000 --- a/static/js/apps/eval_retrieval_generation/sxs/answer_with_tables.tsx +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright 2024 Google LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -/* Component to display a query and answer with supporting data tables if -appropriate for the eval type. */ - -import React, { useContext } from "react"; - -import { QuerySection } from "../query_section"; -import { TablePane } from "../table_pane"; -import { DocInfo, EvalType, FeedbackStage } from "../types"; -import { SessionContext } from "./context"; - -interface AnswerWithTablesPropType { - docInfo: DocInfo; -} - -export function AnswerWithTables(props: AnswerWithTablesPropType): JSX.Element { - const { sessionQueryId } = useContext(SessionContext); - - return ( - <> -
-
- - {props.docInfo.evalType === EvalType.RAG && ( - - )} -
-
- - ); -} diff --git a/static/js/apps/eval_retrieval_generation/sxs/app.tsx b/static/js/apps/eval_retrieval_generation/sxs/app.tsx deleted file mode 100644 index 05e6ab343d..0000000000 --- a/static/js/apps/eval_retrieval_generation/sxs/app.tsx +++ /dev/null @@ -1,184 +0,0 @@ -/** - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { OAuthCredential, User } from "firebase/auth"; -import { GoogleSpreadsheet } from "google-spreadsheet"; -import React, { useContext, useEffect, useState } from "react"; - -import { signInWithGoogle } from "../../../utils/google_signin"; -import { DocInfo } from "../types"; -import { getDocInfo } from "../util"; -import { AnswerWithTables } from "./answer_with_tables"; -import { SessionContext } from "./context"; -import { getRatedQueryIds } from "./data_store"; -import { getLeftAndRight } from "./left_right_picker"; -import { SxsFeedback } from "./sxs_feedback"; - -interface AppPropType { - sessionId: string; - sheetIdA: string; - sheetIdB: string; -} - -interface CombinedDocInfo { - docInfoA: DocInfo; - docInfoB: DocInfo; - sortedQueryIds: number[]; -} - -function getSortedQueryIds(docInfoA: DocInfo, docInfoB: DocInfo): number[] { - const idsA = Object.keys(docInfoA.allQuery || {}); - const idsB = Object.keys(docInfoB.allQuery || {}); - return idsA - .filter((id) => idsB.includes(id)) - .map((id) => Number(id)) - .sort((a, b) => a - b); -} - -/** Returns the ID of the first unevaluated query. */ -async function getStartingQueryId( - sheetIdA: string, - sheetIdB: string, - sessionId: string, - sortedQueryIds: number[] -): Promise { - const completedIds = await getRatedQueryIds(sheetIdA, sheetIdB, sessionId); - for (const queryId of sortedQueryIds) { - if (!completedIds.includes(queryId)) { - return queryId; - } - } - // If all evals are complete, show the first query. - return sortedQueryIds[0]; -} - -export function App(props: AppPropType): JSX.Element { - const [user, setUser] = useState(null); - const [combinedDocInfo, setCombinedDocInfo] = useState(null); - const { setSessionQueryId, sessionQueryId } = useContext(SessionContext); - - useEffect(() => { - let subscribed = true; - if (combinedDocInfo?.sortedQueryIds.length) { - getStartingQueryId( - props.sheetIdA, - props.sheetIdB, - props.sessionId, - combinedDocInfo.sortedQueryIds - ).then((startingQueryId) => { - if (!subscribed) return; - setSessionQueryId(startingQueryId); - }); - } - return () => void (subscribed = false); - }, [ - combinedDocInfo, - props.sheetIdA, - props.sheetIdB, - props.sessionId, - setSessionQueryId, - ]); - - const { leftDocInfo, rightDocInfo } = getLeftAndRight( - props.sessionId, - combinedDocInfo?.docInfoA, - combinedDocInfo?.docInfoB, - sessionQueryId - ); - - // Sign in automatically. - useEffect(() => { - const scopes = ["https://www.googleapis.com/auth/spreadsheets"]; - - const handleUserSignIn = async ( - user: User, - credential: OAuthCredential - ): Promise => { - if (credential.accessToken) { - setUser(user); // Set the user state to the signed-in user - const docA = new GoogleSpreadsheet(props.sheetIdA, { - token: credential.accessToken, - }); - const docB = new GoogleSpreadsheet(props.sheetIdB, { - token: credential.accessToken, - }); - // Wait for documents to load - await Promise.all([docA.loadInfo(), docB.loadInfo()]); - // Get and set information about each document - Promise.all([getDocInfo(docA), getDocInfo(docB)]).then( - ([docInfoA, docInfoB]) => { - setCombinedDocInfo({ - docInfoA, - docInfoB, - sortedQueryIds: getSortedQueryIds(docInfoA, docInfoB), - }); - } - ); - } - }; - - signInWithGoogle(scopes, handleUserSignIn); - }, [props.sheetIdA, props.sheetIdB]); - - const initialLoadCompleted = combinedDocInfo && sessionQueryId; - return ( - <> - {!user && ( -
-

Signing you in...

-

- If you are not signed in after a few seconds, check that pop-ups are - allowed and refresh the page. -

-
- )} - - {user && ( -
-

Signed in as {user.email}

-
- )} - {user && !initialLoadCompleted && ( -
-

Loading query...

-
- )} - {initialLoadCompleted && ( - <> -
-
-

Query {sessionQueryId}

- {leftDocInfo.allQuery[sessionQueryId].text} -
-
- -
- -
- -
- - )} - - ); -} diff --git a/static/js/apps/eval_retrieval_generation/sxs/context.tsx b/static/js/apps/eval_retrieval_generation/sxs/context.tsx deleted file mode 100644 index a7f81ed359..0000000000 --- a/static/js/apps/eval_retrieval_generation/sxs/context.tsx +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import React, { createContext, useState } from "react"; - -/** - * Session context contains fields that can be set within child components and - * are changed when the user interacts with the tool. - */ -interface SessionContextType { - sessionQueryId: number; - setSessionQueryId: (queryId: number) => void; -} - -export const SessionContext = createContext({ - sessionQueryId: null, - setSessionQueryId: () => void {}, -}); - -export function SessionContextProvider({ - children, -}: { - children: JSX.Element; -}): JSX.Element { - const [sessionQueryId, setSessionQueryId] = useState(null); - return ( - - {children} - - ); -} diff --git a/static/js/apps/eval_retrieval_generation/sxs/data_store.tsx b/static/js/apps/eval_retrieval_generation/sxs/data_store.tsx deleted file mode 100644 index 444d792978..0000000000 --- a/static/js/apps/eval_retrieval_generation/sxs/data_store.tsx +++ /dev/null @@ -1,141 +0,0 @@ -/* - Copyright 2024 Google LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -import { - collectionGroup, - doc, - DocumentReference, - getDoc, - getDocs, - query, - setDoc, - where, -} from "firebase/firestore"; - -import { db } from "../../../utils/firebase"; -import { Rating, SxsPreference } from "./types"; - -const SHEETS_COLLECTION_NAME = "sheets"; -const QUERIES_COLLECTION_NAME = "queries"; -const RATINGS_COLLECTION_NAME = "ratings"; - -const SHEET_IDS_KEY = "sheetIds"; -const SESSION_ID_KEY = "sessionId"; - -interface StorageOnlyRatingFields { - [SHEET_IDS_KEY]: string; - [SESSION_ID_KEY]: string; - queryId: number; - userEmail: string; - timestamp: Date; -} - -type StoredRating = Rating & StorageOnlyRatingFields; - -/** - * Gets the document ref for a particular rating. - */ -function getRatingRef( - sheetIdA: string, - sheetIdB: string, - queryId: number, - sessionId: string -): DocumentReference { - return doc( - db, - SHEETS_COLLECTION_NAME, - getCombinedSheetIds(sheetIdA, sheetIdB), - QUERIES_COLLECTION_NAME, - queryId.toString(), - RATINGS_COLLECTION_NAME, - String(sessionId) - ); -} - -/** - * Combines two sheet IDs into the expected format for Firestore path. - */ -function getCombinedSheetIds(sheetIdA: string, sheetIdB: string): string { - // Use sheet IDs in lexicographical order so it doesn't matter which order - // they're passed in. - const firstSheetId = sheetIdA < sheetIdB ? sheetIdA : sheetIdB; - const secondSheetId = sheetIdA < sheetIdB ? sheetIdB : sheetIdA; - return `${firstSheetId}:${secondSheetId}`; -} - -/** - * Saves a rater's input to Firestore, overwriting any previous data. - */ -export async function saveRatingToStore( - userEmail: string, - sheetIdA: string, - sheetIdB: string, - queryId: number, - sessionId: string, - rating: Rating -): Promise { - const docRef = getRatingRef(sheetIdA, sheetIdB, queryId, sessionId); - const dataToSave: StoredRating = { - ...rating, - sheetIds: getCombinedSheetIds(sheetIdA, sheetIdB), - sessionId, - queryId, - userEmail, - timestamp: new Date(), - }; - return setDoc(docRef, dataToSave); -} - -/** - * Gets any prior rating for the given query and session. - */ -export async function getStoredRating( - sheetIdA: string, - sheetIdB: string, - queryId: number, - sessionId: string -): Promise { - const docRef = getRatingRef(sheetIdA, sheetIdB, queryId, sessionId); - const snapshot = await getDoc(docRef); - const savedData = snapshot.data(); - if (!savedData) return null; - return { - leftSheetId: savedData["leftSheetId"], - preference: savedData["preference"] as SxsPreference, - reason: savedData["reason"], - rightSheetId: savedData["rightSheetId"], - }; -} - -/** - * Gets the IDs of queries that have a stored rating under the given session ID. - */ -export async function getRatedQueryIds( - sheetIdA: string, - sheetIdB: string, - sessionId: string -): Promise { - const sessionRatingsRef = query( - collectionGroup(db, RATINGS_COLLECTION_NAME), - where(SHEET_IDS_KEY, "==", getCombinedSheetIds(sheetIdA, sheetIdB)), - where(SESSION_ID_KEY, "==", sessionId) - ); - const sessionRatings = await getDocs(sessionRatingsRef); - return sessionRatings.docs.map((ratingDocData) => { - const storedRating = ratingDocData.data() as StoredRating; - return storedRating.queryId; - }); -} diff --git a/static/js/apps/eval_retrieval_generation/sxs/eval_list.tsx b/static/js/apps/eval_retrieval_generation/sxs/eval_list.tsx deleted file mode 100644 index 067057cbfd..0000000000 --- a/static/js/apps/eval_retrieval_generation/sxs/eval_list.tsx +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* Component to show the full list of SxS evaluation queries */ - -import React, { useContext, useState } from "react"; -import { Button, Modal } from "reactstrap"; - -import { AllQuery } from "../types"; -import { SessionContext } from "./context"; -import { getRatedQueryIds } from "./data_store"; - -interface EvalListPropType { - leftSheetId: string; - rightSheetId: string; - sessionId: string; - sortedQueryIds: number[]; - allQuery: AllQuery; -} - -export function EvalList(props: EvalListPropType): JSX.Element { - const { sessionQueryId, setSessionQueryId } = useContext(SessionContext); - - const [modalOpen, setModalOpen] = useState(false); - const toggleModal = (): void => setModalOpen(!modalOpen); - - // Keys are query IDs and values are true if query eval is complete. - const [queryCompletionStatus, setQueryCompletionStatus] = useState< - Record - >({}); - - const [completedCount, setCompletedCount] = useState(0); - - const openModal = (): void => { - setModalOpen(true); - getRatedQueryIds( - props.leftSheetId, - props.rightSheetId, - props.sessionId - ).then((completedIds) => { - let updatedCompletedCount = 0; - const updatedCompletionStatus: Record = {}; - props.sortedQueryIds.forEach((queryId) => { - const completed = completedIds.includes(queryId); - updatedCompletionStatus[queryId] = completed; - if (completed) updatedCompletedCount++; - }); - setQueryCompletionStatus(updatedCompletionStatus); - setCompletedCount(updatedCompletedCount); - }); - }; - - return ( - <> - - -
-
- Evaluations ({completedCount} of {props.sortedQueryIds.length}{" "} - completed) -
-
-
- {props.sortedQueryIds.map((queryId) => { - const completed = queryCompletionStatus[queryId]; - return ( -
{ - setModalOpen(false); - setSessionQueryId(queryId); - }} - key={queryId} - > -
- {completed ? "check_circle" : "radio_button_unchecked"} -
-
- Q{queryId} · {props.allQuery[queryId]?.text || ""} -
-
- ); - })} -
-
- -
-
- - ); -} diff --git a/static/js/apps/eval_retrieval_generation/sxs/feedback_form.tsx b/static/js/apps/eval_retrieval_generation/sxs/feedback_form.tsx deleted file mode 100644 index 3969ff7ba8..0000000000 --- a/static/js/apps/eval_retrieval_generation/sxs/feedback_form.tsx +++ /dev/null @@ -1,85 +0,0 @@ -/* - Copyright 2024 Google LLC - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - */ - -/* Component that lets a rater enter which answer they prefer and why. */ - -import React, { FormEvent } from "react"; - -import { SxsPreference } from "./types"; - -// Map from enum to displayed string -const OPTIONS: Record = { - [SxsPreference.LEFT]: "Left", - [SxsPreference.RIGHT]: "Right", - [SxsPreference.NEUTRAL]: "No preference", -}; - -interface FeedbackFormProps { - disabled: boolean; - preference: SxsPreference | null; - reason: string; - setPreference: (value: SxsPreference) => void; - setReason: (value: string) => void; -} - -export function FeedbackForm(props: FeedbackFormProps): JSX.Element { - const handlePreferenceChange = (event: FormEvent): void => { - const { value } = event.target as HTMLInputElement; - props.setPreference(value as SxsPreference); - }; - - const handleReasonChange = (event: FormEvent): void => { - const { value } = event.target as HTMLInputElement; - props.setReason(value ?? ""); - }; - - return ( -
-
-
Which answer do you prefer?
-
- {Object.keys(OPTIONS).map((optionKey) => { - const optionValue = OPTIONS[optionKey]; - return ( - - ); - })} -
-
-
-
Comments (optional)
-
-