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

# Forest area

> Forest area by type group from condition proportions and expansion factors.

Area queries expand condition proportions (`CONDPROP_UNADJ`) rather than tree counts, using the condition's `PROP_BASIS` to pick the right adjustment factor.

## Minnesota — forest area by forest type group

<Info>**EVALID:** 272201 (Minnesota 2022) · **Result:** 17,599,046 forest acres across 10 forest type groups · [source](https://github.com/mihiarc/pyfia/blob/main/reference/queries/forest_area/minnesota_forest_type_groups.sql)</Info>

<Accordion title="View SQL">
  ```sql theme={null}
  SELECT
      CASE
          WHEN rftg.VALUE IS NULL THEN '0999 Nonstocked'
          ELSE LPAD(CAST(rftg.VALUE AS VARCHAR), 4, '0') || ' ' || COALESCE(rftg.MEANING, 'Unknown')
      END AS forest_type_group,
      SUM(
          c.CONDPROP_UNADJ *
          CASE c.PROP_BASIS
              WHEN 'MACR' THEN ps.ADJ_FACTOR_MACR
              ELSE ps.ADJ_FACTOR_SUBP
          END * ps.EXPNS
      ) AS total_area_acres
  FROM POP_STRATUM ps
  JOIN POP_PLOT_STRATUM_ASSGN ppsa ON ppsa.STRATUM_CN = ps.CN
  JOIN PLOT p ON ppsa.PLT_CN = p.CN
  JOIN COND c ON c.PLT_CN = p.CN
  LEFT JOIN REF_FOREST_TYPE rft ON rft.VALUE = c.FORTYPCD
  LEFT JOIN REF_FOREST_TYPE_GROUP rftg ON rft.TYPGRPCD = rftg.VALUE
  WHERE
      c.COND_STATUS_CD = 1            -- Forest conditions only
      AND c.CONDPROP_UNADJ IS NOT NULL
      AND ps.rscd = 23               -- Minnesota
      AND ps.evalid = 272201
  GROUP BY rftg.VALUE, rftg.MEANING
  ORDER BY total_area_acres DESC
  LIMIT 10;
  ```
</Accordion>

<Tip>The Python equivalent is [`area()`](/api/pyfia-estimation-estimators-area) with `grp_by="FORTYPCD"`.</Tip>
