St. Tammany Parish Assessor

Introduction

This report analyzes parcel data, focusing on assessed versus calculated acreage. The goal is to identify discrepancies and patterns across different users who created the polygons. Note this data set is a test copy.

Data Source: St. Tammany Parish GIS Portal

Data Preparation

Loading and Cleaning the Data

# Read in the parcel data
parcel_data <- read_csv(here("data", "STPAO_PARCEL.csv"))
## Rows: 133129 Columns: 10
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr  (2): CREATE_USE, EDIT_USER
## dbl  (6): REID, ASSESSED_A, DEEDED_ACR, CALCULATED, Shape_STAr, Shape_STLe
## date (2): CREATE_DAT, EDIT_DATE
## 
## ℹ 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.
# Convert necessary columns to numeric
parcel_data <- parcel_data %>%
  mutate(
    ASSESSED_A = as.numeric(ASSESSED_A),
    CALCULATED = as.numeric(CALCULATED)
  )

# Remove invalid or missing values
filtered_data <- parcel_data %>%
  filter(!is.na(ASSESSED_A) & !is.na(CALCULATED) & CALCULATED > 0)

# Handle outliers by keeping only the bottom 95%
if (nrow(filtered_data) > 0) {
  threshold_assessed <- quantile(filtered_data$ASSESSED_A, 0.95, na.rm = TRUE)
  threshold_calculated <- quantile(filtered_data$CALCULATED, 0.95, na.rm = TRUE)
  filtered_data <- filtered_data %>%
    filter(ASSESSED_A <= threshold_assessed & CALCULATED <= threshold_calculated)
}

# Convert CREATE_DAT to date format
filtered_data <- filtered_data %>%
  mutate(CREATE_DAT = as.Date(CREATE_DAT, format = "%Y-%m-%d"))

# Round numeric values for clarity
filtered_data <- filtered_data %>%
  mutate(across(where(is.numeric), ~ round(.x, 2)))

Analysis & Visualization

Number of Parcels by User (Excluding INITIAL)

filtered_data %>%
  filter(CREATE_USE != "INITIAL") %>%
  group_by(CREATE_USE) %>%
  summarise(parcel_count = n()) %>%
  ggplot(aes(x = reorder(CREATE_USE, parcel_count), y = parcel_count)) +
  geom_col(fill = "blue", alpha = 0.7) +
  coord_flip() +
  labs(title = "Parcel Count by User (Excluding INITIAL)",
       x = "User",
       y = "Parcel Count")

Assessed vs. Calculated Acreage

filtered_data %>%
  ggplot(aes(x = ASSESSED_A, y = CALCULATED)) + 
  geom_point(alpha = 0.5) +
  geom_abline(slope = 1, intercept = 0, color = "red", linetype = "dashed") +
  labs(title = "Comparison of Assessed vs. Calculated Acreage",
       subtitle = "Red dashed line represents perfect agreement",
       x = "Assessed Acreage",
       y = "Calculated Acreage")

Distribution of Acreage Differences

filtered_data <- filtered_data %>% mutate(difference = CALCULATED - ASSESSED_A)

filtered_data %>%
  ggplot(aes(x = difference)) +
  geom_histogram(binwidth = 0.5, fill = "blue", alpha = 0.7) +
  labs(title = "Distribution of Acreage Differences",
       subtitle = "Calculated - Assessed Acreage",
       x = "Acreage Difference",
       y = "Frequency")

Acreage Differences by User

filtered_data %>%
  ggplot(aes(x = CREATE_USE, y = difference, fill = CREATE_USE)) +
  geom_boxplot() +
  coord_flip() +
  labs(title = "Acreage Differences by User",
       x = "User",
       y = "Calculated - Assessed Acreage") +
  theme(legend.position = "none")

Correlation Between Assessed and Calculated Acreage

cor_value <- cor(filtered_data$ASSESSED_A, filtered_data$CALCULATED, use = "complete.obs")
cor_value
## [1] 0.8619787

Conclusion

This analysis highlights discrepancies between assessed and calculated acreage, revealing significant variability in the dataset. The scatterplot illustrates considerable noise, emphasizing the extent of these differences. Additionally, the comparison of user-created polygons suggests potential sources of variation contributing to these inconsistencies. Future research could explore the underlying causes of acreage discrepancies and apply statistical methods to identify and analyze outliers more effectively.

References: - Data Source: St. Tammany Parish GIS Portal - R Tidyverse Style Guide: https://style.tidyverse.org/