Skip to content

Cropping a plot.geo map by land features #2240

Answered by Fil
jschuur asked this question in Q&A
Discussion options

You must be logged in to vote

Here are some possible adjustments, with comments:

  projection: {
    type: "mercator",
    // rotate the projection to reattach the tip of eastern Siberia
    rotate: [-10, 0], 
    // create a valid GeoJSON domain
    domain: {
      type: "FeatureCollection",
      // filter the features on valid properties (there is no "continent" property on this dataset)
      features: land.features.filter((d) => populationByCountry.get(d.properties.a3)) 
    }
  },
  width,
  // set the aspect ratio
  height: width * 0.65,

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Fil
Comment options

Fil Nov 20, 2024
Collaborator

@Fil
Comment options

Fil Nov 20, 2024
Collaborator

@jschuur
Comment options

@Fil
Comment options

Fil Nov 22, 2024
Collaborator

Answer selected by jschuur
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants