Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix choropleth legend and RE share choropleth #156

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

henhuy
Copy link
Contributor

@henhuy henhuy commented May 23, 2024

Fixes #142
Fixes #141

Needs poetry update due to fix in mapengine

@henhuy henhuy requested a review from nesnoj May 23, 2024 12:40
@henhuy henhuy self-assigned this May 23, 2024
Copy link
Contributor

@nesnoj nesnoj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx for the fix!
The choropleth for RE share is working now.

As you set the range to 10, 100, ... the color range is not completely used leading to a map with very similar colors..which in my opinion is a drawback but I could live with that.. but it has effects like this:
image
because in one mun (Bliesdorf) the factor is 270 (which is correct) leading to 27000% but this sets the legend range to 100000%..

@henhuy
Copy link
Contributor Author

henhuy commented May 23, 2024

Indeed, the ranges are too wide now.
As for your example above - this is a tricky one, as choropleth legend and colors try to fit for all given values.
Now, range is very high, but even in older implementation the legend would go up to 27000%
We must add special behaviour for percentage choropleths in order to prevent this high values.
I will come up with a solution for both.

@nesnoj
Copy link
Contributor

nesnoj commented Jun 20, 2024

@henhuy Could you please have a look how this could be solved taking the issues from above into account?

@henhuy
Copy link
Contributor Author

henhuy commented Jun 20, 2024

Fixed RE share legend to 100% - but then many municiaplities colored dark blue as they exceed 100%.
Good, or do you want to have it somehow different?

@henhuy
Copy link
Contributor Author

henhuy commented Jul 3, 2024

Fixed RE share legend to 100% - but then many municiaplities colored dark blue as they exceed 100%. Good, or do you want to have it somehow different?

Could you have a look @nesnoj ?

@nesnoj
Copy link
Contributor

nesnoj commented Oct 8, 2024

To list the issues and their status again:

  • 0-0 in Legend
  • choropleth for RE share
  • "Fixed RE share legend to 100% - but then many municipalities colored dark blue as they exceed 100%"
    Yes, this is a problem. It is better that having 27000 % like before but we need sth like a >100% color value.
  • Colors on map do not match those from legend (shifted by 1 category)
  • Another problem that came up with your fixes: The colors for the bigger numbers are not used in many choropleths because of the larger ranges.
    Example "Gewonnene Energie aus EE (GWh)" which goes up to 1000 instead of 400 so 600-800 and 800-1000 are not used at all:

Old:
image

New:
image

Can you solve this please?

@nesnoj
Copy link
Contributor

nesnoj commented Oct 11, 2024

Could you have a look @henhuy ?

@henhuy
Copy link
Contributor Author

henhuy commented Oct 15, 2024

Hey @nesnoj please review again.
I made a rebase - so you have to throw away your current local branch and checkout fresh.
And you have to update poetry, as i had to update mapengine.

Please check different choropleths and especially chorpleths for energy shares (%)

@nesnoj
Copy link
Contributor

nesnoj commented Oct 18, 2024

From today @henhuy

  • Colors seem to be continuous and do not match discrete colors
  • Increase default number of legend colors from 5 to 6
  • The param num_colors in static/config/choropleths.json seem to have no effect 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Choropleth for RE share not working 0 - 0 in choropleth legend value
2 participants