microsoft / FluMapModel
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 72 units with 1,646 lines of code in units (50.2% of code).
    • 4 very long units (537 lines of code)
    • 5 long units (327 lines of code)
    • 15 medium size units (443 lines of code)
    • 13 small units (180 lines of code)
    • 35 very small units (159 lines of code)
32% | 19% | 26% | 10% | 9%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
R43% | 26% | 23% | 3% | 3%
py0% | 0% | 37% | 33% | 29%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
incidenceMapR/R67% | 9% | 18% | 2% | 1%
dbViewR/R33% | 45% | 21% | 0% | 0%
modelServR/R0% | 73% | 0% | 8% | 18%
modelVisualizeR/R0% | 0% | 85% | 12% | 2%
api_service/seattle_flu_incidence_mapper0% | 0% | 37% | 24% | 38%
ROOT0% | 0% | 86% | 0% | 13%
api_service/migrations0% | 0% | 24% | 60% | 14%
api_service/scripts0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
latentFieldModel <- function()
in incidenceMapR/R/latentFieldModel.R
178 32 4
fluVaxEfficacyModel <- function()
in incidenceMapR/R/fluVaxEfficacyModel.R
133 19 3
smoothModel <- function()
in incidenceMapR/R/smoothModel.R
119 22 4
selectFromDB <- function()
in dbViewR/R/selectFromDB.R
107 23 4
expandDB <- function()
in dbViewR/R/expandDB.R
80 13 1
saveModel <- function()
in modelServR/R/saveModel.R
68 5 3
masterSpatialDB <- function()
in dbViewR/R/masterSpatialDB.R
67 28 3
effectsModel <- function()
in incidenceMapR/R/effectsModel.R
61 10 4
returnModel <- function()
in modelServR/R/returnModel.R
51 8 3
addCensusData <- function()
in dbViewR/R/addCensusData.R
48 8 1
def query()
in api_service/seattle_flu_incidence_mapper/query_model.py
42 8 0
appendLatentFieldData <- function()
in incidenceMapR/R/appendData.R
40 9 2
def get_or_create_model_container()
in api_service/seattle_flu_incidence_mapper/query_model.py
37 6 3
ggplotSmoothEffects <- function()
in modelVisualizeR/R/ggplotWrappers.R
33 2 6
def upload_model()
in upload_models.py
31 9 5
appendCatchmentModel <- function()
in incidenceMapR/R/appendCatchmentModel.R
28 2 4
appendFluVaxEfficacyData <- function()
in incidenceMapR/R/appendData.R
26 1 2
modelTrainR <- function()
in incidenceMapR/R/modelTrainR.R
25 5 1
ggplotLatentMap <- function()
in modelVisualizeR/R/ggplotWrappers.R
24 1 4
ggplotFixedEffects <- function()
in modelVisualizeR/R/ggplotWrappers.R
23 2 5