opensanctions / opensanctions/opensanctions
Add helper to convert American height notation to metric
Open
@nvmbrasserie is already working on this.
Since Jun 23, 2025.
zavod
- Dominant language
- Python
- Stars
- 810
- Forks
- 187
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 133
Description
Create a helper to parse and convert American-style height expressions (e.g., 5' 11" or 6ft 2in) into metric (centimeters).
Implement a function (e.g., convert_height_to_cm(value: str) -> float) that:
- Parses formats like 5'11", 6 ft 2 in, 5ft, etc.
- Handles edge cases and spacing variations.
- Add unit tests with common height formats and expected centimeter outputs.
Goal: Standardize height data across datasets by converting US-style height entries to metric units.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.