Skip to content

Jse 06jan2023 #10

Merged
merged 10 commits into from Jan 6, 2023
1 change: 1 addition & 0 deletions .rcsignore
@@ -0,0 +1 @@
dataset_generator.R
4 changes: 4 additions & 0 deletions .rscignore
@@ -1 +1,5 @@
state_reservoirs_spatial_ny.Rds
points_in_state_ny.Rds
tab20_tract20_tract10_natl.tsv
debug.R
dataset_generator.R
16 changes: 11 additions & 5 deletions app.R
@@ -1,3 +1,4 @@
# See: https://github.rpi.edu/RensselaerIDEA/CohoesPVApp
library(usmap)
library(ggplot2)
library(plotly)
Expand Down Expand Up @@ -40,12 +41,14 @@ transformed <- usmap_transform(transformed)

# Helper functions =====
# Load states data
state_choices <- data.frame(state.name, state.abb)
names(state_choices) <- c('State', 'Abbreviation')
# Format state names
state_choices$Adjusted_Name <- tolower(state_choices$State)
state_choices$Adjusted_Name <- sub(' ', '_', state_choices$Adjusted_Name)
# state_choices <- data.frame(state.name, state.abb)
# names(state_choices) <- c('State', 'Abbreviation')
# # Format state names
# state_choices$Adjusted_Name <- tolower(state_choices$State)
# state_choices$Adjusted_Name <- sub(' ', '_', state_choices$Adjusted_Name)

state_choices <- readRDS("data/general/state_choices.Rds")

# Linear regression model for determining zoom level
# Data
long_data <- c(0.972210, 0.100498, 3.206336, 3.723576, 0.410752, 7.002313, 0.628595, 0.111407,
Expand Down Expand Up @@ -190,6 +193,9 @@ ui <- fluidPage(
"Select a congressional district (left) to highlight census tracts
in that district."
),
tags$li(
"NEW (Jan 2023): Congressional district boundaries for the ", tags$b("118th Congress")," are shown."
),
),
tags$br(),
leafletOutput('reservoir_map', height = '700'),
Expand Down
Binary file added data/cd118_shapes/congress.dbf
Binary file not shown.
1 change: 1 addition & 0 deletions data/cd118_shapes/congress.prj
@@ -0,0 +1 @@
GEOGCS["WGS84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.017453292519943295]]