# Geojson Features not Plotting via d3

**URL:** <https://talk.observablehq.com/t/geojson-features-not-plotting-via-d3/5611>\
**Category:** Help\
**Created:** [September 24, 2021, 4:19pm UTC](https://talk.observablehq.com/t/geojson-features-not-plotting-via-d3/5611 "2021-09-24T16:19:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChrisWoodsSays](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/chriswoodssays/32/3754_2.png) [@ChrisWoodsSays](https://talk.observablehq.com/u/ChrisWoodsSays)\
**Post date:** [September 24, 2021, 4:19pm UTC](https://talk.observablehq.com/t/geojson-features-not-plotting-via-d3/5611/1 "2021-09-24T16:19:37Z")

</div>

I’m trying to plot UK Local Authorities using d3. The code below has an example using leaflet, which works but the d3 version plots a large rectangle and then a small, strange shape and I can’t see why.

> **[Carbon Calculator Map](https://observablehq.com/@chriswoodssays/carbon-calculator-map)**
>
> Data Placed Based Carbon Calculator Local Authority Boundaries

Any suggestions warmly welcomed.

Once I get this working , I plan to plot the data using d3 on top of the leaflet map with all its detail, but that’s one for another day.

---

<div class="post-metadata">

**Author:** ![mootari](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mootari/32/581_2.png) [@mootari](https://talk.observablehq.com/u/mootari)\
**Post date:** [September 24, 2021, 9:44pm UTC](https://talk.observablehq.com/t/geojson-features-not-plotting-via-d3/5611/2 "2021-09-24T21:44:24Z")

</div>

Looks like your geojson has the wrong winding order. As a quick fix, you can reverse the order via `@turf/rewind`.

Load the module:

```auto
rewind = (await import('@turf/rewind@6.5')).default

```

Then apply to your geojson features:

```auto
boundaries = rewind(
  await FileAttachment("Local_Authority_Districts_(December_2017)_Boundaries_in_Great_Britain@1.geojson").json(),
  {mutate: true, reverse: true}
)

```

Note that maps aren’t my forte, so there may very well be a different cause or better solution. @Fil breathes projections and may be able to chime in.

---

<div class="post-metadata">

**Author:** ![Fil](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/fil/32/207_2.png) [@Fil](https://talk.observablehq.com/u/Fil)\
**Post date:** [September 25, 2021, 6:34am UTC](https://talk.observablehq.com/t/geojson-features-not-plotting-via-d3/5611/3 "2021-09-25T06:34:24Z")

</div>

To @mootari’s suggestion I’d add a change: `centreOfUK = [-1.5, 52.3555]` (the order of coordinates is longitude, latitude).

---

<div class="post-metadata">

**Author:** ![ChrisWoodsSays](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/chriswoodssays/32/3754_2.png) [@ChrisWoodsSays](https://talk.observablehq.com/u/ChrisWoodsSays)\
**Post date:** [September 25, 2021, 9:33am UTC](https://talk.observablehq.com/t/geojson-features-not-plotting-via-d3/5611/4 "2021-09-25T09:33:19Z")

</div>

Thanks @mootari and @Fil , those changes did the trick.

> **[Carbon Calculator Map](https://observablehq.com/@chriswoodssays/carbon-calculator-map)**
>
> Data Placed Based Carbon Calculator Local Authority Boundaries
