> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Analytics Reporting Warehouse（分析レポート用データウェアハウス）

> ABBYY Vantage の Analytics Reporting Warehouse: Process skills のフィールド変更、手動検証の工数、ドキュメント精度の指標を追跡します。

export const VantageRegion = ({children}) => {
  const STORAGE_KEY = "abbyy.vantage.region";
  const REGIONS = [{
    code: "eu",
    label: "Europe"
  }, {
    code: "us",
    label: "North America"
  }, {
    code: "au",
    label: "Australia / Asia-Pacific"
  }];
  const [region, setRegion] = useState("eu");
  const [open, setOpen] = useState(false);
  const containerRef = useRef(null);
  const dropdownRef = useRef(null);
  function safeGetSavedRegion() {
    try {
      const saved = typeof window !== "undefined" ? window.localStorage.getItem(STORAGE_KEY) : null;
      const valid = new Set(REGIONS.map(r => r.code));
      return saved && valid.has(saved) ? saved : "eu";
    } catch {
      return "eu";
    }
  }
  function safeSetSavedRegion(code) {
    try {
      if (typeof window !== "undefined") {
        window.localStorage.setItem(STORAGE_KEY, code);
      }
    } catch {}
  }
  function dispatchRegionChanged(code) {
    try {
      if (typeof window !== "undefined") {
        window.dispatchEvent(new CustomEvent("abbyy:region-changed", {
          detail: {
            code
          }
        }));
      }
    } catch {}
  }
  function replaceRegionInString(text, currentRegion) {
    if (typeof text !== "string") return text;
    const hostRegex = /https:\/\/vantage-(eu|us|au)\.abbyy\.com/gi;
    const tokenRegex = /https:\/\/vantage-\[region\]\.abbyy\.com/gi;
    const bareHostRegex = /vantage-(eu|us|au)\.abbyy\.com/gi;
    const bareTokenRegex = /vantage-\[region\]\.abbyy\.com/gi;
    return text.replace(hostRegex, `https://vantage-${currentRegion}.abbyy.com`).replace(tokenRegex, `https://vantage-${currentRegion}.abbyy.com`).replace(bareHostRegex, `vantage-${currentRegion}.abbyy.com`).replace(bareTokenRegex, `vantage-${currentRegion}.abbyy.com`);
  }
  useEffect(() => {
    setRegion(safeGetSavedRegion());
  }, []);
  useEffect(() => {
    const root = containerRef.current;
    if (!root) return;
    const anchors = root.querySelectorAll("a[href]");
    anchors.forEach(a => {
      const href = a.getAttribute("href");
      if (href) {
        const next = replaceRegionInString(href, region);
        if (next !== href) {
          a.setAttribute("href", next);
        }
      }
    });
    const walker = typeof document !== "undefined" ? document.createTreeWalker(root, NodeFilter.SHOW_TEXT, null) : null;
    if (walker) {
      const toUpdate = [];
      let node = walker.nextNode();
      while (node) {
        const updated = replaceRegionInString(node.nodeValue, region);
        if (updated !== node.nodeValue) {
          toUpdate.push([node, updated]);
        }
        node = walker.nextNode();
      }
      toUpdate.forEach(([textNode, value]) => {
        textNode.nodeValue = value;
      });
    }
  }, [region, children]);
  useEffect(() => {
    const root = containerRef.current;
    if (!root) return;
    const anchors = root.querySelectorAll("a[href]");
    anchors.forEach(a => {
      a.style.fontWeight = "600";
      a.style.textDecoration = "underline";
      a.style.textUnderlineOffset = "2px";
    });
  }, [region, children]);
  useEffect(() => {
    const onRegionChanged = evt => {
      const code = evt && evt.detail && evt.detail.code;
      if (!code || code === region) return;
      setRegion(code);
    };
    if (typeof window !== "undefined") {
      window.addEventListener("abbyy:region-changed", onRegionChanged);
    }
    return () => {
      if (typeof window !== "undefined") {
        window.removeEventListener("abbyy:region-changed", onRegionChanged);
      }
    };
  }, [region]);
  useEffect(() => {
    const onClickAway = e => {
      if (!dropdownRef.current) return;
      if (!dropdownRef.current.contains(e.target)) {
        setOpen(false);
      }
    };
    document.addEventListener("click", onClickAway, true);
    return () => document.removeEventListener("click", onClickAway, true);
  }, []);
  const onSelect = code => {
    setRegion(code);
    safeSetSavedRegion(code);
    dispatchRegionChanged(code);
    setOpen(false);
  };
  const current = REGIONS.find(r => r.code === region) || REGIONS[0];
  return <div className="not-prose">
      <div className="mb-4 inline-flex items-center gap-2" ref={dropdownRef}>
        <span className="text-sm text-zinc-950/80 dark:text-white/80">Tenant Region:</span>
        <div className="relative">
          <button type="button" aria-haspopup="listbox" aria-expanded={open ? "true" : "false"} onClick={() => setOpen(v => !v)} className="h-8 px-3 rounded-md bg-zinc-900/5 dark:bg-white/5 border border-zinc-950/20 dark:border-white/20 text-sm inline-flex items-center gap-2">
            <span className="text-zinc-950 dark:text-white">{current.label}</span>
            <svg width="8" height="24" viewBox="0 -9 3 24" className="transition-transform text-gray-400 overflow-visible dark:text-gray-600 ml-auto" style={{
    transform: open ? "rotate(270deg)" : "rotate(90deg)"
  }}>
              <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round"></path>
            </svg>
          </button>
          {open ? <div role="listbox" className="absolute z-50 left-full top-0 ml-2 w-56 rounded-xl border border-zinc-950/20 dark:border-white/20 bg-white dark:bg-zinc-900 shadow-lg p-2">
              {REGIONS.map(r => {
    const selected = r.code === region;
    return <button key={r.code} type="button" role="option" aria-selected={selected ? "true" : "false"} onClick={() => onSelect(r.code)} className={"w-full flex items-center justify-between px-3 py-2 rounded-lg text-sm hover:bg-zinc-950/5 dark:hover:bg-white/10 text-zinc-950 dark:text-white" + (selected ? " font-medium" : "")}>
                    <span style={selected ? {
      color: "#ff2038"
    } : undefined}>{r.label}</span>
                    <span className={selected ? "ml-3" : "ml-3 invisible"} style={selected ? {
      color: "#ff2038"
    } : undefined}>✓</span>
                  </button>;
  })}
            </div> : null}
        </div>
      </div>
      <div ref={containerRef} className="prose dark:prose-invert max-w-none">{children}</div>
    </div>;
};

Analytics Reporting Warehouse は、システム内でのドキュメント処理の効率を分析するために使用できるデータを格納します。このデータを利用して、どのドキュメントで手動検証により多くの時間がかかっているのか、その要因とともに特定できます。

統計情報は、少なくとも 1 つの 手動確認 ステップを持ち、少なくとも 1 つの Document skill を含む Process skills について収集されます。システムは、ドキュメントの手動確認前の初期状態と処理後の状態を比較します。

Analytics Reporting Warehouse は、Vantage の 2 つのレポート用データウェアハウスのうちの 1 つです。両方の概要と、トランザクションレベルのデータを扱う [Business Processing Reporting](/ja/vantage/developer/reporting/business-reporting) データウェアハウスについては、[Reporting service](/ja/vantage/developer/reporting/reporting-service) を参照してください。

Analytics Reporting Warehouse には、次のデータが格納されます。

* ドキュメントの変更に関する情報
* ドキュメントフィールドに関する情報:
  * 抽出されたフィールド値の数
  * 変更されたフィールド値の数
  * 各フィールドのステータス (正しいか、認識に問題があるか、位置が誤って特定されているか、検出されなかったかを示します)

<div id="migrating-from-v1-to-v2">
  ## v1 から v2 への移行
</div>

パスは "/v1/" から "/v2/" に変わっただけです。リクエスト／レスポンスの field や動作に変更はありません。

<div id="downloading-a-data-report">
  ## データレポートのダウンロード
</div>

<Note>
  データレポートをダウンロードできるのは、**テナント管理者** または **Processing Supervisor** ロールを持つユーザーのみです。詳細については、[ロールベースアクセス制御 (RBAC) ](/ja/vantage/documentation/tenant-admin/tenant-management/role-based-access) を参照してください。
</Note>

Analytics Reporting Warehouse からデータを取得するには、取得したいレポートの種類に応じて、次のいずれかのリソースに **GET** リクエストを送信します。

