The UK Covid Python SDK (https://publichealthengland.github.io/coronavirus-dashboard-api-python-sdk/) can collect data for an area, e.g. Barnsley, using the following code: