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

write_portfolio_fails when an indicator has only NULL values #303

Closed
goergen95 opened this issue Jul 9, 2024 · 0 comments · Fixed by #304
Closed

write_portfolio_fails when an indicator has only NULL values #303

goergen95 opened this issue Jul 9, 2024 · 0 comments · Fixed by #304
Assignees
Labels
bug Something isn't working

Comments

@goergen95
Copy link
Member

Having an object with an indicator column with only NULL values like this:

Simple feature collection with 3 features and 3 fields
Geometry type: POLYGON
Dimension:     XY
Bounding box:  xmin: -80.10651 ymin: 19.66116 xmax: -80.10651 ymax: 19.66116
Geodetic CRS:  WGS 84
# A tibble: 3 × 4
  .mapmeid humanfootprint     key_biodiversity_areas                                                                                         geom
*    <int> <list>             <list>                                                                                                <POLYGON [°]>
1        1 <tibble [126 × 4]> <NULL>                 ((-80.10651 19.66116, -80.10651 19.66116, -80.10651 19.66116, -80.10651 19.66116, -80.106...
2        2 <tibble [126 × 4]> <NULL>                 ((-80.10651 19.66116, -80.10651 19.66116, -80.10651 19.66116, -80.10651 19.66116, -80.106...
3        3 <tibble [126 × 4]> <NULL>                 ((-80.10651 19.66116, -80.10651 19.66116, -80.10651 19.66116, -80.10651 19.66116, -80.106...

and trying to serialize it with write_portfolio() leads to the following error message:

Error in tmp[, c("assetid", "indicator", "datetime", "variable", "unit",  : 
  Can't subset columns that don't exist.Columns `datetime`, `variable`, `unit`, and `value` don't exist.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant