has2k1 / has2k1/plotnine

geom_map: it seems that changing the coordinate system has no effect

Open
#900 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature
Dominant language
Python
Stars
4.8k
Forks
254
Avg merge
10h 35m
Merged PRs (30d)
9

Description

Hi,
I'm using creating this map

geodf = gp.read_file("https://gist.githubusercontent.com/aborruso/62a708faa4c050776ece5fb4a33b4593/raw/7a99636eac7a3d9844f6c54b2cacbc9ae6023e4a/oc_costo_regioni.geojson")

# Reproject to EPSG:32633
geodf = geo_df.to_crs(epsg=3857)

(
    ggplot(geodf)
    + geom_map(aes(fill="costo_per_km2"), color="black", size=0.1)
)

In output I have a flattened shape, as if they were always geographical coordinates.

image

Using EPSG:3857, I should have a more elongated shape, like the one below.

image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the geom_map entry point and reproduce the example with the GeoDataFrame reprojected to EPSG:3857 using to_crs. Compare the rendered shape before and after reprojection, then verify that the output reflects the changed coordinate system and add or run a regression test for this behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.