aws-samples / mangrove-landcover-classification
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 12 units with 174 lines of code in units (82.5% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (87 lines of code)
    • 2 small units (39 lines of code)
    • 7 very small units (48 lines of code)
0% | 0% | 50% | 22% | 27%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 50% | 22% | 27%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 0% | 50% | 22% | 27%
Alternative Visuals
Longest Units
Top 12 longest units
Unit# linesMcCabe index# params
def plot_inference()
in src/plot_utils.py
37 6 5
def split_dataset()
in src/data_utils.py
27 10 3
def get_model_prediction()
in src/inf_utils.py
23 4 4
def plot_bands()
in src/plot_utils.py
20 5 2
def main()
in src/data_utils.py
19 6 0
def sample_points()
in src/data_utils.py
10 1 6
def save_regional_data()
in src/data_utils.py
9 1 3
def satellite_data()
in src/data_utils.py
8 1 3
def points_to_df()
in src/data_utils.py
7 1 1
def get_data_by_zone_year()
in src/data_utils.py
7 1 0
def get_masks()
in src/data_utils.py
5 1 1
def get_mangrove_data()
in src/data_utils.py
2 1 0