Skip to content

Commit

Permalink
Merge pull request #385 from rl-institut/fix/population_popup_nans
Browse files Browse the repository at this point in the history
Fix population popups for missing data
  • Loading branch information
nesnoj authored Oct 19, 2023
2 parents 1d5b9d2 + 065ac1b commit 97f3257
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project tries to adhere to [Semantic Versioning](https://semver.org/spe
- Abort simulation run when switching to settings tab

### Fixed
- population popups for missing data
- various fixes in charts, texts and units
- RES share calculation for SQ
- power and heat demand scaling for future scenario
Expand Down
2 changes: 2 additions & 0 deletions digiplan/map/popups.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from collections.abc import Iterable
from typing import Optional, Union

import numpy as np
import pandas as pd
from django.db.models import F
from django.utils.translation import gettext_lazy as _
Expand Down Expand Up @@ -68,6 +69,7 @@ def get_chart_options(self) -> dict:
chart data ready to use in ECharts in JS
"""
chart_data = self.get_chart_data()
chart_data = chart_data.replace([np.nan], [None])
return charts.create_chart(self.lookup, chart_data)

@abc.abstractmethod
Expand Down

0 comments on commit 97f3257

Please sign in to comment.