Skip to contents

Calculate grade for each index and subwatershed

Usage

calculate_grades(all_scores)

Arguments

all_scores

compiled scores for each metric and subwatershed

Value

List of three dataframes: index_grades, overall_grades, graphics

Examples

calculate_grades(df_all_scores_example)
#> $index_grades
#> # A tibble: 100 × 8
#>    sci_subshed       index index_score max_index_score index_percent index_grade
#>    <chr>             <chr>       <dbl>           <dbl>         <dbl> <chr>      
#>  1 Battery Kemble C… Aqua…        24                40          60   D          
#>  2 Battery Kemble C… Huma…        24.7              30          82.3 B          
#>  3 Battery Kemble C… Hydr…         6                10          60   D          
#>  4 Battery Kemble C… Wate…        52.5              70          74.9 C          
#>  5 Broad Branch      Aqua…        22                40          55   F          
#>  6 Broad Branch      Huma…        19.1              30          63.7 D          
#>  7 Broad Branch      Hydr…         2                10          20   F          
#>  8 Broad Branch      Wate…        53.1              70          75.8 C          
#>  9 Dalecarlia Tribu… Aqua…        12                40          30   F          
#> 10 Dalecarlia Tribu… Huma…        21.0              30          70.2 C          
#> # ℹ 90 more rows
#> # ℹ 2 more variables: index_underscore <chr>, image_file <chr>
#> 
#> $overall_grades
#> # A tibble: 25 × 6
#>    sci_subshed  max_overall_score overall_percent overall_grade index image_file
#>    <chr>                    <dbl>           <dbl> <chr>         <chr> <chr>     
#>  1 Battery Kem…               150            71.4 C             Over… template_…
#>  2 Broad Branch               150            64.1 D             Over… template_…
#>  3 Dalecarlia …               150            50.8 F             Over… template_…
#>  4 Dumbarton O…               150            67.6 D             Over… template_…
#>  5 Fenwick Bra…               150            68.3 D             Over… template_…
#>  6 Fort Chapli…               150            51.2 F             Over… template_…
#>  7 Fort Davis …               150            43.2 F             Over… template_…
#>  8 Fort Dupont…               150            52.5 F             Over… template_…
#>  9 Fort Stanto…               150            53.3 F             Over… template_…
#> 10 Foundry Bra…               140            58.3 F             Over… template_…
#> # ℹ 15 more rows
#> 
#> $graphics
#> # A tibble: 125 × 3
#>    sci_subshed          index         image_file                                
#>    <chr>                <chr>         <chr>                                     
#>  1 Battery Kemble Creek Aquatic Life  template_files/graphic_pieces/Aquatic_Lif…
#>  2 Battery Kemble Creek Human Health  template_files/graphic_pieces/Human_Healt…
#>  3 Battery Kemble Creek Hydrology     template_files/graphic_pieces/Hydrology_D…
#>  4 Battery Kemble Creek Water Quality template_files/graphic_pieces/Water_Quali…
#>  5 Broad Branch         Aquatic Life  template_files/graphic_pieces/Aquatic_Lif…
#>  6 Broad Branch         Human Health  template_files/graphic_pieces/Human_Healt…
#>  7 Broad Branch         Hydrology     template_files/graphic_pieces/Hydrology_F…
#>  8 Broad Branch         Water Quality template_files/graphic_pieces/Water_Quali…
#>  9 Dalecarlia Tributary Aquatic Life  template_files/graphic_pieces/Aquatic_Lif…
#> 10 Dalecarlia Tributary Human Health  template_files/graphic_pieces/Human_Healt…
#> # ℹ 115 more rows
#>