---
type: "Source File"
title: "path = \"/home/ben/infra/copecheck-cities/templates/city.html\""
description: "path = \"/home/ben/infra/copecheck-cities/templates/city.html\" with open(path, \"r\") as f: content = f.read() old = \"\"\"automation probabilities, mapped to SIC sectors via ONS correspondence tables.\"\"\" new = \"\"\"automation."
resource: "https://cities.copecheck.com"
tags: ["copecheck", "cities", "source-file", "py"]
timestamp: "2026-05-09T15:08:05Z"
site: "cities"
source_path: "copecheck-cities/patch_city_template.py"
---

# path = "/home/ben/infra/copecheck-cities/templates/city.html"

Source path: `copecheck-cities/patch_city_template.py`  
Index snapshot generated: `2026-11-24T13:27:52Z`  
File modified: `2026-05-09T15:08:05Z`

```py
path = "/home/ben/infra/copecheck-cities/templates/city.html"
with open(path, "r") as f:
    content = f.read()

old = """automation probabilities, mapped to SIC sectors via ONS correspondence tables."""

new = """automation probabilities, mapped to {% if country_code == 'uk' %}SIC sectors via ONS correspondence tables{% elif country_code == 'ie' %}NACE sectors via CSO Census 2022 data{% elif country_code == 'us' %}NAICS sectors via BLS data{% elif country_code == 'ca' %}NAICS sectors via Statistics Canada data{% elif country_code == 'au' %}ANZSIC sectors via ABS 2021 Census data{% elif country_code == 'nz' %}ANZSIC sectors via Stats NZ Census data{% else %}industry classification correspondence tables{% endif %}."""

if old in content:
    content = content.replace(old, new)
    with open(path, "w") as f:
        f.write(content)
    print("OK: patched city.html with dynamic data sources")
else:
    print("ERROR: could not find match")
```
