-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add links to Climate Action Plan Explorer plans #1331
Comments
The simplest way to do this is by adding a new item in the body sidebar (as we've done for NI charities and MapIt areas. The existing pattern for linking out to external databases is to use a tag of the form While CAPE does have some lookup code, I don't think we want to use that here. CAPE is currently only focused on local councils, which is ~1% of the bodies on WDTK. While we could generate a link for every authority for CAPE to look up based on a WDTK body identifier, the majority of them will 404 since CAPE won't have a listing. We already have a spreadsheet mapping WDTK bodies to CAPE records, so it should be pretty trivial to write a script to apply tags to bodies in the form <% if public_body.has_tag?('cape') %>
<% public_body.get_tag_values('cape').each do |tag_value| %>
<%= link_to _('Climate Action Plan'),
"https://data.climateemergency.uk/councils/#{ tag_value }" %><br>
<% end %>
<% end %> I'm not too concerned about the maintenance aspect here, since the generation of the WDTK/CAPE slug mapping is automatable and we're dealing with a handful of authorities that don't change too frequently. If we want some fancier styling then I'm sure @zarino can arrange that within the confines of the sidebar. |
Just noting that this might be a nice issue for our new cross-programme developer to work on as a relatively easy intro to both CAPE and Alaveteli/WDTK, and includes a bit of data munging (script to add/update tags) + a bit of UI. |
e.g. WhatDoTheyKnow: Aberdeen City Council → UK Climate Action Plan Explorer: Aberdeen City Council
The text was updated successfully, but these errors were encountered: