OpenWaterFoundation / owf-app-infomapper-ng

Open Water Foundation InfoMapper web application for menu-driven maps and visualizations, using Angular
GNU General Public License v3.0
1 stars 2 forks source link

Gapminder needs to be integrated into InfoMapper #359

Closed Nightsphere closed 2 years ago

Nightsphere commented 3 years ago

Integrate the Gapminder JS code Sophia has been working on into the InfoMapper for being displayed in a Dialog.

Nightsphere commented 3 years ago

I have pushed the first update for the Gapminder code. For some reason, the window manager was fighting back, even though I've done something almost identical for at least 4 other dialogs, so a user can open up multiple Gapminder Dialogs at the moment. I'll keep looking into why it's acting the way it is, and hopefully do another push soon.

As for displaying the Gapminder, the resourcePath property in the event config file can use either a absolute path to the main Gapminder configuration file, or a relative path from the map configuration file like has been done with other resourcePath properties. Each Gapminder can use 3 files total for displaying the Gapminder: the main Gapminder config file as mentioned above, an annotations JSON file, and a CSV file for the data itself.

The main config file, named viz-config.json for me, has two property named DataFileName and AnnotationsFileName, which as of right now takes the full path to the CSV data file and annotations file mentioned above. The code that uses these paths is not from the InfoMapper, but maybe we can talk to Sophia about updating that in her code later. With these 3 files, that should be enough to show up in the dialog.

Nightsphere commented 3 years ago

When the next git pull is performed, it show many files being deleted from the repo. These are css/ and js/ folders that contain the code for the Gapminder that is supposed to be used in the dialog-component. It is also there as well, and I'm not sure how it snuck in again in the assets/ folder.

Another point I forgot to mention in the comment before is that as of now the Gapminder Dialog will not be resizable, but hopefully will be in the future.

Nightsphere commented 3 years ago

A new merge has occurred, with the Gapminder code implementation at what I'm calling 4.0. This just means that this is the fourth large update since Sofia and I have been getting her Gapminder code to work with the InfoMapper. It is much faster than it used to be, and after this merge, virtually nothing will have to be done by me, except the odd path updating.

I think this will also greatly help in the next coming days where we really look into the npm packaging of the Gapminder, since both of us have seen what happens and what needs to be done to get the code from the viz demo to another code base.

Nightsphere commented 2 years ago

Sofia's code has been brought into the Gapminder Dialog Component. The code now lives in the AppDev repo under the Common library. The main purpose of this issue has been fulfilled, and a Trendalyzer (created by the Gapminder group) visualization can be created and shown in a dialog. Further issues can be created in the AppDev repo for the Common library. Closing this issue.