6.1_ChildAbuse

Loading Data

Data was obtained from public data source Texas Open Data Portal. Most recent data is as of 01/2025 as of cleaning this data. More information below:

This chart counts victims in completed investigations. Completed investigations only include those cases conducted as a traditional investigation that were not administratively closed or merged into another stage. An investigation can only be administratively closed if all allegations have a disposition of administrative closure. A completed investigation can include more than one alleged victim. Completed investigations do not include any Alternative Response stages.

A confirmed victim on a completed investigation is a child who is a victim on at least one allegation with a disposition of reason to believe.

An unconfirmed victim on a completed investigation is a child who was an alleged victim on at least one allegation with a disposition of unable to complete, unable to determine or ruled out.

For the purposes of this indicator reporting, only confirmed victims are reported.

knitr::opts_chunk$set(echo = TRUE)
library(ipumsr)
library(dplyr)

Attaching package: 'dplyr'
The following objects are masked from 'package:stats':

    filter, lag
The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union
library(ggplot2)
library(tidyr)
children_abuse_2024 <- read.csv("CPI_3.8_Abuse_Neglect_Investigations_-_Alleged_and_Confirmed_Victims_By_County_FY2015-FY2024_20250325.csv")
locations <- read.csv("../../location_countyNames copy.csv") |>
  select(Location, LocationId)

child_pops <- read.csv("../../child_pops.csv") |>
  filter(TimeFrame > 2020) |>
  select(Location, TimeFrame, Data) |>
  rename(population = Data)
years_and_location <- expand.grid(
  year = c(2021, 2022, 2023, 2024),
  location = locations$Location
) |>
  filter(location != "Texas") |>
  rename(Location = location,
         TimeFrame = year)
numbers <- children_abuse_2024 |>
  filter(Fiscal.Year > 2020) |>
  filter(Confirmed.Victims == "Confirmed Victim") |>
  rename(Location = County, 
         TimeFrame = Fiscal.Year, 
         Data = Victims)|>
  right_join(years_and_location, by = c("Location", "TimeFrame")) |>
  select(Location, TimeFrame, Data) |>
  mutate(LocationType = "County") |>
  mutate(DataFormat = "Number") |>
  select(Location, TimeFrame, LocationType, Data, DataFormat)

rates <- numbers |>
  select(-DataFormat) |>
  right_join(child_pops, by = c("Location", "TimeFrame")) |>
  mutate(Rate = ifelse(is.na(Data), Data, (Data/population) * 1000)) |>
  mutate(DataFormat = "Rate per 1,000 children ages 0-17") |>
  select(Location, TimeFrame, Rate, LocationType, DataFormat)|>
  rename(Data = Rate) |>
  select(Location, TimeFrame, LocationType, Data, DataFormat)

head(numbers)
   Location TimeFrame LocationType Data DataFormat
1 Armstrong      2024       County    3     Number
2    Bailey      2024       County    9     Number
3   Briscoe      2024       County    2     Number
4    Carson      2024       County   11     Number
5    Castro      2024       County   21     Number
6 Childress      2024       County   13     Number
head(rates)
   Location TimeFrame LocationType      Data                        DataFormat
1 Armstrong      2023       County 15.306122 Rate per 1,000 children ages 0-17
2    Bailey      2023       County  5.494505 Rate per 1,000 children ages 0-17
3   Briscoe      2023       County  3.333333 Rate per 1,000 children ages 0-17
4    Carson      2023       County 11.355034 Rate per 1,000 children ages 0-17
5    Castro      2023       County  9.161041 Rate per 1,000 children ages 0-17
6 Childress      2023       County 15.846539 Rate per 1,000 children ages 0-17
county_data <- rbind(numbers, rates)

State Calculations

state_nums <- numbers |>
  filter(!is.na(Data)) |>
  group_by(TimeFrame) |>
  summarize(Total = sum(Data)) |>
  mutate(Location = "Texas", 
         LocationType = "State", 
         DataFormat = "Number") |>
  rename(Data = Total) |>
  select(Location, TimeFrame, LocationType, Data, DataFormat)
  
  
state_rate <- state_nums |>
  left_join(child_pops, by = c("Location", "TimeFrame")) |>
  mutate(Rate = ifelse(is.na(Data), Data, (Data/population) * 1000)) |>
  mutate(DataFormat = "Rate per 1,000 children ages 0-17") |>
  select(-population, -Data) |>
  rename(Data = Rate) |>
  select(Location, TimeFrame, LocationType, Data, DataFormat)
  

head(state_nums)
# A tibble: 4 × 5
  Location TimeFrame LocationType  Data DataFormat
  <chr>        <dbl> <chr>        <int> <chr>     
1 Texas         2021 State        68508 Number    
2 Texas         2022 State        56942 Number    
3 Texas         2023 State        58114 Number    
4 Texas         2024 State        53535 Number    
head(state_rate)
# A tibble: 4 × 5
  Location TimeFrame LocationType  Data DataFormat                       
  <chr>        <dbl> <chr>        <dbl> <chr>                            
1 Texas         2021 State         9.24 Rate per 1,000 children ages 0-17
2 Texas         2022 State         7.63 Rate per 1,000 children ages 0-17
3 Texas         2023 State         7.74 Rate per 1,000 children ages 0-17
4 Texas         2024 State        NA    Rate per 1,000 children ages 0-17
state_data <- rbind(state_nums, state_rate)
final_data <- rbind(state_data, county_data) |>
  arrange(desc(LocationType), Location, TimeFrame, DataFormat)
write.csv(file = "6.1_ChildAbuse_2021ALL_2024Numbers.csv", final_data, row.names = FALSE)