################################# DATA ANALYSIS Component [Energy] ################################# .. note:: Some functions are the same as for Livelihoods Module * :ref:`updateAllDataKobo ` * :ref:`updateDataHarmonizeDatabridge ` * :ref:`createUpdateAnalysisSheet ` * :ref:`checkAnalysisNote ` * :ref:`loadDataTemplate ` * :ref:`getUrlFetchOptions1 ` * :ref:`getUrlFetchOptions2 ` * :ref:`convertSheet2Json ` * :ref:`getAllData ` * :ref:`datafilter ` * :ref:`calculateOutlier ` * :ref:`convertDataOutliervToJson ` * :ref:`displayLabelIndicator4Ouput1 ` * :ref:`formatTableHeader ` * :ref:`displayNarrative3SampleSize ` * :ref:`sortTable ` * :ref:`mergeText ` * :ref:`mergeText2 ` * :ref:`countTotalNumIndicator2Dependency ` * :ref:`countTotalNumAgeGroup ` * :ref:`filterpage ` * :ref:`filterMain ` * :ref:`filterInitial ` * :ref:`formatText ` * :ref:`formatNote ` * :ref:`takeUniqueDataBGsheet ` * :ref:`formatGraphArrow ` * :ref:`formatHeader ` * :ref:`generateTemplateDataSpCountry ` * :ref:`IndicatorYN ` * :ref:`filterBenefAge ` .. warning:: Some function are the same as for Livelihoods Module and no longer used * :ref:`convertNumberToText ` * :ref:`generateLabelUnderTable ` .. _extractAnalysisNote_energy Overview: Function extractAnalysisNote_energy =================================== .. js:autofunction::extractAnalysisNote_energy * Locate the file in the folder, and if it does not exist create new one. Set the idx address (datasheet id) so that the code in different functions can work on the correct DataSheet through global variables. .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 354 - 377 :emphasize-lines: 1 :linenos: * Schedule CREATEANALYSISHEET or ANALYSISNOTEEXTRACT Task .. figure:: images/dataanalysis/energy/createanalysissheet_extract_task.png :width: 500px :align: center :alt: This is the image caption Example of CREATEANALYSISHEET or ANALYSISNOTEEXTRACT Task .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 379 - 392 :emphasize-lines: 8,11 :linenos: * Add **Fllter** sheet in Beneficiary data sheet [ALLFILESYear >COUNTRY_ANALYSISYEAR>Year Country Analysis Energy Beneficiary Survey] .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 394 - 439 :linenos: * Read Partner Survey Data .. figure:: images/dataanalysis/energy/analysisnoteextract_partner_data.png :width: 400px :align: center :alt: This is the image caption Screenshot of Partner data .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 443 - 489 :linenos: * :ref:`extractCountryAnalysisNote ` * Country Analysis File .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 490 - 563 :linenos: General Variables [Energy] ========================== .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 565 - 577 :linenos: DataLoad Variables [Energy] ============================ .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 580 - 588 :linenos: .. _verifyKPTEnergy_energy Overview: Function verifyKPTEnergy ================================= .. js:autofunction:: verifyKPTEnergy .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 852 - 980 :emphasize-lines: 1 :linenos: .. _recalculateTopBottomThresholds_energy Overview: Function recalculateTopBottomThresholds_energy ================================================ .. js:autofunction:: recalculateTopBottomThresholds_energy .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 985 - 992 :emphasize-lines: 1 :linenos: .. _convertToUSD Overview: Function convertToUSD ================================= .. js:autofunction:: convertToUSD .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 998 - 1161 :emphasize-lines: 1 :linenos: .. _overwriteOutlier_energy Overview: Function overwriteOutlier_energy ================================== .. js:autofunction:: overwriteOutlier_energy .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 1190 - 1278 :emphasize-lines: 1 :linenos: Function extractCountryAnalysisNote_energy ============================================ .. js:autofunction:: extractCountryAnalysisNote_energy * Resetting GLobal Variables .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 1311 - 1423 :linenos: * Generating and displaying data on Country Analysis note .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 1425 - 1435 :linenos: .. _displayDataIndicators123_energy Overview: Function displayDataIndicators123_energy ========================================= .. js:autofunction:: displayDataIndicators123_energy .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 1481 - 1909 :emphasize-lines: 1 :linenos: * 1. ENERGY PROGRAMME AND MONITORING SCOPE on country abalysis note and Problem statemenet .. figure:: images/dataanalysis/energy/country_analysis_energy_1.png :width: 400px :align: center :alt: This is the image caption Screenshot of header * 2. PROFILE OF SAMPLE BENEFICIARIES AT BASELINE/ENDLINE .. figure:: images/dataanalysis/energy/country_analysis_energy_2.png :width: 400px :align: center :alt: This is the image caption Screenshot of header * 3. SAMPLE SIZE PER OUTPUT .. figure:: images/dataanalysis/energy/country_analysis_energy_3.png :width: 400px :align: center :alt: This is the image caption Screenshot of header .. _displayDataIndicators4Otput1_energy Overview: Function displayDataIndicators4Otput1_energy =============================================== .. js:autofunction::displayDataIndicators4Otput1_energy * 4. AREA 1: SUSTAINABLE COOKSTOVES & FUEL SUPPLY .. figure:: images/dataanalysis/energy/country_analysis_energy_4.png :width: 400px :align: center :alt: This is the image caption Screenshot of 4. AREA 1: SUSTAINABLE COOKSTOVES & FUEL SUPPLY .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 1915 - 1978 :emphasize-lines: 1,22,36,40 :linenos: * The information on the average amount of assistance .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 1981 - 2067 :linenos: * 4.1 UTILISATION OF COOKSTOVE .. figure:: images/dataanalysis/energy/country_analysis_energy_4_1.png :width: 400px :align: center :alt: This is the image caption Screenshot of 4.1 UTILISATION OF COOKSTOVE .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines:2069 - 2241 :emphasize-lines: 1 :linenos: * 4.2 KITCHEN PERFORMANCE TEST (KPT) .. figure:: images/dataanalysis/energy/country_analysis_energy_4_2.png :width: 400px :align: center :alt: This is the image caption Screenshot of 4.2 KITCHEN PERFORMANCE TEST (KPT) .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 2242 - 2358 :emphasize-lines: 1 :linenos: * 4.3 FUEL EXPENDITURE .. figure:: images/dataanalysis/energy/country_analysis_energy_4_3.png :width: 400px :align: center :alt: This is the image caption Screenshot of 4.3 FUEL EXPENDITURE .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 2359 - 2432 :emphasize-lines: 1 :linenos: .. _displayDataIndicator5Output2_energy Overview: Function displayDataIndicator5Output2_energy ============================================ .. js:autofunction:: displayDataIndicator5Output2_energy * 5. AREA 2: COMMUNITY AND HOUSEHOLD LIGHTING .. figure:: images/dataanalysis/energy/country_analysis_energy_5.png :width: 400px :align: center :alt: This is the image caption Screenshot of 5. AREA 2: COMMUNITY AND HOUSEHOLD LIGHTING .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 2468 - 2524 :emphasize-lines: 1 :linenos: * The information on the average amount of assistance .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 2527 - 2552 :emphasize-lines: 1 :linenos: * 5.1 COMMUNITY LIGHTING: PERCEPTION OF SAFETY .. figure:: images/dataanalysis/energy/country_analysis_energy_5_1.png :width: 400px :align: center :alt: This is the image caption Screenshot of 5.1 COMMUNITY LIGHTING: PERCEPTION OF SAFETY .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 2555 - 2607 :emphasize-lines: 1 :linenos: * 5.2 HOUSEHOLD LIGHTING: RETENTION AND UTLISATION OF PORTABLE LIGHTS .. figure:: images/dataanalysis/energy/country_analysis_energy_5_2.png :width: 400px :align: center :alt: This is the image caption Screenshot of 5.2 HOUSEHOLD LIGHTING: RETENTION AND UTLISATION OF PORTABLE LIGHTS .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 2608 - 2797 :emphasize-lines: 1 :linenos: * 5.3 HOUSEHOLD LIGHTING: EXPENDITURE ON HH LIGHTING .. figure:: images/dataanalysis/energy/country_analysis_energy_5_3.png :width: 400px :align: center :alt: This is the image caption Screenshot of 5.3 HOUSEHOLD LIGHTING: EXPENDITURE ON HH LIGHTING .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 2798 - 2875 :emphasize-lines: 1 :linenos: * 5.4 HOUSEHOLD LIGHTING: PERCEPTION OF SAFETY .. figure:: images/dataanalysis/energy/country_analysis_energy_5_4.png :width: 400px :align: center :alt: This is the image caption Screenshot of 5.4 HOUSEHOLD LIGHTING: PERCEPTION OF SAFETY .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 2876 - 2941 :emphasize-lines: 1 :linenos: .. _displayNarrativeIndicator52StreetSafety Overview: Function displayNarrativeIndicator52StreetSafety =================================================== .. js:autofunction:: displayNarrativeIndicator52StreetSafety .. figure:: images/dataanalysis/energy/narrative11b.png :width: 400px :align: center :alt: This is the image caption Screenshot of narrative .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 3007 - 3068 :emphasize-lines: 1 :linenos: .. _displayNarrativeIndicator54HHSafety Overview: Function displayNarrativeIndicator54HHSafety ============================================ .. js:autofunction:: displayNarrativeIndicator54HHSafety .. figure:: images/dataanalysis/energy/narrative11c.png :width: 400px :align: center :alt: This is the image caption Screenshot of narrative .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 3081 - 3185 :emphasize-lines: 1 :linenos: .. _displayNarrativeIndicator41UtilisationStove Overview: Function displayNarrativeIndicator41UtilisationStove ====================================================== .. js:autofunction:: displayNarrativeIndicator41UtilisationStove .. figure:: images/dataanalysis/energy/narrative41.png :width: 400px :align: center :alt: This is the image caption Screenshot of narrative .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 3196 - 3305 :emphasize-lines: 1 :linenos: .. _displayNarrativeIndicator42KPT Overview: Function displayNarrativeIndicator42KPT ========================================= .. js:autofunction:: displayNarrativeIndicator42KPT .. figure:: images/dataanalysis/energy/narrative42.png :width: 400px :align: center :alt: This is the image caption Screenshot of narrative .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 3318 - 3403 :emphasize-lines: 1 :linenos: .. _displayNarrativeIndicator43Fuel Overview: Function displayNarrativeIndicator43Fuel ========================================= .. js:autofunction:: displayNarrativeIndicator43Fuel .. figure:: images/dataanalysis/energy/naarrative43.png :width: 400px :align: center :alt: This is the image caption Screenshot of narrative .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 3415 - 3527 :emphasize-lines: 1 :linenos: Function displayNarrativeIndicator52HHLighting =============================================== .. js:autofunction:: displayNarrativeIndicator52HHLighting .. figure:: images/dataanalysis/energy/narrative52.png :width: 400px :align: center :alt: This is the image caption Screenshot of narrative .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 3539 - 3627 :emphasize-lines: 1 :linenos: Function displayNarrativeIndicator53HHLighting ================================================ .. js:autofunction:: displayNarrativeIndicator53HHLighting .. figure:: images/dataanalysis/energy/narrative53.png :width: 400px :align: center :alt: This is the image caption Screenshot of narrative .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 3638 - 3739 :emphasize-lines: 1 :linenos: .. _skipHeaders Overview: Function skipHeaders ================================= .. js:autofunction::skipHeaders .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 3832 - 3826 :emphasize-lines: 1 :linenos: .. _Count_energy Overview: Function Count_energy ================================= .. warning:: it's recommended that the function be renamed .. js:autofunction::Count_energy .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 3838 - 3887 :emphasize-lines: 1 :linenos: .. _countNumBenefIndicator_energy Overview: Function countNumBenefIndicator_energy ====================================== .. js:autofunction:: countNumBenefIndicator_energy .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 3943 - 3989 :emphasize-lines: 1 :linenos: .. _Count2_energy Overview: Function Count2_energy ================================= .. warning:: it's recommended that the function be renamed .. js:autofunction::Count2_energy .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 4000 - 4014 :emphasize-lines: 1 :linenos: .. _countNumIndicator4Kitchen Overview: Function countNumIndicator4Kitchen ==================================== .. js:autofunction:: countNumIndicator4Kitchen .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 4042 - 4087 :emphasize-lines: 1 :linenos: .. _initialFilter_energy Overview: Function initialFilter_energy ================================= .. js:autofunction:: initialFilter_energy .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 4103 - 4119 :emphasize-lines: 1 :linenos: .. _generateTablePercentIndicatorImpact_energy Overview: Function generateTablePercentIndicatorImpact_energy ==================================================== .. js:autofunction:: generateTablePercentIndicatorImpact_energy .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 4548 - 4631 :emphasize-lines: 1 :linenos: .. _generateTablePercentIndicatorImpactChange_energy Overview: Function generateTablePercentIndicatorImpactChange_energy ========================================================== .. js:autofunction:: generateTablePercentIndicatorImpactChange_energy .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 4644 - 4730 :emphasize-lines: 1 :linenos: .. _formatTables_energy Overview: Function formatTables_energy ================================= .. js:autofunction:: formatTables_energy .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 4745 - 4794 :emphasize-lines: 1 :linenos: .. _formatTablesAddMerge_energy Overview: Function formatTablesAddMerge_energy ===================================== .. js:autofunction:: formatTablesAddMerge_energy .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 4804 - 4857 :emphasize-lines: 1 :linenos: .. _generateTableAverageIndicator42Kitchen Overview: Function generateTableAverageIndicator42Kitchen ================================================= .. js:autofunction::generateTableAverageIndicator42Kitchen .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 4862 - 5146 :emphasize-lines: 1 :linenos: .. _generateTableValueIndicator42Fuel Overview: Function generateTableValueIndicator42Fuel ============================================ .. js:autofunction::generateTableValueIndicator42Fuel .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 5153 - 5263 :emphasize-lines: 1 :linenos: .. _generateTableValueIndicator52Light Overview: Function generateTableValueIndicator52Light ============================================ .. js:autofunction::generateTableValueIndicator52Light .. literalinclude:: ../scripts/DATA_ANALYSIS_energy_specific.js :language: js :lines: 5269 - 5365 :emphasize-lines: 1 :linenos: