Skip to content
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

Update to D3 4.0. #32

Closed
91 tasks done
mbostock opened this issue Jun 26, 2016 · 22 comments
Closed
91 tasks done

Update to D3 4.0. #32

mbostock opened this issue Jun 26, 2016 · 22 comments
Assignees

Comments

@mbostock
Copy link
Member

mbostock commented Jun 26, 2016

  • d3.geoAitoff
  • d3.geoAiry
  • d3.geoAlbers
  • d3.geoArmadillo
  • d3.geoAugust
  • d3.geoAzimuthalEqualArea
  • d3.geoAzimuthalEquidistant
  • d3.geoBaker
  • d3.geoBerghaus
  • d3.geoBoggs
  • d3.geoBonne
  • d3.geoBottomley
  • d3.geoBromley
  • d3.geoChamberlin
  • d3.geoCollignon
  • d3.geoConicConformal
  • d3.geoConicEquidistant
  • d3.geoCraig
  • d3.geoCraster
  • d3.geoCylindricalEqualArea
  • d3.geoCylindricalStereographic
  • d3.geoEckert1
  • d3.geoEckert2
  • d3.geoEckert3
  • d3.geoEckert4
  • d3.geoEckert5
  • d3.geoEckert6
  • d3.geoEisenlohr
  • d3.geoEquirectangular
  • d3.geoFahey
  • d3.geoFoucaut
  • d3.geoGilbert
  • d3.geoGingery
  • d3.geoGinzburg4
  • d3.geoGinzburg5
  • d3.geoGinzburg6
  • d3.geoGinzburg8
  • d3.geoGinzburg9
  • d3.geoGnomonic
  • d3.geoGringorten
  • d3.geoGringortenQuincuncial
  • d3.geoGuyou
  • d3.geoHammer
  • d3.geoHammerRetroazimuthal
  • d3.geoHealpix
  • d3.geoHill
  • d3.geoHomolosine
  • d3.geoInterrupted
  • d3.geoKavrayskiy7
  • d3.geoLagrange
  • d3.geoLarrivee
  • d3.geoLaskowski
  • d3.geoLittrow
  • d3.geoLoximuthal
  • d3.geoMercator
  • d3.geoMiller
  • d3.geoModifiedStereographic
  • d3.geoModifiedStereographicAlaska
  • d3.geoModifiedStereographicGs48
  • d3.geoModifiedStereographicGs50
  • d3.geoModifiedStereographicMiller
  • d3.geoModifiedStereographicLee
  • d3.geoMollweide
  • d3.geoMtFlatPolarParabolic
  • d3.geoMtFlatPolarQuartic
  • d3.geoMtFlatPolarSinusoidal
  • d3.geoNaturalEarth
  • d3.geoNellHammer
  • d3.geoOrthographic
  • d3.geoPatterson
  • d3.geoPeirceQuincuncial
  • d3.geoPolyconic
  • d3.geoRectangularPolyconic
  • d3.geoRobinson
  • d3.geoSatellite
  • d3.geoSinusoidal
  • d3.geoSinuMollweide
  • d3.geoStereographic
  • d3.geoTimes
  • d3.geoTransverseMercator
  • d3.geoTwoPointAzimuthal
  • d3.geoTwoPointEquidistant
  • d3.geoVanDerGrinten
  • d3.geoVanDerGrinten2
  • d3.geoVanDerGrinten3
  • d3.geoVanDerGrinten4
  • d3.geoWagner4
  • d3.geoWagner6
  • d3.geoWagner7
  • d3.geoWiechel
  • d3.geoWinkel3
@mbostock mbostock self-assigned this Jun 26, 2016
@Fil
Copy link
Member

Fil commented Jun 30, 2016

  • d3.geoBottomley done locally

[UPDATE: SOLVED] Before I continue I have an issue with the image resolution for the tests: the test output is visually OK but not the same as those in img/

For reference I'm attaching the result of npm test for mollweide: it's 209KB instead of 82.6KB for img/mollweide.png

mollweide

@Fil
Copy link
Member

Fil commented Jun 30, 2016

instructions from @mbostock to play this game:

Take a look at the past commits to get a sense of what’s needed.
e.g., 2ed796f

  1. Replace the Greek with anglicized ASCII.
  2. Replace the Math. prefix with an import.
  3. Fix the imports.
  4. Update the tests.
    5 Add reference image to the README.

