microsoft / FluMapModel
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 72 units with 1,646 lines of code in units (50.2% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (245 lines of code)
    • 4 medium complex units (439 lines of code)
    • 9 simple units (340 lines of code)
    • 57 very simple units (622 lines of code)
0% | 14% | 26% | 20% | 37%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
R0% | 19% | 35% | 16% | 28%
py0% | 0% | 0% | 34% | 65%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
incidenceMapR/R0% | 28% | 39% | 15% | 16%
dbViewR/R0% | 20% | 57% | 14% | 6%
api_service/seattle_flu_incidence_mapper0% | 0% | 0% | 34% | 65%
modelServR/R0% | 0% | 0% | 31% | 68%
ROOT0% | 0% | 0% | 86% | 13%
api_service/scripts0% | 0% | 0% | 100% | 0%
modelVisualizeR/R0% | 0% | 0% | 0% | 100%
api_service/migrations0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
latentFieldModel <- function()
in incidenceMapR/R/latentFieldModel.R
178 32 4
masterSpatialDB <- function()
in dbViewR/R/masterSpatialDB.R
67 28 3
selectFromDB <- function()
in dbViewR/R/selectFromDB.R
107 23 4
smoothModel <- function()
in incidenceMapR/R/smoothModel.R
119 22 4
fluVaxEfficacyModel <- function()
in incidenceMapR/R/fluVaxEfficacyModel.R
133 19 3
expandDB <- function()
in dbViewR/R/expandDB.R
80 13 1
effectsModel <- function()
in incidenceMapR/R/effectsModel.R
61 10 4
def get_models()
in api_service/scripts/download_models.py
16 9 4
appendLatentFieldData <- function()
in incidenceMapR/R/appendData.R
40 9 2
def upload_model()
in upload_models.py
31 9 5
def query()
in api_service/seattle_flu_incidence_mapper/query_model.py
42 8 0
addCensusData <- function()
in dbViewR/R/addCensusData.R
48 8 1
returnModel <- function()
in modelServR/R/returnModel.R
51 8 3
def get_or_create_model_container()
in api_service/seattle_flu_incidence_mapper/query_model.py
37 6 3
def get_model_id()
in api_service/seattle_flu_incidence_mapper/utils.py
14 6 1
def create()
in api_service/seattle_flu_incidence_mapper/generic_models.py
10 5 0
modelTrainR <- function()
in incidenceMapR/R/modelTrainR.R
25 5 1
saveModel <- function()
in modelServR/R/saveModel.R
68 5 3
def delete_old_models()
in api_service/migrations/versions/2c92fa01c7ef_.py
11 4 0
def insert_one_model()
in api_service/seattle_flu_incidence_mapper/generic_models.py
21 4 2