This file is the current implementation of the dataloader module. It actually combines multiple functions: requesting data from sources, reading and formatting data connecting with module-lang.js and module-datacheck.js and the main-core.js.
- Since:
- 0.0
- TODO
-
- This implementation should be revised in the next versions.
Requires
- module:index.html
- module:user/user-defined.js
- module:lang/lang.js
- module:js/module-datacheck.js
- module:js/main-core.js
Methods
-
innergenerate_display()
main-loadfiles -
Generates the general display to select module:g.medical_filecurrent in module:g.medical_filelist (and launches module:main_loadfiles~queue_medical when a new file is selected from the list). And give the option to load the dashboard with the function module:main-core~generateDashboard.
Also loads module:module_datacheck and module:module-lang and embeds some related displays (quick datacheck summary module:module_datacheck~display, errors log module:module_datacheck~showlog and related interactions module:module_datacheck~interaction for the datacheck module and language switch buttons module:module_lang~display for the lang module). -
innerqueue_geometry()
main-loadfiles -
Initiates the data parsing process with geometry files that are parsed from module:g.geometry_filelist to module:g.geometry_data. It then triggers the next step depending on module:g.population_bypass and module:g.mask_bypass contents.
Requires module:main_loadfiles~queue_list -
innerqueue_list(filelist, filetype, dataobject, exit_fun)
main-loadfiles -
Parses recursively all the files from a list to a variable and ends executing a function given its name.
Name Type Description filelist
Object List of files to parse data from
filetype
String Type of files to parse data from (one type for all)
dataobject
Variable to parse data to
exit_fun
String Function name to be executed when data parsed
-
innerqueue_mask()
main-loadfiles -
Continues the data parsing process with extra layers parsed from module:g.mask_filelist to module:g.mask_data. It then triggers the next step depending on module:g.population_bypass content.
Requires module:main_loadfiles~queue_list -
innerqueue_medical()
main-loadfiles -
Parses medical data from module:g.medical_filecurrent.
module:g.medical_folder is required to identify the folder and module:g.medical_filetypecurrent to select the right parsing method.
Triggered by module:main_loadfiles~read_commons and requires module:main_loadfiles~read_medical. -
innerqueue_population()
main-loadfiles -
Continues the data parsing process with population data parsed from module:g.population_filelist to module:g.population_data. It then triggers the next step depending on module:g.mask_bypass content.
Requires module:main_loadfiles~queue_list -
innerread_commons()
main-loadfiles -
Reads the content of module:g.geometry_data that has just been parsed by the module:main_loadfiles~queue_geometry function and of module:g.population_data that has just been parsed by the module:main_loadfiles~queue_population if available.
The function returns various files:- Related to geometry data
- Related to population data (if any)
-
innerread_medical()
main-loadfiles -
Stores the medical data parsed by module:main_loadfiles~queue_medical in module:g.medical_data. Initiates the datacheck module module_datacheck~dataprocessing and generates the display with module:main_loadfiles~generate_display.