Giter Site home page Giter Site logo

Comments (7)

curran avatar curran commented on May 23, 2024

Here's a port of that logic to standalone ES6 module: https://github.com/datavis-tech/pleth/blob/4e916c05d7c3375cfdaa00172670c287a15a1205/packages/examples/src/pleth/geoAlbersUsaTerritories.js

image

It was also ported into dirty-reprojectors for use with Mapbox https://github.com/stamen/dirty-reprojectors/blob/master/projections/albers-usa-territories.js

from d3-geo-projection.

Fil avatar Fil commented on May 23, 2024

Isn't it a duplicate of d3/d3-geo#152 ?

from d3-geo-projection.

mbostock avatar mbostock commented on May 23, 2024

Yep, duplicate.

from d3-geo-projection.

curran avatar curran commented on May 23, 2024

The distinction here is that it also includes US Virgin Islands, American Samoa, Guam, and Northern Mariana Islands.

from d3-geo-projection.

almccon avatar almccon commented on May 23, 2024

Here's another variant with US Virgin Islands, American Samoa, Guam, and Northern Mariana Islands, but where the Pacific possessions are on the left side of the map. This one seemed to be preferred by most people:

https://observablehq.com/@almccon/u-s-map-with-puerto-rico-us-virgin-islands-american-samoa-gua

Screen Shot 2020-06-19 at 1 30 33 PM

from d3-geo-projection.

armsp avatar armsp commented on May 23, 2024

I downloaded the geoshape json files - one projected and another un-projected - from Mike Bostock's example both of which have Puerto Rico.

I am trying to display them in the "albersUsa" projection in Vega or Vega-Lite which uses d3. However I don't see it at all. In the unprojected file, "albersUsa" projection filters Puerto Rico and never displays it. In the projected version there is no map, everything is a giant dark rectangle.

@curran @almccon Any idea how to get it to display in Vega/Vega-Lite?

I see that there are some js files with Puerto Rico too, how do I get them to replace the native d3 js file responsible for the "albersUsa" projection? Perhaps this technique may help me with displaying Puerto Rico too in "albersUsa" projection.

Update - GIS StackExchange Post

from d3-geo-projection.

curran avatar curran commented on May 23, 2024

@armsp It's not recommended to cross-post like this. I responded over in d3/d3-geo#152

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.