NINAnor / NIviz

Code and functions for improved visualization of indicator data, thematic indices, and ecosystem indices from the Norwegian Nature Index work.
https://ninanor.github.io/NIviz/index.html
1 stars 0 forks source link

Take geodata into NIcalc as shapefile data #21

Open ChloeRN opened 2 years ago

ChloeRN commented 2 years ago

Accessing geodata stored in the NI database is somewhat cumbersome and access is tricky to implement efficiently according to @jenast. A good alternative for the future would be to store all relevant shapefiles as data within NI calc.

jenast commented 2 years ago

I never implemented this, but an earlier idea was to create a generic map-plotting function for NI-values. If we store NI-values together with its geographical scale, we could write a plot function that can plot this on a map. To this end I stored this data in NIcalc/data/indicator.area.rda

What I never got around to:

  1. Perhaps add an attribute to the "indicatorData" class that holds a name of the largest geographic area the indicator value refers to (in the getIndicatorValues.R).

  2. Then I thought we could perhaps store a hierarchical list of the geographical units of Norway in the NIcalc package, so that you optionally could plot the value for smaller regions.

  3. Write a plot function that takes as options the value to plot, and the choosen area to plot it to, where you then could plot it to any area contained in the largest area. And gives an error message if the choosen area isn't part of the geographical scope of the indicator/index.