Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into difference_in_counts
Browse files Browse the repository at this point in the history
  • Loading branch information
feba-rajan committed Aug 27, 2024
2 parents 616e5ce + c11af22 commit bdd1ba6
Show file tree
Hide file tree
Showing 25 changed files with 258 additions and 83 deletions.
2 changes: 1 addition & 1 deletion application/core/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def random_int(n=1):
templates.env.globals["enable_x_ref"] = True
templates.env.globals["includeAutocomplete"] = True
templates.env.globals["random_int"] = random_int
templates.env.globals["templateVar"] = {"email": "digitalland@levellingup.gov.uk"}
templates.env.globals["templateVar"] = {"email": "digitalland@communities.gov.uk"}
templates.env.globals["serviceStatus"] = False
templates.env.globals["gaMeasurementId"] = settings.GA_MEASUREMENT_ID
templates.env.globals["get_os_oauth2_token"] = get_os_oauth2_token
Expand Down
2 changes: 1 addition & 1 deletion application/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def create_app():
version="0.1.0",
contact={
"name": "planning.data.gov.uk team",
"email": "digitalland@levellingup.gov.uk",
"email": "digitalland@communities.gov.uk",
"url": "https://www.planning.data.gov.uk",
},
license_info={
Expand Down
23 changes: 20 additions & 3 deletions application/routers/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@
logger = logging.getLogger(__name__)


def get_origin_label(dataset):
labels = {
"alpha": (
"Data created by MHCLG. We will replace this with data from authoritative sources "
"when it is available."
),
"beta": (
"Contains some data created by MHCLG. We are working to replace it with data "
"from authoritative sources"
),
"live": "All data from authoritative sources",
"live+": "All data from authoritative sources with additional supporting data.",
}
return labels.get(dataset.phase, "Unknown")


def get_datasets_by_typology(datasets):
typologies = {}
for ds in (d for d in datasets if d.typology):
Expand Down Expand Up @@ -109,11 +125,12 @@ def get_dataset(
"current": publisher_coverage.publisher_count,
},
"latest_resource": latest_resource,
"last_collection_attempt": latest_resource.last_collection_attempt
if latest_resource
else None,
"last_collection_attempt": (
latest_resource.last_collection_attempt if latest_resource else None
),
"categories": categories,
"data_file_url": data_file_url,
"dataset_origin_label": get_origin_label(_dataset),
},
)

Expand Down
10 changes: 9 additions & 1 deletion application/routers/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,15 @@ def search_entities(
extension: Optional[SuffixEntity] = None,
session: Session = Depends(get_session),
):
# Determine if the URL path includes an extension
if "." in request.url.path: # check if extension if in path parameter
extension = extension
else:
if request.query_params.get(
"extension"
): # check if extension if in query parameter
extension = None

