Git Product home page Git Product logo

accessmod's Introduction

AccessMod 5

Summary

This is the main repository of AccessMod 5.

AccessMod 5 is a tool to analyze geographical accessibility to or from given locations, using anisotropic movements and multimodal transport processes (e.g. walk, bicycles, motorized vehicles). This package may help to analyze catchments of peoples who can reach a central point in a given time and transport model or determine where new public services should be scaled up in priority.

This product is developed by the GeoHealth group at the University of Geneva, in collaboration with the World Health Organization and MORU/Health GeoLab Group (Manila, Philippines).

AccessMod 5 : Interactive Map

AccessMod user interface, interactive map. Visualization of generated travel time layer and a set of facilities.

User manual

Download the latest version of the user manual in the Download section of the Accessmod website : accessmod.org.

Or Access the online version of the user manual : accessmod online user manual

Development

# Launch AccessMod stack 
# with app files bind mounted -> /app in docker-compose.yml 
$ docker compose up

# Check if the app server is working:  http://localhost:3080/status
# Check if the agent server is working:  http://localhost:5080/status

# --------- app dev session 
$ docker compose exec am5_dev R
> source('run.r')

# --------- app dev non-interactive session  
$ docker compose exec am5_dev Rscript --vanilla run.r
# Debbuging http.r in a secondary session :
# 1) Comment the source(http.r) line in run.r 
# 2) docker compose exec am5_dev R 
# 3) source('http.r')


# ---------- Replay analysis (dev)

# Launch a development session for the app
$ docker compose exec am5_dev R
> source('global.R')
> amAnalysisReplayExec("<path to config>.json")
# exemple in a dev session
> amAnalysisReplayExec("/data/dbgrass/demo/demo/accessmodConfigs/lAnalysisParameters__425.json")



# ---------- BUILD IMAGES
# Build base images
cd docker
./build.sh

# ---------- Github actions testing (not fully implemented)
act --secret-file .secrets --remote-name github --container-architecture linux/amd64


# ---------- BASIC END-TO-END TESTS 
# Default script 
$ npm run test
# - or - direct command with docker compose 
$ docker compose exec am5_dev Rscript tests/start.R 
# - or - from an interactive session 
$ docker compose exec am5_dev R
> source('tests/start.R') 

Branches

  • main: Contains the production-ready code. This branch holds the latest stable code. Pushing to this branch does not trigger any automated processes.
  • staging: Used for integrating new features and minor versions. Pushing to this branch triggers the build of a Docker image.
  • release: Contains stable versions ready for release. Pushing to this branch triggers the build of a Docker image, a VirtualBox OVA, and all Electron builds.

Versioning

To create a version, use npm run version from the staging or release branches. This command helps in selecting the version and commits it.

Expected Workflow

  1. Integrate a feature in a dedicated branch.
  2. Test the feature.
  3. Merge into the staging branch.
  4. Merge into the release branch (optional).
  5. Create a version: Select the correct semver value; it will push to the selected remote.
    • If on the release branch: All assets will be built.
    • If on the staging branch: Only the Docker image will be built.

Hot Fixes

In case of a hot fix, pushing to the staging or release branches manually will trigger the corresponding actions and overwrite the built version.

Electron

cd electron
yarn start 
# yarn start:debug for an interactive session, with external debugger.
  • State is stored in application data
  • Browser, communication with electron :
    • amcom.getState('data_location').then(console.log);
    • amcom.request('list_versions',{}).then(console.log);
    • amcom.getState('port_host').then(console.log);
    • ...

Issues

The bugs and new functionality request should be reported here : AccessMod 5 issues

accessmod's People

Contributors

fxi avatar carlosrochoa avatar nicolasray avatar ptimoner avatar

Stargazers

Vassily Trubetskoy avatar Nurzhan Mukashev avatar  avatar Tom Russell avatar 张春哲 avatar Manoel Davi Carneiro avatar Brian Mc Donald avatar Rica Zamora Duchateau avatar  avatar  avatar Lucas Lopes Felipe avatar Adam Howes avatar Caio Peixoto avatar Altan Orhon avatar  avatar Jonathan Gray avatar Christopher J Brooks avatar steve avatar Yo Yehudi avatar  avatar Callum avatar Jianting Zhao avatar Grégoire Lurton avatar Michelle MDV Schmitz avatar Donghoon Lee avatar Emmanuel Habets avatar Erdong avatar Pierre-Alexandre Kofron avatar Nour avatar  avatar  avatar François Guilhaumon avatar Engelbert Niehaus avatar Markus Neteler avatar Bekim avatar Roy Burstein avatar De'Mel avatar  avatar

Watchers

James Cloos avatar  avatar  avatar  avatar  avatar Steeve Ebener avatar David Vale avatar  avatar  avatar  avatar Peter Macharia avatar

accessmod's Issues

Data import with wrong CRS or extent.

J'étais sous le projet Demo, mais j'ai voulu loadé des cartes du Burkina, Ca m'a fait un message d'erreur (normal), mais il serait bien si c'est possible d'avoir un message qui dit d'entrée que l'externe n'est pas la même et qui suggère de faire un nouveau projet si pas déjà fait.

Structure of the exported zip file

I did some test of the export module.

It is good to have each data layer in separated folders but do we really need to have them in sub-folders with the same name when they are in vector format?

I personnaly don't see any problem to have the info.txt file together with the data like it is already the case for the raster format layers.

Plantage de l'appli

Je fais planter l'appli si je fais ça:

  • accessibility analysis avec donnes burkina, et paramètres classiques
  • ensuite je vais dans Zonal potential coverage
  • je choisi zone admin 2 (les zones qui ont aussi un field "merge")
  • je fais s'afficher les valeurs de la table avec 120 minutes
  • puis je change la "zone admin map" et je choisi "zone admin 1" (celle qui n'a pas un field "merge")
    --> BOOM, plantage, avec un message de Safari: "The application unexpectedly exited."

probablement du au fait que "zone admin 1" n'a pas de field "merge" ?

Auto-update

Pull github update in background.
Let the user decide if he/she want to update the application

Analysis>Geographic Coverage analysis: Décalage de certaines fenêtres de selection

Est-ce que l'on pourrait avoir les fenêtre de selection des champs du health facility data (unie ID, Name, Capacity) décalé vers la droite par rapport à la fenêtre de selection de la donnée elle même? Si ce n'est pas possible:
 placer la fenêtre de selection de la population avant les health facilities
 mettre le texte pour les champs en question en italique

Frédéric: c'est quoi la raison? Créer une hiérarchie dans les champs de sélection ? Est-ce prioritaire ?

Module 2,3 : HF within barrier cells

HF within barriers cells should produce a warning (and warning grid) in module 2 and an error in module 3.

Possible solution: Preliminary analysis of hospital facilities coordinates, as soon as HF and merged land-cover containing barriers cells are selected. Output a table with concerned HF and ask if an auto-correction should be done. Strategy to be implemented: replace barrier cell under HF with a value selected by user. Non corrected HF will be ignored.

Toolbox>Merge landcover>Add roads to the stack

the module allow for a road class to be equal to "0" and make it appear as blank in the "class" column.

I don't know what you think but according to me we should not let that to be possible. It actually seems that this make the module crash.

Priority 2: Analysis>Zonal potential coverage: Map preview

o Le texte "no travel time selected" apparait en haut de la carte alors que j'ai effectivement sélectionné un temps de trajet dans le time scale. Par contre le texte disparait quand je rajoute la carte des zones
o est-ce que l'on pourrait avoir d'autres données dans la zone de preview du travel time? Je pense simplement à la délimitation des zones mais j'imagine que c'est la même difficulté que pour le "preview", il faut que les couches soient en raster, correct?

Frédéric: On peut avoir une superposition de plusieurs couches, mais ça demande pas mal de ressources. Je ne pense pas que ça apporte beaucoup par rapport au travail que ça demande.

Priority 2: Toolbox>accessibility analysis: import of external scenario

As long as the headers are correct It is possible to import scenario tables that do not contain:

  • all the classes
  • the correct spelling for the transportation mode

These scenario tables (I will send you example of them by email as we can't attach them here) do appear under "existing scenario table" in the tool and you can click on the "complete with existing scenario" button but different things are then appearing without giving a warning message:

  1. if the number of class is smaller but there is a match between classes (scenario.xlsx or scenario3.xlsx file) click on the button bring back to the original values
  2. if the number of class is the same and there is a match between classes but there are spelling mistakes in the travel mode (scenario2.xlsx or scenario4.xlsx), the correct transportation mode is being imported but nothing change for the other classes
  3. if there not a full match in terms of classes (scenario5.xls) clicking on the button also brings back to the original values.

In view of the above, can we please implement two simple tests as follow:

  • check that the imported scenario table contains the same values that in the one to be processes
  • check that the mode reported is among the available options "MOTORIZED, VEHICLE, BICYCLING)

If this is not the case, the existing scenario table should be be appearing on the right and a message like this should appear: "The content of the external scenario table is not compatible. Please ensure all the classes to be processed are present and/or that the transportation mode is among the possible options (MOTORIZED, VEHICLE, BICYCLING)?

Thanks

Importations de données

On devrait pouvoir importer les données suivantes dans le project mais elles n'aparaissent pas dans les data class du menu déroulant:
 DEM Est-ce que cela veux dire que tu dois recommencer un nouveau projet chaque fois que tu fais une modification dans le DEM?
 Cumulative_cost (on devrait changer cette classe en "Travel_time"

Frédéric: Pourquoi l'utilisateur voudrait-il changer le DEM ? Si les montagnes commencent à se faire la malle, c'est un assez gros problème pour lequel je ne vais pas être très utile. Plus sérieusement, on peut imaginer de remplacer le DEM si on veut changer de résolution. Mais il faudra créer une exception dans la logique employée en arrière-plan. Ce n'est pas une couche comme les autres et c'est la seule qui est dans le mapset PERMANENT, le mapset qui n'est pas, en général, modifiable par l'utilisateur. GRASS a un système de rôle. Dans les premières version d'AM 5, j'avais implémenter qqch dans ce sens et Nicolas m'a demandé de contourner ça.

Cumulative_cost. Changement de terme. C'est le terme employé par GRASS et ça fait du sens pour moi. Mais je peux changer ça. C'est également dans le fichier Excel.

Module 3: process order by HF

The user has to select the strategy to use for the HF capacity analysis. The order of HF during the process is one of the important parameter. As each HF will drain population and remove it from the population pool, the next HF capacity will be affected by the previous step.

Those options are available in AccessMod 4.0 and should be implemented here:

a. A variable located in the existing health facility attribute table (have to be generated before using AccessMod).
b. The population living within a calculated travel time, using the cost distance function, specified in minutes. Please note that a travelling time greater than zero has to be specified.
c. The total population living in the cell where the health facility is located.
d. The population living in a circular buffer around the health facility. The radius of the buffer must be specified in meters.

Health facility selection and sorting

Dans "Geographic coverage analysis", si je classe la table selon un colonne, puis je sélectionne tous les HF (All) ou aucun (None), la table se "déclasse" (revient au classement par défaut). Idéalement il faudrait que All et None n'aient pas d'effet sur la classement de la table.

Priority 1: Barrière de type point

Une barrière ne peut pas avoir un format point. La raison principale est le fait que ces points seront convertit en surface fonction de la résolution du DEM et on ne peut pas tout d'un coup avoir un batiment convertit en une cellule d'1km2 par exemple => cela devrait être enlevé des options sous Analysis>Merge landcover>Add barriers to stack>Barrier type et la table sur le côté droit.

Frédéric: on en avait déjà discuté. Si un chemin forestier ou une rivière peut avoir un Km de large, pourquoi un barrage ou une zone minée ne pourraient pas également mesurer cette distance ?

Coverage analysis: operation order when selecting to do the zonal statistics ( Toolbox>Geographic )

I know you are trying to keep data inputs and setting separated but having for the user to go back to data inputs in case he check the "Generate zonal statistics (select zones layer in data input panel)." option is for me an issue.

In addition to that there is no warning message and he can compute in case he check the button but does not select a zone layer.

If there is really no way for the zones layer to appear just below the button once checked can we at least implement a warning message and blog the computing until he has selected such layer?

Thanks

Analysis>Land cover merge:

Steeve: Sous Analysis>Merge landcover>Add roads to stack il y a le texte suivant: "If a label or category exists in another stack element, the label and category of the uppermost stack element will be kept as the final raster landcover value after merging process."

Je ne suis pas sure de comprendre ce qui va se passer si par exemple dans la couche land cover on a une classe 1 highways et que l'on retrouve la classe 1 main road dans la couche des routes. Est-ce que tu peux m'expliquer ce qui se passe si on met cette classe de route en dessus du landcover?

Frédéric: Pour la question sur le merge: Si deux couches possèdent la même classe pour définir deux labels différents, un seul sera gardé pour le merge. L'application envoie un message lors de la validation pour prévenir l'utilisateur s'il y a un conflit. Les couches concernées sont affichées dans une table récapitulative qui apparaît dans l'onglet "Stack category conflict". Si l'utilisateur poursuit le merge malgré tout, le label de la couche la plus haute dans le stack sera gardée dans le land-cover final.

Steeve: c'est quelque chose que l'on doit changer car le risque d'avoir des classes identiques entre items du stack va très certainement se produire et on ne peut pas avoir tout d'un coup une classe de land cover qui à la même vitesse que celle d'une route.

Dans la version 4 le problème avait été résolut en changement automatiquement les classes pour les routes lors de leur transformation en raster et ceci en ajoutant 1000. Par exemple la classe de route 23 devenait alors la classe 1023. Est-ce que ce n'est pas quelque chose que l'on pourrait également implémenter ici?

Si ce n'est pas le cas il faut alors forcer l'utilisateur à fournir des couches de land cover et de routes pour lesquels il n'y a pas d'overlap de classes. le message et le check serra donc fait en conséquence.

J'imagine que les classes utilisés dans le stack barrier ne sont pas pris en compte comme dans la version 4, c'est bien correct?

Frédéric: Je ne pense pas que ce soit une bonne idée de modifier automatiquement les classes. C'est envisageable de laisser une colonne "new classes" dans la table des routes pour que l'utilisateur puisse changer ça en connaissance de cause, au moment où il choisit les colonnes. Il pourra prendre note de la correspondance entre anciennes et nouvelles classes plus facilement.

Analysis>Zonal potential coverage: localisation de certains champs

o For me:
 the selection of the zones and other associated information should go under "Select inputs"
 the time scroll mbar should go under "Module settings"

Frédéric: Pour le moment, j'essaie d'éviter de dupliquer les inputs. "Select zone admin map" ne peut pas être une fois dans inputs et l'autre fois dans settings. Donc dans geographic coverage le "select zone admin" va aussi remonter dans inputs. Je fais ça.

Et je descends le time slider dans settings. Je mettrai également un bouton "Update analysis". Nicolas voulait que ça change peu importe le champ modifié, mais avec une carte de plusieurs millions de cellules, ça sera pas très "instantané". Avec un bouton, on prend moins de risque d'avoir des analyses dupliquées si on change le slider de plusieurs crans.

re-ordonnement des tags

les tags se re-ordonnent alphabétiquement dans un liste de tags pour un data set donné, dans la table data, il faudrait éviter.

Nombre de classes autorisées dans les stacks

En ce qui concerne le nombre de classes qu'AccessMod peut gérer: quand est-il des autres stack? est-ce qu'il y a aussi une limitation? On devrait l'indiquer si c'est le cas.

Frédéric: il n'y a pas de limites pour les barrières et land cover. Si on a besoin de beaucoup de classes pour les routes, comme je l'ai expliqué dans le fichier Excel, je peux changer ce paramètre. La limitation du nombre de classes pour les routes, c'est pour éviter toutes les combinaisons qui ne s'affichent sur la page. J'ai mis 50, ça joue ?

Priority 1: Deleter un projet

Comment est-ce que tu delete un project? Il me semble que tu m'avais montré mais je me rappelle plus. Intuitivement j'attendrais d'avoir une telle option ici.

Frédéric: Pour l'instant, l'utilisateur ne peut pas supprimer un projet complet. Mais je peux implémenter ça.

Table reactivity

Handson table did not update when we switch from a project that provide such table to a new project without it. E.g. scenario table.

Toolbox>Merge landcover>Sort and merge stack: warning message when only barriers are in the stack

mes_er_1
mes_er_2

When only barriers are in a stack a first error message appears (mes_er_1.jpg attached) but is not explicit and you can still continue the operation.

When you then click on "Merge the items in the stack" a second message appears (mes_er_2.jpg attached) which is also not explicit.

Could we have some warning message appearing to indicate that there should at least be the landcover to ensure the merge and not allow for the calculation to take place as long as the landcover is not in the list?

Can't upload a new scenario table again after an error message has appeared (Data > Import)

I uploaded a scenario table that did not contain the correct column header and got an error message which is good.

I then corrected the file in question and tried to upload it again. I therefore entered the tag, click the choose dataset button, selected the file but the upload did not happen.

To make it work I first had to refresh the browser. In case there is no solution to this we should at least have this mentioned in the doc.

Problème lors de la supression de certaines données filtrées

J'ai essayé de deleter seulement les scénarios tables dans le projet demo. J'ai donc utiliser le filtre pour n'avoir que les model_table dans la vue et j'ai entamé le delete...il semble que cela ai finalement deleter toutes les données et non pas seulement les tables car plus rien n'apparait ensuite...=> quelque soit le problème je pense que cela indique que l'on doit également donner accès aux données de démo en dehors de la VM

Frédéric: À mon avis, c'est un problème de latence de la partie client (ton navigateur), additionnée au fait de cliquer 2 fois sur le bouton avant qu'il ne se désactive. Je vais désactiver la sélection par défaut des dataset, lors du 2e clic, la fonction delete ne fera rien.

Module 2,3 : subset of HF

Allow user to create a subset of HF.

In module 2 and 3, create a tabset containing transportation model and HF table.
In HF table, allow:

  1. Filtering selected column, e.g. HF code, HF capacity, HF staff competence.
  2. Manually select HF with checkbox.

Priority 3: Issue with the merge stack

After updating to revision number 209 the list of items in the stack was not empty in the demo project (first attached picture) and was actually containing items from a land cover layer that is not appearing under data (land_cover_test) (second picture attached here).

I was therefore trying to empty the stack but I could not find how (I thought this was the role of the display and hide option but seems it is not the case). If this is not yet possible we should have a button to allow for that as the user might need to generate several merged land cover (to try dry versus wet season for example or the impact of changes on the road network).

I am then also now wondering what is the use of the display or hide function. Thanks for the explanation on this.

merge_stack_1
merge_stack_2

Priority 2: Class conflict lors du merge du land cover

j'ai fait un test pour voir si le merge land cover identifiait effectivement les conflict de classes (j'ai créé une couche de route avec les même classes que celle du landcover) et l'identification ne s'est pas faite, il n'y a eu aucun message ni d'information reportée sous stack category conflict

Frédéric: contrôle des conflit. Ok, je vais tester avec d'autres données.

Module 3: process order of HF capacity analysis

The user have to select the strategy to use for the HF capacity analysis. The order of HF during the process is one of the important parameter. As each HF will drain population and remove it from the population pool, the next HF capacity will be affected by the previous step.

Those options are available in AccessMod 4.0 and should be implemented here:

a. A variable located in the existing health facility attribute table (have to be generated before using AccessMod).
b. The population living within a calculated travel time, using the cost distance function, specified in minutes. Please note that a travelling time greater than zero has to be specified.
c. The total population living in the cell where the health facility is located.
d. The population living in a circular buffer around the health facility. The radius of the buffer must be specified in meters.

logo OMS

Aouter le logo de l'OMS, peut-e^tre ne dessous de Settings dans la colonne de menu?

Priority 3: Vider le champ du tag après un compute

Il serrait bien si la fenêtre du tag pouvait être vide une fois que tu as fait le compute,

Frédéric: je vais faire en sorte de vider les tags après le compute. J'ai fait l'inverse il n'y pas longtemps pour pouvoir simplement ajouter un numéro aux tags existants.

Analysis>Accessibility analysis: Ecrasement des fichiers précédent au cas ou le même tag est utilisé

Cette partie de l'operation est trop compliquée: Map cumulative_cost__Dede exists and will be overwritten, along with corresponding new facilities map, speed map or friction map. However, if changes has been made to the homonymic model (speed table), a new table will be stored => Si le tag est le même alors les données résultantes (grille et table de scénario) doivent toutes être écrasées par la nouvelle version => merci de changer cela dans le code

Frédéric: New table stored : ok, je change ça.

Role of the Data>Rename function

Could you please explain to me what this function is supposed to do?

I manually changed some of the tags in the table but clicking on the "update modified tags and rename" button with the dataset selected or not does not make any difference.

Priority 3: Merging of the stack in the merge land cover tool

We have to find a way that the stack is not being combined/merged as long as there are conflicts. if this can't be solved then we have to:

  • either push the user to come back to the original data and change it;
  • or we use the same approach than the one in version 4

For me , the second one is the easiest and the less risky but I know you don't like this approach

Toolbox>Merge landcover>sort and merge stack

The resolution of class conflicts between the road network and the landcover is still not working.

This morning I have used the conflict road and landcover layers I placed in the AccessMod5\data\sample\MWI_conflict_roads folder in the dropbox.

Both files present the same set of classes: 1, 2 and 3 but he only asked me to solve the conflict for class 3 and did the merge keeping the other two conflicts and therefore removing some of the roads

In addition to that, I thought the "new_class" column would be physically added to the original road layer to be able knowing the correspondence with the original class but it seems this is not the case.

Finally, if you have to set of roads in the stack, which can be the case if you want to look at the impact of building a road (case currently discussed with ADB) the module identifies conflicts among road layers as well.

I am sorry but this approach for trying to solve the conflicts is too complicated => we need to reach something that is much closer than what is implemented in Version 4.0.

There are reasons why we have been using this approach, even since the first version of AccessMod if I am not wrong.

Thanks for your understanding,

Steeve

Changement de métode d'accès aux outils dans la toolbox,

Je souhaiterais que l'on retourne à la version d'avant avec chaque outil soit donc accessible depuis un onglet. C'était bien plus pratique.

Je ne pense pas que la description de chaque outil soit nécessaire et le texte pourrait être assez long pour être compréhensif.

D'avance merci

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.