---
id: "ph_value"
kind: "datatype"
status: "draft"
is_pii: false
name: "pH value"
regexp: "^(?:(?:\\d|1[0-3])(?:[.,]\\d{1,3})?|14(?:[.,]0{1,3})?)$"
categories: ["chemistry", "environment", "values"]
langs: ["common"]
quality: 90
url: "https://registry.apicrafter.io/datatype/ph_value"
---

# pH value (`ph_value`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

pH of a water sample, a soil or a solution: a number on the scale from 0 to 14, usually with one or two decimals, written with a decimal point or comma. Soil tables give the pH in water and in a salt solution in separate columns (pH H2O, pH KCl, pH CaCl2; pHwater, phLevel_calciumChloride), water quality tables next to temperature and conductivity. A number alone does not tell a pH from any other measure, so a value is a pH only in a field named after it (pH of the horizons of the soil profile database of the Armenian Soil Information System).

- Parent datatype: [`numeric`](https://registry.apicrafter.io/datatype/numeric.md)
- Personal data (PII): no
- Categories: Chemistry (chemistry), Environment (protected areas, biodiversity, water, weather, emissions, waste) (environment), All measurable values (percentage, amount and e.t.c) (values)
- Countries: global
- Languages: Common to most languages (common)
- Classification: categorical

## Detection

Regular expression (Python `re`):

```
^(?:(?:\d|1[0-3])(?:[.,]\d{1,3})?|14(?:[.,]0{1,3})?)$
```

## Examples

- `8.1` — Soil horizon, Armenian Soil Information System
- `7` — Whole number
- `4.25` — Two decimals
- `6,8` — Decimal comma
- `15.2` (invalid example) — Above the scale
- `-1` (invalid example) — Below the scale

## Metacrafter rules

2 rules: 2 match the field name, 0 match values.

- `phbyname` (field, `common/environment.yaml`)
- `phbysensorname` (field, `common/environment.yaml`)

## Supported by tools

- [`metacrafter`](https://registry.apicrafter.io/tool/metacrafter.md)

## Translations

- ru: Водородный показатель (pH)

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/PH>

## Quality

Score 90/100. Missing: mapping (Wikidata, Schema.org, ...).

JSON: <https://registry.apicrafter.io/api/v1/datatypes/ph_value.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/chemistry/ph_value.yaml>