# get query_filters as a dict
query_params = asdict(query_filters)
# TODO minimse queries by using normal queries below rather than returning the names
Expand All @@ -271,7 +280,6 @@ def search_entities(
validate_typologies(query_params.get("typology", None), typology_names)
# Run entity query
data = get_entity_search(session, query_params)

# the query does some normalisation to remove empty
# params and they get returned from search
params = data["params"]
Expand Down
2 changes: 1 addition & 1 deletion application/templates/components/phase-banner/macro.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"tag": {
"text": params.phase
},
"html": params.html | default('This is a prototype. Your <a class="govuk-link" href="mailto:digitalland@levellingup.gov.uk?subject=Prototype feedback">feedback</a> will help us to improve it.'),
"html": params.html | default('This is a prototype. Your <a class="govuk-link" href="mailto:digitalland@communities.gov.uk?subject=Prototype feedback">feedback</a> will help us to improve it.'),
"classes": params.classes,
"attributes": params.attributes
}) }}
Expand Down
8 changes: 8 additions & 0 deletions application/templates/dataset.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ <h1 class="govuk-heading-xl">{{ dataset["name"] }}</h1>
{
'html': latest_resource.last_updated if latest_resource.last_updated else 'N/A'
},
],
[
{
'html': '<b>Origin</b>'
},
{
'html': dataset_origin_label
}
]
]
%}
Expand Down
2 changes: 1 addition & 1 deletion application/templates/fact.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ <h1 class="govuk-heading-xl govuk-!-margin-bottom-0">Fact</h1>
{%- elif field == 'value' and fact['field'] in ["geometry","point"] %}
<div class="app-code-block">{{ fact[field] }}</div>
{%- elif field == 'entity-name' %}
<a class ="govuk-link" href="/curie/{{ fact['entity-prefix'] + ':' + fact['entity-reference'] }}">{{ fact[field] }}</a>
<a class ="govuk-link" href="/curie/{{ fact['entity-prefix'] + ':' + fact['entity-reference'] if fact['entity-prefix'] and fact['entity-reference'] else '#'}}">{{ fact[field] }}</a>
{%- elif field == 'reference-entity' %}
<a class ="govuk-link" href="/entity/{{ fact[field] }}">{{ fact[field] }}</a>
{%- else %}
Expand Down
2 changes: 1 addition & 1 deletion application/templates/homepage.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ <h2 class="govuk-heading-m">{% if params.title %}{{ params.title }}{% else %}Ple
'src': '/images/providers-dashboard',
},
'link': {
'href': 'https://www.planning.data.gov.uk/guidance',
'href': 'https://check.planning.data.gov.uk/manage',
'text': 'Check and provide planning data'
},
})
Expand Down
6 changes: 6 additions & 0 deletions application/templates/layouts/layout--about.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ <h1 class="govuk-heading-xl govuk-!-margin-bottom-3">{{ pageData.pageTitle }}</h
'href': sectionPath + 'roadmap',
'current': true if pageData.name == 'roadmap' else false,
'theme': theme,
},
{
'text': 'Performance',
'href': sectionPath + 'performance',
'current': true if pageData.name == 'performance' else false,
'theme': theme,
}
],
})
Expand Down
6 changes: 3 additions & 3 deletions application/templates/pages/about/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Because we are working on this product:
- the data we have collected is not yet complete (there may be things you expect to see that are currently missing) 
- legislation designed to mandate these standards is still [in Parliament](https://bills.parliament.uk/bills/3155) 

You can tell us if something doesn't look right by emailing [digitalland@levellingup.gov.uk](mailto:digitalland@levellingup.gov.uk)
You can tell us if something doesn't look right by emailing [digitalland@communities.gov.uk](mailto:digitalland@communities.gov.uk)

We are currently working with a set of LPAs to collect data according to our draft standards, that will be collected by the platform. The number of LPAs and datasets covered is growing all the time.

Expand Down Expand Up @@ -63,11 +63,11 @@ Services like PlanX and BOPS have the potential to save LPAs millions each year,
UK PropTech
---

The UK has a growing Property Technology sector with global ambitions. DLUHC is working closely with the sector, including through [Digital Citizen Engagement](https://dluhcdigital.blog.gov.uk/2021/08/03/new-fund-to-enhance-community-engagement-in-planning/) pilots and the [PropTech Advisory Council](https://www.gov.uk/government/news/proptech-dragons-form-new-expert-property-innovation-council).   
The UK has a growing Property Technology sector with global ambitions. MHCLG is working closely with the sector, including through [Digital Citizen Engagement](https://mhclgdigital.blog.gov.uk/2021/08/03/new-fund-to-enhance-community-engagement-in-planning/) pilots and the [PropTech Advisory Council](https://www.gov.uk/government/news/proptech-dragons-form-new-expert-property-innovation-council).   

While the data for this site has been designed for the modernisation of public sector planning services, we are exposing it so it can also be used by the UK PropTech sector without expensive and complex workarounds to scrape, acquire or deduce the data from the state.  

We are keen to hear from and potentially highlight external users of this data, and to get feedback about how we can improve this service. To get in touch with the team, contact [digitalland@levellingup.gov.uk](mailto:digitalland@levellingup.gov.uk).  
We are keen to hear from and potentially highlight external users of this data, and to get feedback about how we can improve this service. To get in touch with the team, contact [digitalland@communities.gov.uk](mailto:digitalland@communities.gov.uk).  

A number of companies already provide access to public sector planning data. If you are looking for commercial services providing national data coverage, access to historic data, or insights and services, have a look at companies such as [LandTech](https://land.tech/), [Glenigan](https://www.glenigan.com/), [Nimbus](https://www.nimbusmaps.co.uk/), [Urban Intelligence](https://urbanintelligence.co.uk/) and [Realyse](https://www.realyse.com/) among others.

Expand Down
16 changes: 16 additions & 0 deletions application/templates/pages/about/performance.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{% extends "layouts/layout--about.html" %}
{% set templateName = 'dl-info/about/performance.html' %}
{%- from "components/back-button/macro.jinja" import dlBackButton %}
{%- block breadcrumbs -%}
{{ dlBackButton({
"parentHref": '/about/'
})}}
{%- endblock -%}
{%- do pageData.update({
'pageTitle': 'Performance',
'lede': lede
}) %}
{% block content_primary %}
{%- set page_content -%}{%- include pageData.root_url + "performance.md" -%}{%- endset -%}
{{ page_content | render_markdown }}
{% endblock %}
54 changes: 54 additions & 0 deletions application/templates/pages/about/performance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
Performance indicators show how the planning data platform is making it easier to find, use and trust planning and housing data in England.

Last updated 31 July 2024.

## Availability

We index planning and housing datasets provided by multiple organisations in England.

Many datasets have one owner providing the data nationally. There are 8 datasets compiled from data sources provided by local planning authorities (LPAs) across England.

### 89 datasets on the platform

89 datasets available from 452 organisations. <!--? added last month (+/-0%). -->

131 data sources out of 584 provided by 31 local planning authorities. 4 up from last month (+0.7%).

1 new local planning authority providing data. 1 up from last month (+1%).

You can [help identify and design data](https://www.planning.data.gov.uk/) that would be useful on the platform.

## Quality

We check data sources for issues and help data owners improve the quality. This increases the quality and trustworthiness of the data at national scale. For example, we check for invalid dates, geometries that fall outside of administrative boundaries, and identify duplicate entities that need reconciling.

<!-- ### ?? out of ?? quality score -->

62 data sources on the platform with no issues (47%). 8 fixed last month (+15%).

24 data sources on the platform conform to the specifications (18%). 4 improved last month (+4%).

<!-- 00 datasets up to date (0%). 00 updated last month (+/-0%). -->

## Coverage

We aim to provide datasets covering the entirety of England. We’re currently working with 73 out of 311 local planning authorities to start providing 8 datasets nationally.

<!-- ### ??% nationwide coverage -->

<!-- 5% average dataset coverage per local planning authority. No change from last month. -->

Datasets compiled from LPA sources:

* 4% coverage of Article 4 direction. No change from last month.
* 8% coverage of Article 4 direction area. No change from last month.
* 10% coverage of Conservation area. No change from last month.
* 1% coverage of Conservation area document. No change from last month.
* 6% coverage of Listed building outline. No change from last month.
* 3% coverage of Tree preservation order. No change from last month.
* 5% coverage of Tree preservation zone. No change from last month.
* 4% coverage of Tree. No change from last month.

<!-- ## Usage
0.00 average daily calls. +/-0% change from last month. -->
4 changes: 2 additions & 2 deletions application/templates/pages/accessibility-statement.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ We will outsource an accessibility audit on this website in the near future and

## How to request content in an accessible format

If you need information in a different format, for example large print or accessible PDF, email <digitalland@levellingup.gov.uk> and tell us:
If you need information in a different format, for example large print or accessible PDF, email <digitalland@communities.gov.uk> and tell us:

- the web address (URL) of the content
- your name and email address
Expand All @@ -80,7 +80,7 @@ We'll consider your request and get back to you in 21 days.

## Reporting accessibility problems with this website

If you find any problems that are not listed on this page, or you think we're not meeting the accessibility requirements, please email <digitalland@levellingup.gov.uk> so that we can fix the issue.
If you find any problems that are not listed on this page, or you think we're not meeting the accessibility requirements, please email <digitalland@communities.gov.uk> so that we can fix the issue.

## Enforcement procedure

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The data is provided under the [Open Government Licence](https://www.nationalarc
Tell us about the webpage
-------------

Send an email to [digitalland@levellingup.gov.uk](mailto:digitalland@levellingup.gov.uk).
Send an email to [digitalland@communities.gov.uk](mailto:digitalland@communities.gov.uk).

The email must include:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,19 @@ You can provide data in one of these formats:

These may be uploaded to a single URL, or served via an OGC WFS or ArcGIS API.

Field names
-----------

You can provide fields names using hyphens, underscores or spaces.

For example:

- `start-date`
- `start_date`
- `start date`

These are all valid, and any uppercase characters will be converted to lowercase.

---

## Article 4 direction dataset
Expand Down Expand Up @@ -64,7 +77,7 @@ Example: `http://www.LPAwebsite.org.uk/article4direction1.pdf`

The URL of the webpage on your website that introduces the document.

Each document should be linked to from a documentation webpage that includes a short description of the data and the document you’re linking to. Each article 4 direction should have a unique URL. This means you can create a separate page for each one, or you could list several on one page. If you do that, there must be a separate anchor link (fragment identifier) for each one.
Each document should be linked to from a documentation webpage that includes a short description of the data and the document you’re linking to. Each article 4 direction should have a unique URL. This means you can create a separate page for each one, or you could list several on one page. If you do that, there must be a separate anchor link (fragment identifier) for each one.

This means each section of your page should have its own URL. Most publishing systems will allow you to use a hashtag to create the identifiers for each article 4 direction you list - as in the examples shown.

Expand Down Expand Up @@ -168,7 +181,7 @@ A list of the permitted development rights withdrawn by the article 4 direction.

Separate the rights in the list using semicolons.

Only use rights from our [permitted development right dataset](https://www.planning.data.gov.uk/dataset/permitted-development-right). If the area withdraws a permitted development right that is not in our dataset, email [digitalland@levellingup.gov.uk](digitalland@levellingup.gov.uk).
Only use rights from our [permitted development right dataset](https://www.planning.data.gov.uk/dataset/permitted-development-right). If the area withdraws a permitted development right that is not in our dataset, email [digitalland@communities.gov.uk](digitalland@communities.gov.uk).

Example: `3D;3M;11B`

Expand Down
Loading

0 comments on commit bdd1ba6

Please sign in to comment.