Comments (22)
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.
- 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
from d3-geo-projection.
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
- Replace the Greek with anglicized ASCII.
- Replace the
Math.
prefix with an import.- Fix the imports.
- Update the tests.
5 Add reference image to the README.
from d3-geo-projection.
my recipe for setting up the dev environment, in case it can help others: https://gist.github.com/Fil/5f8c92efadd183670ae8c63a060f03b8
from d3-geo-projection.
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.
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.
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.
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.
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.
The game looks simpler now 🤖. Please give the new rules.
from d3-geo-projection.
from d3-geo-projection.
Another question: wouldn't it be neater to .rotate([-11.5,0])
by default on most projections so that we cut in the waters?
from d3-geo-projection.
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.
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.
from d3-geo-projection.
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.
from d3-geo-projection.
HowIHateCamelCase
from d3-geo-projection.
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.
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.
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.
🎉
from d3-geo-projection.
Related Issues (20)
- Relax d3-array dependency to 1-2. HOT 3
- compatibility of geoRectangularPolyconicRaw with geoInterrupt HOT 3
- There are es2015 in the final package file HOT 3
- Count Number Of Visible Objects Within Projection HOT 1
- What is the source of the projections? HOT 10
- Pangean projection HOT 5
- Two-point equidistant projection has artifacts when showing the whole world HOT 6
- geoPath.curve ? HOT 1
- Support All US Territories in Albers USA projection HOT 7
- geoProject converts hole to MultiPolygon HOT 2
- Using this lib in TypeScript? HOT 2
- interrupted projections sometimes have partially undefined inverse HOT 2
- More customizable Wagner projections (and others)? HOT 7
- Add Cupola projection HOT 14
- A new quincuncial projection HOT 10
- geoStitch mislabels the union of two Polygons forming a hole on the date line as a MultiPolygon
- Could not find a declaration file HOT 2
- ISEA visualization? HOT 3
- No types definition package of d3-geo-projection HOT 1
- Renner's Hemispheric Projection HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d3-geo-projection.