UK Parliament 2025 postcode lookup

postcodes_with_con.csv

Version: latest

Return to data package page.


Integrating with code

Using Python

Install the mysoc-dataset package. You can then use the following code to get this file.


        from mysoc_dataset import get_dataset_url, get_dataset_df

        # get the url of dataset
        url = get_dataset_url(
            repo_name="2025-constituencies",
            package_name="uk_parliament_2025_postcode_lookup",
            version_name="latest",
            file_name="postcodes_with_con.csv",
        )
        
        
        # get a pandas dataframe
        df = get_dataset_df(
            repo_name="2025-constituencies",
            package_name="uk_parliament_2025_postcode_lookup",
            version_name="latest",
            file_name="postcodes_with_con.csv",
        )
        
      

You can also use this package as a command-line tool:


        mysoc-dataset download \
        --repo 2025-constituencies \
        --package uk_parliament_2025_postcode_lookup \
        --version latest \
        --file postcodes_with_con.csv
      

Use mysoc-dataset --help for all options.


Can you help us with funding by telling us more about yourself?