@Fil
Copy link
Member

Fil commented Jun 30, 2016

my recipe for setting up the dev environment, in case it can help others: https://gist.github.com/Fil/5f8c92efadd183670ae8c63a060f03b8

@mbostock
Copy link
Member Author

The difference in size is expected. I run the output images through optipng (brew install optipng on macOS) before adding them to the img folder so they are smaller to download. The test uses imagemagick to compare just the pixel values, not the non-image information.

@mbostock
Copy link
Member Author

Also re. your Gist, you can simplify slightly and just npm install because all those things are listed as dependencies (or devDependencies) in the package.json.

@Fil Fil mentioned this issue Jun 30, 2016
5 tasks
@Fil
Copy link
Member

Fil commented Jun 30, 2016

I've just pushed a PR claiming winkel3. Incomplete but up for comments.

tests were failing on my Mac due to an old version of compare that was on the path (/Applications/MAMP/Library/bin : ImageMagick 6.8.9-7); I've replaced it by ImageMagick 6.9.4-9 Q16 and now they work.

Re: npm install, I thought I did just that, but I didn't (my mistake).

One question: how do you choose and specify the default scale? Just so that it fits well in the 960/500 reference canvas?

@mbostock
Copy link
Member Author

mbostock commented Jun 30, 2016

Just so that it fits well in the 960/500 reference canvas?

Yes; typically with a 5-10px margin. Also pick suitable clipping, since not every projection wants antimeridian clipping.

@Fil Fil mentioned this issue Jun 30, 2016
@mbostock
Copy link
Member Author

I’ve started trying to do a mass translation over here:

https://github.com/d3/d3-geo-projection/tree/4-broken

@Fil
Copy link
Member

Fil commented Jul 1, 2016

The game looks simpler now 🤖. Please give the new rules.

@mbostock
Copy link
Member Author

mbostock commented Jul 1, 2016 via email

This was referenced Jul 2, 2016
@Fil
Copy link
Member

Fil commented Jul 2, 2016

Another question: wouldn't it be neater to .rotate([-11.5,0]) by default on most projections so that we cut in the waters?
robinson

@Fil Fil mentioned this issue Jul 2, 2016
@mbostock
Copy link
Member Author

mbostock commented Jul 2, 2016

Hmm. I can see the appeal in that, but I also think it’s best to stick with the exact standard aspect by default. Better to just suggest that as a better default aspect in the README, say in the top introduction (which needs pictures anyway!).

@Fil
Copy link
Member

Fil commented Jul 2, 2016

OK. I'd keep it in a funky projection such as Wiechel (where you had put it in v3)
https://github.com/d3/d3-geo-projection/pull/38/files#diff-7aedb1c4d81a3fbd4bf980fc6e6bd479

@mbostock
Copy link
Member Author

mbostock commented Jul 2, 2016 via email

@Fil
Copy link
Member

Fil commented Jul 2, 2016

The visual tests are probably sufficient to test projections, but what about inverse projections? Can we use a systematic method? Maybe test a given or random set of points?

@Fil Fil mentioned this issue Jul 2, 2016
@mbostock
Copy link
Member Author

mbostock commented Jul 2, 2016 via email

@mbostock
Copy link
Member Author

mbostock commented Jul 3, 2016

I’ve decided that rather than try to apply some variable padding to each projection, to just fit them exactly into 960×500 using the new test/compute-scale.

This was referenced Jul 3, 2016
@Fil
Copy link
Member

Fil commented Jul 3, 2016

HowIHateCamelCase

@Fil
Copy link
Member

Fil commented Jul 3, 2016

I'm leaving the game now, not seeing straight and I think these are too difficult:

  • d3.geoHealpix
  • d3.geoHomolosine
  • d3.geoInterrupted
  • d3.geoTwoPointAzimuthal
  • d3.geoTwoPointEquidistant

@mbostock
Copy link
Member Author

mbostock commented Jul 3, 2016

Thanks for all your work! 👍

I merged as many as I could, but I’m on vacation now and want to spend some time with family. I’ll take another pass sometime later…

@mbostock
Copy link
Member Author

mbostock commented Jul 4, 2016

I merged to master. Still have to implement the two-point and interrupted projections, but that should happen soon. And then 1.0!

@mbostock
Copy link
Member Author

mbostock commented Jul 5, 2016

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants