Giter VIP home page Giter VIP logo

Comments (22)

mbostock avatar mbostock commented on May 3, 2024 1

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.

from d3-geo-projection.

Fil avatar Fil commented on May 3, 2024
  • 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

from d3-geo-projection.

Fil avatar Fil commented on May 3, 2024

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.

from d3-geo-projection.

Fil avatar Fil commented on May 3, 2024

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

from d3-geo-projection.

mbostock avatar mbostock commented on May 3, 2024

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.

from d3-geo-projection.

mbostock avatar mbostock commented on May 3, 2024

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.

from d3-geo-projection.

Fil avatar Fil commented on May 3, 2024

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?

from d3-geo-projection.

mbostock avatar mbostock commented on May 3, 2024

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.

from d3-geo-projection.

mbostock avatar mbostock commented on May 3, 2024

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

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

from d3-geo-projection.

Fil avatar Fil commented on May 3, 2024

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

from d3-geo-projection.

mbostock avatar mbostock commented on May 3, 2024

from d3-geo-projection.

Fil avatar Fil commented on May 3, 2024

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

from d3-geo-projection.

mbostock avatar mbostock commented on May 3, 2024

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!).

from d3-geo-projection.

Fil avatar Fil commented on May 3, 2024

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

from d3-geo-projection.

mbostock avatar mbostock commented on May 3, 2024

from d3-geo-projection.

Fil avatar Fil commented on May 3, 2024

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?

from d3-geo-projection.

mbostock avatar mbostock commented on May 3, 2024

from d3-geo-projection.

Fil avatar Fil commented on May 3, 2024

HowIHateCamelCase

from d3-geo-projection.

Fil avatar Fil commented on May 3, 2024

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

from d3-geo-projection.

mbostock avatar mbostock commented on May 3, 2024

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…

from d3-geo-projection.

mbostock avatar mbostock commented on May 3, 2024

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

from d3-geo-projection.

mbostock avatar mbostock commented on May 3, 2024

🎉

from d3-geo-projection.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.