Author

Carolyn Koehn

Reading in the data

Read spreadsheet into R:

Code
library(sf)
library(tidyverse)

file.to.read <- read_csv(file = "/opt/data/data/assignment01/landmarks_ID.csv", col_names = TRUE, col_type = NULL, na = c("", NA))

file.as.sf <- st_as_sf(file.to.read, coords = c("longitude", "lattitude"), crs=4326)
Linking to GEOS 3.11.2, GDAL 3.8.2, PROJ 9.3.1; sf_use_s2() is TRUE
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.4     ✔ readr     2.1.5
✔ forcats   1.0.0     ✔ stringr   1.4.0
✔ ggplot2   3.5.1     ✔ tibble    3.2.1
✔ lubridate 1.9.3     ✔ tidyr     1.3.1
✔ purrr     1.0.2     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
Rows: 12169 Columns: 7
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (3): ANSICODE, FULLNAME, MTFCC
dbl (4): STATEFP, POINTID, longitude, lattitude

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

Read in a shapefile:

Code
shapefile.inR <- read_sf(dsn = "/opt/data/data/assignment01/cejst_nw.shp")

Read in a raster:

Code
library(terra)
raster.inR <- rast(x = "/opt/data/data/assignment01/wildfire_hazard_agg.tif")
terra 1.7.78

Attaching package: 'terra'
The following object is masked from 'package:tidyr':

    extract

Introducing yourself to vector data

Structure of the data:

Code
str(shapefile.inR)
sf [2,590 × 124] (S3: sf/tbl_df/tbl/data.frame)
 $ GEOID10   : chr [1:2590] "16019970700" "16025970100" "16027021700" "16027020700" ...
 $ SF        : chr [1:2590] "Idaho" "Idaho" "Idaho" "Idaho" ...
 $ CF        : chr [1:2590] "Bonneville County" "Camas County" "Canyon County" "Canyon County" ...
 $ DF_PFS    : num [1:2590] 0.44 0.67 0.74 0.48 0.75 0.8 0.76 0.72 0.76 0.52 ...
 $ AF_PFS    : num [1:2590] 0.73 0.65 0.86 0.63 0.79 0.88 0.86 0.79 0.8 0.65 ...
 $ HDF_PFS   : num [1:2590] 0.57 0.79 0.69 0.47 0.72 0.55 0.53 0.71 0.74 0.45 ...
 $ DSF_PFS   : num [1:2590] 0.53 0 0.58 0.46 0.12 0.79 0.68 0.27 0.06 0.11 ...
 $ EBF_PFS   : num [1:2590] 0.63 0.95 0.54 0.3 0.63 0.81 0.81 0.44 0.73 0.52 ...
 $ EALR_PFS  : num [1:2590] 0.55 0.83 0.63 0.63 0.65 NA 0.41 0.64 0.65 0.64 ...
 $ EBLR_PFS  : num [1:2590] 0.19 0.93 0.05 0.55 0.09 0.09 0.08 0.09 0.47 0.17 ...
 $ EPLR_PFS  : num [1:2590] 0.8 0.99 0.09 0.1 0.11 0.31 0.08 0.09 0.1 0.09 ...
 $ HBF_PFS   : num [1:2590] 0.69 0.6 0.53 0.07 0.46 0.86 0.93 0.22 0.53 0.28 ...
 $ LLEF_PFS  : num [1:2590] 0.73 0.48 0.67 0.29 0.51 0.87 0.62 0.38 0.32 0.26 ...
 $ LIF_PFS   : num [1:2590] 0.54 0.54 0.53 0.12 0.48 0.61 0.88 0.46 0.41 0.32 ...
 $ LMI_PFS   : num [1:2590] 0.81 0.75 0.61 0.25 0.55 0.92 0.95 0.44 0.42 0.35 ...
 $ PM25F_PFS : num [1:2590] 0.11 0 0.68 0.63 0.42 0.66 0.69 0.57 0.26 0.4 ...
 $ HSEF      : num [1:2590] 0.14 0.06 0.2 0.08 0.21 0.24 0.31 0.18 0.18 0.09 ...
 $ P100_PFS  : num [1:2590] 0.83 0.63 0.47 0.24 0.6 0.72 0.93 0.27 0.39 0.33 ...
 $ P200_I_PFS: num [1:2590] 0.86 0.71 0.81 0.39 0.75 0.98 0.91 0.49 0.67 0.54 ...
 $ AJDLI_ET  : int [1:2590] 1 1 1 0 1 1 1 0 1 1 ...
 $ LPF_PFS   : num [1:2590] 0.75 0.52 0.26 0.3 0.65 0.62 0.63 0.4 0.51 0.36 ...
 $ KP_PFS    : num [1:2590] 0.86 0.21 0.84 0.21 0.61 0.57 0.21 0.43 0.9 0.21 ...
 $ NPL_PFS   : num [1:2590] 0.09 0.05 0.06 0.08 0.03 0.08 0.05 0.05 0.08 0.1 ...
 $ RMP_PFS   : num [1:2590] 0.49 0.01 0.56 0.84 0.26 0.96 0.58 0.36 0.1 0.2 ...
 $ TSDF_PFS  : num [1:2590] 0.22 0.01 0.14 0.42 0.07 0.55 0.13 0.11 0.1 0.19 ...
 $ TPF       : num [1:2590] 5589 1048 11701 3901 5059 ...
 $ TF_PFS    : num [1:2590] 0.55 0.06 0.54 0.53 0.28 0.71 0.83 0.24 0.05 0.09 ...
 $ UF_PFS    : num [1:2590] 0.61 0.16 0.64 0.33 0.66 0.86 0.8 0.45 0.47 0.61 ...
 $ WF_PFS    : num [1:2590] 0.03 0.11 0.98 0.24 0.79 0.98 0.98 0.85 0.42 0.04 ...
 $ UST_PFS   : num [1:2590] 0.59 0.02 0.44 0.31 0.17 0.73 0.83 0.13 0.06 0.18 ...
 $ N_WTR     : int [1:2590] 0 0 1 0 0 1 1 0 0 0 ...
 $ N_WKFC    : int [1:2590] 0 0 0 0 0 1 1 0 0 0 ...
 $ N_CLT     : int [1:2590] 0 1 0 0 0 1 1 0 0 0 ...
 $ N_ENY     : int [1:2590] 0 1 0 0 0 0 0 0 0 0 ...
 $ N_TRN     : int [1:2590] 0 0 0 0 0 0 0 0 1 0 ...
 $ N_HSG     : int [1:2590] 0 0 0 0 0 0 1 0 1 0 ...
 $ N_PLN     : int [1:2590] 0 0 0 0 0 1 0 0 0 0 ...
 $ N_HLTH    : int [1:2590] 0 0 0 0 0 0 0 0 0 0 ...
 $ SN_C      : int [1:2590] 0 1 1 0 0 1 1 0 1 0 ...
 $ SN_T      : chr [1:2590] NA NA NA NA ...
 $ DLI       : int [1:2590] 0 0 0 0 0 0 0 0 0 0 ...
 $ ALI       : int [1:2590] 0 0 0 0 0 0 0 0 0 0 ...
 $ PLHSE     : int [1:2590] 0 0 0 0 0 0 1 0 0 0 ...
 $ LMILHSE   : int [1:2590] 0 0 0 0 0 1 1 0 0 0 ...
 $ ULHSE     : int [1:2590] 0 0 0 0 0 0 0 0 0 0 ...
 $ EPL_ET    : int [1:2590] 0 1 0 0 0 0 0 0 0 0 ...
 $ EAL_ET    : int [1:2590] 0 0 0 0 0 0 0 0 0 0 ...
 $ EBL_ET    : int [1:2590] 0 1 0 0 0 0 0 0 0 0 ...
 $ EB_ET     : int [1:2590] 0 1 0 0 0 0 0 0 0 0 ...
 $ PM25_ET   : int [1:2590] 0 0 0 0 0 0 0 0 0 0 ...
 $ DS_ET     : int [1:2590] 0 0 0 0 0 0 0 0 0 0 ...
 $ TP_ET     : int [1:2590] 0 0 0 0 0 0 0 0 0 0 ...
 $ LPP_ET    : int [1:2590] 0 0 0 0 0 0 0 0 0 0 ...
 $ HRS_ET    : chr [1:2590] NA NA NA NA ...
 $ KP_ET     : int [1:2590] 0 0 0 0 0 0 0 0 1 0 ...
 $ HB_ET     : int [1:2590] 0 0 0 0 0 0 1 0 0 0 ...
 $ RMP_ET    : int [1:2590] 0 0 0 0 0 1 0 0 0 0 ...
 $ NPL_ET    : int [1:2590] 0 0 0 0 0 0 0 0 0 0 ...
 $ TSDF_ET   : int [1:2590] 0 0 0 0 0 0 0 0 0 0 ...
 $ WD_ET     : int [1:2590] 0 0 1 0 0 1 1 0 0 0 ...
 $ UST_ET    : int [1:2590] 0 0 0 0 0 0 0 0 0 0 ...
 $ DB_ET     : int [1:2590] 0 0 0 0 0 0 0 0 0 0 ...
 $ A_ET      : int [1:2590] 0 0 0 0 0 0 0 0 0 0 ...
 $ HD_ET     : int [1:2590] 0 0 0 0 0 0 0 0 0 0 ...
 $ LLE_ET    : int [1:2590] 0 0 0 0 0 0 0 0 0 0 ...
 $ UN_ET     : int [1:2590] 0 0 0 0 0 0 0 0 0 0 ...
 $ LISO_ET   : int [1:2590] 0 0 0 0 0 0 0 0 0 0 ...
 $ POV_ET    : int [1:2590] 0 0 0 0 0 0 1 0 0 0 ...
 $ LMI_ET    : int [1:2590] 0 0 0 0 0 1 1 0 0 0 ...
 $ IA_LMI_ET : int [1:2590] 0 0 0 0 0 0 0 0 0 0 ...
 $ IA_UN_ET  : int [1:2590] 0 0 0 0 0 0 0 0 0 0 ...
 $ IA_POV_ET : int [1:2590] 0 0 0 0 0 0 0 0 0 0 ...
 $ TC        : num [1:2590] 0 3 1 0 0 4 5 0 2 0 ...
 $ CC        : num [1:2590] 0 2 1 0 0 4 4 0 2 0 ...
 $ IAULHSE   : int [1:2590] 0 0 0 0 0 0 0 0 0 0 ...
 $ IAPLHSE   : int [1:2590] 0 0 0 0 0 0 0 0 0 0 ...
 $ IALMILHSE : int [1:2590] 0 0 0 0 0 0 0 0 0 0 ...
 $ IALMIL_76 : num [1:2590] NA NA NA NA NA NA NA NA NA NA ...
 $ IAPLHS_77 : num [1:2590] NA NA NA NA NA NA NA NA NA NA ...
 $ IAULHS_78 : num [1:2590] NA NA NA NA NA NA NA NA NA NA ...
 $ LHE       : int [1:2590] 1 0 1 0 1 1 1 1 1 0 ...
 $ IALHE     : int [1:2590] 0 0 0 0 0 0 0 0 0 0 ...
 $ IAHSEF    : num [1:2590] NA NA NA NA NA NA NA NA NA NA ...
 $ N_CLT_EOMI: int [1:2590] 0 1 0 0 0 1 1 0 0 0 ...
 $ N_ENY_EOMI: int [1:2590] 0 1 0 0 0 0 0 0 0 0 ...
 $ N_TRN_EOMI: int [1:2590] 0 0 0 0 0 0 0 1 1 0 ...
 $ N_HSG_EOMI: int [1:2590] 0 0 0 0 0 0 1 0 1 0 ...
 $ N_PLN_EOMI: int [1:2590] 0 0 0 0 0 1 0 0 0 0 ...
 $ N_WTR_EOMI: int [1:2590] 0 0 1 0 0 1 1 0 0 0 ...
 $ N_HLTH_88 : int [1:2590] 0 0 0 0 0 0 0 0 0 0 ...
 $ N_WKFC_89 : int [1:2590] 0 0 0 0 0 1 1 0 0 0 ...
 $ FPL200S   : int [1:2590] 1 1 1 0 1 1 1 0 1 0 ...
 $ N_WKFC_91 : int [1:2590] 1 0 1 0 1 1 1 1 1 0 ...
 $ TD_ET     : int [1:2590] 0 0 0 0 0 0 0 1 1 0 ...
 $ TD_PFS    : num [1:2590] 0.67 0.78 0.6 0.63 0.85 0.35 0.29 0.94 0.91 0.78 ...
 $ FLD_PFS   : num [1:2590] 0.83 0.88 0.43 0.24 0.82 0.93 0.97 0.44 0.49 0.71 ...
 $ WFR_PFS   : num [1:2590] 0.7 0.82 0.33 0.87 0.8 0.33 0.83 0.77 0.81 0.78 ...
 $ FLD_ET    : int [1:2590] 0 0 0 0 0 1 1 0 0 0 ...
 $ WFR_ET    : int [1:2590] 0 0 0 0 0 0 0 0 0 0 ...
  [list output truncated]
 - attr(*, "sf_column")= chr "geometry"
 - attr(*, "agr")= Factor w/ 3 levels "constant","aggregate",..: NA NA NA NA NA NA NA NA NA NA ...
  ..- attr(*, "names")= chr [1:123] "GEOID10" "SF" "CF" "DF_PFS" ...

Number of rows and columns:

Code
nrow(shapefile.inR)
[1] 2590
Code
ncol(shapefile.inR)
[1] 124

Column names:

Code
colnames(shapefile.inR)
  [1] "GEOID10"    "SF"         "CF"         "DF_PFS"     "AF_PFS"    
  [6] "HDF_PFS"    "DSF_PFS"    "EBF_PFS"    "EALR_PFS"   "EBLR_PFS"  
 [11] "EPLR_PFS"   "HBF_PFS"    "LLEF_PFS"   "LIF_PFS"    "LMI_PFS"   
 [16] "PM25F_PFS"  "HSEF"       "P100_PFS"   "P200_I_PFS" "AJDLI_ET"  
 [21] "LPF_PFS"    "KP_PFS"     "NPL_PFS"    "RMP_PFS"    "TSDF_PFS"  
 [26] "TPF"        "TF_PFS"     "UF_PFS"     "WF_PFS"     "UST_PFS"   
 [31] "N_WTR"      "N_WKFC"     "N_CLT"      "N_ENY"      "N_TRN"     
 [36] "N_HSG"      "N_PLN"      "N_HLTH"     "SN_C"       "SN_T"      
 [41] "DLI"        "ALI"        "PLHSE"      "LMILHSE"    "ULHSE"     
 [46] "EPL_ET"     "EAL_ET"     "EBL_ET"     "EB_ET"      "PM25_ET"   
 [51] "DS_ET"      "TP_ET"      "LPP_ET"     "HRS_ET"     "KP_ET"     
 [56] "HB_ET"      "RMP_ET"     "NPL_ET"     "TSDF_ET"    "WD_ET"     
 [61] "UST_ET"     "DB_ET"      "A_ET"       "HD_ET"      "LLE_ET"    
 [66] "UN_ET"      "LISO_ET"    "POV_ET"     "LMI_ET"     "IA_LMI_ET" 
 [71] "IA_UN_ET"   "IA_POV_ET"  "TC"         "CC"         "IAULHSE"   
 [76] "IAPLHSE"    "IALMILHSE"  "IALMIL_76"  "IAPLHS_77"  "IAULHS_78" 
 [81] "LHE"        "IALHE"      "IAHSEF"     "N_CLT_EOMI" "N_ENY_EOMI"
 [86] "N_TRN_EOMI" "N_HSG_EOMI" "N_PLN_EOMI" "N_WTR_EOMI" "N_HLTH_88" 
 [91] "N_WKFC_89"  "FPL200S"    "N_WKFC_91"  "TD_ET"      "TD_PFS"    
 [96] "FLD_PFS"    "WFR_PFS"    "FLD_ET"     "WFR_ET"     "ADJ_ET"    
[101] "IS_PFS"     "IS_ET"      "AML_ET"     "FUDS_RAW"   "FUDS_ET"   
[106] "IMP_FLG"    "DM_B"       "DM_AI"      "DM_A"       "DM_HI"     
[111] "DM_T"       "DM_W"       "DM_H"       "DM_O"       "AGE_10"    
[116] "AGE_MIDDLE" "AGE_OLD"    "TA_COU_116" "TA_COUNT_C" "TA_PERC"   
[121] "TA_PERC_FE" "UI_EXP"     "THRHLD"     "geometry"  

First few rows of data:

Code
head(file.as.sf, n = 6)
Simple feature collection with 6 features and 5 fields
Geometry type: POINT
Dimension:     XY
Bounding box:  xmin: -116.7492 ymin: 43.18526 xmax: -111.3299 ymax: 43.80765
Geodetic CRS:  WGS 84
# A tibble: 6 × 6
  STATEFP ANSICODE       POINTID FULLNAME        MTFCC             geometry
    <dbl> <chr>            <dbl> <chr>           <chr>          <POINT [°]>
1      16 NA        110680906449 State Hospital… K1231 (-112.3351 43.18526)
2      16 00390731 1102653699212 Snake River Ra… C3081 (-111.4147 43.45992)
3      16 00395965 1102653699303 South Falls Ctr C3081  (-112.0222 43.4813)
4      16 00399195 1102653700141 Swan Valley Ra… C3081 (-111.3299 43.44797)
5      16 00382976 1102653683820 Hawley Gulch R… C3081 (-111.5744 43.65464)
6      16 00398090 1102653708691 Sand Holw       C3081 (-116.7492 43.80765)

Simple plotting:

Code
plot(st_geometry(shapefile.inR))

Code
plot(shapefile.inR["AGE_10"])

CRS of vector:

Code
st_crs(shapefile.inR)
Coordinate Reference System:
  User input: WGS 84 
  wkt:
GEOGCRS["WGS 84",
    DATUM["World Geodetic System 1984",
        ELLIPSOID["WGS 84",6378137,298.257223563,
            LENGTHUNIT["metre",1]]],
    PRIMEM["Greenwich",0,
        ANGLEUNIT["degree",0.0174532925199433]],
    CS[ellipsoidal,2],
        AXIS["latitude",north,
            ORDER[1],
            ANGLEUNIT["degree",0.0174532925199433]],
        AXIS["longitude",east,
            ORDER[2],
            ANGLEUNIT["degree",0.0174532925199433]],
    ID["EPSG",4326]]

Introducing yourself to raster data

Describe raster before reading it in:

Code
describe("/opt/data/data/assignment01/wildfire_hazard_agg.tif")
 [1] "Driver: GTiff/GeoTIFF"                                                                                 
 [2] "Files: C:/Users/carolynkoehn/Documents/HES505_Fall_2024/data/2023/assignment01/wildfire_hazard_agg.tif"
 [3] "Size is 4607, 4016"                                                                                    
 [4] "Coordinate System is:"                                                                                 
 [5] "PROJCRS[\"unnamed\","                                                                                  
 [6] "    BASEGEOGCRS[\"NAD83\","                                                                            
 [7] "        DATUM[\"North American Datum 1983\","                                                          
 [8] "            ELLIPSOID[\"GRS 1980\",6378137,298.257222101004,"                                          
 [9] "                LENGTHUNIT[\"metre\",1]]],"                                                            
[10] "        PRIMEM[\"Greenwich\",0,"                                                                       
[11] "            ANGLEUNIT[\"degree\",0.0174532925199433]],"                                                
[12] "        ID[\"EPSG\",4269]],"                                                                           
[13] "    CONVERSION[\"Albers Equal Area\","                                                                 
[14] "        METHOD[\"Albers Equal Area\","                                                                 
[15] "            ID[\"EPSG\",9822]],"                                                                       
[16] "        PARAMETER[\"Latitude of false origin\",23,"                                                    
[17] "            ANGLEUNIT[\"degree\",0.0174532925199433],"                                                 
[18] "            ID[\"EPSG\",8821]],"                                                                       
[19] "        PARAMETER[\"Longitude of false origin\",-96,"                                                  
[20] "            ANGLEUNIT[\"degree\",0.0174532925199433],"                                                 
[21] "            ID[\"EPSG\",8822]],"                                                                       
[22] "        PARAMETER[\"Latitude of 1st standard parallel\",29.5,"                                         
[23] "            ANGLEUNIT[\"degree\",0.0174532925199433],"                                                 
[24] "            ID[\"EPSG\",8823]],"                                                                       
[25] "        PARAMETER[\"Latitude of 2nd standard parallel\",45.5,"                                         
[26] "            ANGLEUNIT[\"degree\",0.0174532925199433],"                                                 
[27] "            ID[\"EPSG\",8824]],"                                                                       
[28] "        PARAMETER[\"Easting at false origin\",0,"                                                      
[29] "            LENGTHUNIT[\"metre\",1],"                                                                  
[30] "            ID[\"EPSG\",8826]],"                                                                       
[31] "        PARAMETER[\"Northing at false origin\",0,"                                                     
[32] "            LENGTHUNIT[\"metre\",1],"                                                                  
[33] "            ID[\"EPSG\",8827]]],"                                                                      
[34] "    CS[Cartesian,2],"                                                                                  
[35] "        AXIS[\"easting\",east,"                                                                        
[36] "            ORDER[1],"                                                                                 
[37] "            LENGTHUNIT[\"metre\",1,"                                                                   
[38] "                ID[\"EPSG\",9001]]],"                                                                  
[39] "        AXIS[\"northing\",north,"                                                                      
[40] "            ORDER[2],"                                                                                 
[41] "            LENGTHUNIT[\"metre\",1,"                                                                   
[42] "                ID[\"EPSG\",9001]]]]"                                                                  
[43] "Data axis to CRS axis mapping: 1,2"                                                                    
[44] "Origin = (-2294745.000000000000000,3172575.000000000000000)"                                           
[45] "Pixel Size = (240.000000000000000,-240.000000000000000)"                                               
[46] "Metadata:"                                                                                             
[47] "  AREA_OR_POINT=Area"                                                                                  
[48] "Image Structure Metadata:"                                                                             
[49] "  COMPRESSION=LZW"                                                                                     
[50] "  INTERLEAVE=BAND"                                                                                     
[51] "Corner Coordinates:"                                                                                   
[52] "Upper Left  (-2294745.000, 3172575.000) (127d 6'55.97\"W, 48d 8'21.26\"N)"                             
[53] "Lower Left  (-2294745.000, 2208735.000) (123d27'25.80\"W, 39d53'32.24\"N)"                             
[54] "Upper Right (-1189065.000, 3172575.000) (112d33'19.93\"W, 50d38'58.88\"N)"                             
[55] "Lower Right (-1189065.000, 2208735.000) (110d31'22.39\"W, 42d 3'38.51\"N)"                             
[56] "Center      (-1741905.000, 2690655.000) (118d26'35.33\"W, 45d20'39.18\"N)"                             
[57] "Band 1 Block=4607x1 Type=Float32, ColorInterp=Gray"                                                    
[58] "  Description = WHP_ID"                                                                                
[59] "  Min=0.000 Max=64185.656 "                                                                            
[60] "  Minimum=0.000, Maximum=64185.656, Mean=-9999.000, StdDev=-9999.000"                                  
[61] "  NoData Value=nan"                                                                                    
[62] "  Metadata:"                                                                                           
[63] "    STATISTICS_MAXIMUM=64185.65625"                                                                    
[64] "    STATISTICS_MEAN=-9999"                                                                             
[65] "    STATISTICS_MINIMUM=0"                                                                              
[66] "    STATISTICS_STDDEV=-9999"                                                                           

Basic object info:

Code
raster.inR
class       : SpatRaster 
dimensions  : 4016, 4607, 1  (nrow, ncol, nlyr)
resolution  : 240, 240  (x, y)
extent      : -2294745, -1189065, 2208735, 3172575  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=aea +lat_0=23 +lon_0=-96 +lat_1=29.5 +lat_2=45.5 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs 
source      : wildfire_hazard_agg.tif 
name        :   WHP_ID 
min value   :     0.00 
max value   : 64185.66 

Summary of values:

Code
# Summary of all values
summary(values(raster.inR))
     WHP_ID       
 Min.   :    0    
 1st Qu.:   85    
 Median :  242    
 Mean   :  952    
 3rd Qu.:  668    
 Max.   :64186    
 NA's   :7349366  
Code
# Summary of some values
summary(raster.inR)
Warning: [summary] used a sample
     WHP_ID        
 Min.   :    0.00  
 1st Qu.:   83.91  
 Median :  242.20  
 Mean   :  949.59  
 3rd Qu.:  666.39  
 Max.   :57327.66  
 NA's   :39866     

Basic plot:

Code
plot(raster.inR)

Code
#Change color of NA
plot(raster.inR, colNA = "black")

CRS of raster:

Code
crs(raster.inR)
[1] "PROJCRS[\"unnamed\",\n    BASEGEOGCRS[\"NAD83\",\n        DATUM[\"North American Datum 1983\",\n            ELLIPSOID[\"GRS 1980\",6378137,298.257222101004,\n                LENGTHUNIT[\"metre\",1]]],\n        PRIMEM[\"Greenwich\",0,\n            ANGLEUNIT[\"degree\",0.0174532925199433]],\n        ID[\"EPSG\",4269]],\n    CONVERSION[\"Albers Equal Area\",\n        METHOD[\"Albers Equal Area\",\n            ID[\"EPSG\",9822]],\n        PARAMETER[\"Latitude of false origin\",23,\n            ANGLEUNIT[\"degree\",0.0174532925199433],\n            ID[\"EPSG\",8821]],\n        PARAMETER[\"Longitude of false origin\",-96,\n            ANGLEUNIT[\"degree\",0.0174532925199433],\n            ID[\"EPSG\",8822]],\n        PARAMETER[\"Latitude of 1st standard parallel\",29.5,\n            ANGLEUNIT[\"degree\",0.0174532925199433],\n            ID[\"EPSG\",8823]],\n        PARAMETER[\"Latitude of 2nd standard parallel\",45.5,\n            ANGLEUNIT[\"degree\",0.0174532925199433],\n            ID[\"EPSG\",8824]],\n        PARAMETER[\"Easting at false origin\",0,\n            LENGTHUNIT[\"metre\",1],\n            ID[\"EPSG\",8826]],\n        PARAMETER[\"Northing at false origin\",0,\n            LENGTHUNIT[\"metre\",1],\n            ID[\"EPSG\",8827]]],\n    CS[Cartesian,2],\n        AXIS[\"easting\",east,\n            ORDER[1],\n            LENGTHUNIT[\"metre\",1,\n                ID[\"EPSG\",9001]]],\n        AXIS[\"northing\",north,\n            ORDER[2],\n            LENGTHUNIT[\"metre\",1,\n                ID[\"EPSG\",9001]]]]"
Code
# You can also use st_crs!
st_crs(raster.inR)
Coordinate Reference System:
  User input: unnamed 
  wkt:
PROJCRS["unnamed",
    BASEGEOGCRS["NAD83",
        DATUM["North American Datum 1983",
            ELLIPSOID["GRS 1980",6378137,298.257222101004,
                LENGTHUNIT["metre",1]]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["degree",0.0174532925199433]],
        ID["EPSG",4269]],
    CONVERSION["Albers Equal Area",
        METHOD["Albers Equal Area",
            ID["EPSG",9822]],
        PARAMETER["Latitude of false origin",23,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8821]],
        PARAMETER["Longitude of false origin",-96,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8822]],
        PARAMETER["Latitude of 1st standard parallel",29.5,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8823]],
        PARAMETER["Latitude of 2nd standard parallel",45.5,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8824]],
        PARAMETER["Easting at false origin",0,
            LENGTHUNIT["metre",1],
            ID["EPSG",8826]],
        PARAMETER["Northing at false origin",0,
            LENGTHUNIT["metre",1],
            ID["EPSG",8827]]],
    CS[Cartesian,2],
        AXIS["easting",east,
            ORDER[1],
            LENGTHUNIT["metre",1,
                ID["EPSG",9001]]],
        AXIS["northing",north,
            ORDER[2],
            LENGTHUNIT["metre",1,
                ID["EPSG",9001]]]]