<div id="obtaining-data-about-documents-processed-by-a-process-skill">
  ### Process スキルで処理されたドキュメントのデータ取得
</div>

<VantageRegion>
  ```
  GET https://vantage-us.abbyy.com/api/reporting/v2/qa/process-skills/documents
  ```
</VantageRegion>

<div id="obtaining-data-about-fields-processed-by-process-and-document-skills">
  ### Process skill および Document skill で処理されたフィールド データの取得
</div>

<VantageRegion>
  ```
  GET https://vantage-us.abbyy.com/api/reporting/v2/qa/process-skills/fields
  ```
</VantageRegion>

リクエストでは次のパラメーターを受け付けます。

* **startDate**. データをダウンロードする期間の開始日時 (書式例: 2022-01-07T13:03:38、時刻は UTC) 。必須パラメーターです。
* **endDate**. データをダウンロードする期間の終了日時 (書式例: 2022-09-07T13:03:38、時刻は UTC) 。
* **processSkillId**. データをダウンロードする対象となる Process skill の ID。必須パラメーターです。
* **documentSkillId**. データをダウンロードする対象となる Document skill の ID。

<Info>
  このパラメーターを含めることができるのは `/api/reporting/v2/qa/process-skills/fields` リクエストのみです。
</Info>

* **imageType**. ドキュメント画像の種別。指定可能な値: Unknown, Receipt, A4, BusinessCard, Book, Id, PassportRus, DiscountCard, BankCard, NotDocument, PassportPage.
* **imageColority**. ドキュメントの先頭ページがカラーか、グレースケールか、白黒かを示します。指定可能な値: BlackWhite, Gray, Color.
* **imageSource**. ドキュメント画像の取得元。指定可能な値: Unknown, Photo, Scan, Synthetic, Screenshot, Pdf.
* **wasCorrectedInManualReview**. 手動確認中にドキュメントフィールドが修正されたかどうかを示します。
* **wasDocumentTypeChangedInManualReview**. 手動確認中にドキュメントタイプが変更されたかどうかを示します。

生成される CSV ファイルには、次の情報が列として格納されます。

<div id="report-about-changes-in-documents">
  ### ドキュメント変更に関するレポート
</div>

| Column                                  | Description                                                                |
| :-------------------------------------- | :------------------------------------------------------------------------- |
| `ProcessSkillId`                        | Process skill の ID。                                                        |
| `ProcessSkillVersion`                   | Process skill のバージョン。                                                      |
| `ProcessSkillName`                      | Process skill の名前。                                                         |
| `DocumentSkillId`                       | Document skill の ID。                                                       |
| `DocumentSkillVersion`                  | Document skill のバージョン。                                                     |
| `DocumentSkillName`                     | Document skill の名前。                                                        |
| `TransactionId`                         | トランザクションの ID。                                                              |
| `HasManualReview`                       | ドキュメントが手動レビューされたかどうかを示します。取りうる値：1 または 0。                                   |
| `DocumentId`                            | 処理に渡されたドキュメントの ID。                                                         |
| `DocumentName`                          | 処理に渡されたドキュメントの名前。                                                          |
| `PageSize`                              | ドキュメントの 1 ページ目のサイズ (ピクセル単位の幅と高さ) 。                                         |
| `ImageColority`                         | ドキュメントの 1 ページ目がカラー、グレー、または白黒かどうかを示します。                                     |
| `ImageSource`                           | ドキュメントの 1 ページ目の画像の取得元。例：スキャン、写真、PDF ファイル、スクリーンショットなど。                      |
| `ImageType`                             | ドキュメントの 1 ページ目の画像タイプ。例：A4、レシート、銀行カードなど。                                    |
| `DPI`                                   | ドキュメントの 1 ページ目に含まれるドット数 (ピクセル数) 。                                          |
| `TransactionParameter1..N`              | 処理に渡されたトランザクション パラメーター。ドキュメントにトランザクション パラメーターが含まれない場合、レポート上の値は null になります。 |
| `DimensionField1..MValue`               | 処理に渡されたディメンション フィールド。ドキュメントにディメンション フィールドが含まれない場合、レポート上の値は null になります。     |
| `DocumentSkillChanged`                  | 手動レビュー中にドキュメントタイプが変更されたかどうかを示します。取りうる値：true または false。                     |
| `DocumentSkillIdUsedBeforeManualReview` | Manual Review ステージの前にドキュメントに適用された Document skill。                          |
| `NumberOfExportedFields`                | ドキュメント内でエクスポートされたフィールド数。                                                   |
| `NumberOfChangedFields`                 | ドキュメント内で手動変更されたフィールド数。                                                     |

このレポートのデータは 12 か月間保存されます。

<div id="report-about-changes-in-fields">
  ### フィールド変更に関するレポート
</div>

| Column                     | Description                                                                                                                                |
| :------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------- |
| `ProcessSkillId`           | Process skill の ID。                                                                                                                        |
| `ProcessSkillVersion`      | Process skill のバージョン。                                                                                                                      |
| `ProcessSkillName`         | Process skill の名前。                                                                                                                         |
| `DocumentSkillId`          | Document skill の ID。                                                                                                                       |
| `DocumentSkillVersion`     | Document skill のバージョン。                                                                                                                     |
| `DocumentSkillName`        | Document skill の名前。                                                                                                                        |
| `TransactionId`            | トランザクションの ID。                                                                                                                              |
| `HasManualReview`          | ドキュメントが手動確認されたかどうかを示します。取りうる値: 1 または 0。                                                                                                    |
| `DocumentId`               | 処理に渡されたドキュメントの ID。                                                                                                                         |
| `DocumentName`             | 処理に渡されたドキュメントの名前。                                                                                                                          |
| `PageSize`                 | ドキュメントの 1 ページ目のサイズ (ピクセル単位の幅と高さ) 。                                                                                                         |
| `ImageColority`            | ドキュメントの 1 ページ目がカラー、グレースケール、白黒のいずれかを示します。                                                                                                   |
| `ImageSource`              | ドキュメントの 1 ページ目の画像のソース。例: スキャン、写真、PDF ファイル、スクリーンショットなど。                                                                                     |
| `ImageType`                | ドキュメントの 1 ページ目の画像タイプ。例: A4、領収書、銀行カードなど。                                                                                                    |
| `DPI`                      | ドキュメントの 1 ページ目のドット (またはピクセル) 数。                                                                                                            |
| `TransactionParameter1..N` | 処理に渡されたトランザクションパラメーター。ドキュメントにトランザクションパラメーターが含まれない場合、レポート上の値は null になります。                                                                   |
| `DimensionField1..MValue`  | 処理に渡されたディメンションフィールド。ドキュメントにディメンションフィールドが含まれない場合、レポート上の値は null になります。                                                                       |
| `NumberOfExportedFields`   | ドキュメントでエクスポートされたフィールドの数。                                                                                                                   |
| `NumberOfChangedFields`    | ドキュメントで手動変更されたフィールドの数。                                                                                                                     |
| `FieldID`                  | ドキュメントフィールドの ID。                                                                                                                           |
| `FieldName`                | ドキュメントフィールドの名前。                                                                                                                            |
| `Correct`                  | 非反復フィールドの補正状況および、補正されなかった反復フィールドのインスタンス数に関する情報を示します。取りうる値:<br />- 非反復フィールドが手動確認中に補正されなかった場合は 1。<br />- 反復フィールドについて、手動確認中に補正されなかったインスタンスの数。 |
| `RecognitionIssue`         | ドキュメントフィールドの処理中に発生した認識の問題に関する情報。取りうる値:<br />- 非反復フィールドの値は補正されたが、領域は補正されなかった場合は 1。<br />- 反復フィールドについて、手動確認中に値が補正されたインスタンスの数。                |
| `DetectedIncorrectly`      | 手動確認中に行われた補正に関する情報。取りうる値:<br />- 非反復フィールドの領域および値が補正された場合は 1。<br />- 反復フィールドについて、手動確認中に領域および値が補正されたインスタンスの数。                                |
| `NotDetected`              | 手動確認前に抽出されなかったフィールド値に関する情報。取りうる値:<br />- 非反復フィールドの値が手動確認前に抽出されず、Verifier によって作成された場合は 1。<br />- 反復フィールドについて、手動確認中に作成された値のインスタンス数。          |
| `IsInDocument`             | フィールドがドキュメント内に少なくとも 1 つのインスタンスを持つかどうかを示します。取りうる値: true, false。                                                                             |

このレポート用のデータは 14 日間保存されます。

CSV 形式で取得したデータは、任意の BI ツールでさらに分析できます。
