diff --git a/bin/render.py b/bin/render.py index 61470ca..d881bdb 100755 --- a/bin/render.py +++ b/bin/render.py @@ -330,33 +330,10 @@ def overlaps(one, two): ) project = "open-digital-planning" - sep = "" - """ - for organisation, row in rows.items(): - if row["funded"]: - print(f'{sep}["Funded organisation", "{row["role"]}", 1, "{row["name"]}"]', end="") - sep = ",\n" - - for organisation, row in rows.items(): - if project in row["projects"]: - print(f'{sep}["{row["role"]}", "ODP member", 1, "{row["name"]}"]', end="") - sep = ",\n" - - for organisation, row in rows.items(): - source = "ODP member" if project in row["projects"] else "Funded" if row["funded"] else row["role"] - if organisation in sets("providing"): - print(f'{sep}["{source}", "Providing data", 1, "{row["name"]}"]', end="") - sep = ",\n" for organisation, row in rows.items(): - if row["data-ready"] == "ODP": - print(f'{sep}["Providing data", "Data ready for PlanX", 1, "{row["name"]}"]', end="") - sep = ",\n" - """ - - for organisation, row in rows.items(): - if organisation in sets["providing"]: + if organisation in sets["data-ready"]: print( f'{sep}["Providing data", "Data ready for PlanX", 1, "{row["name"]}"]', end="", @@ -373,15 +350,18 @@ def overlaps(one, two): }[row["adoption"]] if dest: - source = ( - "Data ready for PlanX" - if organisation in sets["data-ready"] - else "Providing data" - ) + if organisation in sets["data-ready"]: + source = "Data ready for PlanX" + elif organisation in sets["providing"]: + source = "Providing data" + else: + source = "Not providing data" print(f'{sep}["{source}", "{dest}", 1, "{row["name"]}"]', end="") + sep = ",\n" print( - """]); + """ + ]); options = { sankey: { link: { color: { fill: '#d5d5d6' } }, diff --git a/docs/index.html b/docs/index.html index df158ca..e1e8818 100644 --- a/docs/index.html +++ b/docs/index.html @@ -100,66 +100,28 @@

Organisations adopting PlanX

data.addColumn({type: 'string', role: 'tooltip'}); data.addRows([ -["Providing data", "Data ready for PlanX", 1, "Ashford Borough Council"], -["Providing data", "Data ready for PlanX", 1, "London Borough of Barking and Dagenham"], -["Providing data", "Data ready for PlanX", 1, "Birmingham City Council"], ["Providing data", "Data ready for PlanX", 1, "London Borough of Barnet"], -["Providing data", "Data ready for PlanX", 1, "Bolton Metropolitan Borough Council"], -["Providing data", "Data ready for PlanX", 1, "Broadland District Council"], ["Providing data", "Data ready for PlanX", 1, "Bristol City Council"], ["Providing data", "Data ready for PlanX", 1, "Buckinghamshire Council"], -["Providing data", "Data ready for PlanX", 1, "Castle Point Borough Council"], -["Providing data", "Data ready for PlanX", 1, "Canterbury City Council"], -["Providing data", "Data ready for PlanX", 1, "London Borough of Camden"], -["Providing data", "Data ready for PlanX", 1, "Dacorum Borough Council"], ["Providing data", "Data ready for PlanX", 1, "Doncaster Metropolitan Borough Council"], ["Providing data", "Data ready for PlanX", 1, "Dover District Council"], -["Providing data", "Data ready for PlanX", 1, "Dorset Council"], -["Providing data", "Data ready for PlanX", 1, "East Cambridgeshire District Council"], -["Providing data", "Data ready for PlanX", 1, "East Hampshire District Council"], -["Providing data", "Data ready for PlanX", 1, "London Borough of Enfield"], ["Providing data", "Data ready for PlanX", 1, "Epsom and Ewell Borough Council"], ["Providing data", "Data ready for PlanX", 1, "Gateshead Metropolitan Borough Council"], ["Providing data", "Data ready for PlanX", 1, "Gloucester City Council"], -["Providing data", "Data ready for PlanX", 1, "Great Yarmouth Borough Council"], -["Providing data", "Data ready for PlanX", 1, "Horsham District Council"], ["Providing data", "Data ready for PlanX", 1, "Royal Borough of Kensington and Chelsea"], -["Providing data", "Data ready for PlanX", 1, "London Borough of Lambeth"], -["Providing data", "Data ready for PlanX", 1, "Leicester City Council"], -["Providing data", "Data ready for PlanX", 1, "City of London Corporation"], -["Providing data", "Data ready for PlanX", 1, "Medway Council"], -["Providing data", "Data ready for PlanX", 1, "North East Derbyshire District Council"], -["Providing data", "Data ready for PlanX", 1, "Newcastle City Council"], -["Providing data", "Data ready for PlanX", 1, "New Forest District Council"], ["Providing data", "Data ready for PlanX", 1, "North Lincolnshire Council"], ["Providing data", "Data ready for PlanX", 1, "North Somerset Council"], -["Providing data", "Data ready for PlanX", 1, "North Yorkshire Council"], ["Providing data", "Data ready for PlanX", 1, "Plymouth City Council"], -["Providing data", "Data ready for PlanX", 1, "Peterborough City Council"], -["Providing data", "Data ready for PlanX", 1, "Rochdale Metropolitan Borough Council"], -["Providing data", "Data ready for PlanX", 1, "Rother District Council"], -["Providing data", "Data ready for PlanX", 1, "Rossendale Borough Council"], ["Providing data", "Data ready for PlanX", 1, "St Albans City and District Council"], -["Providing data", "Data ready for PlanX", 1, "Sandwell Metropolitan Borough Council"], -["Providing data", "Data ready for PlanX", 1, "South Cambridgeshire District Council"], -["Providing data", "Data ready for PlanX", 1, "South Gloucestershire Council"], -["Providing data", "Data ready for PlanX", 1, "Salford City Council"], -["Providing data", "Data ready for PlanX", 1, "South Norfolk District Council"], -["Providing data", "Data ready for PlanX", 1, "South Staffordshire Council"], -["Providing data", "Data ready for PlanX", 1, "London Borough of Southwark"], ["Providing data", "Data ready for PlanX", 1, "Tewkesbury Borough Council"], ["Providing data", "Data ready for PlanX", 1, "Torbay Council"], -["Providing data", "Data ready for PlanX", 1, "Trafford Metropolitan Borough Council"], ["Providing data", "Data ready for PlanX", 1, "London Borough of Tower Hamlets"], ["Providing data", "Data ready for PlanX", 1, "West Berkshire Council"], -["Providing data", "Data ready for PlanX", 1, "Wirral Borough Council"], -["Providing data", "Data ready for PlanX", 1, "City of York Council"], -["Providing data", "Data ready for PlanX", 1, "New Forest National Park Authority"], ["Providing data", "Adopting PlanX", 1, "London Borough of Barking and Dagenham"], ["Providing data", "Adopting PlanX", 1, "Birmingham City Council"], ["Data ready for PlanX", "Have adopted PlanX submission", 1, "London Borough of Barnet"], ["Data ready for PlanX", "Have adopted PlanX submission", 1, "Buckinghamshire Council"], -["Providing data", "Interested in adopting PlanX", 1, "Cambridge City Council"], +["Not providing data", "Interested in adopting PlanX", 1, "Cambridge City Council"], ["Providing data", "Interested in adopting PlanX", 1, "Castle Point Borough Council"], ["Providing data", "Adopting PlanX", 1, "Canterbury City Council"], ["Providing data", "Have adopted PlanX submission", 1, "London Borough of Camden"], @@ -168,21 +130,22 @@

Organisations adopting PlanX

["Data ready for PlanX", "Have adopted PlanX guidance", 1, "Gateshead Metropolitan Borough Council"], ["Data ready for PlanX", "Have adopted PlanX guidance", 1, "Gloucester City Council"], ["Providing data", "Interested in adopting PlanX", 1, "Horsham District Council"], -["Providing data", "Adopting PlanX", 1, "Royal Borough of Kingston upon Thames"], +["Not providing data", "Adopting PlanX", 1, "Royal Borough of Kingston upon Thames"], ["Providing data", "Have adopted PlanX submission", 1, "London Borough of Lambeth"], ["Providing data", "Have adopted PlanX submission", 1, "Medway Council"], -["Providing data", "Interested in adopting PlanX", 1, "Northumberland County Council"], +["Not providing data", "Interested in adopting PlanX", 1, "Northumberland County Council"], ["Providing data", "Have adopted PlanX guidance", 1, "Newcastle City Council"], ["Providing data", "Interested in adopting PlanX", 1, "Rother District Council"], ["Data ready for PlanX", "Have adopted PlanX guidance", 1, "St Albans City and District Council"], ["Providing data", "Interested in adopting PlanX", 1, "South Cambridgeshire District Council"], ["Providing data", "Interested in adopting PlanX", 1, "South Gloucestershire Council"], ["Providing data", "Interested in adopting PlanX", 1, "South Staffordshire Council"], -["Providing data", "Interested in adopting PlanX", 1, "Surrey Heath Borough Council"], +["Not providing data", "Interested in adopting PlanX", 1, "Surrey Heath Borough Council"], ["Providing data", "Have adopted PlanX submission", 1, "London Borough of Southwark"], ["Data ready for PlanX", "Have adopted PlanX guidance", 1, "Tewkesbury Borough Council"], ["Data ready for PlanX", "Interested in adopting PlanX", 1, "London Borough of Tower Hamlets"], -["Data ready for PlanX", "Have adopted PlanX submission", 1, "West Berkshire Council"]]); +["Data ready for PlanX", "Have adopted PlanX submission", 1, "West Berkshire Council"] + ]); options = { sankey: { link: { color: { fill: '#d5d5d6' } },