# Plot solar panels not added to OSM yet

**URL:** <https://openclimatefix.discourse.group/t/plot-solar-panels-not-added-to-osm-yet/56>\
**Category:** Solar PV mapping\
**Created:** [April 29, 2019, 3:17pm UTC](https://openclimatefix.discourse.group/t/plot-solar-panels-not-added-to-osm-yet/56 "2019-04-29T15:17:18Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![SylwiaMielnicka](https://yyz2.discourse-cdn.com/free1/user_avatar/openclimatefix.discourse.group/sylwiamielnicka/32/38_2.png) [@SylwiaMielnicka](https://openclimatefix.discourse.group/u/SylwiaMielnicka)\
**Post date:** [April 29, 2019, 3:17pm UTC](https://openclimatefix.discourse.group/t/plot-solar-panels-not-added-to-osm-yet/56/1 "2019-04-29T15:17:18Z")

</div>

I was recently discussing with @dct, that it might be valuable to map percent of missing solar panels on OSM per given postal code, to help the contributors find the areas where few panels are being mapped.

It will be the most valuable if it will update itself every day/week.

I was learning visualization recently, so I made [proof of concept chart](http://bl.ocks.org/SylwiaOliwia2/c273b9ad88a28862d9cafe64583b01f0) (keep in mind, it’s only POC), where shades represent the percent of solar panels which are missing on OSM(I’ve compared OSM entries with [federal data](https://www.ofgem.gov.uk/publications-and-updates/feed-tariff-installation-report-31-march-2019)).

To improve it, several issues must be discussed:

1. Postal code precision - first 3 characters? (federal data has first 4 characters, currently, you see postcode as 2 characters).
2. The map. I use [this one](https://github.com/davidsoloman/uk-postcode-map/blob/master/data/uk-postcode-area.json), however, maybe there is better choropleth map to visualize postal codes in the UK with Mapbox?
3. How to identify Solar panels in the  
The UK? I’ve used the query in the overpass, but I believe the panels can be identified more precisely:

> [out:json];  
> area[“name”=“United Kingdom”]-\>.searchArea;  
> ( node(area.searchArea)[“generator:source”=“solar”];  
> );  
> out body; \>;  
> out skel qt;

And

> [out:json];  
> area[“name”=“United Kingdom”]-\>.searchArea;  
> (way(area.searchArea)[“generator:source”=“solar”];  
> );  
> out body; \>;  
> out skel qt;

1. How to visualise it? Some panels are marked as nodes (single point), some as area (polygon). Currently, I represent the polygon panels as nodes.

If you have any ideas, thoughts or remarks, don’t hesitate to comment.

---

<div class="post-metadata">

**Author:** ![danstowell](https://avatars.discourse-cdn.com/v4/letter/d/b2d939/32.png) [@danstowell](https://openclimatefix.discourse.group/u/danstowell)\
**Post date:** [April 29, 2019, 7:37pm UTC](https://openclimatefix.discourse.group/t/plot-solar-panels-not-added-to-osm-yet/56/2 "2019-04-29T19:37:22Z")

</div>

Hi - great idea! I think that would be very motivating for people.

Postal code precision: you suggest “first 3 characters” but postcodes are variable length, so let’s be careful with how we describe it. Have a look at [this wikipedia entry about how UK postcodes are formatted](https://en.wikipedia.org/wiki/Postcodes_in_the_United_Kingdom#Formatting) - in the example they give “SW1W 0NY” and the terminology is like this:

- “Postcode area” are the biggest ones e.g. “SW”, i.e. the level used in your proof-of-concept.
- “Postcode district” are the next smaller granularity e.g. “SW1W”. I used postcode districts when [I plotted the FiT data](http://mcld.co.uk/blog/2019/where-are-the-solar-panels-in-britain.html). (By the way, I downloaded my postcode data from [here](https://random.dev.openstreetmap.org/postcode_shapes/).)

I think plotting at the postcode-district level is the best thing to aim for. We have that info in the FiT data and people can be motivated to work on a manageable local area.

One thing that someone would need to do is to perform some kind of geo query to allocate each OSM solar object to a postcode district, i.e. to find which one it is contained inside. I guess maybe you did that when you made your proof-of-concept?

Re question 3 “how to identify solar panels in the UK”, your query is fine, I think. I should point out that there are also some “solar farm” objects in OSM (having the tag “power:source=solar” among other things) but they usually have one or more solar panel items inside, so perhaps you don’t need to worry about the solar farm objects at all. I guess it depends what you’re intending this visualisation to be good for.

I think it’s fine to represent each solar panel as a node, but it depends what you want to achieve. If it’s just for counting progress it should be fine, right? And there’s not even any need to visualise individual solar panels if you’re simply visualising the number-per-postcode-district.

Oh one other little thing! Can we make it “per cent of panels added” rather than “per cent of panels NOT added”? It’ll be more motivating people to be aiming at 100%, I reckon.

---

<div class="post-metadata">

**Author:** ![SylwiaMielnicka](https://yyz2.discourse-cdn.com/free1/user_avatar/openclimatefix.discourse.group/sylwiamielnicka/32/38_2.png) [@SylwiaMielnicka](https://openclimatefix.discourse.group/u/SylwiaMielnicka)\
**Post date:** [May 24, 2019, 11:44am UTC](https://openclimatefix.discourse.group/t/plot-solar-panels-not-added-to-osm-yet/56/3 "2019-05-24T11:44:23Z")

</div>

[EDIT: I’ve changed the link]

The _beta_ version of the map is ready. Keep in mind, that there are two panes (nominal and percentage, upper right corner). In the final version, the map will be updated daily; I’ll work on that this weekend.

The map is available [here](https://bl.ocks.org/SylwiaOliwia2/cf0d679e81a7c8bfee8888189ec364bb). Any feedback will be highly appreciated 🙂

---

<div class="post-metadata">

**Author:** ![laurencew](https://yyz2.discourse-cdn.com/free1/user_avatar/openclimatefix.discourse.group/laurencew/32/4_2.png) [@laurencew](https://openclimatefix.discourse.group/u/laurencew)\
**Post date:** [May 26, 2019, 4:51pm UTC](https://openclimatefix.discourse.group/t/plot-solar-panels-not-added-to-osm-yet/56/4 "2019-05-26T16:51:37Z")

</div>

@SylwiaMielnicka this is so good! Nice work.

I think the % metric is more useful so maybe that could be the default?

Strongly recommend opening it in fullscreen (‘Open’ link in bottom right) - maybe help text could suggest that and add some context as well.

On a wider data point, I just found 8.3GW of geo-located solar in the BEIS Renewable Energy Planning Database (REPD) - I hadn’t come across that before. There are 1139 operating solar installations, I think there may be a smaller (0.2GW) overlap with the FITs database based on the banding, although it could be more:

> **[Renewable Energy Planning Database quarterly extract](https://www.gov.uk/government/publications/renewable-energy-planning-database-monthly-extract)**
>
> The results of BEIS' renewable project monitoring work are recorded each quarter. This document is a quarterly extract of that database.

The coordinates are in British National Grid x y but seem accurate for the few I have eyeballed. I’d expect most of these to be in OSM already because a lot of them are pretty big. But if we do the map with capacity (MW) figures it might colour in some broad swathes of your map pretty quickly.

I’ll be working on this more actively over the next few weeks!

- Cheers, Laurence

---

<div class="post-metadata">

**Author:** ![danstowell](https://avatars.discourse-cdn.com/v4/letter/d/b2d939/32.png) [@danstowell](https://openclimatefix.discourse.group/u/danstowell)\
**Post date:** [June 10, 2019, 7:17pm UTC](https://openclimatefix.discourse.group/t/plot-solar-panels-not-added-to-osm-yet/56/5 "2019-06-10T19:17:49Z")

</div>

Just spotted this. Nice work @SylwiaMielnicka! Looks great. The colour scheme is ace too.

Suggestions:

- I agree with Laurence that the % metric as the default might be a good choice.
- Maybe it’s also useful to show a table of the same data? Like [this postbox example](https://osm.mathmos.net/postboxes/progress/).
- Would it be useful for the popups to appear on mouseover, instead of on click, so it’s more instantly interactive? Maybe, maybe not.

Looking forward to seeing this in action.

(@laurencew: thanks for mentioning the REPD. In the OSM UK community we’ve already been using that, to map the solar farms - in [this wiki table](https://wiki.openstreetmap.org/wiki/Renewable_energy_in_the_United_Kingdom#List_of_under_construction_and_operational_UK_Ground_Mounted_Solar_Farms) the REPD data is shown along with corresponding OSM objects. I’ve checked every entry of 12 GW or more (a couple of hundred) and other OSM people have been using the REPD list to guide their own mapping too. Thanks to this data, I think getting the big farms in should be very feasible - and our effort should go into the “long tail” of the rooftops…)

---

<div class="post-metadata">

**Author:** ![SylwiaMielnicka](https://yyz2.discourse-cdn.com/free1/user_avatar/openclimatefix.discourse.group/sylwiamielnicka/32/38_2.png) [@SylwiaMielnicka](https://openclimatefix.discourse.group/u/SylwiaMielnicka)\
**Post date:** [June 11, 2019, 2:28pm UTC](https://openclimatefix.discourse.group/t/plot-solar-panels-not-added-to-osm-yet/56/6 "2019-06-11T14:28:38Z")

</div>

Good remarks guys, I will try to implement it.

The data to display can be updated with one line in cmd. I thought to set it up recurrently (once a day/week), however, I’m not able to do it at my hosting server. The code is stored [here](https://github.com/SylwiaOliwia2/uk-postcode-map), if you are able to store it and run automatically somewhere - feel free to do it. Also if you need insights about the code, don’t hesitate to bother me. I can also dockerize it if needed.

---

<div class="post-metadata">

**Author:** ![SylwiaMielnicka](https://yyz2.discourse-cdn.com/free1/user_avatar/openclimatefix.discourse.group/sylwiamielnicka/32/38_2.png) [@SylwiaMielnicka](https://openclimatefix.discourse.group/u/SylwiaMielnicka)\
**Post date:** [June 18, 2019, 4:02pm UTC](https://openclimatefix.discourse.group/t/plot-solar-panels-not-added-to-osm-yet/56/7 "2019-06-18T16:02:58Z")

</div>

I’ve added updates to the [map](https://www.sylwia.hs3.linux.pl/my_files/uk_photovoltaics_map/frontend/mapbox_uk.html):

- Search panel (for postcode)
- legend
- changed color palette

I tested displaying popup on mouseover, it was annoying for small postcodes.  
Will be glad for the feedback, especially If it’s displayed properly in the browser.  
It finally seems I’m able to run it on my hosting server, to display fresh records every day. I’m in touch with the admins & I will keep you updated.

---

<div class="post-metadata">

**Author:** ![SylwiaMielnicka](https://yyz2.discourse-cdn.com/free1/user_avatar/openclimatefix.discourse.group/sylwiamielnicka/32/38_2.png) [@SylwiaMielnicka](https://openclimatefix.discourse.group/u/SylwiaMielnicka)\
**Post date:** [June 30, 2019, 10:21am UTC](https://openclimatefix.discourse.group/t/plot-solar-panels-not-added-to-osm-yet/56/8 "2019-06-30T10:21:23Z")

</div>

I’ve managed to set up the CRON job on my server, so the number of panels will be updated daily 🙂  
Feel free to share the [map](https://sylwia.hs3.linux.pl/my_files/uk_photovoltaics_map/frontend/mapbox_uk.html) 🙂

---

<div class="post-metadata">

**Author:** ![dct](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@dct](https://openclimatefix.discourse.group/u/dct)\
**Post date:** [July 3, 2019, 9:10am UTC](https://openclimatefix.discourse.group/t/plot-solar-panels-not-added-to-osm-yet/56/9 "2019-07-03T09:10:13Z")

</div>

That’s great @SylwiaMielnicka.  
One ideal, what if it also had “Expected number of installed panels”? Then people would know where to look for panels to map.

---

<div class="post-metadata">

**Author:** ![SylwiaMielnicka](https://yyz2.discourse-cdn.com/free1/user_avatar/openclimatefix.discourse.group/sylwiamielnicka/32/38_2.png) [@SylwiaMielnicka](https://openclimatefix.discourse.group/u/SylwiaMielnicka)\
**Post date:** [July 17, 2019, 12:19pm UTC](https://openclimatefix.discourse.group/t/plot-solar-panels-not-added-to-osm-yet/56/10 "2019-07-17T12:19:03Z")

</div>

@dct, I’ve added _Number of panels remaining to be added OSM_ which is basically `expected (from FIT) - Number of panels added to OSM`.

Let me know please if you have any remarks.

---

<div class="post-metadata">

**Author:** ![dct](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@dct](https://openclimatefix.discourse.group/u/dct)\
**Post date:** [July 19, 2019, 10:11am UTC](https://openclimatefix.discourse.group/t/plot-solar-panels-not-added-to-osm-yet/56/11 "2019-07-19T10:11:44Z")

</div>

This is terrific! Thanks for putting the effort in.

---

<div class="post-metadata">

**Author:** ![danstowell](https://avatars.discourse-cdn.com/v4/letter/d/b2d939/32.png) [@danstowell](https://openclimatefix.discourse.group/u/danstowell)\
**Post date:** [August 4, 2019, 11:07am UTC](https://openclimatefix.discourse.group/t/plot-solar-panels-not-added-to-osm-yet/56/12 "2019-08-04T11:07:39Z")

</div>

Hi all - I just discovered that Greg Williams (of OSM UK) has made a similar service, separately: [http://osm.gregorywilliams.me.uk/solar/](http://osm.gregorywilliams.me.uk/solar/)

I think it’s based on code he previously used for other mapping stats.
