<jupyter_start><jupyter_text>Emissions-reduction related servicesRough breakdown of local government services (as defined in [ESD standard](https://standards.esd.org.uk/?uri=list)) for England and Wales that have some relation to emissions reduction.These services are then categorized into:* Services/Direct - services councils do and direct actions they take* Regulation/Data - How councils shape what others can do and information they gather to inform this activity* Place-making - Wider plan and strategic powers that have some relevance to emissions reductions.Services can be in multiple categories.This dataset has a `draft` status, not all relevant services may be included, not all services included may be relevant, and catagories may not be entirely correct. The raw dataset is in `data\emissions-related-services.csv`.<jupyter_code>service_types = ["Service delivery","Enforcement and regulation","Place making"]


def get_types(row: pd.Series) -> list:
    return [x for x in service_types if row[x] == 1]

df = (
    pd.read_csv(Path("data", "emissions-related-services.csv"))
    .fillna(0)
    .assign(types=lambda df: df.apply(get_types, axis="columns"))
)

overall = (
    df.explode("types")
    .pivot_table("Identifier", index="types", aggfunc="count")
    .reset_index()
    .rename(columns={"types":"Area", "Identifier": "Services"})
    .style.hide_index()
)

overall<jupyter_output><empty_output><jupyter_text>List of services by type<jupyter_code>comma = ", ".join

for s in service_types:
    display(md(f"## {s}"))
    for index, row in df[df[s] == 1].iterrows():
        display(md(f"### {row.Label}"))
        display(md(f"{row.Description} ({comma(row.types)})"))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1246376811594203, 'fraction_numerical': 0.0017391304347826088, 'mean_word_length': 5.056140350877193, 'pattern_counts': {'":': 2, '<': 9, '<?xml version=': 0, '>': 10, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '427520', 'license': 'MIT', 'n_tokens_mistral': 520, 'n_tokens_neox': 503, 'n_words': 162, 'path': 'notebooks/service_descriptions.ipynb', 'repo_name': 'mysociety/council_climate_services', 'size': '1725'}