Conversations (4)
Really beautiful chart of a beautiful country Adam Falchenberg! When I drag my mouse over the map, I see that the white selected borders are hanging. Is this a new D3 process starting when I get to a new kommune, before it has completed the last one?
It shouldnt do that. I dont see that here. But the map is around 3 MB of data, so perhaps be hanging a little in certain browser under load. My build script could simplify the municipality shapes quite a bit without loosing much visual resolution. I should do that
Martin Feigum (@mfe)1mo ago·permalink
Really nice Adam Falchenberg, I also love the interactivity!
Thank you! Yeah in a static pdf it is hard to get in all the data you want to show, without cluttering the view. Interactivity makes that a lot easier. I was thinking about making some interesting drilldown views, eg. add in a vote breakdown of different social aspects like age, gender etc. I have to apply to get that data first, but perhaps Ill add it in future with some nice D3 transitions
Sondov Engen (@sen)1mo ago·permalink
You can add more pages that does the "Fylke" one by one. including carveouts for the biggest population centers and small naratives etc
Yes. Could be interesting to compare with Sweden who had the same vote two weeks prior: 53% voted Yes with a 83% turnout.
Sondov Engen (@sen)1mo ago·permalink

Absolutely lovely, I'll give you the same suggestion I gave Filip here.


One thing worth exploring is to change the projection from Mercator to something like Albers Equal Area Conic projection (EPSG:9822).

It will reduce the size of Finnmark somewhat and bring it in line with the rest of the country. It can also be fun to experiment with some of the options.

Here are some AI suggestions, but I have no verified or tested it.

  • Central Meridian: 15.0° E (Centers the projection along Norway's longitudinal axis).
  • Standard Parallel 1: 59.0° N (Focuses on Southern Norway).
  • Standard Parallel 2: 69.0° N (Focuses on Northern Norway).
  • Latitude of Origin: 63.0° N (The approximate geographic center).
  • False Easting: 0.0
  • False Northing: 0.0
Those are good suggestions. I ended up using a fullpage iframe with zero doc margins. One of the struggles were getting norway to extend along the entire page, which I wanted. The mercator projection gave the map some dimensions that were pretty wide, which made it hard to make it all fit. I tried rotating norway so that its narrowest axis would be aligned top to bottom in the page - but that looked really off. I didnt think of changing projection. That might have made it easier to fit
I really like the look of mercator though. But perhaps I should experiment a little with others
Sondov Engen (@sen)1mo ago·permalink
I prefer the more balanced look of the albers personally
Martin Myrseth (@mmy)1 point1mo ago·permalink
This is really quite beautiful Adam Falchenberg. I think I prefer the light version, but both are good!

Thank you! The colorbar diverges from the background colour towards red and blue. Finding a nicely balanced interpolation that looked smooth in both dark mode and lightmode was a bit tricky. I wanted the two modes to behave the same and look good at the same time. I settled on:

const colorScale = d3.scaleDiverging()
  .domain([0, 50, 100])
  .interpolator(d3.piecewise(d3.interpolateLab, [t.noColor, t.midColor, t.yesColor]))
  .clamp(true);