diff --git a/.gitignore b/.gitignore index 80e7c11..27d5f06 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,7 @@ R/.Rhistory # Ignore helper and scout folders helper/ scout/ + +# temp cache +__pycache__/ +diagnostics/ \ No newline at end of file diff --git a/R/EIA comparison.R b/R/EIA comparison.R index abf44d0..21bd391 100644 --- a/R/EIA comparison.R +++ b/R/EIA comparison.R @@ -47,3 +47,6 @@ eia_comp<-eia_ratios_sector %>% filter(year<2024) %>% facet_wrap(~sector,nrow=2,labeller = labeller(sector=s_label))+ ggtitle("Ratio of max monthly electricity consumption in the winter max to max monthly electricity consumption in the summer",subtitle = "EIA 861 2001-2023 (boxplot) vs. BSS 2024 baseline (red dot)") save_plot(paste0(graph_dir,"/",filename_prefix,"/eia_seasonal_ratio_comp.jpg"),eia_comp,base_height = 6,base_width = 12,bg="white") + +# restore previous working directory, otherwise will mess up python script calls +setwd("../") \ No newline at end of file diff --git a/R/annual_graphs.R b/R/annual_graphs.R index d992968..5895378 100644 --- a/R/annual_graphs.R +++ b/R/annual_graphs.R @@ -19,7 +19,7 @@ scenarios <- c("brk", "fossil", "accel", "aeo", "ref", "state", scenario_for_baseline <- "aeo" # I/O locations (unchanged names) -input_dir <- "../scout_tsv" # where TSVs live +input_dir <- "../scout/scout_tsv" # where TSVs live filename_prefix <- "" graph_dir <- "graphs/annual_results" # where graphs are written @@ -300,3 +300,6 @@ wide_all <- .make_factor(wide, setall_codes) .make_split_plots_for(wide_S1, "_S1", mm_long, states, to, sec, eu, colors) .make_split_plots_for(wide_S2, "_S2", mm_long, states, to, sec, eu, colors) .make_split_plots_for(wide_all, "", mm_long, states, to, sec, eu, colors) + +# restore previous working directory, otherwise will mess up python script calls +setwd("../") \ No newline at end of file diff --git a/R/calibration.R b/R/calibration.R index 739dc61..4cdc039 100644 --- a/R/calibration.R +++ b/R/calibration.R @@ -1,5 +1,6 @@ - -setwd("R") +if (basename(getwd()) != "R") { + setwd("R") +} #install the packages if they're not already installed packages <- c("tidyverse", "scales", "cowplot", "maps", "mapdata", "colorspace") install.packages(setdiff(packages, rownames(installed.packages()))) @@ -22,14 +23,17 @@ eia_gross<-read_csv("../map_meas/eia_gross_consumption_by_state_sector_year_mont state_monthly<-read_csv("../diagnostics/state_monthly_for_cal.csv") # if you have TMY -state_monthly_tmy<-read_csv("../diagnostics/state_monthly_for_cal_tmy.csv") %>% - mutate(type="state_monthly_tmy_kwh") %>% rename("kwh"="state_monthly_tmy_kwh") +if (file.exists("../diagnostics/state_monthly_for_cal_tmy.csv")) { + state_monthly_tmy<-read_csv("../diagnostics/state_monthly_for_cal_tmy.csv") %>% + mutate(type="state_monthly_tmy_kwh") %>% rename("kwh"="state_monthly_tmy_kwh") +} type_label<-c(state_monthly_uncal_kwh="BSS uncalibrated",state_monthly_cal_kwh="BSS calibrated",state_monthly_tmy_kwh="BSS uncalibrated, TMY weather") s_label<-c(com="Commercial",res="Residential",all="Buildings") # calculate monthly state-level calibration ratios ------------------------ monthly_ratios<-state_monthly %>% + dplyr::mutate_at(vars(month, year), as.numeric) %>% inner_join(eia_gross,by=c("in.state","month","sector","year")) %>% mutate(gross_over_bss=gross.kWh/state_monthly_uncal_kwh, net_over_bss=sales.kWh/state_monthly_uncal_kwh) %>% @@ -133,3 +137,6 @@ ggplot(aes(x=x,y=y))+ save_plot(plot_grid(quadgraph,leg,nrow = 1,rel_widths = c(4,1)),filename = "graphs/fig_max_ratios.jpg",base_height = 7,bg = "white") + +# restore previous base directory +setwd("../") \ No newline at end of file diff --git a/R/county and hourly graphs.R b/R/county and hourly graphs.R index b504d0f..fd81b53 100644 --- a/R/county and hourly graphs.R +++ b/R/county and hourly graphs.R @@ -1,464 +1,486 @@ -setwd("R") - -#install the packages if they're not already installed -packages <- c("tidyverse", "scales", "cowplot", "maps", "mapdata", "colorspace") -install.packages(setdiff(packages, rownames(installed.packages()))) - -library(tidyverse) -library(scales) -library(cowplot) -library(maps) -library(mapdata) -library(colorspace) - -theme_set(theme_bw()) - - -# BSS results created by SQL queries -------------------------------------- - -# the data frame names are analogous to the names of the SQL queries that created them - -input_dir <- "generated_csvs" #directory where the csvs are stored -filename_prefix <- "" -graph_dir <- "graphs/county_hourly" #directory where the graphs will be written - -# scenarios -scenarios<-c("aeo", "ref", "fossil", "state", "accel", "brk", "dual_switch", "high_switch", "min_switch") -# scenario to get the baseline (AEO 2023) data from -scenario_for_baseline <- "aeo" - -county_ann_eu<-data.frame() -county_share_winter<-data.frame() -county_peak_hr<-data.frame() -county_monthly_maxes<-data.frame() -county_hourly_examples_list <- list() - -for (scen in scenarios){ - if (scen==scenario_for_baseline){ - county_ann_eu<-bind_rows(county_ann_eu,read_csv(paste0(input_dir,"/",scen,"_county_ann_eu.csv"))) - county_peak_hr<-bind_rows(county_peak_hr,read_csv(paste0(input_dir,"/",scen,"_county_peak_hour.csv"))) - county_share_winter<-bind_rows(county_share_winter,read_csv(paste0(input_dir,"/",scen,"_county_share_winter.csv"))) - county_monthly_maxes<-bind_rows(county_monthly_maxes,read_csv(paste0(input_dir,"/",scen,"_county_monthly_maxes.csv"))) - county_hourly_examples_list[[scen]]<-read_csv(paste0(input_dir,"/",filename_prefix,scen,"_county_hourly_examples_60_days.csv")) - } else{ - county_ann_eu<-bind_rows(county_ann_eu,read_csv(paste0(input_dir,"/",scen,"_county_ann_eu.csv"))%>% filter(turnover!="baseline")) - county_peak_hr<-bind_rows(county_peak_hr,read_csv(paste0(input_dir,"/",scen,"_county_peak_hour.csv"))%>% filter(turnover!="baseline")) - county_share_winter<-bind_rows(county_share_winter,read_csv(paste0(input_dir,"/",scen,"_county_share_winter.csv"))%>% filter(turnover!="baseline")) - county_monthly_maxes<-bind_rows(county_monthly_maxes,read_csv(paste0(input_dir,"/",scen,"_county_monthly_maxes.csv"))%>% filter(turnover!="baseline")) - county_hourly_examples_list[[scen]]<-read_csv(paste0(input_dir,"/",filename_prefix,scen,"_county_hourly_examples_60_days.csv")) - } -} - - -# map data ---------------------------------------------------------------- - - -#shape files for counties -county_map<-map_data("county") %>% filter(region!="hawaii") - -# for mapping of county designations, population -geo_counties<-read_csv("../map_meas/emm_county_map.csv") %>% filter(subregion!="yellowstone national") #we don't need 2 yellowstones - - -# for labeling --------------------------------------------------------------- - -# Scout scenarios -- every value of "turnover" should be here -# this is the order they'll be shown in the plots -to<-c(baseline="baseline", - aeo="AEO 2025", - ref="Reference", - fossil="Fossil Favorable", - stated_policies="Stated Policies", - mid="Mid", - high="High", - state="State and Local Action", - accel="Accelerated Innovation", - breakthrough="Breakthrough", - brk="Breakthrough", - ineff="Inefficient", - dual_switch="Dual Switch", - high_switch="High Switch", - min_switch="Min Switch" -) -# sector -s_label<-c(com="Commercial",res="Residential",all="All Buildings") -# end uses -eu<-c(`Computers and Electronics`="Computers and Electronics",Cooking="Cooking",`Cooling (Equip.)`="Cooling",`Heating (Equip.)`="Heating",Lighting="Lighting",Other="Other",Refrigeration="Refrigeration",Ventilation="Ventilation",`Water Heating`="Water Heating") - - -#fill colors for end use annual graphs -colors<-c("#e41a1c","#fbb4ae","#377eb8","#b3cde3","#4daf4a","#ccebc5","#984ea3","#decbe4","#ff7f00","#fed9a6","#ffee33","#ffffcc","#a65628","#e5d8bd","#f781bf","#fddaec","#999999","#f2f2f2") -#for % change in energy and peak -color_interp <- gradient_n_pal(colours = c("#2A7062","#80cdc1", "#f5f5f5", "#dfc27d", "#bf812d", "#8c510a","#583A17", "black"), - values = c(-1, -.25, 0, .25, .5, 1,3,20), space = "Lab") - -#for top hrs and winter/summer ratio -diverg<-c("#9e3d22","#e36621","#fcad52","#ffffff","#95c5e1","#5b8fbc","#2b5c8a") -#for top 100 hrs maps -diverg_tophours_interp<-gradient_n_pal(colours=diverg, - values=seq(0,1,length.out = 7),space="Lab") -#for winter/summer ratio -diverg_ratio <- gradient_n_pal(colours = diverg, - values = seq(-.9,.9,length.out = 7), space = "Lab") - -#function to round a number to the closest __ -round_any<-function(x, accuracy, f=round){f(x/ accuracy) * accuracy} - - -#sample sizes and county names -ns<-read_csv("../map_meas/resstock_ns.csv") - - -#order the scenarios -county_ann_eu<-county_ann_eu %>% mutate(turnover=factor(turnover,levels=c("baseline",names(to[scenarios])),ordered=T)) -county_share_winter<-county_share_winter %>% mutate(turnover=factor(turnover,levels=c("baseline",names(to[scenarios])),ordered=T)) -county_peak_hr<-county_peak_hr %>% mutate(turnover=factor(turnover,levels=c("baseline",names(to[scenarios])),ordered=T)) -county_monthly_maxes<-county_monthly_maxes %>% mutate(turnover=factor(turnover,levels=c("baseline",names(to[scenarios])),ordered=T)) - -# choose scenarios to plot ---------------------------------------------- -filename_prefix <- "" -scen_filtered<-c("baseline", scenarios) - -# scen_filtered<-c("aeo","ref","fossil","state","accel","brk") -# scen_filtered<-c("aeo","ref","state","brk","min_switch","dual_switch") -# scen_filtered<-c("aeo","min_switch","dual_switch","high_switch") - -# filename_prefix <- paste(c(scen_filtered,"_"),collapse="_") - -#width for annual graphs changes based on number of scenarios -width<-(1+length(scen_filtered))*1.8 - - -# map with histogram - functions ----------------------------------------------------------------- - -# Function to create main and inset plots -create_plot_pair <- function(data,label) { - list( - main = county_map %>% ggplot()+ - geom_polygon(data = data%>% - full_join(geo_counties,by=c("in.county"="stock.county"),relationship="many-to-many") %>% - full_join(county_map,by=c("region","subregion"),relationship="many-to-many") %>% - filter(!is.na(turnover)), - mapping = aes(x = long, y = lat, group = group,fill=fill_color),color=NA) + - coord_map("conic", lat0 = 30,xlim = c(-66.95,-124.67),ylim=c(49.38,25.84))+ - scale_fill_identity() + - theme(panel.grid = element_blank(),axis.title = element_blank(),axis.line = element_blank(),axis.text = element_blank(),axis.ticks = element_blank(),panel.border = element_rect(color=NA), - axis.ticks.length = unit(0, "pt"), #length of tick marks - legend.position = "none", - panel.background = element_rect(fill="white",color=NA), - panel.grid.major = element_blank(), - panel.grid.minor = element_blank(), - plot.background = element_rect(fill="white",color=NA), - plot.margin = unit(c(0,0,0,0),"mm")), - inset = data %>% - mutate(percent_binned=if_else(percent_change>3,3,round_any(percent_change,.1)), - fill_color=color_interp(percent_binned))%>% - ggplot(aes(x=percent_binned,fill=fill_color))+ - geom_bar(stat="count",color="gray20")+ - scale_fill_identity() + - scale_x_continuous(labels=percent_format(),limits=c(-1,3.05),expand=expansion(add=0,mult=c(0,.05)))+ - scale_y_continuous(n.breaks=3,expand=expansion(add=0,mult=c(0,.05)))+ - ggtitle(str_replace_all(label,pattern = "\n",replacement = " "))+ - theme(panel.grid.minor.y = element_blank(),axis.title = element_blank(),plot.margin=margin(t = 0, b = 0, l = 0, r = 0), - plot.title.position = "plot", - plot.title = element_text(hjust=0)) - ) -} - - -# function to combine and format the map and histogram plots - -plot_map_hist<-function(data_list){ - nice_labels <- setNames( - purrr::map_chr(names(datasets), ~ { - parts <- str_split(.x, "\\.", n = 2)[[1]] - turnover_label <- to[parts[1]] - subset_label <- c(eu, s_label)[parts[2]] - paste(na.omit(c(turnover_label, subset_label)), collapse = " - ") - }), - names(datasets) - ) - # Now create plots using those labels - plot_pairs <- purrr::imap(datasets, ~ { - label <- nice_labels[.y] - create_plot_pair(.x, label = label) - }) - combined_plots <- purrr::map(plot_pairs, ~ - plot_grid(.x$main, - plot_grid(NULL, .x$inset, NULL, rel_widths = c(1, 4, 1), ncol = 3), - rel_heights = c(3, 1), rel_widths = c(5, 4), ncol = 1, align="v") - ) - nrows <- if_else(sum(str_detect(names(datasets), pattern = "\\.")) >= 1, 2, 1) - return(plot_grid(plotlist = combined_plots, nrow = nrows)) -} - - -# map with histogram - plot % changes! ---------------------------------------------- - -# percent change in annual electricity -# by turnover -aggregated<-county_ann_eu %>% - filter(turnover %in% scen_filtered) %>% - group_by(turnover,in.state,in.county,year) %>% summarize(county_ann_kwh=sum(county_ann_kwh)) -if(nrow(aggregated > 0)){ - filename<-"county_map_ann_2050vs2026_all" - plottitle<-"Change in Building Electricity: 2026 to 2050" - annual_county_change<- aggregated %>% - filter(year %in% c(2026,2050)) %>% - pivot_wider(names_from=year,values_from=county_ann_kwh) %>% - mutate(percent_change=`2050`/`2026`-1, - fill_color=color_interp(percent_change)) - datasets <- split(annual_county_change, list(annual_county_change$turnover), drop=T) - - p<-plot_map_hist(datasets) - ggsave(paste0(graph_dir,"/",filename_prefix,filename,".jpg"), - plot_grid(ggdraw()+draw_text(plottitle,x=.5,y=.5,vjust=.5,hjust=.5),p,nrow = 2,rel_heights = c(.3,1)), - width=length(scen_filtered)*4,height=4,units="in",bg = "white") -} - - - -# by turnover, 50+ RS samples -aggregated<-county_ann_eu %>% - filter(turnover %in% scen_filtered) %>% - right_join(ns %>% filter(n>=50),by="in.county") %>% - group_by(turnover,in.state,in.county,year) %>% summarize(county_ann_kwh=sum(county_ann_kwh)) -if(nrow(aggregated > 0)){ - filename<-"county_map_ann_2050vs2026_all_50plus" - plottitle<-"Change in Building Electricity: 2026 to 2050\nCounties with 50+ ResStock Samples" - annual_county_change<- aggregated %>% - filter(year %in% c(2026,2050)) %>% - pivot_wider(names_from=year,values_from=county_ann_kwh) %>% - mutate(percent_change=`2050`/`2026`-1, - fill_color=color_interp(percent_change)) - datasets <- split(annual_county_change, list(annual_county_change$turnover), drop=T) - - p<-plot_map_hist(datasets) - ggsave(paste0(graph_dir,"/",filename_prefix,filename,".jpg"), - plot_grid(ggdraw()+draw_text(plottitle,x=.5,y=.5,vjust=.5,hjust=.5),p,nrow = 2,rel_heights = c(.3,1)), - width=length(scen_filtered)*4,height=4,units="in",bg = "white") -} - - -# by turnover and sector -aggregated<-county_ann_eu %>% - filter(turnover %in% scen_filtered) %>% - group_by(turnover,in.state,in.county,year,sector) %>% summarize(county_ann_kwh=sum(county_ann_kwh)) -if(nrow(aggregated > 0)){ - filename<-"county_map_ann_2050vs2026_sector" - plottitle<-"Change in Building Electricity: 2026 to 2050" - annual_county_change<- aggregated %>% - filter(year %in% c(2026,2050)) %>% - pivot_wider(names_from=year,values_from=county_ann_kwh) %>% - mutate(percent_change=`2050`/`2026`-1, - fill_color=color_interp(percent_change)) - datasets <- split(annual_county_change, list(annual_county_change$turnover,annual_county_change$sector), drop=T) - - p<-plot_map_hist(datasets) - ggsave(paste0(graph_dir,"/",filename_prefix,filename,".jpg"), - plot_grid(ggdraw()+draw_text(plottitle,x=.5,y=.5,vjust=.5,hjust=.5),p,nrow = 2,rel_heights = c(.05,1)), - width=length(scen_filtered)*4,height=7,units="in",bg = "white") -} - - -# res HVAC by turnover -aggregated<-county_ann_eu %>% - filter(sector=="res",end_use %in% c("Heating (Equip.)","Cooling (Equip.)"), - turnover %in% scen_filtered) -if(nrow(aggregated > 0)){ - filename<-"county_map_ann_2050vs2026_res_hvac" - plottitle<-"Change in Residential HVAC Electricity: 2026 to 2050" - annual_county_change<- aggregated %>% - filter(year %in% c(2026,2050)) %>% - pivot_wider(names_from=year,values_from=county_ann_kwh) %>% - mutate(percent_change=`2050`/`2026`-1, - fill_color=color_interp(percent_change)) - datasets <- split(annual_county_change, list(annual_county_change$turnover,annual_county_change$end_use), drop=T) - - p<-plot_map_hist(datasets) - ggsave(paste0(graph_dir,"/",filename_prefix,filename,".jpg"), - plot_grid(ggdraw()+draw_text(plottitle,x=.5,y=.5,vjust=.5,hjust=.5),p,nrow = 2,rel_heights = c(.05,1)), - width=length(scen_filtered)*4,height=7,units="in",bg = "white") -} - - -# com HVAC by turnover -aggregated<-county_ann_eu %>% - filter(sector=="com",end_use %in% c("Heating (Equip.)","Cooling (Equip.)"), - turnover %in% scen_filtered) -if(nrow(aggregated > 0)){ - filename<-"county_map_ann_2050vs2026_com_hvac" - plottitle<-"Change in Commercial Heating and Cooling Electricity: 2026 to 2050" - annual_county_change<- aggregated %>% - filter(year %in% c(2026,2050)) %>% - pivot_wider(names_from=year,values_from=county_ann_kwh) %>% - mutate(percent_change=`2050`/`2026`-1, - fill_color=color_interp(percent_change)) - datasets <- split(annual_county_change, list(annual_county_change$turnover,annual_county_change$end_use), drop=T) - - p<-plot_map_hist(datasets) - ggsave(paste0(graph_dir,"/",filename_prefix,filename,".jpg"), - plot_grid(ggdraw()+draw_text(plottitle,x=.5,y=.5,vjust=.5,hjust=.5),p,nrow = 2,rel_heights = c(.05,1)), - width=length(scen_filtered)*4,height=7,units="in",bg = "white") -} - - -# percent change in peak demand -# by turnover -peak_change<-county_peak_hr %>% - filter(turnover %in% scen_filtered) %>% - mutate(fill_color=color_interp(percent_change)) -filename<-"county_map_peak_2050vs2026_all" -plottitle<-"Change in Building Peak Electricity: 2026 to 2050" -datasets <- split(peak_change, list(droplevels(peak_change$turnover)), drop=T) -p<-plot_map_hist(datasets) -ggsave(paste0(graph_dir,"/",filename_prefix,filename,".jpg"), - plot_grid(ggdraw()+draw_text(plottitle,x=.5,y=.5,vjust=.5,hjust=.5),p,nrow = 2,rel_heights = c(.05,1)), - width=length(scen_filtered)*4,height=4,units="in",bg = "white") - -# top 100 hours - map and histogram of share in the winter ----------------------------------------------------------- - - -top100_map<- county_share_winter %>% - filter(turnover %in% scen_filtered) %>% - left_join(geo_counties %>% select(stock.county,subregion,region,population),by=c("in.county"="stock.county"),relationship="many-to-many") %>% - full_join(county_map,by=c("region","subregion"),relationship="many-to-many") %>% - filter(!is.na(turnover),!is.na(year)) - - -p100<-county_map %>% ggplot()+ - geom_polygon(data = top100_map , - mapping = aes(x = long, y = lat, group = group,fill=share_winter),color=NA) + - coord_map("conic", lat0 = 30)+ - scale_fill_gradientn(colors=diverg,name="",labels=percent_format())+ - theme(panel.grid = element_blank(),axis.title = element_blank(),axis.line = element_blank(),axis.text = element_blank(),axis.ticks = element_blank(),panel.border = element_blank(), - panel.background = element_blank(), - legend.position="bottom",legend.key.width = unit(1,"in"), - panel.spacing = unit(0, "in"), - strip.background = element_blank(),strip.text.y = element_text(angle=-90,size=10),strip.text.x = element_text(size=10))+ - facet_grid(year~turnover,labeller = labeller(turnover=to))+ - ggtitle("Share of Top 100 Hours in the Winter") -save_plot(paste0(graph_dir,"/",filename_prefix,"county_100_hrs_share.jpg"), p100, base_height = 6,bg="white") - -p100_hist<-county_share_winter %>% - filter(turnover %in% scen_filtered) %>% - mutate(percent_binned=round_any(share_winter,.05), - fill_color=diverg_tophours_interp(percent_binned))%>% - ggplot(aes(x=percent_binned,y=after_stat(count/3107),fill=fill_color))+ - geom_bar()+ - scale_fill_identity() + - facet_grid(year~turnover,labeller = labeller(turnover=to))+ - scale_x_continuous(labels=percent_format())+ - scale_y_continuous(n.breaks=4,expand=expansion(add=0,mult=c(0,.05)),labels=percent_format())+ - theme(panel.grid.minor.y = element_blank(),axis.title = element_blank(),plot.margin=margin(b = 0), - strip.background = element_blank(),strip.text.y = element_text(angle=-90,size=10),strip.text.x = element_text(size=10))+ - ggtitle("Share of Top 100 Hours in the Winter") -save_plot(paste0(graph_dir,"/",filename_prefix,"county_100_hrs_share_hist.jpg"), p100_hist, base_height = 6,bg="white") - - - -# winter to summer ratio - map and histogram -------------------------------------------------- - - -peak_ratio<-county_monthly_maxes %>% - filter(turnover %in% scen_filtered) %>% - mutate(month=month(timestamp_hour),season=case_when(month %in% 5:9 ~ "Summer", month %in% c(11,12,1,2) ~ "Winter", TRUE ~ "Shoulder")) %>% - group_by(in.county,turnover,year,season) %>% filter(county_total_hourly_kwh==max(county_total_hourly_kwh)) %>% - select(in.county,turnover,in.state,year,season,county_total_hourly_kwh) %>% - pivot_wider(names_from=season,values_from=county_total_hourly_kwh) %>% - mutate(winter_to_summer=Winter/Summer,log_winter_to_summer=log10(winter_to_summer)) - -peak_ratio_map<- peak_ratio %>% - left_join(geo_counties %>% select(stock.county,subregion,region,population),by=c("in.county"="stock.county"),relationship="many-to-many") %>% - full_join(county_map,by=c("region","subregion"),relationship="many-to-many") %>% - filter(!is.na(turnover),!is.na(year)) - - -ratio_map<-county_map %>% ggplot()+ - geom_polygon(data = peak_ratio_map , - mapping = aes(x = long, y = lat, group = group,fill=log_winter_to_summer),color=NA) + - coord_map("conic", lat0 = 30)+ - scale_fill_gradientn(colors=diverg,name="",labels=function(x) round(10^x, 2),limits=c(-.9,.9),breaks=c(-1,-.6,-.3,0,.3,.6,1))+ - theme(panel.grid = element_blank(),axis.title = element_blank(),axis.line = element_blank(),axis.text = element_blank(),axis.ticks = element_blank(),panel.border = element_blank(), - panel.background = element_blank(), - legend.position="bottom",legend.key.width = unit(1,"in"), - panel.spacing = unit(0, "in"), - strip.background = element_blank(),strip.text.y = element_text(angle=-90,size=10),strip.text.x = element_text(size=10))+ - facet_grid(year~turnover,labeller = labeller(turnover=to))+ - ggtitle("Ratio of Winter Peak to Summer Peak") -save_plot(paste0(graph_dir,"/",filename_prefix,"county_peak_ratio.jpg"),ratio_map,base_height = 6,bg="white") - - -ratio_hist<-peak_ratio %>% - filter(turnover %in% scen_filtered) %>% - mutate(log_ratio_binned=round_any(log_winter_to_summer,.02), - fill_color=diverg_ratio(log_ratio_binned))%>% - ggplot(aes(x=log_ratio_binned,y=after_stat(count/3107),fill=fill_color))+ - geom_vline(xintercept=0,color="gray50")+ - geom_bar(stat="count")+ - scale_fill_identity() + - facet_grid(year~turnover,labeller = labeller(turnover=to))+ - scale_x_continuous(labels= function(x) round(10^x, 2))+ - coord_cartesian(xlim=c(log10(.25),log10(4)))+ - scale_y_continuous(n.breaks=4,expand=expansion(add=0,mult=c(0,.05)),labels=percent_format())+ - theme(panel.grid.minor.y = element_blank(),axis.title = element_blank(),plot.margin=margin(b = 0), - strip.background = element_blank(),strip.text.y = element_text(angle=-90,size=12),strip.text.x = element_text(size=12))+ - ggtitle("Ratio of Winter Peak to Summer Peak") -save_plot(paste0(graph_dir,"/",filename_prefix,"county_peak_ratio_hist.jpg"),ratio_hist,base_height = 6,bg="white",base_asp = 2) - - -# example counties - peak day line plots -------------------------------------------------------- - -for (i in 1:length(county_hourly_examples_list)){ - with_ex_labels<-county_hourly_examples_list[[i]]%>% - filter(peak_source_turnover!="baseline",day_type=="monthly_peak_day") %>% - left_join(ns %>% select(in.county,county_name),by="in.county") %>% - mutate(example_label=paste0(example_type,": ",county_name), - day_of_month=day(date)) - maxes<-with_ex_labels %>% filter(turnover!="baseline") %>% - group_by(year,in.county,example_label) %>% - filter(county_hourly_kwh==max(county_hourly_kwh)) %>% ungroup() - day_labels<-with_ex_labels %>% - right_join(maxes %>% select(year, date, example_label, in.county),by=c("year", "date", "example_label", "in.county")) %>% - select(in.county,year,month,day_of_month,example_label,turnover) %>% unique() %>% - mutate(day_label=paste(month,day_of_month,sep="/"),x=if_else(year==2024,3,13)) - psample<-with_ex_labels %>% - right_join(maxes %>% select(year, date, example_label, in.county),by=c("year", "date", "example_label", "in.county")) %>% - mutate(turnover=factor(turnover,levels=c("baseline",names(to[scenarios])),ordered=T)) %>% - ggplot(aes(color=factor(year)))+ - geom_line(aes(x=hour_of_day,y=county_hourly_kwh/1000,linetype=turnover))+ - xlab("EST")+ - geom_text(data=day_labels,y=-Inf,vjust=-.5,aes(x=x,label=day_label),show.legend = F,size=8) + - scale_y_continuous(name="MWh",labels=comma_format(),limits=c(0,NA))+ - scale_color_brewer(name="",palette = "Dark2")+ - scale_linetype(name="",labels=to)+ - facet_wrap(~example_label,scales="free",ncol=2)+ - ggtitle("Day with the Peak Hour") - save_plot(paste0(graph_dir,"/example_peak_days_",names(county_hourly_examples_list)[i],".jpg"),psample,base_height = 18,base_width = 8,bg="white") -} - -# example counties - monthly line plots -------------------------------------------------------- - -example_labels<-county_hourly_examples_list[[i]]%>% select(in.county,example_type) %>% unique() %>% - left_join(ns %>% select(in.county,county_name),by="in.county") %>% - mutate(example_label=paste0(example_type,": ",county_name)) - -for (i in 1:length(county_hourly_examples_list)){ - for (cty in unique(county_hourly_examples_list[[i]]$in.county)){ - monthly_examples<-county_hourly_examples_list[[i]] %>% - filter(in.county==cty, (peak_source_turnover!="baseline" | is.na(peak_source_turnover)), turnover!="baseline") %>% - pivot_wider(names_from="day_type",values_from="county_hourly_kwh",id_cols=c("year","month","hour_of_day","turnover")) %>% - ggplot(aes(x=hour_of_day))+ - geom_ribbon(aes(ymin=monthly_min_peak_day/1000,ymax=monthly_peak_day/1000,fill=factor(year)),alpha=.4)+ - geom_line(aes(y=monthly_mean/1000,color=factor(year)))+ - xlab("EST")+ - scale_y_continuous(name="MWh",labels=comma_format(),limits=c(0,NA))+ - scale_color_brewer(name="",palette = "Dark2")+ - scale_fill_brewer(name="",palette = "Dark2")+ - facet_wrap(~month)+ - ggtitle(paste0(to[names(county_hourly_examples_list)[[i]]],": Mean, Day with Highest Peak, Day with Lowest Peak by Month"), - subtitle = (example_labels %>% filter(in.county==cty))$example_label) - save_plot(paste0(graph_dir,"/example_by_month/",names(county_hourly_examples_list)[i],"_",(example_labels %>% filter(in.county==cty))$county_name,".jpg"), - monthly_examples,base_height = 7,base_width = 8,bg="white") - } -} +setwd("R") + +#install the packages if they're not already installed +packages <- c("tidyverse", "scales", "cowplot", "maps", "mapdata", "colorspace") +install.packages(setdiff(packages, rownames(installed.packages()))) + +library(tidyverse) +library(scales) +library(cowplot) +library(maps) +library(mapdata) +library(colorspace) + +theme_set(theme_bw()) + + +# BSS results created by SQL queries -------------------------------------- + +# the data frame names are analogous to the names of the SQL queries that created them + +input_dir <- "generated_csvs" #directory where the csvs are stored +filename_prefix <- "" +graph_dir <- "graphs/county_hourly" #directory where the graphs will be written + +# scenarios +scenarios<-c("aeo", "ref", "fossil", "state", "accel", "brk", "dual_switch", "high_switch", "min_switch") +# scenario to get the baseline (AEO 2023) data from +scenario_for_baseline <- "aeo" + +county_ann_eu<-data.frame() +county_share_winter<-data.frame() +county_peak_hr<-data.frame() +county_monthly_maxes<-data.frame() +county_hourly_examples_list <- list() + +for (scen in scenarios){ + if (scen==scenario_for_baseline){ + county_ann_eu<-bind_rows(county_ann_eu,read_csv(paste0(input_dir,"/",scen,"_county_ann_eu.csv"))) + county_peak_hr<-bind_rows(county_peak_hr,read_csv(paste0(input_dir,"/",scen,"_county_peak_hour.csv"))) + county_share_winter<-bind_rows(county_share_winter,read_csv(paste0(input_dir,"/",scen,"_county_share_winter.csv"))) + county_monthly_maxes<-bind_rows(county_monthly_maxes,read_csv(paste0(input_dir,"/",scen,"_county_monthly_maxes.csv"))) + county_hourly_examples_list[[scen]]<-read_csv(paste0(input_dir,"/",filename_prefix,scen,"_county_hourly_examples_60_days.csv")) + } else{ + county_ann_eu<-bind_rows(county_ann_eu,read_csv(paste0(input_dir,"/",scen,"_county_ann_eu.csv"))%>% filter(turnover!="baseline")) + county_peak_hr<-bind_rows(county_peak_hr,read_csv(paste0(input_dir,"/",scen,"_county_peak_hour.csv"))%>% filter(turnover!="baseline")) + county_share_winter<-bind_rows(county_share_winter,read_csv(paste0(input_dir,"/",scen,"_county_share_winter.csv"))%>% filter(turnover!="baseline")) + county_monthly_maxes<-bind_rows(county_monthly_maxes,read_csv(paste0(input_dir,"/",scen,"_county_monthly_maxes.csv"))%>% filter(turnover!="baseline")) + county_hourly_examples_list[[scen]]<-read_csv(paste0(input_dir,"/",filename_prefix,scen,"_county_hourly_examples_60_days.csv")) + } +} + + +# map data ---------------------------------------------------------------- + + +#shape files for counties +county_map<-map_data("county") %>% filter(region!="hawaii") + +# for mapping of county designations, population +geo_counties<-read_csv("../map_meas/emm_county_map.csv") %>% filter(subregion!="yellowstone national") #we don't need 2 yellowstones + + +# for labeling --------------------------------------------------------------- + +# Scout scenarios -- every value of "turnover" should be here +# this is the order they'll be shown in the plots +to<-c(baseline="baseline", + aeo="AEO 2025", + ref="Reference", + fossil="Fossil Favorable", + stated_policies="Stated Policies", + mid="Mid", + high="High", + state="State and Local Action", + accel="Accelerated Innovation", + breakthrough="Breakthrough", + brk="Breakthrough", + ineff="Inefficient", + dual_switch="Dual Switch", + high_switch="High Switch", + min_switch="Min Switch" +) +# sector +s_label<-c(com="Commercial",res="Residential",all="All Buildings") +# end uses +eu<-c(`Computers and Electronics`="Computers and Electronics",Cooking="Cooking",`Cooling (Equip.)`="Cooling",`Heating (Equip.)`="Heating",Lighting="Lighting",Other="Other",Refrigeration="Refrigeration",Ventilation="Ventilation",`Water Heating`="Water Heating") + + +#fill colors for end use annual graphs +colors<-c("#e41a1c","#fbb4ae","#377eb8","#b3cde3","#4daf4a","#ccebc5","#984ea3","#decbe4","#ff7f00","#fed9a6","#ffee33","#ffffcc","#a65628","#e5d8bd","#f781bf","#fddaec","#999999","#f2f2f2") +#for % change in energy and peak +color_interp <- gradient_n_pal(colours = c("#2A7062","#80cdc1", "#f5f5f5", "#dfc27d", "#bf812d", "#8c510a","#583A17", "black"), + values = c(-1, -.25, 0, .25, .5, 1,3,20), space = "Lab") + +#for top hrs and winter/summer ratio +diverg<-c("#9e3d22","#e36621","#fcad52","#ffffff","#95c5e1","#5b8fbc","#2b5c8a") +#for top 100 hrs maps +diverg_tophours_interp<-gradient_n_pal(colours=diverg, + values=seq(0,1,length.out = 7),space="Lab") +#for winter/summer ratio +diverg_ratio <- gradient_n_pal(colours = diverg, + values = seq(-.9,.9,length.out = 7), space = "Lab") + +#function to round a number to the closest __ +round_any<-function(x, accuracy, f=round){f(x/ accuracy) * accuracy} + + +#sample sizes and county names +ns<-read_csv("../map_meas/resstock_ns.csv") + + +#order the scenarios +county_ann_eu<-county_ann_eu %>% mutate(turnover=factor(turnover,levels=c("baseline",names(to[scenarios])),ordered=T)) +county_share_winter<-county_share_winter %>% mutate(turnover=factor(turnover,levels=c("baseline",names(to[scenarios])),ordered=T)) +county_peak_hr<-county_peak_hr %>% mutate(turnover=factor(turnover,levels=c("baseline",names(to[scenarios])),ordered=T)) +county_monthly_maxes<-county_monthly_maxes %>% mutate(turnover=factor(turnover,levels=c("baseline",names(to[scenarios])),ordered=T)) + +# choose scenarios to plot ---------------------------------------------- +filename_prefix <- "" +scen_filtered<-c("baseline", scenarios) + +# scen_filtered<-c("aeo","ref","fossil","state","accel","brk") +# scen_filtered<-c("aeo","ref","state","brk","min_switch","dual_switch") +# scen_filtered<-c("aeo","min_switch","dual_switch","high_switch") + +# filename_prefix <- paste(c(scen_filtered,"_"),collapse="_") + +#width for annual graphs changes based on number of scenarios +width<-(1+length(scen_filtered))*1.8 + + +# map with histogram - functions ----------------------------------------------------------------- + +# Function to create main and inset plots +create_plot_pair <- function(data,label) { + list( + main = county_map %>% ggplot()+ + geom_polygon(data = data%>% + full_join(geo_counties,by=c("in.county"="stock.county"),relationship="many-to-many") %>% + full_join(county_map,by=c("region","subregion"),relationship="many-to-many") %>% + filter(!is.na(turnover)), + mapping = aes(x = long, y = lat, group = group,fill=fill_color),color=NA) + + coord_map("conic", lat0 = 30,xlim = c(-66.95,-124.67),ylim=c(49.38,25.84))+ + scale_fill_identity() + + theme(panel.grid = element_blank(),axis.title = element_blank(),axis.line = element_blank(),axis.text = element_blank(),axis.ticks = element_blank(),panel.border = element_rect(color=NA), + axis.ticks.length = unit(0, "pt"), #length of tick marks + legend.position = "none", + panel.background = element_rect(fill="white",color=NA), + panel.grid.major = element_blank(), + panel.grid.minor = element_blank(), + plot.background = element_rect(fill="white",color=NA), + plot.margin = unit(c(0,0,0,0),"mm")), + inset = data %>% + mutate(percent_binned=if_else(percent_change>3,3,round_any(percent_change,.1)), + fill_color=color_interp(percent_binned))%>% + ggplot(aes(x=percent_binned,fill=fill_color))+ + geom_bar(stat="count",color="gray20")+ + scale_fill_identity() + + scale_x_continuous(labels=percent_format(),limits=c(-1,3.05),expand=expansion(add=0,mult=c(0,.05)))+ + scale_y_continuous(n.breaks=3,expand=expansion(add=0,mult=c(0,.05)))+ + ggtitle(str_replace_all(label,pattern = "\n",replacement = " "))+ + theme(panel.grid.minor.y = element_blank(),axis.title = element_blank(),plot.margin=margin(t = 0, b = 0, l = 0, r = 0), + plot.title.position = "plot", + plot.title = element_text(hjust=0)) + ) +} + + +# function to combine and format the map and histogram plots + +plot_map_hist<-function(data_list){ + nice_labels <- setNames( + purrr::map_chr(names(datasets), ~ { + parts <- str_split(.x, "\\.", n = 2)[[1]] + turnover_label <- to[parts[1]] + subset_label <- c(eu, s_label)[parts[2]] + paste(na.omit(c(turnover_label, subset_label)), collapse = " - ") + }), + names(datasets) + ) + # Now create plots using those labels + plot_pairs <- purrr::imap(datasets, ~ { + label <- nice_labels[.y] + create_plot_pair(.x, label = label) + }) + combined_plots <- purrr::map(plot_pairs, ~ + plot_grid(.x$main, + plot_grid(NULL, .x$inset, NULL, rel_widths = c(1, 4, 1), ncol = 3), + rel_heights = c(3, 1), rel_widths = c(5, 4), ncol = 1, align="v") + ) + nrows <- if_else(sum(str_detect(names(datasets), pattern = "\\.")) >= 1, 2, 1) + return(plot_grid(plotlist = combined_plots, nrow = nrows)) +} + + +# map with histogram - plot % changes! ---------------------------------------------- + +# percent change in annual electricity +# by turnover +aggregated<-county_ann_eu %>% + filter(turnover %in% scen_filtered) %>% + group_by(turnover,in.state,in.county,year) %>% summarize(county_ann_kwh=sum(county_ann_kwh)) +if(nrow(aggregated > 0)){ + filename<-"county_map_ann_2050vs2026_all" + plottitle<-"Change in Building Electricity: 2026 to 2050" + annual_county_change<- aggregated %>% + filter(year %in% c(2026,2050)) %>% + pivot_wider(names_from=year,values_from=county_ann_kwh) %>% + mutate(percent_change=`2050`/`2026`-1, + fill_color=color_interp(percent_change)) + datasets <- split(annual_county_change, list(annual_county_change$turnover), drop=T) + + p<-plot_map_hist(datasets) + ggsave(paste0(graph_dir,"/",filename_prefix,filename,".jpg"), + plot_grid(ggdraw()+draw_text(plottitle,x=.5,y=.5,vjust=.5,hjust=.5),p,nrow = 2,rel_heights = c(.3,1)), + width=length(scen_filtered)*4,height=4,units="in",bg = "white") +} + + + +# by turnover, 50+ RS samples +aggregated<-county_ann_eu %>% + filter(turnover %in% scen_filtered) %>% + right_join(ns %>% filter(n>=50),by="in.county") %>% + group_by(turnover,in.state,in.county,year) %>% summarize(county_ann_kwh=sum(county_ann_kwh)) +if(nrow(aggregated > 0)){ + filename<-"county_map_ann_2050vs2026_all_50plus" + plottitle<-"Change in Building Electricity: 2026 to 2050\nCounties with 50+ ResStock Samples" + annual_county_change<- aggregated %>% + filter(year %in% c(2026,2050)) %>% + pivot_wider(names_from=year,values_from=county_ann_kwh) %>% + mutate(percent_change=`2050`/`2026`-1, + fill_color=color_interp(percent_change)) + datasets <- split(annual_county_change, list(annual_county_change$turnover), drop=T) + + p<-plot_map_hist(datasets) + ggsave(paste0(graph_dir,"/",filename_prefix,filename,".jpg"), + plot_grid(ggdraw()+draw_text(plottitle,x=.5,y=.5,vjust=.5,hjust=.5),p,nrow = 2,rel_heights = c(.3,1)), + width=length(scen_filtered)*4,height=4,units="in",bg = "white") +} + + +# by turnover and sector +aggregated<-county_ann_eu %>% + filter(turnover %in% scen_filtered) %>% + group_by(turnover,in.state,in.county,year,sector) %>% summarize(county_ann_kwh=sum(county_ann_kwh)) +if(nrow(aggregated > 0)){ + filename<-"county_map_ann_2050vs2026_sector" + plottitle<-"Change in Building Electricity: 2026 to 2050" + annual_county_change<- aggregated %>% + filter(year %in% c(2026,2050)) %>% + pivot_wider(names_from=year,values_from=county_ann_kwh) %>% + mutate(percent_change=`2050`/`2026`-1, + fill_color=color_interp(percent_change)) + datasets <- split(annual_county_change, list(annual_county_change$turnover,annual_county_change$sector), drop=T) + + p<-plot_map_hist(datasets) + ggsave(paste0(graph_dir,"/",filename_prefix,filename,".jpg"), + plot_grid(ggdraw()+draw_text(plottitle,x=.5,y=.5,vjust=.5,hjust=.5),p,nrow = 2,rel_heights = c(.05,1)), + width=length(scen_filtered)*4,height=7,units="in",bg = "white") +} + + +# res HVAC by turnover +aggregated<-county_ann_eu %>% + filter(sector=="res",end_use %in% c("Heating (Equip.)","Cooling (Equip.)"), + turnover %in% scen_filtered) +if(nrow(aggregated > 0)){ + filename<-"county_map_ann_2050vs2026_res_hvac" + plottitle<-"Change in Residential HVAC Electricity: 2026 to 2050" + annual_county_change<- aggregated %>% + filter(year %in% c(2026,2050)) %>% + pivot_wider(names_from=year,values_from=county_ann_kwh) %>% + mutate(percent_change=`2050`/`2026`-1, + fill_color=color_interp(percent_change)) + datasets <- split(annual_county_change, list(annual_county_change$turnover,annual_county_change$end_use), drop=T) + + p<-plot_map_hist(datasets) + ggsave(paste0(graph_dir,"/",filename_prefix,filename,".jpg"), + plot_grid(ggdraw()+draw_text(plottitle,x=.5,y=.5,vjust=.5,hjust=.5),p,nrow = 2,rel_heights = c(.05,1)), + width=length(scen_filtered)*4,height=7,units="in",bg = "white") +} + + +# com HVAC by turnover +aggregated<-county_ann_eu %>% + filter(sector=="com",end_use %in% c("Heating (Equip.)","Cooling (Equip.)"), + turnover %in% scen_filtered) +if(nrow(aggregated > 0)){ + filename<-"county_map_ann_2050vs2026_com_hvac" + plottitle<-"Change in Commercial Heating and Cooling Electricity: 2026 to 2050" + annual_county_change<- aggregated %>% + filter(year %in% c(2026,2050)) %>% + pivot_wider(names_from=year,values_from=county_ann_kwh) %>% + mutate(percent_change=`2050`/`2026`-1, + fill_color=color_interp(percent_change)) + datasets <- split(annual_county_change, list(annual_county_change$turnover,annual_county_change$end_use), drop=T) + + p<-plot_map_hist(datasets) + ggsave(paste0(graph_dir,"/",filename_prefix,filename,".jpg"), + plot_grid(ggdraw()+draw_text(plottitle,x=.5,y=.5,vjust=.5,hjust=.5),p,nrow = 2,rel_heights = c(.05,1)), + width=length(scen_filtered)*4,height=7,units="in",bg = "white") +} + + +# percent change in peak demand +# by turnover +peak_change<-county_peak_hr %>% + filter(turnover %in% scen_filtered) %>% + mutate(fill_color=color_interp(percent_change)) +filename<-"county_map_peak_2050vs2026_all" +plottitle<-"Change in Building Peak Electricity: 2026 to 2050" +datasets <- split(peak_change, list(droplevels(peak_change$turnover)), drop=T) +p<-plot_map_hist(datasets) +ggsave(paste0(graph_dir,"/",filename_prefix,filename,".jpg"), + plot_grid(ggdraw()+draw_text(plottitle,x=.5,y=.5,vjust=.5,hjust=.5),p,nrow = 2,rel_heights = c(.05,1)), + width=length(scen_filtered)*4,height=4,units="in",bg = "white") + +# top 100 hours - map and histogram of share in the winter ----------------------------------------------------------- + + +top100_map<- county_share_winter %>% + filter(turnover %in% scen_filtered) %>% + left_join(geo_counties %>% select(stock.county,subregion,region,population),by=c("in.county"="stock.county"),relationship="many-to-many") %>% + full_join(county_map,by=c("region","subregion"),relationship="many-to-many") %>% + filter(!is.na(turnover),!is.na(year)) + + +p100<-county_map %>% ggplot()+ + geom_polygon(data = top100_map , + mapping = aes(x = long, y = lat, group = group,fill=share_winter),color=NA) + + coord_map("conic", lat0 = 30)+ + scale_fill_gradientn(colors=diverg,name="",labels=percent_format())+ + theme(panel.grid = element_blank(),axis.title = element_blank(),axis.line = element_blank(),axis.text = element_blank(),axis.ticks = element_blank(),panel.border = element_blank(), + panel.background = element_blank(), + legend.position="bottom",legend.key.width = unit(1,"in"), + panel.spacing = unit(0, "in"), + strip.background = element_blank(),strip.text.y = element_text(angle=-90,size=10),strip.text.x = element_text(size=10))+ + facet_grid(year~turnover,labeller = labeller(turnover=to))+ + ggtitle("Share of Top 100 Hours in the Winter") +save_plot(paste0(graph_dir,"/",filename_prefix,"county_100_hrs_share.jpg"), p100, base_height = 6,bg="white") + +p100_hist<-county_share_winter %>% + filter(turnover %in% scen_filtered) %>% + mutate(percent_binned=round_any(share_winter,.05), + fill_color=diverg_tophours_interp(percent_binned))%>% + ggplot(aes(x=percent_binned,y=after_stat(count/3107),fill=fill_color))+ + geom_bar()+ + scale_fill_identity() + + facet_grid(year~turnover,labeller = labeller(turnover=to))+ + scale_x_continuous(labels=percent_format())+ + scale_y_continuous(n.breaks=4,expand=expansion(add=0,mult=c(0,.05)),labels=percent_format())+ + theme(panel.grid.minor.y = element_blank(),axis.title = element_blank(),plot.margin=margin(b = 0), + strip.background = element_blank(),strip.text.y = element_text(angle=-90,size=10),strip.text.x = element_text(size=10))+ + ggtitle("Share of Top 100 Hours in the Winter") +save_plot(paste0(graph_dir,"/",filename_prefix,"county_100_hrs_share_hist.jpg"), p100_hist, base_height = 6,bg="white") + + + +# winter to summer ratio - map and histogram -------------------------------------------------- + + +peak_ratio<-county_monthly_maxes %>% + filter(turnover %in% scen_filtered) %>% + mutate(month=month(timestamp_hour),season=case_when(month %in% 5:9 ~ "Summer", month %in% c(11,12,1,2) ~ "Winter", TRUE ~ "Shoulder")) %>% + group_by(in.county,turnover,year,season) %>% filter(county_total_hourly_kwh==max(county_total_hourly_kwh)) %>% + select(in.county,turnover,in.state,year,season,county_total_hourly_kwh) %>% + pivot_wider(names_from=season,values_from=county_total_hourly_kwh) %>% + mutate(winter_to_summer=Winter/Summer,log_winter_to_summer=log10(winter_to_summer)) + +peak_ratio_map<- peak_ratio %>% + left_join(geo_counties %>% select(stock.county,subregion,region,population),by=c("in.county"="stock.county"),relationship="many-to-many") %>% + full_join(county_map,by=c("region","subregion"),relationship="many-to-many") %>% + filter(!is.na(turnover),!is.na(year)) + + +ratio_map<-county_map %>% ggplot()+ + geom_polygon(data = peak_ratio_map , + mapping = aes(x = long, y = lat, group = group,fill=log_winter_to_summer),color=NA) + + coord_map("conic", lat0 = 30)+ + scale_fill_gradientn(colors=diverg,name="",labels=function(x) round(10^x, 2),limits=c(-.9,.9),breaks=c(-1,-.6,-.3,0,.3,.6,1))+ + theme(panel.grid = element_blank(),axis.title = element_blank(),axis.line = element_blank(),axis.text = element_blank(),axis.ticks = element_blank(),panel.border = element_blank(), + panel.background = element_blank(), + legend.position="bottom",legend.key.width = unit(1,"in"), + panel.spacing = unit(0, "in"), + strip.background = element_blank(),strip.text.y = element_text(angle=-90,size=10),strip.text.x = element_text(size=10))+ + facet_grid(year~turnover,labeller = labeller(turnover=to))+ + ggtitle("Ratio of Winter Peak to Summer Peak") +save_plot(paste0(graph_dir,"/",filename_prefix,"county_peak_ratio.jpg"),ratio_map,base_height = 6,bg="white") + + +ratio_hist<-peak_ratio %>% + filter(turnover %in% scen_filtered) %>% + mutate(log_ratio_binned=round_any(log_winter_to_summer,.02), + fill_color=diverg_ratio(log_ratio_binned))%>% + ggplot(aes(x=log_ratio_binned,y=after_stat(count/3107),fill=fill_color))+ + geom_vline(xintercept=0,color="gray50")+ + geom_bar(stat="count")+ + scale_fill_identity() + + facet_grid(year~turnover,labeller = labeller(turnover=to))+ + scale_x_continuous(labels= function(x) round(10^x, 2))+ + coord_cartesian(xlim=c(log10(.25),log10(4)))+ + scale_y_continuous(n.breaks=4,expand=expansion(add=0,mult=c(0,.05)),labels=percent_format())+ + theme(panel.grid.minor.y = element_blank(),axis.title = element_blank(),plot.margin=margin(b = 0), + strip.background = element_blank(),strip.text.y = element_text(angle=-90,size=12),strip.text.x = element_text(size=12))+ + ggtitle("Ratio of Winter Peak to Summer Peak") +save_plot(paste0(graph_dir,"/",filename_prefix,"county_peak_ratio_hist.jpg"),ratio_hist,base_height = 6,bg="white",base_asp = 2) + + +# example counties - peak day line plots -------------------------------------------------------- + +for (i in 1:length(county_hourly_examples_list)){ + with_ex_labels<-county_hourly_examples_list[[i]]%>% + filter(peak_source_turnover!="baseline",day_type=="monthly_peak_day") %>% + left_join(ns %>% select(in.county,county_name),by="in.county") %>% + mutate(example_label=paste0(example_type,": ",county_name), + day_of_month=day(date)) + maxes<-with_ex_labels %>% filter(turnover!="baseline") %>% + group_by(year,in.county,example_label) %>% + filter(county_hourly_kwh==max(county_hourly_kwh)) %>% ungroup() + day_labels<-with_ex_labels %>% + right_join(maxes %>% select(year, date, example_label, in.county),by=c("year", "date", "example_label", "in.county")) %>% + select(in.county,year,month,day_of_month,example_label,turnover) %>% unique() %>% + mutate(day_label=paste(month,day_of_month,sep="/"),x=if_else(year==2026,3,13)) + psample<-with_ex_labels %>% + right_join(maxes %>% select(year, date, example_label, in.county),by=c("year", "date", "example_label", "in.county")) %>% + mutate(turnover=factor(turnover,levels=c("baseline",names(to[scenarios])),ordered=T)) %>% + ggplot(aes(color=factor(year)))+ + geom_line(aes(x=hour_of_day,y=county_hourly_kwh/1000,linetype=turnover))+ + xlab("EST")+ + geom_text(data=day_labels,y=-Inf,vjust=-.5,aes(x=x,label=day_label),show.legend = F,size=8) + + scale_y_continuous(name="MWh",labels=comma_format(),limits=c(0,NA))+ + scale_color_brewer(name="",palette = "Dark2")+ + scale_linetype(name="",labels=to)+ + facet_wrap(~example_label,scales="free",ncol=2)+ + ggtitle("Day with the Peak Hour") + save_plot(paste0(graph_dir,"/example_peak_days_",names(county_hourly_examples_list)[i],".jpg"),psample,base_height = 18,base_width = 8,bg="white") +} + +# example counties - monthly line plots -------------------------------------------------------- +## is this i here intentional? should it just be length(county_hourly_examples_list) +## moved to inside of the following loop. example label should be compatible with the cities in it +## example_labels<-county_hourly_examples_list[[i]]%>% select(in.county,example_type) %>% unique() %>% +## left_join(ns %>% select(in.county,county_name),by="in.county") %>% +## mutate(example_label=paste0(example_type,": ",county_name)) + +## checking missing day type +for (scen in scenarios) { + bad.county <- readr::read_csv(sprintf("generated_csvs/%s_county_hourly_examples_60_days.csv", scen), show_col_types = FALSE) %>% + dplyr::distinct(in.county, day_type) %>% + dplyr::group_by(in.county) %>% + dplyr::filter(n() < 3) %>% + dplyr::distinct(in.county)%>% + .$in.county %>% + {.} + num.bad.county <- length(bad.county) + if (num.bad.county > 0) { + print(sprintf("missing day_type found for %s counties in %s", num.bad.county, scen)) + } +} + +for (i in 1:length(county_hourly_examples_list)){ + for (cty in unique(county_hourly_examples_list[[i]]$in.county)){ + example_labels<-county_hourly_examples_list[[i]]%>% select(in.county,example_type) %>% unique() %>% + left_join(ns %>% select(in.county,county_name),by="in.county") %>% + mutate(example_label=paste0(example_type,": ",county_name)) + monthly_examples<- county_hourly_examples_list[[i]] %>% + filter(in.county==cty, (peak_source_turnover!="baseline" | is.na(peak_source_turnover)), turnover!="baseline") %>% + pivot_wider(names_from="day_type",values_from="county_hourly_kwh",id_cols=c("year","month","hour_of_day","turnover")) %>% + ggplot(aes(x=hour_of_day))+ + geom_ribbon(aes(ymin=monthly_min_peak_day/1000,ymax=monthly_peak_day/1000,fill=factor(year)),alpha=.4)+ + geom_line(aes(y=monthly_mean/1000,color=factor(year)))+ + xlab("EST")+ + scale_y_continuous(name="MWh",labels=comma_format(),limits=c(0,NA))+ + scale_color_brewer(name="",palette = "Dark2")+ + scale_fill_brewer(name="",palette = "Dark2")+ + facet_wrap(~month)+ + ggtitle(paste0(to[names(county_hourly_examples_list)[[i]]],": Mean, Day with Highest Peak, Day with Lowest Peak by Month"), + subtitle = (example_labels %>% filter(in.county==cty))$example_label) + save_plot(paste0(graph_dir,"/example_by_month/",names(county_hourly_examples_list)[i],"_",(example_labels %>% filter(in.county==cty))$county_name[[1]],".jpg"), + monthly_examples,base_height = 7,base_width = 8,bg="white") + } +} + +# restore previous working directory, otherwise will mess up python script calls +setwd("../") diff --git a/README.md b/README.md index 462095d..e33e522 100644 --- a/README.md +++ b/README.md @@ -437,6 +437,43 @@ For more detailed information on setting up AWS credentials, refer to the [AWS S **Recommended**: The `--gen_countyall` flag orchestrates the complete workflow in a single command. It performs ingestion of Scout data, county generation, post-processing, diagnostics, CSVs, and plots. This is the simplest way to run a full workflow refresh when inputs have changed broadly. +Before running `python bss_workflow.py --gen_countyall`, please complete the following preparations: +- Prepare the scout folders and files: + - create the following folder structure + ``` + scout/ + ├── scout_json/ + └── scout_tsv_df/ + ``` + - From your generated SCOUT data, copy the `results//ecm_results.json` file into `scout/scout_json/.json` ,generated using `python3 scout/run_batch.py --batch ./batch/bss-v1`. +- Configure bucket and database settings: + - Open the bss_workflow.py file and find the config class. + - Update these two variables to match your setup: + - BUCKET_NAME: The name of your AWS S3 bucket where results will be saved. + - DATABASE_NAME: The Athena/Glue database to save output tables. + - If the specified database doesn’t exist, you can create one. +- Set AWS environment variables: make sure the AWS_PROFILE and AWS_REGION environment variables are set. + - You can verify with + ``` + echo $AWS_PROFILE + echo $AWS_REGION + ``` + - If not set, run the following command to set them up as follows. + ``` + export AWS_PROFILE= + export AWS_REGION= + ``` +- Verify the disaggregation multiplier tables exist: In the DATABASE_NAME you set above, ensure these tables exist. + - com_annual_disaggregation_multipliers_amy + - com_hourly_disaggregation_multipliers_amy + - res_annual_disaggregation_multipliers_amy + - res_hourly_disaggregation_multipliers_amy + If they are missing, follow the instructions in [Register S3 data as AWS Glue tables](#register-s2-data-as-aws-glue-tables-so-athena-can-query) + +- Confirm ComStock and ResStock data availability: You’ll also need ComStock and ResStock datasets (e.g., resstock_amy2018_release_2024.2_metadata). To register them in Athena/Glue, follow the same [Register S3 data as AWS Glue tables](#register-s2-data-as-aws-glue-tables-so-athena-can-query) process, with source set to `s3://oedi-data-lake/nrel-pds-building-stock/end-use-load-profiles-for-us-building-stock/2024/resstock_amy2018_release_2/metadata`. Remember to use Table prefix "resstock_amy2018_release_2024.2_". Set the output database to the same as the one specified in the `DATABASE_NAME` in the `config` class. +After crawling, you should see the table "resstock_amy2018_release_2024.2_metadata" in the database. +- Generate the uncalibrated monthly result file used in the calibration process: run the query in `sql/data_downloads/state_monthly.sql` on table "long_county_hourly_{turnover}_{weather}" for one specific turnover and weather that covers 2020-2024 period, and save the result as "diagnostics/state_monthly_for_cal.csv" + ### Granular Workflow Steps For more control over the workflow, you can run individual steps: @@ -473,9 +510,11 @@ To produce coherent scenario files, all county-level extractions are combined in - Facilitates unified multi-scenario comparisons - Maintains outputs both in S3 and locally -#### Step 4: Generating Multipliers (`--gen_multipliers`) +#### Step 4: Generating Multipliers (`--gen_mults`) + +The `--gen_mults` flag builds disaggregation scaffolding used later to generate county-level data. It executes a library of SQL files — first for annual geographic shares and then for hourly load shape shares. -The `--gen_multipliers` flag builds disaggregation scaffolding used later to generate county-level data. It executes a library of SQL files — first for annual geographic shares and then for hourly load shape shares. +Before running `--gen_mults`, comstock and resstock data are needed: such as `resstock_amy2018_release_2024.2_metadata`. Please refer to [this section](#register-s2-data-as-aws-glue-tables-so-athena-can-query), with source set to `s3://oedi-data-lake/nrel-pds-building-stock/`. The multiplier tables are materialized in Athena/S3: @@ -565,6 +604,9 @@ Use these to run just the parts of the workflow you need. Typical runs don't req - Runs Scout → county → combine → diagnostics → CSVs → R graphs and calibration steps. - Use for a full refresh when inputs changed broadly. +- `--calibration` + - Generate calibration multipliers using AEO historic data from 2020 to 2024 + - `--run_test` - Runs diagnostics: multipliers checks, county annual/hourly checks, measure coverage tests. - Use after changes to multipliers or county generation templates. @@ -574,7 +616,7 @@ Use these to run just the parts of the workflow you need. Typical runs don't req - Use when you want to publish or republish outputs to the target bucket. - `--bssbucket_parquetmerge` - - Publishes and merges parquet folders in both BSS and IEF buckets; also exports wide Scout parquet. + - Publishes and merges parquet folders in both BSS buckets; also exports wide Scout parquet. - Use when you want fully merged state-level parquet deliverables. - `--county_partition_mults` diff --git a/bss_workflow.py b/bss_workflow.py index a562f09..4ca0ad1 100644 --- a/bss_workflow.py +++ b/bss_workflow.py @@ -47,7 +47,7 @@ class Config: MAP_MEAS_DIR = "map_meas" ENVELOPE_MAP_PATH = os.path.join(MAP_MEAS_DIR, "envelope_map.tsv") MEAS_MAP_PATH = os.path.join(MAP_MEAS_DIR, "measure_map.tsv") - CALIB_MULT_PATH = os.path.join(MAP_MEAS_DIR, "calibration_multipliers.csv") + CALIB_MULT_PATH = os.path.join(MAP_MEAS_DIR, "calibration_multipliers.tsv") SCOUT_OUT_TSV = "scout/scout_tsv" SCOUT_IN_JSON = "scout/scout_json" OUTPUT_DIR = "agg_results" @@ -62,18 +62,20 @@ class Config: WEATHER = "amy" MULTIPLIERS_TABLES = [ - "com_annual_disaggregation_multipliers", # mult_com_annual - "res_annual_disaggregation_multipliers", # mult_res_annual - "com_hourly_disaggregation_multipliers", # mult_com_hourly - "res_hourly_disaggregation_multipliers", # mult_res_hourly + f"com_annual_disaggregation_multipliers_{WEATHER}", # mult_com_annual + f"res_annual_disaggregation_multipliers_{WEATHER}", # mult_res_annual + f"com_hourly_disaggregation_multipliers_{WEATHER}", # mult_com_hourly + f"res_hourly_disaggregation_multipliers_{WEATHER}", # mult_res_hourly ] + MULTIPLIERS_SUFFIX = "disaggregation_multipliers_" + WEATHER + BLDSTOCK_TABLES = [ "comstock_amy2018_release_2024.2_parquet", # meta_com "comstock_amy2018_release_2024.2_by_state", # ts_com - "comstock_2025.1_upgrade_0" # gap_com - "resstock_amy2018_release_2024.2_metadata". # meta_res - "resstock_amy2018_release_2024.2_by_state". # ts_res + "comstock_2025.1_upgrade_0", # gap_com + "resstock_amy2018_release_2024.2_metadata", # meta_res + "resstock_amy2018_release_2024.2_by_state", # ts_res ] @@ -183,7 +185,7 @@ def execute_athena_query_to_df2(s3_client, athena_client, query: str, table_name """ s3_bucket_target = "bss-workflow" - s3_folder = "v2/annual/" + s3_folder = "v4/annual/" s3_output_prefix = "athena_results/" output_location = f"s3://{cfg.BUCKET_NAME}/{s3_output_prefix}/" qid = start_athena_query(athena_client, query, output_location, cfg.DATABASE_NAME) @@ -200,6 +202,20 @@ def execute_athena_query_to_df2(s3_client, athena_client, query: str, table_name print(f"{local_parquet_file} is uploaded to {s3_bucket_target}/{s3_folder}") +def drop_athena_table_if_exists(athena, t, cfg): + """ + Drop an Athena table if it exists. + + Parameters: + - athena: Boto3 Athena client + - t: Table name to drop + - cfg: Config object containing DATABASE_NAME + """ + query = f"DROP TABLE IF EXISTS {t};" + print(f"Dropping table if exists: {t}") + execute_athena_query(athena, query, cfg, is_create=True, wait=True) + + def upload_file_to_s3(s3_client, local_path: str, bucket: str, s3_path: str): s3_client.upload_file(local_path, bucket, s3_path) print(f"UPLOADED {os.path.basename(local_path)} to s3://{bucket}/{s3_path}") @@ -388,7 +404,7 @@ def _scout_json_to_df(filename: str, include_env: bool, cfg: Config) -> pd.DataF # Fix measures without a fuel key to_shift = all_df[pd.isna(all_df["value"])].copy() if not to_shift.empty: - to_shift.loc[:, "value"] = to_shift["year"] + to_shift.loc[:, "value"] = pd.to_numeric(to_shift["year"], errors="coerce") to_shift.loc[:, "year"] = to_shift["fuel"] to_shift.loc[:, "fuel"] = "Electric" df = pd.concat([all_df[pd.notna(all_df["value"])], to_shift]) @@ -548,8 +564,16 @@ def _calc_annual_common(df: pd.DataFrame, gap_weights: pd.DataFrame, include_bas .reset_index() .rename(columns={"state_ann_kwh": "kwh_after"}) ) - cmp_all = pre_all.merge(post_all, on=group_keys, how="outer") \ - .fillna({"kwh_before": 0.0, "kwh_after": 0.0}) + + cmp_all = pre_all.merge(post_all, on=group_keys, how="outer") + + # Explicitly convert to numeric first + cmp_all["kwh_before"] = pd.to_numeric(cmp_all["kwh_before"], errors="coerce") + cmp_all["kwh_after"] = pd.to_numeric(cmp_all["kwh_after"], errors="coerce") + + # Now fill NaNs safely + cmp_all = cmp_all.fillna({"kwh_before": 0.0, "kwh_after": 0.0}) + cmp_all["delta"] = cmp_all["kwh_after"] - cmp_all["kwh_before"] cmp_all["pct_delta"] = cmp_all.apply( lambda r: (r["delta"] / r["kwh_before"]) if r["kwh_before"] else (0.0 if r["kwh_after"] == 0 else float("inf")), @@ -573,8 +597,14 @@ def _calc_annual_common(df: pd.DataFrame, gap_weights: pd.DataFrame, include_bas .reset_index() .rename(columns={"state_ann_kwh": "kwh_after"}) ) - cmp_sub = pre_sub.merge(post_sub, on=group_keys, how="outer") \ - .fillna({"kwh_before": 0.0, "kwh_after": 0.0}) + cmp_sub = pre_sub.merge(post_sub, on=group_keys, how="outer") + + # Explicitly convert to numeric first + cmp_sub["kwh_before"] = pd.to_numeric(cmp_sub["kwh_before"], errors="coerce") + cmp_sub["kwh_after"] = pd.to_numeric(cmp_sub["kwh_after"], errors="coerce") + + cmp_sub = cmp_sub.fillna({"kwh_before": 0.0, "kwh_after": 0.0}) + cmp_sub["delta"] = cmp_sub["kwh_after"] - cmp_sub["kwh_before"] cmp_sub["pct_delta"] = cmp_sub.apply( lambda r: (r["delta"] / r["kwh_before"]) if r["kwh_before"] else (0.0 if r["kwh_after"] == 0 else float("inf")), @@ -710,6 +740,8 @@ def sql_to_s3table(athena_client, cfg: Config, sql_file: str, sectorid: str, yea mult_res_annual=cfg.MULTIPLIERS_TABLES[1], mult_com_hourly=cfg.MULTIPLIERS_TABLES[2], mult_res_hourly=cfg.MULTIPLIERS_TABLES[3], + # used in test_multipliers functions + mult_suffix=cfg.MULTIPLIERS_SUFFIX, meta_com=cfg.BLDSTOCK_TABLES[0], ts_com=cfg.BLDSTOCK_TABLES[1], @@ -741,7 +773,7 @@ def render(**kw): for st in cfg.US_STATES: q = render(**base_kwargs, state=st) f"RUN {sql_rel} | sector={sectorid} turnover={turnover} " - f"year={yearid} state={st} enduse={eu}" + f"year={yearid} state={st}" execute_athena_query(athena_client, q, cfg, is_create=False, wait=True) return # Case 3: only {enduse} @@ -763,6 +795,14 @@ def render(**kw): def gen_multipliers(s3_client, athena_client, cfg: Config): sectors = ["com", "res"] + # drop tables before rerunning multipliers + drop_tables = [ + "com_annual_disaggregation_multipliers_amy", + "com_hourly_disaggregation_multipliers_amy", + f"com_hourly_hvac_temp_{cfg.VERSION_ID}" + ] + for t in drop_tables: + drop_athena_table_if_exists(athena_client, t, cfg) # lists as in original tbl_res = [ "tbl_ann_mult.sql", @@ -772,7 +812,7 @@ def gen_multipliers(s3_client, athena_client, cfg: Config): "res_ann_shares_wh.sql", "res_ann_shares_hvac.sql", "res_ann_shares_deliveredheat.sql", - "res_ann_shares_deliveredcool.sql", + "res_ann_shares_deliveredcooling.sql", "res_ann_shares_deliveredwh.sql", "res_ann_shares_cw.sql", "res_ann_shares_dry.sql", @@ -831,7 +871,7 @@ def gen_multipliers(s3_client, athena_client, cfg: Config): sql_to_s3table(athena_client, cfg, tbl_name, sectorid, yearid="2024", turnover="brk") -def get_csvs_for_R(s3_client, athena_client, cfg: Config): +def get_csvs_for_R(s3_client, athena_client, cfg: Config, for_calibration: bool = False): turnovers = cfg.TURNOVERS sql_files = [ # "county_100_hrs.sql", @@ -845,6 +885,10 @@ def get_csvs_for_R(s3_client, athena_client, cfg: Config): "county_peak_hour.sql", "county_share_winter.sql" ] + + if for_calibration: + sql_files = ["state_monthly.sql"] + out_dir = "R/generated_csvs" os.makedirs(out_dir, exist_ok=True) @@ -858,6 +902,30 @@ def get_csvs_for_R(s3_client, athena_client, cfg: Config): df.to_csv(out, index=False) print(f"Saved {out}") +def generate_state_monthly_for_cal(s3_client, athena_client, cfg: Config): + """ + Generate state monthly for calibration from the long_county_hourly_ref_amy table + and save to diagnostics/state_monthly_for_cal.csv + """ + os.makedirs("diagnostics", exist_ok=True) + out_path = "diagnostics/state_monthly_for_cal.csv" + + # Using the state_monthly.sql template, but specifically for 'ref' turnover and 'amy' weather + sql_path = "data_downloads/state_monthly.sql" + template = read_sql_file(sql_path, cfg) + + # Override the default SQL to use specific table and turnover + q = template.format( + turnover='aeo', + weather='amy', + dest_bucket=cfg.BUCKET_NAME + ) + + # Execute the query and save to CSV + df = execute_athena_query_to_df(s3_client, athena_client, q, cfg) + df.to_csv(out_path, index=False) + print(f"Saved {out_path}") + def county_partition_multipliers(athena_client, cfg: Config): """ @@ -1003,10 +1071,10 @@ def convert_scout_long_to_wide(athena_client, cfg: Config): sql_dir = "data_conversion" turnovers = cfg.TURNOVERS - # # baseline - # template = read_sql_file(f"{sql_dir}/long_to_wide_ann_baseline.sql", cfg) - # q = template.format(dest_bucket=cfg.BUCKET_NAME, version=cfg.VERSION_ID) - # execute_athena_query(athena_client, q, cfg, is_create=False, wait=True) + # baseline + template = read_sql_file(f"{sql_dir}/long_to_wide_ann_baseline.sql", cfg) + q = template.format(dest_bucket=cfg.BUCKET_NAME, version=cfg.VERSION_ID) + execute_athena_query(athena_client, q, cfg, is_create=False, wait=True) # scenarios scout_header = f"""CREATE TABLE wide_scout_annual_state @@ -1250,7 +1318,8 @@ def test_county(s3_client, athena_client, cfg: Config): "test_county_hourly_total.sql", "test_county_hourly_enduse.sql", "test_county_hourly_state.sql", - "test_missing_shape_ts_hourly.sql", + "test_missing_shape_ts_res.sql", + "test_missing_shape_ts_com.sql", "test_missing_group_ann_hourly.sql" ] years = cfg.YEARS @@ -1269,9 +1338,13 @@ def test_county(s3_client, athena_client, cfg: Config): q = template.format(dest_bucket=cfg.BUCKET_NAME, turnover=t, year=y, weather=cfg.WEATHER, version=cfg.VERSION_ID) df = execute_athena_query_to_df(s3_client, athena_client, q, cfg) df["year"] = y + df["turnover"] = t - final = pd.concat([final, df.sort_values(by=["turnover"], ascending=[True])], ignore_index=True) + final = pd.concat([final, df], ignore_index=True) + # Sort once at the end if needed + final = final.sort_values(by=["turnover", "year"], ascending=[True, True]) + if os.path.exists(out_csv): os.remove(out_csv) final.to_csv(out_csv, index=False) @@ -1286,13 +1359,20 @@ def test_multipliers(s3_client, athena_client, cfg: Config): out_csv = "./diagnostics/test_multipliers.csv" os.makedirs("diagnostics", exist_ok=True) + mult_com_annual=cfg.MULTIPLIERS_TABLES[0] + mult_res_annual=cfg.MULTIPLIERS_TABLES[1] + mult_com_hourly=cfg.MULTIPLIERS_TABLES[2] + mult_res_hourly=cfg.MULTIPLIERS_TABLES[3] + # used in test_multipliers functions + suf=cfg.MULTIPLIERS_SUFFIX + final = pd.DataFrame() for sql_file in test_files: result_col = sql_file.split(".")[0] sectors = ["res", "com"] if "annual" in sql_file else (["com"] if "com" in sql_file else ["res"]) for s in sectors: template = read_sql_file(f"{sql_dir}/{sql_file}", cfg) - q = template.format(version=cfg.VERSION_ID, sector=s) + q = template.format(sector=s, suffix=suf) print(q) df = execute_athena_query_to_df(s3_client, athena_client, q, cfg) df["test_name"] = f"{result_col}_{s}" @@ -1308,7 +1388,7 @@ def test_multipliers(s3_client, athena_client, cfg: Config): f""" with re_agg as( SELECT group_ann, sector, "in.state", end_use, sum(multiplier_annual) as added - FROM res_annual_disaggregation_multipliers_{cfg.VERSION_ID} + FROM {mult_res_annual} GROUP BY group_ann, sector, "in.state", end_use ) SELECT * FROM re_agg WHERE added>1.001 OR added<.9999 @@ -1316,7 +1396,7 @@ def test_multipliers(s3_client, athena_client, cfg: Config): f""" with re_agg as( SELECT shape_ts, sector, "in.state", "in.weather_file_city", end_use, sum(multiplier_hourly) as added - FROM res_hourly_disaggregation_multipliers_{cfg.VERSION_ID} + FROM {mult_res_hourly} GROUP BY shape_ts, sector, "in.state", "in.weather_file_city", end_use ) SELECT * FROM re_agg WHERE added>1.001 OR added<.9999 @@ -1324,7 +1404,7 @@ def test_multipliers(s3_client, athena_client, cfg: Config): f""" with re_agg as( SELECT group_ann, sector, "in.state", end_use, sum(multiplier_annual) as added - FROM com_annual_disaggregation_multipliers_{cfg.VERSION_ID} + FROM {mult_com_annual} GROUP BY group_ann, sector, "in.state", end_use ) SELECT * FROM re_agg WHERE added>1.001 OR added<.9999 @@ -1332,7 +1412,7 @@ def test_multipliers(s3_client, athena_client, cfg: Config): f""" with re_agg as( SELECT shape_ts, sector, "in.county", end_use, sum(multiplier_hourly) as added - FROM com_hourly_disaggregation_multipliers_{cfg.VERSION_ID} + FROM {mult_com_hourly} GROUP BY shape_ts, sector, "in.county", end_use ) SELECT * FROM re_agg WHERE added>1.001 OR added<.9999 @@ -1397,7 +1477,10 @@ def run_r_script(r_file: str): if robjects is None: print("rpy2 not available; skipping R execution.") return - r_path = os.path.join("R", r_file) + # Get the absolute path to the folder containing THIS Python file + project_root = os.path.dirname(os.path.abspath(__file__)) + # Build the absolute path to the R script + r_path = os.path.join(project_root, "R", r_file) with open(r_path, "r", encoding="utf-8") as f: r_code = f.read() try: @@ -1528,7 +1611,7 @@ def bssbucket_insert(athena_client, cfg: Config): query_template = """ CREATE TABLE bss_county_hourly_{turnover}_amy_{sector}_{year} WITH ( - external_location = 's3://{dest_bucket}/v2/county_hourly/{turnover}/sector={sector}/year={year}/', + external_location = 's3://{dest_bucket}/v4/county_hourly/{turnover}/sector={sector}/year={year}/', format = 'PARQUET', write_compression = 'SNAPPY', partitioned_by = ARRAY['state'] @@ -1558,7 +1641,7 @@ def bssbucket_parquetmerge(s3_client, cfg: Config): for t in turnovers: for s in sectors: for y in years: - top = f"v2/county_hourly/{t}/sector={s}/year={y}/" + top = f"v4/county_hourly/{t}/sector={s}/year={y}/" print(f"Merging BSS bucket for {t} {s} {y}") merge_and_replace_folders(s3_client, dest_bucket, top) @@ -1829,6 +1912,7 @@ def main(opts): if opts.gen_mults: s3, athena = get_boto3_clients() + s3_create_table_from_tsv(s3, athena, cfg.MEAS_MAP_PATH, cfg) s3_create_tables_from_csvdir(s3, athena, cfg) gen_multipliers(s3, athena, cfg) test_multipliers(s3, athena, cfg) @@ -1842,13 +1926,42 @@ def main(opts): _, athena = get_boto3_clients() gen_countydata(athena, cfg) + if opts.combine_countydata: + _, athena = get_boto3_clients() + combine_countydata(athena, cfg) + if opts.convert_wide: _, athena = get_boto3_clients() convert_countyhourly_long_to_wide(athena, cfg) convert_scout_long_to_wide(athena, cfg) + if opts.calibration: + s3, athena = get_boto3_clients() + TURNOVERS_backup = cfg.TURNOVERS + YEARS_backup = cfg.YEARS + cfg.TURNOVERS = ["aeo"] + cfg.YEARS = [str(i) for i in range(2020, 2025)] + gen_scoutdata(s3, athena, cfg) + # might need to run --gen_mults to generate disaggregation multipliers if mapping changed + gen_countydata(athena, cfg) + combine_countydata(athena, cfg) + get_csvs_for_R(s3, athena, cfg, for_calibration=True) + generate_state_monthly_for_cal(s3, athena, cfg) + run_r_script("calibration.R") + cfg.TURNOVERS = TURNOVERS_backup + cfg.YEARS = YEARS_backup + if opts.gen_countyall: s3, athena = get_boto3_clients() + # remove scout_annual_state_aeo (produced from calibration) + # also remove long_county_hourly_aeo_amy and long_county_annual_aeo_amy, as 2026 onward data will be generated and concatenated + drop_tables = [ + "scout_annual_state_aeo", + "long_county_hourly_aeo_amy", + "long_county_annual_aeo_amy" + ] + for t in drop_tables: + drop_athena_table_if_exists(athena, t, cfg) gen_scoutdata(s3, athena, cfg) run_r_script("annual_graphs.R") gen_countydata(athena, cfg) @@ -1856,22 +1969,24 @@ def main(opts): test_county(s3, athena, cfg) get_csvs_for_R(s3, athena, cfg) run_r_script("county and hourly graphs.R") - run_r_script("calibration.R") if opts.bssbucket_insert: _, athena = get_boto3_clients() bssbucket_insert(athena, cfg) - if opts.bssbucket_parquetmerge: + if opts.iefbucket_parquetmerge: s3, athena = get_boto3_clients() s3_bucket = "bss-ief-bucket" + # Insert and merge (IEF) + bssiefbucket_insert(athena, cfg) + bssiefbucket_parquetmerge(s3, cfg) + + if opts.bssbucket_parquetmerge: + s3, athena = get_boto3_clients() # Insert and merge (BSS) bssbucket_insert(athena, cfg) bssbucket_parquetmerge(s3, cfg) - merge_and_replace_folders(s3, 'bss-workflow', 'v2/annual_results/') - # # Insert and merge (IEF) - bssiefbucket_insert(athena, cfg) - bssiefbucket_parquetmerge(s3, cfg) + merge_and_replace_folders(s3, 'bss-workflow', 'v4/annual_results/') bssbucket_parquet_scout(s3, athena, cfg) if opts.run_test: @@ -1886,7 +2001,6 @@ def main(opts): _, athena = get_boto3_clients() county_partition_multipliers(athena, cfg) - if __name__ == "__main__": start_time = time.time() @@ -1896,11 +2010,14 @@ def main(opts): parser.add_argument("--gen_county", action="store_true", help="Generate County Data") parser.add_argument("--gen_countyall", action="store_true", help="Generate County Data and post-process") parser.add_argument("--gen_scoutdata", action="store_true", help="Generate Scout Data") + parser.add_argument("--combine_countydata", action="store_true", help="Combine County Data") parser.add_argument("--convert_wide", action="store_true", help="Convert datasets as necessary") parser.add_argument("--bssbucket_insert", action="store_true", help="Populate into bss-workflow") - parser.add_argument("--bssbucket_parquetmerge", action="store_true", help="Populate + merge parquet under bucket") + parser.add_argument("--bssbucket_parquetmerge", action="store_true", help="Populate + merge parquet under bss bucket") + parser.add_argument("--iefbucket_parquetmerge", action="store_true", help="Populate + merge parquet under ief bucket") parser.add_argument("--run_test", action="store_true", help="Run diagnostics") parser.add_argument("--county_partition_mults", action="store_true", help="Partition multipliers by county") + parser.add_argument("--calibration", action="store_true", help="Generate calibration multipliers") opts = parser.parse_args() main(opts) diff --git a/map_eu/county2tz2state.tsv b/map_eu/county2tz2state.tsv new file mode 100644 index 0000000..ceb85e0 --- /dev/null +++ b/map_eu/county2tz2state.tsv @@ -0,0 +1,3108 @@ +tz in.state in.county +EST IN G1800970 +CST MN G2700530 +PST CA G0600950 +CST MN G2700230 +EST NY G3600850 +EST NY G3600430 +EST FL G1201010 +CST IL G1700110 +EST PA G4200330 +PST CA G0600270 +PST CA G0600350 +EST PA G4200370 +EST WV G5400990 +MST MT G3000890 +EST NJ G3400370 +CST MS G2801210 +CST AL G0101170 +EST OH G3901670 +EST GA G1302290 +CST KS G2002070 +PST WA G5300650 +PST WA G5300450 +EST KY G2101130 +EST NC G3701650 +CST WI G5500690 +PST CA G0600470 +CST AR G0501330 +EST OH G3900210 +CST KS G2001850 +CST AL G0100610 +CST MS G2801590 +EST VA G5101410 +CST MO G2902070 +CST IL G1700870 +CST MO G2900410 +EST MI G2600330 +CST TX G4804050 +CST TN G4700270 +EST PA G4201050 +CST TX G4802550 +CST MO G2902110 +CST ND G3800190 +CST MS G2800090 +CST AL G0100990 +CST TX G4804890 +CST IA G1900410 +EST DE G1000030 +EST MD G2400030 +CST AL G0101090 +EST MI G2600890 +MST WY G5600010 +CST TX G4801890 +CST MN G2701090 +EST NY G3601050 +MST_only AZ G0400030 +CST LA G2201050 +CST IA G1901550 +EST SC G4500650 +CST IL G1701430 +EST IN G1800110 +CST AL G0100170 +CST MS G2800650 +CST IA G1900990 +EST IN G1800670 +EST VA G5100670 +CST IA G1900390 +CST TX G4800370 +EST KY G2100450 +EST NY G3601230 +EST NC G3700070 +EST TN G4701510 +CST TN G4701830 +EST KY G2101590 +EST IN G1801590 +EST MI G2600610 +CST MO G2901570 +EST FL G1200370 +EST WV G5400470 +MST WY G5600050 +MST ID G1600290 +CST MO G2902190 +PST NV G3200290 +CST TX G4801610 +EST VA G5105950 +CST MN G2701730 +CST IA G1901370 +CST KS G2001630 +EST FL G1200310 +MST NM G3500570 +EST NC G3700690 +EST MA G2500090 +EST MI G2601630 +EST FL G1200510 +CST WI G5501050 +EST MI G2601490 +MST_only AZ G0400250 +PST CA G0600450 +EST MD G2400190 +EST NY G3600950 +CST LA G2200710 +EST NH G3300190 +CST NE G3100410 +CST LA G2200950 +EST FL G1201210 +EST OH G3901450 +CST KS G2000990 +EST TN G4701290 +EST FL G1201070 +EST NH G3300170 +CST OK G4000090 +EST WV G5400250 +CST LA G2200670 +CST TN G4700850 +CST TX G4802250 +EST GA G1302410 +CST TN G4701370 +CST AL G0100590 +CST SD G4600130 +CST TN G4700030 +EST OH G3900310 +MST CO G0800870 +CST TX G4800350 +CST AL G0100930 +CST IL G1701070 +CST TX G4802110 +MST MT G3000210 +CST KS G2000670 +MST MT G3000330 +EST GA G1300490 +CST KS G2000110 +CST IL G1700510 +EST KY G2101530 +CST ND G3800430 +EST KY G2101030 +CST IL G1700670 +EST CT G0900110 +EST NY G3600470 +EST RI G4400070 +EST VA G5101910 +CST MO G2900210 +EST VA G5100870 +CST MN G2700950 +EST KY G2101790 +EST KY G2101650 +CST LA G2200770 +EST MI G2600270 +EST GA G1300170 +EST VA G5106600 +EST KY G2101970 +CST KS G2000570 +MST NM G3500370 +CST MO G2902130 +CST WI G5500630 +EST PA G4200730 +EST VA G5101370 +EST KY G2101670 +EST VA G5100630 +EST KY G2101210 +CST MS G2800730 +EST OH G3901590 +CST IL G1700230 +EST GA G1302910 +CST TX G4803490 +CST AL G0100090 +EST VA G5108400 +EST GA G1300810 +CST IA G1900470 +CST AL G0100790 +CST MO G2901350 +CST SD G4600030 +MST SD G4601170 +EST VA G5100110 +CST LA G2201210 +CST NE G3101590 +CST NE G3101370 +EST IN G1801430 +CST TX G4802610 +CST MO G2900430 +PST OR G4100510 +CST IL G1700970 +CST TX G4800270 +EST PA G4201010 +EST WV G5400030 +CST ND G3800170 +EST NY G3600170 +EST MD G2400050 +EST VT G5000030 +EST GA G1300010 +EST IN G1800490 +EST KY G2102290 +CST IL G1700570 +EST GA G1300090 +EST VA G5101270 +CST NE G3101850 +CST MN G2701010 +CST MN G2700590 +CST NE G3100530 +CST WI G5500230 +CST MN G2701610 +EST WV G5400050 +EST TN G4700290 +CST TX G4801170 +MST WY G5600030 +MST ID G1600430 +CST MN G2701290 +CST AL G0101190 +CST KS G2001570 +CST MS G2800510 +CST NE G3100150 +CST NE G3101830 +MST ID G1600270 +MST MT G3000810 +MST CO G0800690 +EST CT G0900010 +EST IN G1801530 +CST LA G2200790 +PST NV G3200310 +CST MO G2900470 +EST VA G5101570 +PST CA G0600690 +EST OH G3901190 +PST ID G1600550 +EST WV G5400290 +EST GA G1302470 +EST GA G1300390 +EST VA G5100750 +EST KY G2101870 +EST IN G1800290 +CST IL G1701210 +EST WV G5400670 +EST SC G4500550 +PST OR G4100590 +CST AL G0100350 +CST MS G2800890 +CST TX G4802310 +EST GA G1301470 +CST TX G4803870 +EST OH G3900010 +EST VA G5101190 +EST GA G1302790 +EST VT G5000190 +CST IA G1900510 +EST GA G1302830 +CST TN G4701010 +CST KY G2100830 +EST OH G3900970 +CST TX G4803530 +CST MN G2701130 +CST NE G3101630 +CST MS G2800070 +PST WA G5300010 +CST IA G1900530 +EST GA G1301710 +CST IL G1700130 +CST WI G5500650 +CST NE G3101670 +CST AR G0500650 +CST IA G1900870 +EST WV G5401010 +EST WV G5400730 +CST NE G3101810 +EST IN G1800810 +CST MO G2905100 +CST TX G4801570 +EST OH G3901290 +EST NY G3600490 +EST TN G4701230 +EST GA G1300730 +CST IN G1801290 +EST NJ G3400210 +CST FL G1201310 +EST OH G3900770 +EST FL G1200550 +CST TN G4701130 +EST OH G3901410 +CST OK G4001450 +CST AR G0501050 +EST TN G4700730 +CST TX G4801770 +EST IN G1800190 +EST IN G1800170 +PST CA G0600870 +EST NC G3700970 +CST MO G2902290 +CST MS G2800050 +CST MO G2902230 +PST WA G5300470 +CST MS G2800430 +EST GA G1302970 +PST CA G0600510 +EST VA G5100370 +EST GA G1300950 +CST WI G5500890 +EST MI G2600630 +EST NC G3700650 +CST MS G2800930 +CST WI G5500910 +CST IA G1901330 +CST TX G4804590 +EST VA G5101330 +EST VA G5100930 +EST MI G2600310 +CST IL G1701090 +PST CA G0600910 +CST TX G4803850 +MST WY G5600190 +CST TX G4802470 +CST ND G3800850 +CST MS G2801190 +CST SD G4600450 +MST CO G0800590 +PST WA G5300330 +CST MS G2800350 +MST CO G0800310 +PST WA G5300630 +CST MS G2800470 +PST CA G0600750 +EST MI G2601250 +CST TX G4803070 +EST NC G3701830 +CST OK G4001350 +EST OH G3900030 +PST OR G4100390 +CST WI G5501130 +EST NC G3700530 +CST LA G2201090 +CST TX G4801670 +CST MO G2900910 +EST OH G3901250 +EST SC G4500090 +CST TX G4801350 +MST CO G0800650 +EST GA G1302930 +CST LA G2200010 +PST WA G5300410 +MST UT G4900190 +MST UT G4900210 +CST MO G2900230 +MST WY G5600310 +CST MN G2701310 +EST PA G4200230 +CST OK G4000210 +CST LA G2200250 +EST PA G4200990 +CST OK G4000990 +CST KS G2001230 +CST MO G2901330 +CST IA G1900050 +CST IA G1901170 +EST VA G5100810 +EST MI G2600470 +CST LA G2200910 +EST NC G3701210 +CST IA G1900650 +CST TX G4800950 +CST MN G2701570 +CST MO G2900390 +CST TX G4802970 +CST TX G4803510 +CST MS G2800210 +EST KY G2100510 +CST TX G4801530 +CST KS G2000250 +CST AR G0500130 +CST ND G3800830 +CST TX G4803930 +CST NE G3101170 +CST KS G2001770 +CST TX G4803550 +EST MA G2500150 +EST FL G1200970 +EST PA G4200490 +PST CA G0600970 +CST WI G5500590 +EST GA G1300970 +CST AL G0100950 +CST OK G4000410 +MST NE G3101570 +CST MO G2901050 +CST LA G2200390 +CST OK G4001530 +CST TN G4700610 +EST TN G4700650 +EST FL G1200230 +CST IL G1700930 +EST GA G1302630 +EST TN G4701790 +PST CA G0600150 +CST IA G1901710 +CST TX G4804570 +CST TX G4804850 +EST MI G2600910 +PST CA G0600630 +CST MS G2800710 +EST IN G1801330 +CST IL G1701010 +CST WI G5500190 +EST OH G3901750 +EST OH G3901430 +CST TX G4804190 +EST IN G1801790 +CST OK G4001230 +EST VA G5101010 +CST MN G2700890 +CST MO G2901850 +CST MS G2800690 +PST WA G5300130 +CST KS G2000170 +CST SD G4600690 +PST CA G0600370 +EST MI G2601030 +EST MA G2500130 +EST MI G2600410 +EST FL G1200610 +CST IN G1801470 +CST NE G3101410 +CST MS G2801010 +PST CA G0600990 +CST IL G1700850 +EST VA G5101530 +EST OH G3900170 +EST GA G1303130 +EST VA G5108300 +EST VA G5100690 +EST ME G2300070 +MST NM G3500550 +CST LA G2201110 +CST KY G2101430 +MST WY G5600230 +EST PA G4200850 +PST WA G5300390 +CST NE G3100810 +CST OK G4000850 +CST TN G4700790 +MST UT G4900370 +CST WI G5500210 +EST TN G4701070 +CST TX G4805070 +CST IL G1701410 +CST TX G4800250 +CST TX G4804370 +EST VA G5101450 +CST MN G2701250 +EST GA G1300930 +PST WA G5300550 +CST TN G4701530 +CST KY G2102130 +EST VA G5101490 +CST IL G1700490 +CST TX G4804450 +CST TX G4803770 +EST KY G2100770 +MST NE G3100310 +PST ID G1600350 +MST NE G3101650 +CST WI G5501330 +CST WI G5500950 +EST TN G4700110 +EST WV G5400330 +CST TN G4700310 +EST NC G3700810 +CST AR G0500090 +EST NJ G3400050 +EST WV G5400110 +EST NC G3700350 +CST SD G4600850 +EST KY G2102090 +CST TX G4803650 +EST GA G1300770 +EST GA G1301510 +CST AR G0501310 +CST TN G4700050 +PST WA G5300310 +CST MN G2701110 +CST IA G1900550 +CST KS G2001390 +EST KY G2101230 +CST TX G4801070 +MST CO G0800370 +EST OH G3900650 +CST AL G0100230 +EST NY G3601090 +MST CO G0800550 +EST VA G5101810 +CST TX G4802270 +CST MN G2700770 +EST VA G5101030 +CST TX G4800070 +EST GA G1303150 +CST TX G4801030 +CST TX G4801050 +PST WA G5300530 +MST CO G0800350 +CST MN G2700330 +EST KY G2100670 +EST MA G2500210 +EST TN G4700890 +EST NY G3600750 +EST FL G1200730 +MST ID G1600050 +EST OH G3901490 +CST TX G4800610 +CST AR G0501210 +CST AL G0100310 +MST MT G3000470 +CST MO G2902090 +CST AL G0100270 +CST SD G4600830 +CST MO G2900870 +CST AR G0500610 +CST IL G1701330 +MST_only AZ G0400120 +CST WI G5500770 +CST WI G5500450 +CST WI G5500310 +EST SC G4500390 +CST OK G4000050 +CST IL G1700450 +EST GA G1302110 +EST GA G1302010 +MST MT G3000670 +CST LA G2200270 +CST KS G2000330 +CST OK G4000730 +CST OK G4000250 +CST KS G2001370 +CST NE G3101130 +CST SD G4600430 +MST UT G4900330 +CST OK G4000110 +CST NE G3101210 +EST VA G5105300 +CST IA G1901730 +MST MT G3000510 +MST NE G3100570 +CST KY G2101050 +CST MN G2700030 +PST OR G4100670 +MST CO G0800430 +CST IL G1701970 +EST IN G1800530 +EST NC G3701850 +EST NC G3700930 +EST IN G1800450 +EST IN G1800050 +CST AL G0100710 +EST SC G4500830 +MST CO G0800140 +EST VA G5100030 +MST ID G1600850 +MST CO G0800030 +EST KY G2100110 +EST PA G4200670 +CST MO G2901070 +EST SC G4500210 +CST MO G2900850 +CST KS G2000790 +EST OH G3900330 +MST_only AZ G0400010 +CST TX G4801690 +CST MN G2700630 +EST GA G1301990 +CST AR G0501170 +MST NM G3500590 +CST KS G2000070 +EST MI G2601010 +CST TX G4800770 +MST MT G3000970 +CST IL G1701530 +CST ND G3800530 +MST CO G0800890 +EST VA G5101110 +CST KS G2001410 +CST OK G4001410 +MST NE G3100290 +CST TX G4801290 +CST TX G4800430 +MST NM G3500280 +CST MO G2900610 +MST CO G0800330 +CST TX G4800850 +EST NY G3600790 +EST MI G2601470 +CST MO G2901890 +EST OH G3900570 +CST AL G0100630 +EST KY G2100930 +EST SC G4500150 +CST KS G2001210 +CST MN G2701590 +EST PA G4201190 +CST TN G4700690 +CST IA G1900890 +CST IL G1701950 +EST NC G3700490 +EST OH G3901690 +CST AR G0501250 +CST MO G2901650 +EST NC G3700410 +EST NC G3701630 +EST SC G4500890 +MST ID G1600310 +EST NC G3700430 +EST ME G2300170 +EST KY G2100950 +CST TX G4801790 +EST VA G5100090 +EST GA G1301450 +EST NC G3700390 +EST VA G5101670 +CST MS G2801030 +CST MN G2700490 +EST PA G4200530 +CST MN G2700910 +EST MD G2400450 +CST MO G2900530 +CST NE G3101110 +CST KS G2000690 +CST TX G4802710 +CST KS G2000770 +MST MT G3001010 +CST KS G2000030 +CST NE G3100770 +MST SD G4600470 +CST KS G2001650 +CST TX G4801510 +CST KS G2001790 +CST OK G4000570 +EST TN G4700930 +EST CT G0900030 +PST NV G3200330 +CST TX G4800390 +CST TX G4803190 +CST TX G4802590 +EST TN G4700090 +CST TX G4804530 +EST SC G4500710 +EST PA G4200790 +EST IN G1801250 +PST CA G0601130 +CST TN G4701890 +CST AR G0500350 +CST TX G4801650 +EST NH G3300090 +MST NM G3500470 +CST MS G2800450 +CST OK G4000370 +EST TN G4700250 +CST TX G4801630 +EST CT G0900130 +EST NC G3700770 +CST LA G2200570 +EST GA G1300230 +MST ID G1600390 +EST WV G5400650 +EST KY G2100130 +EST MD G2400110 +CST NE G3100430 +CST TN G4700230 +MST MT G3000590 +CST MO G2901950 +CST TX G4803730 +CST OK G4000450 +CST MO G2900790 +PST WA G5300610 +EST TN G4700590 +EST NY G3600630 +EST DE G1000010 +EST FL G1200010 +EST NC G3700470 +EST OH G3901030 +CST TX G4800890 +EST PA G4200930 +EST MI G2600290 +CST NE G3101090 +CST SD G4600510 +CST WI G5500970 +CST MO G2901690 +CST OK G4001490 +CST TX G4802230 +EST MI G2600930 +CST ND G3800570 +EST IN G1801550 +EST VA G5101690 +MST ID G1600070 +MST ID G1600730 +CST WI G5500130 +PST WA G5300190 +MST ID G1600530 +EST KY G2102030 +EST WV G5400710 +CST NE G3101730 +CST OK G4000950 +CST MO G2900830 +CST AL G0101050 +CST NE G3100630 +EST GA G1300070 +CST KS G2001190 +CST TX G4803590 +CST FL G1200910 +EST NY G3600810 +CST MN G2701050 +MST UT G4900430 +CST IA G1900610 +EST RI G4400010 +EST KY G2101630 +CST OK G4001010 +EST GA G1302710 +CST IL G1700370 +CST WI G5500810 +MST NM G3500190 +EST PA G4201030 +MST ID G1600590 +CST LA G2200150 +CST MO G2900890 +EST WV G5400390 +CST MO G2901810 +CST LA G2200310 +CST MO G2901410 +EST NC G3701410 +MST NM G3500070 +CST NE G3101330 +CST TX G4802910 +CST SD G4600790 +MST NM G3500450 +CST OK G4000070 +CST AL G0101070 +EST NC G3701810 +EST KY G2102170 +EST VA G5101630 +EST IN G1801610 +CST TN G4701170 +CST TX G4800570 +CST KS G2000050 +CST MO G2901860 +EST MI G2601410 +CST AL G0101310 +PST CA G0600030 +MST NE G3101050 +CST TX G4802070 +CST ND G3801030 +CST AL G0100730 +EST FL G1200860 +CST TX G4804510 +EST NY G3600010 +CST IL G1701810 +EST NY G3601130 +CST OK G4001090 +CST LA G2200290 +EST ME G2300050 +CST IL G1700750 +EST VA G5107750 +EST VA G5100470 +EST VA G5105900 +CST KY G2100850 +EST PA G4201110 +EST WV G5400970 +CST MN G2700790 +CST IL G1700950 +MST ID G1600650 +CST MS G2800150 +CST TX G4800590 +CST TX G4802990 +CST SD G4600350 +MST CO G0800710 +CST TN G4700550 +CST TX G4801110 +EST WV G5400910 +EST TN G4701730 +CST IL G1701770 +CST SD G4600370 +EST GA G1302070 +EST IN G1801210 +CST SD G4601010 +CST ND G3800590 +CST LA G2200810 +CST MO G2900650 +EST NC G3700750 +CST IA G1900810 +MST NM G3500330 +EST VA G5107200 +CST LA G2200130 +MST ID G1600810 +CST TX G4801550 +CST OK G4000290 +CST KS G2001050 +CST ND G3800470 +CST MS G2801230 +CST IL G1701610 +CST WI G5500790 +EST SC G4500810 +CST AL G0101270 +EST FL G1201270 +EST KY G2100710 +EST NJ G3400110 +EST OH G3900270 +EST NY G3600510 +CST IN G1800890 +EST MA G2500010 +CST IA G1900270 +MST ID G1600190 +CST KS G2000130 +EST PA G4200210 +PST ID G1600690 +EST OH G3901570 +EST NC G3700630 +EST PA G4201070 +EST MI G2601430 +EST SC G4500250 +CST LA G2200930 +PST ID G1600170 +CST MN G2701470 +EST MI G2601650 +EST MI G2600230 +CST SD G4601350 +MST MT G3000990 +CST NE G3100250 +MST WY G5600210 +CST TX G4805050 +MST CO G0800070 +EST NC G3701150 +CST AR G0500470 +CST SD G4601270 +CST AR G0500810 +CST AR G0500410 +CST KS G2000310 +EST VA G5100790 +EST GA G1302190 +CST KY G2100550 +CST LA G2201250 +CST TX G4804030 +CST MN G2701170 +MST SD G4600410 +CST KS G2000650 +MST MT G3000690 +CST SD G4600750 +CST MI G2600430 +EST NY G3600310 +EST NH G3300110 +EST GA G1300510 +PST CA G0600190 +EST MD G2400250 +CST TX G4804790 +PST WA G5300290 +CST AL G0100910 +EST KY G2101150 +EST VT G5000070 +EST FL G1200390 +EST WV G5400890 +EST VA G5101730 +CST LA G2200690 +CST NE G3101190 +CST IL G1701490 +EST FL G1200890 +CST MO G2900510 +EST NY G3600830 +EST NY G3601170 +CST TX G4803250 +PST NV G3200050 +CST LA G2201130 +EST VA G5105700 +EST KY G2102230 +CST KS G2001170 +CST MN G2700610 +CST MO G2901250 +MST ND G3800410 +EST NC G3701430 +MST MT G3000070 +MST CO G0800630 +MST MT G3000350 +EST WV G5400170 +CST AL G0100850 +MST MT G3001050 +EST IN G1800790 +CST TX G4801970 +EST MA G2500170 +CST MS G2801150 +EST SC G4500610 +CST WI G5500090 +EST PA G4200750 +EST NC G3701450 +PST CA G0601110 +EST NJ G3400090 +EST MI G2601310 +PST OR G4100530 +CST AL G0100550 +EST GA G1302570 +EST PA G4200410 +CST AL G0101330 +PST WA G5300210 +CST TN G4701350 +MST NM G3500050 +CST OK G4000010 +EST VT G5000210 +CST TX G4803470 +CST MO G2901590 +EST VA G5106900 +EST IN G1800750 +EST GA G1301190 +MST NM G3500510 +CST ND G3800390 +CST SD G4600490 +EST WV G5400130 +EST OH G3900150 +EST FL G1200670 +CST MN G2700010 +CST TX G4801330 +EST VA G5100250 +MST WY G5600430 +CST MO G2900570 +EST IN G1801350 +MST MT G3000570 +CST SD G4600890 +CST KS G2001870 +EST IN G1801310 +EST SC G4500530 +CST AL G0100570 +MST UT G4900290 +CST TX G4801270 +MST ND G3800330 +CST TN G4700370 +EST PA G4201330 +EST GA G1300470 +PST CA G0600290 +EST NY G3600610 +CST TX G4803790 +CST MO G2900310 +EST VA G5107000 +CST MS G2801270 +CST IA G1900170 +CST AR G0500770 +EST KY G2102110 +CST MO G2900710 +EST NY G3600650 +EST NC G3701910 +CST ND G3800030 +CST IN G1800730 +CST WI G5500430 +CST MN G2700570 +EST OH G3901610 +MST ID G1600770 +EST PA G4200810 +CST IA G1901390 +CST TX G4800010 +EST VT G5000050 +EST GA G1302530 +EST GA G1300850 +EST MI G2601510 +CST IL G1701470 +CST SD G4600650 +CST MS G2800530 +CST TN G4700810 +CST MO G2900350 +CST TN G4700150 +CST MO G2901370 +EST WV G5400750 +CST AL G0100650 +CST OK G4000690 +EST GA G1300530 +CST MO G2900450 +EST MI G2600110 +EST VA G5100070 +MST CO G0800790 +MST MT G3001090 +MST SD G4600070 +CST TX G4803030 +EST GA G1300210 +CST TX G4803390 +EST MA G2500250 +EST NY G3600550 +EST MD G2405100 +CST MO G2900290 +PST CA G0600770 +EST NC G3701890 +CST OK G4000890 +EST SC G4500750 +EST MD G2400270 +CST KY G2100590 +EST MI G2600770 +EST VA G5100150 +CST AL G0101130 +CST TX G4803810 +EST ME G2300010 +EST PA G4200610 +CST TX G4801850 +EST NC G3701610 +CST MN G2700050 +EST NC G3701590 +CST NE G3101530 +CST MN G2700670 +EST VA G5107400 +EST NH G3300030 +CST TX G4803710 +EST KY G2100210 +CST MS G2800570 +EST IN G1800850 +CST WI G5501350 +EST VA G5100730 +CST KY G2100910 +MST SD G4600930 +CST KS G2000090 +CST IL G1700050 +CST TX G4802770 +MST SD G4600810 +CST AR G0500290 +EST WV G5400950 +CST TX G4802650 +CST AR G0500030 +MST CO G0800930 +CST IA G1900210 +CST IA G1900070 +MST CO G0800510 +EST GA G1300610 +EST VA G5101550 +EST VA G5105800 +CST IL G1700170 +MST NE G3100690 +CST TX G4804910 +CST MS G2800610 +EST GA G1302450 +CST WI G5500750 +PST CA G0600790 +EST NY G3600890 +CST AR G0500510 +CST MO G2900690 +CST MN G2700430 +CST TN G4701870 +CST TX G4802030 +EST VA G5101130 +MST WY G5600350 +EST MI G2601530 +CST TX G4802410 +EST CT G0900050 +EST NY G3601210 +EST MI G2601170 +MST NE G3101230 +CST KY G2101770 +EST TN G4700190 +CST AR G0500570 +CST IA G1901750 +EST NY G3601010 +EST VA G5101850 +EST GA G1303050 +EST NC G3701270 +CST OK G4001170 +MST NM G3500410 +CST IL G1700530 +EST IN G1800310 +CST MO G2901770 +CST MO G2900250 +CST MS G2800010 +EST GA G1302810 +EST GA G1301650 +EST NC G3700330 +EST NC G3701370 +CST TX G4802830 +CST LA G2200650 +CST AR G0501070 +CST KS G2000970 +EST WV G5401050 +CST TX G4804470 +MST ND G3800070 +MST NE G3100750 +EST CT G0900090 +EST VA G5100130 +EST PA G4200110 +CST AL G0100430 +EST VA G5106000 +EST VA G5105100 +EST GA G1300570 +CST LA G2200050 +EST IN G1800130 +CST TX G4802570 +EST TN G4700010 +EST KY G2100050 +CST TX G4803950 +CST AR G0500270 +EST NC G3701170 +EST IN G1800950 +EST SC G4500670 +MST WY G5600130 +EST NY G3600030 +PST WA G5300490 +CST IA G1900690 +EST NC G3700090 +CST AR G0500890 +EST WV G5400090 +MST CO G0800730 +MST MT G3000910 +EST NC G3700950 +CST SD G4600950 +MST MT G3001070 +EST OH G3901550 +EST VA G5107300 +EST WV G5401070 +EST GA G1301230 +EST VA G5101870 +MST MT G3000930 +EST SC G4500770 +EST VA G5100650 +EST SC G4500570 +EST MI G2600670 +EST RI G4400090 +CST MN G2701410 +EST FL G1200170 +CST TX G4800750 +EST GA G1300290 +EST NC G3701570 +EST MI G2600750 +CST WI G5500530 +EST NC G3701670 +CST TX G4801310 +EST VA G5100990 +CST MS G2800390 +MST ID G1600410 +EST VA G5101350 +EST OH G3901470 +CST MN G2700850 +EST GA G1300330 +CST TN G4700870 +EST GA G1300110 +EST PA G4200870 +EST GA G1300910 +CST IA G1900190 +CST TN G4700950 +EST GA G1301610 +EST VA G5100210 +EST NC G3701770 +CST LA G2200350 +EST GA G1301250 +PST ID G1600610 +CST LA G2200590 +MST ND G3800010 +CST MN G2701670 +MST SD G4600550 +CST TX G4802690 +MST NM G3500010 +EST FL G1200470 +EST MI G2600490 +MST NM G3500270 +EST NY G3600670 +EST FL G1201190 +PST CA G0600530 +EST FL G1201170 +MST TX G4801410 +EST NC G3701130 +EST VA G5106300 +PST OR G4100710 +EST TN G4700130 +CST SD G4600270 +CST MS G2801550 +PST NV G3200210 +CST SD G4600290 +CST MO G2901550 +CST IL G1701750 +CST NE G3100790 +EST WV G5400410 +CST TX G4803210 +CST WI G5500370 +EST VA G5106800 +CST LA G2200410 +CST MS G2800810 +CST TX G4804770 +EST NC G3700130 +EST GA G1302750 +MST NE G3100490 +CST MN G2700090 +MST UT G4900230 +CST IA G1900830 +CST ND G3800550 +CST KS G2000930 +CST MO G2900050 +EST IN G1801150 +CST TX G4800090 +CST KY G2100750 +CST TX G4801370 +MST KS G2001990 +EST NY G3600050 +EST FL G1200950 +CST OK G4001470 +PST CA G0600010 +CST IA G1900110 +EST KY G2100150 +CST MO G2900950 +CST IL G1700890 +EST VA G5107600 +EST OH G3900290 +CST TX G4803430 +EST OH G3900450 +EST NC G3701510 +CST MO G2901150 +CST TN G4701650 +CST OK G4000310 +EST NC G3700250 +EST NY G3600230 +CST SD G4600110 +CST TX G4804730 +CST TX G4801430 +CST KY G2100570 +EST GA G1300590 +CST MN G2701390 +EST VA G5100230 +CST KS G2000870 +CST IL G1701670 +EST SC G4500130 +EST OH G3900550 +CST KS G2002050 +EST MD G2400390 +CST KY G2101490 +MST CO G0800290 +CST MO G2901170 +CST TX G4803130 +CST SD G4600530 +EST TN G4701210 +CST AR G0501370 +CST IL G1700710 +CST IL G1701550 +CST MS G2800110 +PST OR G4100250 +EST WV G5400210 +MST MT G3000770 +CST WI G5501030 +CST IA G1901350 +MST CO G0800230 +CST KS G2001970 +EST KY G2100810 +CST NE G3100830 +CST TN G4701690 +EST WV G5400070 +CST ND G3800130 +CST KS G2002030 +CST ND G3800910 +EST NY G3601110 +CST TX G4801130 +EST WV G5400350 +EST VA G5107900 +EST MI G2600990 +CST OK G4000390 +EST NJ G3400230 +EST MI G2600550 +EST FL G1201150 +CST KY G2101450 +EST OH G3900870 +EST GA G1300890 +CST MN G2700190 +EST VT G5000170 +EST NJ G3400070 +EST KY G2102390 +CST IL G1700910 +EST VA G5101070 +CST IA G1901130 +EST OH G3901370 +PST OR G4100030 +CST TX G4804230 +PST CA G0600090 +EST GA G1302730 +EST KY G2101610 +EST NY G3600250 +CST LA G2200990 +EST MI G2600450 +EST GA G1302550 +MST NM G3500250 +CST TX G4803290 +CST LA G2200610 +CST MN G2701530 +CST OK G4000710 +CST TX G4800530 +CST TX G4805030 +CST OK G4000330 +CST TN G4701750 +CST TX G4800450 +CST IL G1701910 +EST VA G5100570 +CST SD G4601230 +CST MO G2901490 +CST SD G4600870 +CST NE G3100950 +CST SD G4600730 +CST WI G5501010 +EST PA G4200770 +EST OH G3901330 +EST NJ G3400190 +CST WI G5501410 +EST IN G1800990 +CST MO G2901610 +CST MN G2700470 +PST CA G0600310 +EST NY G3600110 +EST PA G4201170 +CST IL G1700190 +EST MI G2600250 +CST SD G4600610 +MST ID G1600110 +EST MD G2400230 +EST NC G3700910 +EST GA G1302990 +EST NY G3601070 +EST MI G2601150 +CST FL G1200630 +PST ID G1600570 +EST OH G3900370 +CST ND G3800710 +CST WI G5500030 +CST NE G3101510 +EST WV G5400850 +EST GA G1300830 +MST CO G0801250 +EST NC G3701730 +CST KS G2000950 +EST GA G1301890 +MST ND G3800370 +CST TX G4802430 +CST KS G2000190 +CST KY G2102190 +EST VA G5100970 +CST MN G2700870 +EST VA G5106780 +MST MT G3000750 +CST IL G1700690 +EST SC G4500410 +EST GA G1302150 +CST WI G5500270 +EST WV G5400510 +CST IN G1801730 +CST MO G2900990 +EST FL G1200710 +EST NC G3701290 +EST GA G1301430 +EST VA G5101250 +EST PA G4200890 +CST AR G0500150 +CST MN G2700830 +CST MO G2900170 +EST IN G1800870 +CST OK G4000810 +EST WV G5400310 +EST VA G5106830 +CST LA G2200490 +MST WY G5600450 +CST IL G1701590 +CST MI G2601090 +MST WY G5600170 +CST TX G4802810 +CST IL G1700030 +CST MN G2701350 +CST KS G2001430 +CST IA G1900670 +CST MN G2700710 +CST TX G4804750 +MST ID G1600030 +CST IL G1700650 +CST ND G3800810 +EST FL G1200070 +MST MT G3000790 +CST MO G2901970 +MST NE G3101350 +EST PA G4200910 +EST DE G1000050 +MST_only AZ G0400190 +CST TX G4801810 +CST TX G4802510 +MST UT G4900570 +CST OK G4000270 +CST LA G2200510 +EST SC G4500790 +CST AR G0501430 +MST CO G0801130 +PST OR G4100330 +CST KY G2100270 +MST_only AZ G0400170 +EST NC G3700670 +CST OK G4001110 +CST AL G0100810 +PST CA G0600410 +EST IN G1800590 +MST NM G3500090 +EST GA G1300130 +CST MS G2801290 +PST WA G5300250 +CST TX G4805010 +CST KS G2001450 +CST MS G2801610 +CST MO G2900270 +CST MO G2900670 +CST FL G1200590 +CST TN G4700430 +MST MT G3000050 +EST OH G3901050 +EST GA G1300690 +CST KS G2001310 +MST CO G0800950 +PST OR G4100650 +CST MO G2900590 +CST MN G2700690 +EST GA G1301670 +CST MN G2700750 +CST IA G1901570 +CST IA G1900030 +MST SD G4601020 +CST TX G4801250 +EST GA G1302590 +CST TX G4800650 +CST WI G5500710 +CST TX G4804010 +CST TX G4804970 +EST IN G1800570 +EST PA G4200010 +PST OR G4100470 +EST MI G2601210 +CST MS G2801330 +CST IA G1900930 +EST NJ G3400310 +CST OK G4001190 +EST WV G5400810 +EST VA G5101050 +CST IL G1701390 +CST AR G0501130 +EST KY G2100190 +EST NH G3300130 +EST GA G1301170 +CST AR G0500310 +MST WY G5600150 +MST UT G4900130 +EST OH G3900470 +CST SD G4601090 +EST GA G1300790 +CST MS G2800270 +EST OH G3900690 +CST MN G2701210 +CST TX G4804350 +MST WY G5600250 +EST KY G2101350 +CST KY G2100350 +EST MI G2600950 +CST WI G5500990 +CST IL G1701230 +CST MS G2801110 +PST ID G1600790 +CST KY G2100390 +CST MS G2800370 +MST SD G4600190 +MST KS G2001810 +MST_only AZ G0400130 +MST NM G3500060 +EST VA G5105500 +CST AL G0101250 +CST IL G1700810 +PST CA G0600890 +EST PA G4200950 +EST SC G4500290 +MST UT G4900270 +EST PA G4200270 +CST KY G2101390 +EST NC G3700190 +CST IL G1700330 +EST NY G3600150 +EST GA G1301130 +EST NC G3700210 +EST IN G1800430 +PST OR G4100290 +EST MI G2601070 +CST MO G2901390 +MST WY G5600090 +CST MS G2800910 +CST AR G0501150 +EST NC G3701090 +PST CA G0601090 +MST NM G3500290 +MST NM G3500390 +CST AR G0500730 +CST MO G2900150 +CST AR G0500230 +MST CO G0800210 +CST KS G2001270 +EST FL G1200790 +CST TX G4802750 +MST MT G3000030 +CST MO G2901790 +MST MT G3000610 +CST AR G0500070 +CST IL G1701630 +MST MT G3000950 +EST OH G3901010 +EST VA G5101210 +PST WA G5300110 +CST WI G5501190 +EST PA G4200690 +CST LA G2201010 +EST IN G1800390 +CST LA G2201190 +CST KS G2001130 +CST OK G4001310 +EST VA G5101770 +CST IL G1701030 +CST MO G2901730 +CST IA G1900590 +EST OH G3901650 +EST NC G3701010 +EST OH G3900530 +CST ND G3800930 +CST MN G2700290 +EST VA G5105400 +EST NJ G3400410 +CST MS G2800290 +MST CO G0801050 +CST LA G2200430 +CST WI G5500550 +CST KS G2001910 +PST OR G4100570 +CST IA G1901870 +EST KY G2100650 +EST OH G3901210 +EST VA G5101390 +EST OH G3900790 +MST UT G4900170 +PST CA G0600050 +CST KS G2000010 +CST KY G2101710 +CST OK G4000790 +CST IL G1702030 +CST MO G2901190 +MST ND G3800890 +CST ND G3800970 +EST GA G1301970 +CST ND G3800630 +CST IA G1901910 +CST KS G2000290 +CST IA G1900010 +CST IA G1900790 +CST ND G3800230 +CST TX G4803570 +CST OK G4000670 +CST ND G3800270 +MST NM G3500110 +PST CA G0600650 +EST NJ G3400290 +CST TX G4800290 +CST IA G1901830 +EST MD G2400010 +CST TX G4800410 +MST WY G5600110 +EST ME G2300190 +CST AR G0500050 +EST GA G1301350 +EST MI G2601110 +EST OH G3901510 +PST OR G4100190 +CST TX G4800510 +EST GA G1301390 +CST KS G2002090 +EST OH G3900090 +CST KY G2101070 +EST MD G2400350 +EST VA G5100010 +EST VA G5101790 +CST IN G1801270 +CST IA G1900450 +EST ME G2300130 +CST IL G1700790 +CST MO G2900010 +MST ID G1600450 +EST GA G1300870 +EST IN G1800830 +PST CA G0601030 +CST AL G0100390 +CST AR G0500790 +EST WV G5400630 +CST MO G2901470 +CST TX G4804830 +CST IL G1701850 +CST AR G0500010 +CST OK G4000870 +CST SD G4601110 +EST GA G1301090 +PST OR G4100690 +CST FL G1200330 +EST NC G3700890 +EST NJ G3400030 +CST IL G1700430 +EST VA G5100590 +MST CO G0801230 +CST TX G4802670 +EST TN G4701550 +EST IN G1801410 +PST OR G4100170 +CST IA G1901930 +CST MS G2801510 +CST IL G1701190 +CST WI G5500250 +CST MO G2900370 +EST SC G4500510 +EST MI G2600590 +EST IN G1801670 +EST ME G2300310 +CST IL G1701350 +MST SD G4600330 +MST WY G5600330 +EST WV G5400610 +MST ID G1600510 +EST PA G4200170 +EST NC G3700310 +EST WV G5400450 +EST RI G4400030 +EST NC G3701690 +CST MS G2801490 +CST IL G1701930 +EST MI G2600350 +MST CO G0800830 +CST WI G5501230 +EST MD G2400130 +CST IA G1900330 +PST OR G4100410 +CST TX G4804990 +CST LA G2200110 +EST VT G5000150 +EST NY G3600970 +EST IN G1800410 +CST AL G0100410 +CST AR G0500250 +PST OR G4100270 +CST AL G0100370 +EST FL G1200430 +EST VA G5101150 +EST KY G2102010 +PST WA G5300590 +EST FL G1201090 +CST MN G2701710 +EST KY G2100370 +EST SC G4500230 +EST VA G5106500 +EST SC G4500630 +MST_only AZ G0400150 +CST IA G1901630 +CST TX G4801870 +CST TN G4700350 +EST KY G2101990 +CST LA G2200730 +CST IL G1701830 +CST AR G0500370 +CST OK G4001130 +EST PA G4201150 +EST WV G5400590 +EST WV G5400370 +CST OK G4000150 +MST MT G3000290 +EST NY G3600390 +CST MN G2700070 +CST IL G1700290 +CST AR G0500930 +CST MN G2700270 +CST IL G1701510 +CST OK G4000590 +EST MI G2600510 +CST IN G1801490 +CST OK G4000910 +CST TN G4701330 +CST KS G2000510 +EST MI G2600850 +CST TX G4804870 +CST KS G2000430 +EST GA G1302390 +MST NM G3500230 +EST GA G1301730 +CST KS G2001510 +CST IA G1901210 +CST KS G2001350 +CST KS G2000630 +EST OH G3900490 +EST GA G1300450 +EST FL G1200410 +EST OH G3901230 +PST WA G5300170 +CST KS G2001070 +CST NE G3100650 +PST NV G3200010 +CST MS G2800490 +CST IA G1900130 +EST FL G1200870 +EST SC G4500590 +CST AL G0100150 +PST OR G4100550 +CST KY G2102330 +CST TX G4800050 +CST IL G1701730 +EST NC G3700990 +EST IN G1801050 +EST NC G3700870 +EST WV G5400190 +CST OK G4000970 +EST IN G1800690 +CST WI G5500410 +EST NC G3700030 +CST IL G1700830 +CST OK G4001390 +PST CA G0600250 +CST TX G4804090 +CST AR G0500910 +CST KS G2001150 +MST MT G3000650 +MST UT G4900030 +EST VA G5101830 +CST MS G2800830 +CST IA G1901230 +CST MO G2900330 +MST CO G0800490 +CST WI G5501210 +CST OK G4000770 +EST KY G2101950 +CST AL G0100070 +CST KS G2001710 +CST IA G1901950 +EST GA G1301810 +EST MI G2601550 +EST GA G1300670 +EST PA G4200030 +CST MN G2700130 +CST TN G4701490 +CST TX G4804390 +EST NJ G3400250 +CST TX G4804670 +EST NY G3600530 +CST AL G0100510 +EST PA G4200510 +EST GA G1303190 +EST NC G3700730 +CST TN G4700450 +EST NC G3700010 +CST IA G1900370 +EST PA G4200090 +CST OK G4000930 +EST MI G2600070 +CST MS G2800590 +CST TX G4800190 +CST TX G4800630 +EST GA G1302510 +CST AL G0101150 +CST IA G1901070 +EST ME G2300290 +CST MN G2700810 +EST KY G2100890 +EST GA G1301070 +EST PA G4201230 +PST ID G1600490 +EST VT G5000010 +EST OH G3901630 +CST MS G2801370 +CST TX G4800210 +CST TX G4804150 +PST OR G4100370 +CST NE G3100470 +CST MS G2800130 +CST IA G1900770 +CST TX G4802890 +EST KY G2101910 +CST MS G2800230 +CST TX G4801150 +EST GA G1300370 +MST MT G3000170 +EST MI G2601130 +CST SD G4601190 +MST CO G0800270 +CST TX G4804290 +CST SD G4600210 +CST ND G3800750 +CST KS G2001730 +EST PA G4200590 +EST SC G4500910 +EST NC G3700450 +CST MN G2701030 +CST TN G4701410 +EST VA G5100350 +EST OH G3900130 +CST KY G2100470 +MST MT G3001110 +EST IN G1800770 +CST AL G0101210 +EST IN G1800710 +EST IN G1801170 +MST UT G4900050 +EST OH G3900750 +CST IL G1701050 +EST GA G1300990 +CST AL G0100770 +MST UT G4900410 +CST IA G1901150 +CST TX G4800730 +EST NC G3701750 +CST TX G4804690 +EST IN G1800150 +EST WV G5400010 +CST KS G2000210 +CST OK G4000430 +CST MN G2700990 +EST OH G3901710 +CST MS G2801130 +EST WV G5400870 +CST TX G4804550 +EST KY G2101370 +CST NE G3101470 +CST IA G1901690 +CST MN G2700310 +CST AR G0500830 +EST KY G2101930 +MST MT G3000870 +CST IL G1700150 +CST OK G4000550 +MST CO G0800570 +MST UT G4900310 +MST CO G0801030 +CST TX G4803110 +CST TX G4801090 +CST IA G1901850 +PST NV G3200170 +CST TX G4804330 +EST OH G3901530 +MST CO G0800050 +CST TX G4802010 +CST TX G4802150 +CST IA G1900630 +CST LA G2201170 +EST FL G1200210 +PST CA G0600670 +EST ME G2300110 +EST MI G2601570 +EST GA G1302090 +CST TN G4701250 +MST NM G3500490 +EST OH G3900630 +PST CA G0601010 +EST FL G1200350 +EST VA G5101950 +CST WI G5501270 +EST NY G3600450 +MST ID G1600150 +CST TN G4700210 +CST TX G4804250 +CST IN G1800510 +MST NE G3100050 +CST WI G5500170 +CST AL G0101290 +CST AR G0500870 +PST OR G4100110 +CST IA G1900490 +CST AL G0100670 +PST ID G1600090 +CST MN G2700210 +MST CO G0801090 +CST SD G4601290 +PST CA G0600210 +CST MO G2900110 +MST SD G4601370 +CST LA G2200210 +CST KS G2000370 +CST IL G1701570 +EST IN G1801190 +MST UT G4900470 +EST KY G2100430 +CST IA G1901970 +EST KY G2100970 +CST IL G1700590 +CST MN G2700110 +EST KY G2100630 +MST CO G0800610 +MST MT G3000110 +MST NM G3500210 +CST IL G1701170 +PST CA G0600610 +CST MS G2800670 +EST OH G3900890 +EST FL G1201110 +EST KY G2101110 +CST MN G2700370 +CST AR G0500850 +MST ID G1600830 +CST LA G2200970 +CST OK G4001330 +CST OK G4000470 +EST FL G1200530 +CST MN G2701370 +EST ME G2300230 +CST WI G5500290 +EST IN G1800630 +CST MS G2800870 +MST CO G0800970 +CST TN G4700750 +EST MI G2600730 +CST TX G4800970 +CST AR G0500690 +CST WI G5501250 +EST TN G4700910 +EST KY G2100230 +MST WY G5600290 +EST GA G1302050 +EST VA G5108000 +CST WI G5500470 +EST KY G2101890 +PST WA G5300370 +CST KS G2000550 +CST MS G2800790 +CST MO G2901530 +CST IA G1901250 +CST NE G3101310 +PST NV G3205100 +CST WI G5501090 +CST KY G2100010 +EST OH G3900730 +CST OK G4001510 +EST OH G3901270 +CST TX G4802190 +CST KS G2000810 +CST OK G4000490 +CST TX G4800550 +CST TX G4801470 +CST MN G2700510 +MST ID G1600670 +EST KY G2100410 +EST SC G4500170 +CST NE G3100730 +CST ND G3800770 +MST CO G0801150 +CST AR G0500530 +CST IA G1900730 +MST TX G4802290 +MST SD G4600710 +CST NE G3101030 +PST NV G3200090 +EST FL G1200190 +PST CA G0600810 +EST NJ G3400170 +MST_only AZ G0400230 +PST WA G5300350 +CST SD G4600990 +CST MO G2901090 +EST NY G3600910 +EST MD G2400370 +PST WA G5300050 +EST OH G3900950 +CST IL G1701250 +EST IN G1800330 +EST ME G2300250 +EST VA G5100610 +CST NE G3100230 +EST GA G1301550 +CST MS G2801450 +EST IN G1800470 +CST TX G4804270 +EST GA G1301770 +EST GA G1301370 +CST SD G4600910 +CST OK G4000350 +EST IN G1801510 +EST NC G3701310 +CST AR G0500990 +MST ID G1600750 +CST AL G0100290 +PST OR G4100230 +CST WI G5501150 +MST CO G0800530 +EST VA G5101470 +EST MI G2600010 +MST CO G0800470 +EST IN G1801690 +EST FL G1200770 +CST NE G3100030 +CST KS G2001830 +EST NC G3700290 +CST ND G3800990 +PST WA G5300430 +MST UT G4900010 +CST TX G4800790 +MST CO G0800770 +CST IL G1700310 +EST DC G1100010 +MST_only AZ G0400270 +EST SC G4500430 +EST OH G3900230 +MST_only AZ G0400210 +EST FL G1200090 +EST GA G1301870 +EST VA G5107700 +EST KY G2101850 +EST NY G3600410 +CST WI G5500850 +EST FL G1200850 +EST VA G5101610 +EST NY G3600690 +CST LA G2200830 +CST MO G2901310 +CST ND G3800150 +EST KY G2100490 +MST_only AZ G0400070 +EST SC G4500310 +CST IA G1900970 +EST IN G1800010 +CST TN G4700510 +EST TN G4700570 +EST KY G2100690 +EST OH G3900390 +CST ND G3800050 +CST TN G4700390 +MST MT G3000430 +CST TX G4803690 +MST MT G3000850 +EST GA G1302310 +CST ND G3800610 +CST IA G1901590 +CST KS G2001530 +EST GA G1302650 +EST SC G4500110 +CST MN G2701230 +EST PA G4201290 +CST OK G4001210 +CST AR G0500710 +EST MI G2600050 +EST OH G3900830 +EST KY G2100290 +MST CO G0801010 +PST CA G0600070 +EST MD G2400290 +MST CO G0800670 +EST VA G5108200 +EST TN G4701050 +CST KY G2102250 +CST KY G2100990 +CST MN G2700730 +EST MA G2500030 +CST WI G5500330 +EST MI G2600570 +CST IA G1900350 +CST IL G1701270 +CST ND G3801050 +EST IN G1801750 +EST GA G1302610 +EST GA G1300710 +EST VT G5000130 +EST GA G1302490 +CST AL G0100050 +CST NE G3101430 +CST KS G2000230 +EST GA G1302430 +EST GA G1303110 +EST VA G5106400 +CST IL G1701890 +CST ND G3800450 +CST KY G2100330 +CST TX G4804950 +EST VA G5100850 +CST TX G4801390 +EST VA G5106700 +PST WA G5300150 +EST OH G3900050 +CST TX G4800330 +EST PA G4201130 +CST TX G4800830 +EST TN G4700630 +CST NE G3101770 +MST NM G3500150 +EST IN G1800550 +CST TX G4802530 +CST TN G4700710 +MST CO G0800390 +EST TN G4701710 +CST MS G2800770 +CST MS G2801050 +EST SC G4500270 +CST MN G2701430 +MST MT G3000410 +CST NE G3101790 +CST TX G4800470 +CST IA G1901310 +CST IA G1900150 +CST MO G2902050 +CST MN G2701070 +CST TX G4803330 +CST TX G4801730 +EST KY G2101730 +EST OH G3900610 +CST IL G1700250 +CST NE G3100550 +EST ME G2300090 +EST SC G4500450 +EST PA G4200630 +CST IL G1701790 +EST OH G3900250 +CST OK G4000170 +CST AL G0100450 +EST NY G3600570 +CST TX G4802130 +MST NM G3500350 +MST WY G5600070 +EST WV G5400790 +CST WI G5500490 +CST AR G0500590 +CST MN G2701690 +EST MI G2601370 +CST KS G2000530 +CST WI G5500830 +CST MO G2901450 +EST NC G3700850 +EST PA G4200310 +EST ME G2300150 +EST KY G2101470 +EST WV G5400490 +EST NC G3700150 +CST OK G4000610 +CST MS G2800310 +CST KY G2100030 +PST NV G3200150 +CST TX G4802870 +CST TN G4700330 +EST MI G2600130 +CST IA G1901010 +MST ND G3800110 +CST OK G4001290 +PST OR G4100050 +CST AL G0100030 +EST MA G2500270 +EST MD G2400170 +CST TX G4802850 +MST UT G4900110 +EST VA G5106850 +CST IL G1700350 +CST NE G3100190 +CST TX G4800150 +EST NY G3600770 +CST IA G1901470 +CST MS G2800970 +PST OR G4100430 +CST ND G3800350 +CST IA G1901050 +CST IA G1901110 +PST OR G4100090 +CST KS G2000450 +CST IL G1700730 +CST TX G4800310 +CST IA G1901290 +CST OK G4000630 +CST AL G0100750 +CST KS G2001950 +MST MT G3000230 +MST MT G3000390 +CST NE G3100350 +CST MS G2801250 +PST OR G4100210 +CST NE G3100090 +EST SC G4500190 +EST PA G4200550 +PST CA G0601050 +CST LA G2201230 +CST WI G5500010 +CST TN G4701470 +CST LA G2200090 +EST OH G3901390 +PST OR G4100310 +EST FL G1200650 +MST WY G5600370 +MST UT G4900250 +CST TX G4801930 +EST IN G1800250 +EST KY G2100170 +CST AR G0500170 +EST FL G1200930 +EST GA G1301010 +CST LA G2200070 +EST KY G2101190 +MST UT G4900150 +CST AR G0501410 +MST MT G3000530 +CST IL G1700610 +CST MO G2900810 +EST WV G5400270 +CST LA G2200750 +CST FL G1200450 +CST MO G2902030 +CST MN G2700150 +CST AL G0100210 +CST MO G2901430 +CST NE G3100870 +EST GA G1302210 +CST WI G5500110 +CST KS G2001290 +EST VA G5101590 +CST SD G4600570 +MST MT G3000550 +CST NE G3101490 +MST WY G5600270 +EST MD G2400330 +CST LA G2200890 +EST PA G4200190 +CST IN G1800910 +CST AR G0500630 +CST TX G4800670 +EST MD G2400410 +EST IN G1800350 +CST TX G4803050 +CST WI G5501370 +PST WA G5300750 +EST KY G2101510 +EST PA G4201210 +EST NC G3700170 +CST SD G4600150 +CST MN G2700930 +CST WI G5500780 +CST TX G4804070 +EST VA G5100530 +CST IA G1901090 +EST VA G5107500 +CST TX G4803090 +CST MO G2900750 +CST TX G4801450 +MST ID G1600250 +EST GA G1300030 +PST OR G4100010 +CST IA G1900850 +EST FL G1200030 +CST TX G4802050 +CST TX G4803890 +MST KS G2000710 +CST IL G1700470 +CST MS G2800330 +EST OH G3900410 +EST FL G1201030 +CST LA G2200190 +CST LA G2200550 +CST AR G0501450 +CST MN G2701630 +EST KY G2101170 +MST UT G4900350 +EST GA G1301790 +EST IN G1800030 +CST IA G1901890 +PST OR G4100350 +CST FL G1201330 +EST PA G4200390 +EST NC G3700230 +EST GA G1302250 +PST CA G0600170 +EST ME G2300030 +EST GA G1301290 +EST IN G1800270 +EST GA G1302770 +EST MI G2601350 +EST OH G3900190 +CST TX G4802210 +EST FL G1200290 +EST OH G3900110 +EST NC G3701970 +EST VT G5000230 +CST IA G1901790 +CST TN G4700970 +CST AR G0500390 +CST NE G3100710 +CST TX G4801590 +EST WV G5400570 +CST KY G2100090 +EST SC G4500470 +CST OK G4000530 +EST GA G1302670 +CST LA G2200870 +CST WI G5501290 +CST AR G0500950 +MST ID G1600630 +MST CO G0800990 +CST TX G4800870 +EST NY G3600870 +CST TX G4803670 +PST WA G5300570 +EST IN G1800930 +EST NY G3601190 +MST CO G0801170 +CST AL G0100970 +EST PA G4200130 +CST TX G4803150 +EST MI G2600810 +EST NH G3300010 +CST AL G0101030 +EST NY G3600710 +EST GA G1301530 +CST MO G2901750 +MST SD G4601030 +CST TN G4701310 +CST TX G4800910 +EST OH G3901150 +CST AR G0501190 +EST OH G3900810 +EST IN G1800610 +EST KY G2100250 +EST GA G1300150 +CST KS G2001250 +EST MI G2601230 +PST NV G3200070 +CST KS G2001470 +CST AR G0500330 +CST ND G3801010 +MST NM G3500030 +CST KS G2001550 +EST GA G1301330 +CST FL G1200130 +MST WY G5600410 +CST KS G2000410 +EST GA G1302370 +CST IN G1801230 +CST MO G2900630 +CST TX G4802170 +MST ND G3800250 +EST MA G2500190 +CST KS G2000490 +CST WI G5501070 +CST MN G2701330 +CST ND G3800690 +CST MS G2800250 +CST TN G4700830 +CST IA G1901450 +CST MS G2801430 +MST UT G4900550 +EST IN G1800090 +MST MT G3000190 +CST ND G3800290 +EST NY G3601030 +EST GA G1300550 +PST NV G3200030 +CST WI G5500570 +EST NC G3701930 +CST AL G0100690 +EST SC G4500850 +CST TN G4701570 +CST WI G5501110 +CST TX G4804170 +MST MT G3000310 +EST NY G3600730 +CST IL G1701110 +CST MS G2800850 +EST OH G3900430 +CST TX G4804490 +EST NC G3701390 +CST MS G2800750 +CST IL G1701150 +EST MI G2601590 +EST NC G3701990 +CST LA G2201150 +CST NE G3100390 +EST GA G1302950 +MST_only AZ G0400110 +EST GA G1302330 +EST NY G3600370 +CST OK G4000750 +CST IA G1901670 +MST NE G3100130 +EST GA G1301570 +PST NV G3200130 +MST MT G3000730 +CST TX G4803630 +MST UT G4900090 +CST MS G2801350 +CST IA G1901430 +CST NE G3101450 +CST TX G4803830 +CST IL G1701710 +CST LA G2200850 +CST SD G4601070 +CST SD G4600170 +CST TX G4803610 +CST TX G4802090 +EST MD G2400470 +MST NM G3500130 +CST AL G0100010 +EST NJ G3400390 +PST CA G0601070 +EST GA G1301210 +EST FL G1201290 +EST OH G3900710 +EST MI G2601270 +CST IA G1900290 +CST AL G0100250 +CST TX G4801230 +EST GA G1303170 +EST MD G2400090 +CST AR G0501350 +CST MS G2800630 +EST NC G3700590 +EST TN G4701450 +CST WI G5501390 +EST TN G4701430 +CST OK G4000830 +EST GA G1301830 +CST TX G4801950 +EST NY G3600350 +CST TX G4800930 +PST CA G0601150 +CST TN G4700470 +CST KS G2001330 +CST WI G5500150 +MST CO G0801190 +CST IL G1701310 +CST KS G2001490 +CST OK G4001250 +EST KY G2101270 +CST OK G4000190 +CST MO G2902210 +CST IA G1901650 +EST VA G5100360 +EST WV G5400930 +EST GA G1303030 +CST AR G0501290 +MST CO G0800190 +CST ND G3800730 +EST VA G5106200 +CST TX G4803450 +EST NJ G3400270 +CST MS G2801090 +PST CA G0600710 +EST FL G1200570 +CST KS G2000150 +EST NH G3300050 +EST NH G3300070 +CST MO G2900770 +EST GA G1301150 +EST MI G2601190 +CST TN G4700530 +CST LA G2200450 +EST OH G3901170 +CST WI G5501310 +EST NH G3300150 +EST NJ G3400350 +CST IL G1701130 +EST VA G5101970 +CST AL G0100190 +EST MI G2600390 +CST TX G4804410 +EST OH G3901110 +CST IL G1700210 +CST TN G4700490 +EST NC G3701790 +CST MS G2801630 +EST VA G5101750 +CST TN G4701670 +EST KY G2102050 +CST TX G4803910 +CST MS G2801530 +CST TX G4804710 +EST VA G5100710 +EST GA G1302130 +MST MT G3000830 +CST AR G0500430 +MST ID G1600710 +PST OR G4100130 +CST AR G0500970 +EST KY G2102350 +EST TN G4701390 +EST VA G5100830 +CST AR G0501470 +CST TX G4801190 +CST TX G4803990 +CST NE G3100210 +EST VA G5100450 +CST TN G4701090 +CST ND G3800510 +EST NC G3701250 +EST NC G3701190 +EST PA G4200290 +CST WI G5500670 +CST WI G5500510 +EST NY G3600290 +EST NC G3700370 +EST NC G3701470 +EST SC G4500870 +EST MA G2500070 +EST CT G0900070 +EST FL G1200150 +CST IL G1700090 +EST PA G4200250 +CST NE G3101390 +CST TX G4801750 +EST WV G5401090 +EST MI G2600170 +EST IN G1801090 +EST VA G5100410 +CST KY G2101010 +PST WA G5300070 +EST NC G3701050 +CST IA G1901030 +EST IN G1801370 +CST TN G4700410 +EST VA G5100890 +EST VA G5101650 +CST MS G2801310 +CST KY G2102270 +CST TX G4801910 +EST GA G1300190 +EST IN G1801810 +EST GA G1301590 +CST TX G4802950 +CST MN G2700390 +EST KY G2101550 +CST OK G4001270 +EST TN G4700670 +EST NC G3701030 +EST KY G2101290 +PST OR G4100490 +CST KS G2001670 +CST TX G4803270 +EST MI G2600830 +CST SD G4601150 +CST TX G4804430 +CST LA G2201030 +EST NJ G3400130 +EST IN G1801770 +EST NC G3701070 +CST OK G4001430 +EST PA G4200830 +PST NV G3200230 +CST MS G2801570 +CST MO G2900970 +CST LA G2200630 +CST WI G5501170 +CST MO G2900030 +MST_only AZ G0400090 +PST OR G4100610 +CST AR G0501110 +EST IN G1800230 +CST IL G1701990 +MST_only AZ G0400050 +EST OH G3901070 +CST TX G4801990 +CST SD G4600050 +EST NC G3701710 +CST IA G1900310 +CST MS G2801070 +CST KY G2102070 +EST MI G2601290 +CST AR G0500110 +CST TN G4700770 +EST GA G1300750 +EST NC G3700050 +CST NE G3100930 +MST NM G3500170 +EST VA G5100290 +CST OK G4001150 +EST GA G1302870 +CST TX G4802370 +CST OK G4001030 +EST VA G5100170 +CST TX G4801010 +CST IA G1901510 +EST MA G2500050 +CST NE G3100890 +CST TX G4800490 +EST NY G3600930 +EST MI G2600650 +CST IA G1901190 +EST GA G1300630 +EST OH G3900910 +EST OH G3901090 +CST KS G2001890 +PST OR G4100630 +CST MS G2800410 +EST GA G1303090 +CST IA G1900430 +EST MI G2601450 +CST MO G2901030 +CST MO G2901670 +PST WA G5300710 +EST NY G3601150 +CST IA G1901810 +CST MO G2902250 +CST IL G1700410 +EST GA G1301410 +CST KS G2001110 +EST KY G2100790 +EST NC G3700790 +EST GA G1302890 +CST MS G2800550 +EST MA G2500110 +MST UT G4900490 +PST WA G5300770 +EST MI G2601610 +EST VA G5101990 +EST NC G3701110 +PST WA G5300730 +CST KS G2001690 +CST IN G1801630 +CST AR G0501090 +EST IN G1801030 +EST NJ G3400010 +CST AR G0500550 +EST SC G4500730 +CST TX G4800990 +EST SC G4500350 +EST VA G5100510 +EST VA G5100430 +CST TN G4701590 +EST MI G2600690 +EST MI G2600190 +MST ID G1600130 +CST TX G4804930 +CST IL G1700390 +EST VA G5101310 +EST GA G1303210 +CST KS G2001010 +EST NC G3701530 +CST KY G2100070 +CST KS G2000850 +CST LA G2201070 +CST TX G4803410 +PST WA G5300230 +CST NE G3100170 +MST MT G3000370 +CST NE G3101250 +CST ND G3800650 +EST PA G4200470 +PST CA G0600730 +EST PA G4200070 +EST NY G3600590 +CST MO G2900190 +EST GA G1301690 +PST OR G4100150 +EST PA G4200450 +EST VA G5108100 +EST MD G2400310 +EST FL G1200750 +MST CO G0800130 +EST VA G5100310 +CST MI G2600710 +CST TX G4803310 +CST TX G4804650 +CST TX G4801710 +CST MS G2800990 +CST TN G4700990 +EST VT G5000250 +EST WV G5400770 +MST MT G3000490 +EST NC G3700110 +CST TX G4802350 +CST ND G3800950 +CST NE G3100270 +CST TN G4701110 +CST KY G2100870 +EST KY G2102370 +CST KY G2101690 +EST FL G1201250 +EST VA G5100330 +CST MO G2902150 +EST KY G2101810 +PST NV G3200270 +EST VA G5100490 +CST IA G1900910 +CST SD G4600670 +CST MO G2902270 +MST MT G3000150 +CST MO G2901290 +CST OK G4000030 +EST OH G3900850 +EST FL G1200810 +CST IA G1901270 +EST OH G3901130 +CST TX G4801210 +CST MO G2901010 +EST GA G1302690 +CST AL G0101010 +EST PA G4200970 +PST CA G0600390 +CST TX G4801830 +CST AL G0100330 +EST WV G5401030 +EST MI G2600090 +PST CA G0600930 +CST ND G3800490 +CST IL G1701650 +CST MN G2701450 +EST SC G4500030 +CST IL G1700010 +CST MS G2801170 +EST PA G4201090 +EST KY G2101250 +EST MI G2600370 +EST VA G5107350 +EST GA G1301750 +EST VA G5101430 +CST MO G2901130 +CST AL G0100870 +EST WV G5400230 +EST MI G2600790 +CST SD G4600090 +CST MO G2901270 +EST VA G5100910 +CST MO G2900130 +MST CO G0801210 +MST UT G4900510 +CST SD G4601250 +CST WI G5500610 +MST KS G2000750 +MST ND G3800870 +MST CO G0800810 +MST ID G1600230 +EST FL G1200110 +CST IL G1700270 +EST FL G1201230 +EST MD G2400210 +EST FL G1200830 +CST LA G2200370 +EST KY G2101750 +EST GA G1301110 +CST IL G1702010 +EST GA G1301850 +EST VA G5101170 +CST TX G4803370 +CST WI G5500730 +MST CO G0801070 +CST OK G4000650 +EST WV G5400530 +CST OK G4000510 +CST KS G2001030 +EST SC G4500330 +EST IN G1801830 +EST WV G5400550 +MST NM G3500610 +CST KS G2000470 +CST AL G0100110 +CST MO G2901510 +CST AR G0501270 +CST MN G2701270 +CST ND G3800790 +CST MO G2901210 +CST TX G4803350 +PST ID G1600210 +CST MO G2901110 +CST SD G4600770 +CST SD G4600970 +EST NC G3701330 +CST AL G0100890 +MST CO G0800410 +CST KS G2000730 +EST FL G1201050 +EST MD G2400150 +MST MT G3000630 +CST IA G1900250 +EST VA G5105200 +CST MN G2700250 +PST WA G5300030 +PST CA G0600330 +CST IL G1700990 +CST AR G0500450 +EST NC G3700510 +CST AR G0500670 +MST NE G3100330 +CST TX G4800130 +EST GA G1302270 +PST WA G5300670 +EST IN G1801570 +CST KY G2100310 +CST TX G4802390 +EST OH G3901350 +EST SC G4500490 +CST LA G2200470 +MST NM G3500310 +CST SD G4600250 +CST MN G2700450 +CST NE G3100990 +EST ME G2300210 +CST IL G1701870 +CST TX G4802730 +CST IL G1701290 +MST CO G0800910 +CST TX G4802630 +EST NC G3701870 +CST IA G1901610 +MST SD G4601050 +CST TX G4804610 +EST GA G1300350 +CST NE G3100010 +EST OH G3900350 +CST AL G0101110 +CST MO G2902010 +CST KS G2001590 +EST IN G1801070 +CST MO G2902170 +CST IA G1900570 +CST MN G2700350 +CST IL G1700630 +PST WA G5300270 +MST CO G0800450 +CST MN G2701150 +MST NM G3500430 +CST MO G2901990 +EST SC G4500050 +CST TX G4801490 +EST FL G1200490 +EST GA G1303010 +CST NE G3101550 +CST MN G2701510 +CST OK G4001050 +CST NE G3101290 +CST MS G2800170 +MST UT G4900390 +CST AL G0100470 +CST IA G1901770 +CST KY G2100530 +CST NE G3101150 +CST TX G4804310 +MST MT G3000250 +PST CA G0600490 +CST SD G4601210 +CST SD G4600230 +CST NE G3101270 +MST SD G4600630 +MST NE G3100070 +EST OH G3900930 +CST MS G2801470 +EST MI G2601390 +EST IN G1800370 +EST IN G1801390 +CST MN G2700410 +EST NY G3600990 +EST NY G3600070 +EST NC G3700270 +CST KS G2000610 +CST MO G2900550 +CST FL G1200050 +CST IL G1701370 +CST FL G1201130 +EST OH G3900510 +CST NE G3101690 +EST NC G3701230 +CST WI G5500350 +PST OR G4100070 +EST NC G3701950 +CST MN G2700970 +CST WI G5500870 +CST KS G2000590 +EST PA G4200650 +EST OH G3901730 +EST VA G5101710 +EST PA G4201310 +EST MI G2600210 +CST MN G2700650 +MST NM G3500530 +EST GA G1300250 +CST TN G4701770 +CST MO G2901870 +EST NY G3600330 +PST WA G5300510 +MST ID G1600470 +CST TN G4701150 +CST LA G2200230 +EST NC G3700610 +CST AL G0100130 +CST NE G3100970 +EST GA G1300650 +CST KS G2000890 +CST ND G3800310 +CST NE G3101750 +MST MT G3001030 +CST TX G4802450 +CST AR G0500490 +PST CA G0600130 +CST WI G5500390 +CST LA G2200330 +EST NJ G3400330 +MST CO G0800150 +EST GA G1302230 +EST GA G1301910 +EST PA G4201270 +EST GA G1301270 +MST UT G4900070 +CST AR G0501030 +CST MS G2800030 +CST AL G0101230 +CST IA G1901490 +EST VA G5100050 +EST MI G2600150 +CST AR G0500190 +EST VT G5000110 +EST VA G5101090 +CST TX G4804630 +EST IN G1801450 +CST TX G4800110 +CST TN G4701810 +CST TX G4804110 +EST IN G1801710 +CST OK G4001370 +CST LA G2200030 +CST TX G4802490 +EST GA G1301050 +EST GA G1301630 +CST AL G0100530 +CST ND G3800670 +CST IA G1900230 +CST MO G2901230 +PST CA G0600430 +CST TX G4800170 +PST NV G3200110 +CST TX G4800810 +CST IA G1901410 +EST KY G2101330 +EST GA G1303070 +MST CO G0800170 +MST CO G0800010 +CST TN G4701610 +MST ID G1600010 +EST PA G4201250 +EST PA G4200430 +EST VA G5107100 +EST TN G4701630 +EST GA G1300270 +PST WA G5300090 +MST OR G4100450 +EST IN G1801650 +CST ND G3800210 +CST KS G2001610 +CST TX G4802330 +EST NC G3700830 +CST IL G1701450 +EST OH G3900670 +CST NE G3100370 +CST ND G3800090 +EST NC G3700570 +CST MN G2701650 +EST GA G1301950 +CST MO G2900730 +EST MI G2600970 +EST VA G5100770 +CST LA G2200530 +EST KY G2101090 +EST OH G3901310 +CST IA G1900090 +CST KY G2100610 +MST MT G3000710 +EST VA G5100950 +EST OH G3900990 +EST MA G2500230 +MST WY G5600390 +CST IL G1700070 +CST KS G2000910 +EST NY G3600270 +CST IA G1901530 +EST NY G3600090 +CST MO G2901830 +CST MO G2900490 +EST GA G1301030 +EST OH G3900590 +EST WV G5400690 +CST AL G0100830 +CST MN G2701550 +MST CO G0800850 +EST WV G5400830 +MST NE G3101610 +MST MT G3000090 +PST CA G0600570 +CST KS G2000350 +CST TX G4803750 +EST FL G1200270 +EST VT G5000270 +EST IN G1801130 +CST WI G5500070 +EST WV G5400430 +PST CA G0600110 +EST NC G3701490 +CST KS G2001930 +CST TX G4803230 +EST OH G3900070 +CST MS G2800950 +MST NE G3101010 +EST IN G1800070 +CST MO G2900930 +CST TX G4800030 +CST TN G4700170 +EST IN G1800210 +CST KS G2001750 +CST AR G0501230 +EST VA G5106100 +MST ID G1600870 +CST LA G2201270 +EST KY G2101310 +CST NE G3100510 +EST GA G1300050 +EST SC G4500690 +EST IN G1801010 +CST IA G1900750 +EST VT G5000090 +CST KS G2001090 +CST TX G4804210 +CST TX G4804130 +CST TX G4802930 +EST SC G4500010 +EST PA G4200710 +CST OK G4000130 +EST SC G4500070 +CST TN G4701190 +CST MO G2900070 +CST MI G2600530 +EST NC G3700550 +CST AL G0100490 +EST NY G3600190 +EST KY G2100730 +EST VA G5100270 +CST TN G4701030 +EST PA G4200050 +EST RI G4400050 +EST VA G5100190 +CST MS G2800190 +CST AR G0500210 +CST TN G4701850 +EST SC G4500370 +CST MO G2900090 +CST OK G4000230 +EST GA G1301930 +MST MT G3000010 +CST TN G4700070 +EST GA G1302350 +EST PA G4200350 +MST NE G3100450 +CST KS G2000270 +CST MN G2701190 +EST MI G2601330 +CST IA G1900710 +CST IA G1900950 +EST PA G4200570 +EST GA G1300430 +CST NE G3100850 +CST TN G4701270 +EST GA G1301490 +CST TX G4803170 +CST NE G3100590 +CST KS G2000390 +CST NE G3101710 +MST ID G1600330 +PST CA G0600590 +CST IL G1700770 +EST NY G3600130 +EST KY G2102150 +EST FL G1200690 +PST CA G0600230 +PST CA G0600850 +CST KY G2101830 +CST TX G4803970 +EST GA G1300310 +CST MS G2801410 +EST PA G4200150 +EST ME G2300270 +EST CT G0900150 +PST CA G0600550 +MST UT G4900530 +EST MI G2600870 +CST MN G2700170 +CST IL G1701690 +EST VA G5101930 +EST NC G3701350 +EST MD G2400430 +EST NC G3700710 +CST IL G1700550 +CST OK G4001070 +CST MO G2901630 +CST NE G3100670 +EST MI G2600030 +MST CO G0800090 +EST WV G5400150 +CST TX G4800230 +CST KS G2002010 +CST KY G2101410 +CST NE G3100110 +CST MS G2801390 +EST GA G1301310 +CST TX G4802790 +CST NE G3101070 +PST WA G5300690 +MST CO G0800110 +MST MT G3000450 +MST ID G1600370 +MST CO G0800250 +CST SD G4600590 +CST SD G4600390 +CST TX G4804810 +EST FL G1200990 +CST IN G1801110 +CST AR G0501490 +EST NJ G3400150 +EST NC G3701550 +CST LA G2200170 +MST MT G3000130 +PST CA G0600830 +EST MI G2601050 +EST GA G1302170 +PST NV G3200190 +EST GA G1302850 +CST WI G5500050 +CST KY G2101570 +CST KY G2102210 +EST NY G3600210 +MST MT G3000270 +CST WI G5500930 +CST TX G4800690 +CST TX G4800710 +MST CO G0800750 +EST IN G1800650 +CST KS G2000830 +MST UT G4900450 +CST AR G0500750 +CST MN G2700550 +EST KY G2102310 +CST AR G0501010 +CST AR G0501390 +MST CO G0801110 +CST MN G2701490 +CST MO G2901710 +CST NE G3100610 +MST SD G4600310 +MST NE G3100910 \ No newline at end of file diff --git a/map_meas/calibration_multipliers.tsv b/map_meas/calibration_multipliers.tsv index 78b65b6..402d916 100644 --- a/map_meas/calibration_multipliers.tsv +++ b/map_meas/calibration_multipliers.tsv @@ -1,1177 +1,1177 @@ sector in.state month calibration_multiplier -com AL 1 0.869828437 -com AR 1 0.901846252 -com AZ 1 0.999992492 -com CA 1 0.969452555 -com CO 1 0.775711139 -com CT 1 0.801633853 -com DC 1 1.009595937 -com DE 1 0.865872857 -com FL 1 0.780016083 -com GA 1 0.778234913 -com IA 1 0.920154613 -com ID 1 1.018506943 -com IL 1 0.95219132 -com IN 1 0.820713715 -com KS 1 0.950350796 -com KY 1 0.877420334 -com LA 1 1.008127833 -com MA 1 0.918138994 -com MD 1 0.917550727 -com ME 1 0.881441296 -com MI 1 1.10800943 -com MN 1 0.836620972 -com MO 1 0.832301107 -com MS 1 1.026381621 -com MT 1 1.551515589 -com NC 1 0.845128501 -com ND 1 2.533498591 -com NE 1 1.161842029 -com NH 1 0.952134962 -com NJ 1 1.046006196 -com NM 1 1.152805089 -com NV 1 0.735292992 -com NY 1 1.041678029 -com OH 1 0.843059777 -com OK 1 1.009493585 -com OR 1 1.282899906 -com PA 1 0.700382875 -com RI 1 0.98677005 -com SC 1 0.759242669 -com SD 1 1.818399264 -com TN 1 0.835751278 -com TX 1 1.020394937 -com UT 1 1.016831464 -com VA 1 1.378373071 -com VT 1 1.354563671 -com WA 1 1.198378505 -com WI 1 1.028144072 -com WV 1 0.817022634 -com WY 1 1.883510616 -res AL 1 1.008029578 -res AR 1 0.855552499 -res AZ 1 1.165357374 -res CA 1 1.015478111 -res CO 1 0.845878031 -res CT 1 1.133601394 -res DC 1 0.754466742 -res DE 1 0.844944967 -res FL 1 1.00669561 -res GA 1 0.991584361 -res IA 1 1.047381501 -res ID 1 1.315352454 -res IL 1 0.995821311 -res IN 1 1.110964888 -res KS 1 0.997150344 -res KY 1 0.759395003 -res LA 1 0.918467418 -res MA 1 0.963303119 -res MD 1 0.739028133 -res ME 1 1.099408158 -res MI 1 0.923489337 -res MN 1 0.973494529 -res MO 1 1.208227075 -res MS 1 0.995703819 -res MT 1 1.210821915 -res NC 1 0.839946157 -res ND 1 1.324149351 -res NE 1 1.184189363 -res NH 1 1.093545934 -res NJ 1 1.038374602 -res NM 1 0.910656679 -res NV 1 1.100004021 -res NY 1 0.909122773 -res OH 1 1.066962205 -res OK 1 0.918459838 -res OR 1 1.210235388 -res PA 1 1.09356935 -res RI 1 0.941358887 -res SC 1 0.926079776 -res SD 1 1.257513913 -res TN 1 0.836956399 -res TX 1 0.930962883 -res UT 1 1.100901674 -res VA 1 0.801697596 -res VT 1 1.11761306 -res WA 1 1.259352087 -res WI 1 0.992755771 -res WV 1 0.845666125 -res WY 1 1.230409161 -com AL 2 1.151500647 -com AR 2 1.046824386 -com AZ 2 1.032005177 -com CA 2 0.961821434 -com CO 2 0.786920916 -com CT 2 0.909548112 -com DC 2 1.109239364 -com DE 2 0.998931457 -com FL 2 0.875336467 -com GA 2 1.022050734 -com IA 2 1.019590021 -com ID 2 0.989016841 -com IL 2 1.021370222 -com IN 2 0.950161013 -com KS 2 1.041760098 -com KY 2 1.030055683 -com LA 2 1.149308608 -com MA 2 1.065795198 -com MD 2 1.045263162 -com ME 2 0.996218269 -com MI 2 1.194636574 -com MN 2 0.924934487 -com MO 2 0.924110128 -com MS 2 1.283778866 -com MT 2 1.625328399 -com NC 2 1.046954204 -com ND 2 2.698604058 -com NE 2 1.272036952 -com NH 2 1.064733279 -com NJ 2 1.207319299 -com NM 2 1.210275274 -com NV 2 0.773705249 -com NY 2 1.195699477 -com OH 2 0.955742265 -com OK 2 1.072400492 -com OR 2 1.274134812 -com PA 2 0.798443469 -com RI 2 1.097249433 -com SC 2 0.949198743 -com SD 2 1.961250867 -com TN 2 1.134334806 -com TX 2 1.184491423 -com UT 2 1.090457924 -com VA 2 1.728057477 -com VT 2 1.515729435 -com WA 2 1.185991049 -com WI 2 1.110282733 -com WV 2 0.903645599 -com WY 2 1.908519072 -res AL 2 1.320015024 -res AR 2 1.075314117 -res AZ 2 1.087810133 -res CA 2 0.892964357 -res CO 2 0.825974839 -res CT 2 1.173441386 -res DC 2 0.918393448 -res DE 2 1.092436451 -res FL 2 1.109094601 -res GA 2 1.240171803 -res IA 2 1.01236591 -res ID 2 1.25477385 -res IL 2 1.055532458 -res IN 2 1.310348329 -res KS 2 0.989755888 -res KY 2 1.049033 -res LA 2 1.266274167 -res MA 2 1.084808169 -res MD 2 0.909627872 -res ME 2 1.219306574 -res MI 2 0.960167055 -res MN 2 0.9508777 -res MO 2 1.316303454 -res MS 2 1.363144926 -res MT 2 1.105717988 -res NC 2 1.138080475 -res ND 2 1.242614502 -res NE 2 1.123708936 -res NH 2 1.152003582 -res NJ 2 1.088815024 -res NM 2 0.948503848 -res NV 2 1.044966176 -res NY 2 1.035026337 -res OH 2 1.218536279 -res OK 2 0.963670472 -res OR 2 1.154194509 -res PA 2 1.226153363 -res RI 2 0.97679406 -res SC 2 1.216831311 -res SD 2 1.219554082 -res TN 2 1.29289784 -res TX 2 1.096116896 -res UT 2 1.100167019 -res VA 2 1.025600165 -res VT 2 1.188567992 -res WA 2 1.199834474 -res WI 2 0.972596631 -res WV 2 1.070328823 -res WY 2 1.151969347 -com AL 3 1.095332252 -com AR 3 0.977763834 -com AZ 3 1.006862717 -com CA 3 1.082129839 -com CO 3 0.822498328 -com CT 3 0.860874597 -com DC 3 1.01081187 -com DE 3 0.94435214 -com FL 3 0.948026341 -com GA 3 0.973779058 -com IA 3 0.990331998 -com ID 3 1.00766095 -com IL 3 0.997544602 -com IN 3 0.904118385 -com KS 3 0.998114303 -com KY 3 0.934188336 -com LA 3 1.053320993 -com MA 3 0.983474132 -com MD 3 0.960651119 -com ME 3 0.970420977 -com MI 3 1.146778624 -com MN 3 0.934920944 -com MO 3 0.861397989 -com MS 3 1.206554162 -com MT 3 1.512083248 -com NC 3 0.970932518 -com ND 3 3.108602806 -com NE 3 1.25447608 -com NH 3 0.999968701 -com NJ 3 1.162045738 -com NM 3 1.215315023 -com NV 3 0.758861001 -com NY 3 1.092041992 -com OH 3 0.91109025 -com OK 3 1.078121918 -com OR 3 1.148089943 -com PA 3 0.717738253 -com RI 3 1.153961498 -com SC 3 0.91682576 -com SD 3 1.989515407 -com TN 3 1.021740791 -com TX 3 1.071470026 -com UT 3 1.005194569 -com VA 3 1.56202874 -com VT 3 1.48553066 -com WA 3 1.050971654 -com WI 3 1.11071626 -com WV 3 0.855130991 -com WY 3 1.936024674 -res AL 3 1.086632707 -res AR 3 1.086954676 -res AZ 3 1.006128651 -res CA 3 0.967025321 -res CO 3 0.912617417 -res CT 3 1.083716125 -res DC 3 0.796519515 -res DE 3 0.959846773 -res FL 3 1.147863543 -res GA 3 1.024499244 -res IA 3 1.014576754 -res ID 3 1.209799893 -res IL 3 0.970035643 -res IN 3 1.122801181 -res KS 3 0.923274757 -res KY 3 0.865644382 -res LA 3 1.141079887 -res MA 3 0.97735388 -res MD 3 0.766624956 -res ME 3 1.156254169 -res MI 3 0.927666549 -res MN 3 1.003764649 -res MO 3 1.150131242 -res MS 3 1.164904336 -res MT 3 1.186219763 -res NC 3 0.858210025 -res ND 3 1.335254958 -res NE 3 1.201942992 -res NH 3 1.068597895 -res NJ 3 0.97407744 -res NM 3 0.852336879 -res NV 3 1.030984788 -res NY 3 0.937623477 -res OH 3 1.045044514 -res OK 3 1.005808442 -res OR 3 1.171647225 -res PA 3 1.041092365 -res RI 3 0.902860041 -res SC 3 0.940140088 -res SD 3 1.287122005 -res TN 3 1.032697463 -res TX 3 1.089827759 -res UT 3 1.092031436 -res VA 3 0.793201169 -res VT 3 1.073622824 -res WA 3 1.306240618 -res WI 3 0.987894165 -res WV 3 0.851555316 -res WY 3 1.209291126 -com AL 4 1.133911012 -com AR 4 0.974478303 -com AZ 4 1.009436796 -com CA 4 0.905207803 -com CO 4 0.814831271 -com CT 4 0.818648051 -com DC 4 1.013066579 -com DE 4 0.92074847 -com FL 4 0.85719331 -com GA 4 1.018692154 -com IA 4 0.92826543 -com ID 4 1.049982765 -com IL 4 0.933738353 -com IN 4 0.887329455 -com KS 4 0.977923051 -com KY 4 0.942157436 -com LA 4 1.059105596 -com MA 4 0.987742177 -com MD 4 0.98101588 -com ME 4 0.943435258 -com MI 4 1.103669336 -com MN 4 0.859648614 -com MO 4 0.839001889 -com MS 4 1.21266692 -com MT 4 1.586613811 -com NC 4 1.021913872 -com ND 4 2.988687111 -com NE 4 1.205209121 -com NH 4 0.976717783 -com NJ 4 1.089899928 -com NM 4 1.205710206 -com NV 4 0.772388417 -com NY 4 1.10958554 -com OH 4 0.911562911 -com OK 4 1.07803588 -com OR 4 1.108997988 -com PA 4 0.734142774 -com RI 4 1.1663204 -com SC 4 0.904022146 -com SD 4 1.951579628 -com TN 4 1.037019275 -com TX 4 1.094127862 -com UT 4 1.023114388 -com VA 4 1.695391866 -com VT 4 1.429357208 -com WA 4 1.09895797 -com WI 4 1.049028272 -com WV 4 0.836676036 -com WY 4 1.972144422 -res AL 4 1.03965814 -res AR 4 0.899173453 -res AZ 4 0.924075885 -res CA 4 0.889439447 -res CO 4 0.88376382 -res CT 4 1.061164993 -res DC 4 0.880468471 -res DE 4 0.970165606 -res FL 4 1.11876004 -res GA 4 1.019397894 -res IA 4 0.933883733 -res ID 4 1.215189944 -res IL 4 0.930586828 -res IN 4 1.1007342 -res KS 4 0.845501044 -res KY 4 0.886617871 -res LA 4 1.040553658 -res MA 4 0.991477091 -res MD 4 0.831087019 -res ME 4 1.131908545 -res MI 4 0.915587333 -res MN 4 0.932482787 -res MO 4 1.049991036 -res MS 4 1.05204606 -res MT 4 1.144304576 -res NC 4 0.957738239 -res ND 4 1.238682852 -res NE 4 1.02376026 -res NH 4 1.012699475 -res NJ 4 1.025018051 -res NM 4 0.787340312 -res NV 4 0.953419706 -res NY 4 0.942342954 -res OH 4 1.041912704 -res OK 4 0.852994102 -res OR 4 1.156547239 -res PA 4 1.0574798 -res RI 4 0.93873323 -res SC 4 1.00378551 -res SD 4 1.21420577 -res TN 4 1.024749032 -res TX 4 1.000185493 -res UT 4 1.055403366 -res VA 4 0.835411514 -res VT 4 1.024132262 -res WA 4 1.291583904 -res WI 4 0.947579042 -res WV 4 0.845942893 -res WY 4 1.138921644 -com AL 5 0.990193958 -com AR 5 0.854622811 -com AZ 5 1.041571375 -com CA 5 0.834978327 -com CO 5 0.83745669 -com CT 5 0.907006831 -com DC 5 1.009388846 -com DE 5 0.94512194 -com FL 5 0.875527353 -com GA 5 0.888446521 -com IA 5 0.839303358 -com ID 5 0.958921148 -com IL 5 0.914298735 -com IN 5 0.879672753 -com KS 5 0.960783207 -com KY 5 0.857876605 -com LA 5 0.906799299 -com MA 5 0.971308604 -com MD 5 1.009502313 -com ME 5 0.896523104 -com MI 5 1.081015931 -com MN 5 0.800532608 -com MO 5 0.793069587 -com MS 5 1.044739855 -com MT 5 1.521515266 -com NC 5 0.961738377 -com ND 5 2.835135491 -com NE 5 1.170025837 -com NH 5 0.990164962 -com NJ 5 1.098129055 -com NM 5 1.242359714 -com NV 5 0.791667743 -com NY 5 1.023951593 -com OH 5 0.937144154 -com OK 5 1.048888568 -com OR 5 1.055734006 -com PA 5 0.728562614 -com RI 5 1.20620333 -com SC 5 0.879879819 -com SD 5 1.737527018 -com TN 5 0.919046793 -com TX 5 0.873730438 -com UT 5 1.047350567 -com VA 5 1.6578082 -com VT 5 1.476152524 -com WA 5 1.095282726 -com WI 5 1.033824642 -com WV 5 0.872159702 -com WY 5 1.940285981 -res AL 5 0.931738147 -res AR 5 0.744312138 -res AZ 5 0.99369656 -res CA 5 0.965675115 -res CO 5 0.920431906 -res CT 5 1.048907878 -res DC 5 0.8076487 -res DE 5 0.862432719 -res FL 5 1.143821072 -res GA 5 0.950323722 -res IA 5 0.850035279 -res ID 5 1.121312855 -res IL 5 0.933726586 -res IN 5 1.025779401 -res KS 5 0.738568301 -res KY 5 0.844517697 -res LA 5 0.83849065 -res MA 5 0.945585443 -res MD 5 0.807195635 -res ME 5 1.001491533 -res MI 5 0.931767676 -res MN 5 0.894150833 -res MO 5 0.871007405 -res MS 5 0.8531644 -res MT 5 1.086035878 -res NC 5 0.879423716 -res ND 5 1.166794571 -res NE 5 0.970787638 -res NH 5 0.952870516 -res NJ 5 1.013135534 -res NM 5 0.728745479 -res NV 5 1.050331606 -res NY 5 0.90948753 -res OH 5 0.983443144 -res OK 5 0.751706024 -res OR 5 1.126369562 -res PA 5 0.993337621 -res RI 5 0.893201578 -res SC 5 0.946407293 -res SD 5 1.122103123 -res TN 5 0.843639315 -res TX 5 0.847384659 -res UT 5 1.051986109 -res VA 5 0.828964629 -res VT 5 0.987766552 -res WA 5 1.252057556 -res WI 5 0.94264906 -res WV 5 0.830186524 -res WY 5 1.042581081 -com AL 6 1.01807123 -com AR 6 0.889216162 -com AZ 6 1.127205955 -com CA 6 0.957703455 -com CO 6 0.83519414 -com CT 6 0.977793526 -com DC 6 1.021264377 -com DE 6 1.09475001 -com FL 6 0.875916743 -com GA 6 0.912358364 -com IA 6 0.872307578 -com ID 6 0.904272995 -com IL 6 1.022659503 -com IN 6 0.989997063 -com KS 6 1.018027172 -com KY 6 0.92017967 -com LA 6 0.941801675 -com MA 6 1.022126906 -com MD 6 1.073397916 -com ME 6 0.916492941 -com MI 6 1.180464751 -com MN 6 0.823920052 -com MO 6 0.84045243 -com MS 6 1.100313387 -com MT 6 1.492759116 -com NC 6 0.93918871 -com ND 6 2.644142607 -com NE 6 1.221401626 -com NH 6 1.06661846 -com NJ 6 1.207803968 -com NM 6 1.294569009 -com NV 6 0.804587847 -com NY 6 1.122965003 -com OH 6 1.012257909 -com OK 6 1.073515065 -com OR 6 1.015085701 -com PA 6 0.769716444 -com RI 6 1.236206276 -com SC 6 0.834354023 -com SD 6 1.784415525 -com TN 6 0.948343965 -com TX 6 0.91980252 -com UT 6 1.061044952 -com VA 6 1.68224876 -com VT 6 1.534035116 -com WA 6 1.056308643 -com WI 6 1.128177152 -com WV 6 0.879355459 -com WY 6 1.830503308 -res AL 6 1.096214301 -res AR 6 0.866928659 -res AZ 6 1.054031658 -res CA 6 1.029800943 -res CO 6 1.041437845 -res CT 6 1.296813428 -res DC 6 0.928790538 -res DE 6 1.046509524 -res FL 6 1.196316448 -res GA 6 1.116194775 -res IA 6 1.03598344 -res ID 6 1.271840368 -res IL 6 1.178484866 -res IN 6 1.244485239 -res KS 6 0.948969244 -res KY 6 1.002482232 -res LA 6 1.057364872 -res MA 6 1.07968016 -res MD 6 0.969072735 -res ME 6 1.070870282 -res MI 6 1.147199644 -res MN 6 1.103899165 -res MO 6 1.055868616 -res MS 6 1.058679541 -res MT 6 1.121066175 -res NC 6 1.010474987 -res ND 6 1.2571114 -res NE 6 1.125567269 -res NH 6 1.113914192 -res NJ 6 1.2729123 -res NM 6 0.805785847 -res NV 6 1.107881651 -res NY 6 1.07305322 -res OH 6 1.20550221 -res OK 6 0.919634134 -res OR 6 1.216143944 -res PA 6 1.151024283 -res RI 6 1.0538958 -res SC 6 1.060071144 -res SD 6 1.256777405 -res TN 6 1.006543023 -res TX 6 0.988205627 -res UT 6 1.184403432 -res VA 6 1.046872353 -res VT 6 1.136815563 -res WA 6 1.297297004 -res WI 6 1.186442291 -res WV 6 0.922566085 -res WY 6 1.119285167 -com AL 7 1.027646716 -com AR 7 0.947425748 -com AZ 7 1.184681151 -com CA 7 0.852734653 -com CO 7 0.857231251 -com CT 7 0.924044851 -com DC 7 1.087501922 -com DE 7 1.038028181 -com FL 7 0.894617385 -com GA 7 0.94028562 -com IA 7 0.903336467 -com ID 7 0.879297887 -com IL 7 1.071246234 -com IN 7 1.010602626 -com KS 7 1.004183976 -com KY 7 0.974376078 -com LA 7 0.972439548 -com MA 7 0.970692524 -com MD 7 1.09330792 -com ME 7 0.860259835 -com MI 7 1.243868342 -com MN 7 0.868390141 -com MO 7 0.859044561 -com MS 7 1.163107273 -com MT 7 1.393301784 -com NC 7 1.025089095 -com ND 7 2.599569115 -com NE 7 1.163852796 -com NH 7 1.014750363 -com NJ 7 1.252135471 -com NM 7 1.337486181 -com NV 7 0.755840961 -com NY 7 1.12962707 -com OH 7 1.063950399 -com OK 7 1.048804846 -com OR 7 0.992978373 -com PA 7 0.830293228 -com RI 7 1.178613325 -com SC 7 0.882529434 -com SD 7 1.796983814 -com TN 7 1.009655259 -com TX 7 0.927207248 -com UT 7 1.038843105 -com VA 7 1.756670399 -com VT 7 1.425291808 -com WA 7 1.052963009 -com WI 7 1.179358501 -com WV 7 0.910858001 -com WY 7 1.696095371 -res AL 7 1.222595515 -res AR 7 1.070077112 -res AZ 7 1.161878732 -res CA 7 1.107050964 -res CO 7 1.159015755 -res CT 7 1.386485261 -res DC 7 1.026569488 -res DE 7 1.164116313 -res FL 7 1.27749901 -res GA 7 1.258911343 -res IA 7 1.126172298 -res ID 7 1.372459348 -res IL 7 1.225222234 -res IN 7 1.374489697 -res KS 7 1.045801634 -res KY 7 1.173074935 -res LA 7 1.1709045 -res MA 7 1.10909198 -res MD 7 1.064680279 -res ME 7 1.119390049 -res MI 7 1.164529793 -res MN 7 1.138769679 -res MO 7 1.191049129 -res MS 7 1.214965553 -res MT 7 1.164642371 -res NC 7 1.20249202 -res ND 7 1.321900404 -res NE 7 1.292370684 -res NH 7 1.242945859 -res NJ 7 1.381483641 -res NM 7 0.939182784 -res NV 7 1.201322705 -res NY 7 1.15357958 -res OH 7 1.310139543 -res OK 7 1.033974127 -res OR 7 1.261548423 -res PA 7 1.259430401 -res RI 7 1.272179095 -res SC 7 1.291704443 -res SD 7 1.32577542 -res TN 7 1.191251682 -res TX 7 1.115423575 -res UT 7 1.306938625 -res VA 7 1.186020248 -res VT 7 1.211521177 -res WA 7 1.309511449 -res WI 7 1.218853524 -res WV 7 1.064349076 -res WY 7 1.159500907 -com AL 8 1.062137412 -com AR 8 0.982599405 -com AZ 8 1.176326974 -com CA 8 0.843987405 -com CO 8 0.925244644 -com CT 8 0.858427264 -com DC 8 1.016148814 -com DE 8 0.980545877 -com FL 8 0.89419037 -com GA 8 0.945213708 -com IA 8 0.896728221 -com ID 8 0.937390766 -com IL 8 1.064010896 -com IN 8 1.038497934 -com KS 8 1.051610792 -com KY 8 0.949201835 -com LA 8 0.982742157 -com MA 8 0.930449472 -com MD 8 1.02818104 -com ME 8 0.86164226 -com MI 8 1.222824454 -com MN 8 0.853374015 -com MO 8 0.858848811 -com MS 8 1.195985185 -com MT 8 1.490783645 -com NC 8 0.997569902 -com ND 8 2.61065902 -com NE 8 1.226259688 -com NH 8 0.930662527 -com NJ 8 1.193095688 -com NM 8 1.392380528 -com NV 8 0.763462459 -com NY 8 1.113580935 -com OH 8 1.018833502 -com OK 8 1.090625022 -com OR 8 1.030756348 -com PA 8 0.79995091 -com RI 8 1.079925743 -com SC 8 0.895859416 -com SD 8 1.870738388 -com TN 8 1.035758039 -com TX 8 0.920253439 -com UT 8 1.110942794 -com VA 8 1.676168571 -com VT 8 1.371968509 -com WA 8 1.110175945 -com WI 8 1.167608694 -com WV 8 0.868880949 -com WY 8 1.865033689 -res AL 8 1.265455246 -res AR 8 1.186131205 -res AZ 8 1.141485931 -res CA 8 1.200129609 -res CO 8 1.262452825 -res CT 8 1.291699816 -res DC 8 0.976319961 -res DE 8 1.13001541 -res FL 8 1.279813881 -res GA 8 1.270457032 -res IA 8 1.14152502 -res ID 8 1.341504266 -res IL 8 1.216770973 -res IN 8 1.416566549 -res KS 8 1.135793918 -res KY 8 1.182620406 -res LA 8 1.23866743 -res MA 8 1.148324149 -res MD 8 0.980260665 -res ME 8 1.212366036 -res MI 8 1.117073599 -res MN 8 1.148775823 -res MO 8 1.223491928 -res MS 8 1.292829442 -res MT 8 1.316163718 -res NC 8 1.167696187 -res ND 8 1.350066047 -res NE 8 1.326336578 -res NH 8 1.238659388 -res NJ 8 1.215824608 -res NM 8 0.962422339 -res NV 8 1.147180393 -res NY 8 1.154784882 -res OH 8 1.289609448 -res OK 8 1.122665487 -res OR 8 1.290564227 -res PA 8 1.243897804 -res RI 8 1.251365981 -res SC 8 1.242341514 -res SD 8 1.423245534 -res TN 8 1.278358596 -res TX 8 1.186375819 -res UT 8 1.332930103 -res VA 8 1.114590691 -res VT 8 1.194587706 -res WA 8 1.337403845 -res WI 8 1.203223168 -res WV 8 1.05916888 -res WY 8 1.190106432 -com AL 9 1.032798248 -com AR 9 1.065040759 -com AZ 9 1.165877708 -com CA 9 1.018321522 -com CO 9 0.909829569 -com CT 9 0.887108305 -com DC 9 1.010205672 -com DE 9 0.966100904 -com FL 9 0.905889044 -com GA 9 0.888658498 -com IA 9 0.895587331 -com ID 9 1.039863487 -com IL 9 1.02644246 -com IN 9 1.010587899 -com KS 9 1.122533606 -com KY 9 0.930929937 -com LA 9 1.06528215 -com MA 9 1.008279041 -com MD 9 1.003730138 -com ME 9 0.960887831 -com MI 9 1.155011097 -com MN 9 0.845824927 -com MO 9 0.901984976 -com MS 9 1.231979259 -com MT 9 1.547797796 -com NC 9 1.003215368 -com ND 9 2.873250718 -com NE 9 1.308232072 -com NH 9 0.992751533 -com NJ 9 1.158935371 -com NM 9 1.408083016 -com NV 9 0.813497785 -com NY 9 1.173253442 -com OH 9 0.98779691 -com OK 9 1.180995591 -com OR 9 1.105404864 -com PA 9 0.783412387 -com RI 9 1.132943475 -com SC 9 0.879233627 -com SD 9 1.972124277 -com TN 9 1.071402996 -com TX 9 0.97167713 -com UT 9 1.08297926 -com VA 9 1.651149396 -com VT 9 1.405269196 -com WA 9 1.168980317 -com WI 9 1.118441433 -com WV 9 0.827660833 -com WY 9 1.913829312 -res AL 9 1.068091649 -res AR 9 1.184335881 -res AZ 9 1.029030085 -res CA 9 1.203527352 -res CO 9 1.087431492 -res CT 9 1.1727072 -res DC 9 1.005318213 -res DE 9 1.168524796 -res FL 9 1.161947196 -res GA 9 1.027444104 -res IA 9 1.039528928 -res ID 9 1.197305107 -res IL 9 1.044455495 -res IN 9 1.262738602 -res KS 9 1.082032923 -res KY 9 1.051127317 -res LA 9 1.212423054 -res MA 9 1.170997083 -res MD 9 0.896197301 -res ME 9 1.184837831 -res MI 9 0.980263216 -res MN 9 1.041537664 -res MO 9 1.112492501 -res MS 9 1.251787159 -res MT 9 1.165377955 -res NC 9 0.995056137 -res ND 9 1.280544826 -res NE 9 1.250717271 -res NH 9 1.100252692 -res NJ 9 1.087850951 -res NM 9 0.902188337 -res NV 9 1.082622509 -res NY 9 1.178524523 -res OH 9 1.144081404 -res OK 9 1.10515941 -res OR 9 1.171586943 -res PA 9 1.173387481 -res RI 9 1.129151338 -res SC 9 1.032299288 -res SD 9 1.338184031 -res TN 9 1.228753476 -res TX 9 1.309852002 -res UT 9 1.190458625 -res VA 9 0.966500331 -res VT 9 1.081994865 -res WA 9 1.252135126 -res WI 9 1.071784969 -res WV 9 0.890066667 -res WY 9 1.051659282 -com AL 10 1.086475525 -com AR 10 1.029035759 -com AZ 10 1.190162379 -com CA 10 1.058090568 -com CO 10 0.838464606 -com CT 10 0.848635326 -com DC 10 1.000963892 -com DE 10 0.960756946 -com FL 10 0.884434305 -com GA 10 0.973299223 -com IA 10 0.963335715 -com ID 10 1.096141642 -com IL 10 0.983372737 -com IN 10 0.949831595 -com KS 10 1.042297652 -com KY 10 0.936841989 -com LA 10 1.073213935 -com MA 10 0.932523604 -com MD 10 0.99473471 -com ME 10 0.863862118 -com MI 10 1.128861916 -com MN 10 0.870927802 -com MO 10 0.839594598 -com MS 10 1.239080668 -com MT 10 1.505135841 -com NC 10 1.007063313 -com ND 10 3.082219935 -com NE 10 1.316274161 -com NH 10 0.940779735 -com NJ 10 1.130316452 -com NM 10 1.249133129 -com NV 10 0.817983641 -com NY 10 1.084843683 -com OH 10 0.9771486 -com OK 10 1.162277599 -com OR 10 1.121967042 -com PA 10 0.748291459 -com RI 10 1.060231145 -com SC 10 0.891780709 -com SD 10 1.930578894 -com TN 10 1.05741029 -com TX 10 1.063172383 -com UT 10 1.123227684 -com VA 10 1.714382239 -com VT 10 1.362469332 -com WA 10 1.161536193 -com WI 10 1.095768527 -com WV 10 0.887692136 -com WY 10 1.968527868 -res AL 10 0.970403656 -res AR 10 1.00433192 -res AZ 10 1.159020028 -res CA 10 1.007532724 -res CO 10 0.936248284 -res CT 10 1.030282318 -res DC 10 0.858906984 -res DE 10 0.89807532 -res FL 10 1.049394541 -res GA 10 0.964297042 -res IA 10 0.973365246 -res ID 10 1.134459811 -res IL 10 1.001437509 -res IN 10 1.113622141 -res KS 10 0.993805102 -res KY 10 0.883367644 -res LA 10 1.073508673 -res MA 10 0.996250624 -res MD 10 0.783575828 -res ME 10 0.989638768 -res MI 10 0.975783004 -res MN 10 0.95110935 -res MO 10 1.0550128 -res MS 10 1.090751913 -res MT 10 0.965013986 -res NC 10 0.894589416 -res ND 10 1.174766792 -res NE 10 1.14617248 -res NH 10 0.960615076 -res NJ 10 0.971487431 -res NM 10 0.886407271 -res NV 10 1.094158553 -res NY 10 0.997362088 -res OH 10 1.044164035 -res OK 10 0.983381199 -res OR 10 1.130203941 -res PA 10 1.029779565 -res RI 10 0.966186604 -res SC 10 0.945850096 -res SD 10 1.155322323 -res TN 10 1.007914675 -res TX 10 1.148057789 -res UT 10 1.141769487 -res VA 10 0.829877867 -res VT 10 1.009853689 -res WA 10 1.148869772 -res WI 10 1.012517705 -res WV 10 0.823038309 -res WY 10 0.972042768 -com AL 11 1.016187507 -com AR 11 0.904434109 -com AZ 11 1.130746398 -com CA 11 0.888025523 -com CO 11 0.748677536 -com CT 11 0.808351903 -com DC 11 1.019407483 -com DE 11 0.891107565 -com FL 11 0.883602228 -com GA 11 0.926546062 -com IA 11 0.901901323 -com ID 11 1.01060581 -com IL 11 0.931990319 -com IN 11 0.876800078 -com KS 11 0.929802963 -com KY 11 0.908081589 -com LA 11 1.023846651 -com MA 11 0.900613274 -com MD 11 0.953325146 -com ME 11 0.795488352 -com MI 11 1.07431752 -com MN 11 0.826239013 -com MO 11 0.763740891 -com MS 11 1.142170735 -com MT 11 1.387735247 -com NC 11 0.938981445 -com ND 11 2.948323728 -com NE 11 1.165787291 -com NH 11 0.926459812 -com NJ 11 1.048812893 -com NM 11 1.12766748 -com NV 11 0.706081299 -com NY 11 1.066936666 -com OH 11 0.915583161 -com OK 11 1.034534843 -com OR 11 1.152260949 -com PA 11 0.705735446 -com RI 11 0.964365219 -com SC 11 0.826705704 -com SD 11 1.784961849 -com TN 11 0.940970101 -com TX 11 1.00981763 -com UT 11 1.085342328 -com VA 11 1.699560466 -com VT 11 1.302049001 -com WA 11 1.166570541 -com WI 11 1.027742739 -com WV 11 0.835669473 -com WY 11 1.909643293 -res AL 11 1.029735838 -res AR 11 0.823970619 -res AZ 11 1.033540848 -res CA 11 0.915842741 -res CO 11 0.862576854 -res CT 11 1.088898224 -res DC 11 0.810703717 -res DE 11 0.841237468 -res FL 11 1.091737629 -res GA 11 1.033148163 -res IA 11 0.88700616 -res ID 11 1.270172933 -res IL 11 0.955108842 -res IN 11 1.077211992 -res KS 11 0.89021465 -res KY 11 0.802081603 -res LA 11 1.054462041 -res MA 11 0.932542099 -res MD 11 0.816345725 -res ME 11 0.974784614 -res MI 11 0.938413404 -res MN 11 0.909457008 -res MO 11 1.048947239 -res MS 11 1.027919659 -res MT 11 1.068160703 -res NC 11 0.922859532 -res ND 11 1.234883988 -res NE 11 1.004535033 -res NH 11 0.993240466 -res NJ 11 1.03435155 -res NM 11 0.881836559 -res NV 11 1.081345391 -res NY 11 0.917814986 -res OH 11 1.015335278 -res OK 11 0.858155144 -res OR 11 1.211891687 -res PA 11 1.053535697 -res RI 11 0.908300903 -res SC 11 0.989126727 -res SD 11 1.118608977 -res TN 11 0.865198201 -res TX 11 0.994701995 -res UT 11 1.132713027 -res VA 11 0.866042198 -res VT 11 1.028450574 -res WA 11 1.176050154 -res WI 11 0.965888421 -res WV 11 0.86356286 -res WY 11 1.069273799 -com AL 12 0.998636272 -com AR 12 0.902319594 -com AZ 12 1.056922218 -com CA 12 1.020827293 -com CO 12 0.737004721 -com CT 12 0.819951076 -com DC 12 1.030660344 -com DE 12 0.96391453 -com FL 12 0.901423889 -com GA 12 0.906059178 -com IA 12 0.972037465 -com ID 12 0.98661947 -com IL 12 0.983418185 -com IN 12 0.874941431 -com KS 12 0.920910974 -com KY 12 0.927106971 -com LA 12 1.025788134 -com MA 12 0.908444301 -com MD 12 0.99578556 -com ME 12 0.856037889 -com MI 12 1.12413775 -com MN 12 0.88046334 -com MO 12 0.792624374 -com MS 12 1.138290997 -com MT 12 1.466529325 -com NC 12 0.880129309 -com ND 12 2.939038904 -com NE 12 1.18644611 -com NH 12 0.958657094 -com NJ 12 1.139653029 -com NM 12 1.074384228 -com NV 12 0.658341385 -com NY 12 1.099025215 -com OH 12 0.93161556 -com OK 12 1.00751181 -com OR 12 1.232755281 -com PA 12 0.741437662 -com RI 12 0.976796939 -com SC 12 0.885600541 -com SD 12 1.840630379 -com TN 12 0.951232875 -com TX 12 1.036142 -com UT 12 1.016576302 -com VA 12 1.588476676 -com VT 12 1.366356386 -com WA 12 1.149232307 -com WI 12 1.075527457 -com WV 12 0.84789437 -com WY 12 1.81844213 -res AL 12 1.168559125 -res AR 12 0.908102628 -res AZ 12 1.10029718 -res CA 12 0.974273966 -res CO 12 0.845648312 -res CT 12 1.206392534 -res DC 12 0.869602999 -res DE 12 1.008473378 -res FL 12 1.094911438 -res GA 12 1.137134235 -res IA 12 1.083278614 -res ID 12 1.274997747 -res IL 12 1.066610301 -res IN 12 1.223473451 -res KS 12 0.961987672 -res KY 12 0.936060017 -res LA 12 1.072282417 -res MA 12 0.945896379 -res MD 12 0.919952227 -res ME 12 1.025643444 -res MI 12 0.994414086 -res MN 12 1.012305892 -res MO 12 1.220386579 -res MS 12 1.10096285 -res MT 12 1.195457597 -res NC 12 1.048687352 -res ND 12 1.39617598 -res NE 12 1.183801298 -res NH 12 1.103406486 -res NJ 12 1.104287886 -res NM 12 0.885807541 -res NV 12 1.112669751 -res NY 12 0.973139399 -res OH 12 1.150876923 -res OK 12 0.945845011 -res OR 12 1.208272728 -res PA 12 1.184866554 -res RI 12 0.902515675 -res SC 12 1.103019856 -res SD 12 1.250943945 -res TN 12 0.9941166 -res TX 12 1.000614116 -res UT 12 1.105734754 -res VA 12 0.99540583 -res VT 12 1.120456676 -res WA 12 1.235823092 -res WI 12 1.053505366 -res WV 12 1.034612793 -res WY 12 1.145945822 +com AL 1 0.905661448444559 +com AL 2 1.1089123733622137 +com AL 3 1.05048109154206 +com AL 4 1.076063115975549 +com AL 5 0.9862158131997796 +com AL 6 1.045642808569102 +com AL 7 1.0731865297121017 +com AL 8 1.1051040460598864 +com AL 9 1.0639697551838292 +com AL 10 1.0572122512553341 +com AL 11 1.006703615424588 +com AL 12 0.9995965728262028 +com AR 1 0.8573592733833584 +com AR 2 0.9996153355384462 +com AR 3 0.949915683916317 +com AR 4 0.9470246527127214 +com AR 5 0.8456118948571394 +com AR 6 0.8977242045101143 +com AR 7 0.9643226763842435 +com AR 8 1.0016278620433992 +com AR 9 1.0664397375911712 +com AR 10 1.0156613945884685 +com AR 11 0.8900278795098091 +com AR 12 0.8829225402630562 +com AZ 1 1.0250220565173067 +com AZ 2 1.0543724068088167 +com AZ 3 1.0305713265392769 +com AZ 4 1.0192875659524026 +com AZ 5 1.0401298372179517 +com AZ 6 1.1276692672636761 +com AZ 7 1.1697293976647132 +com AZ 8 1.1547920563691438 +com AZ 9 1.171106387953977 +com AZ 10 1.2379548759163284 +com AZ 11 1.1946173008011332 +com AZ 12 1.1003671592346616 +com CA 1 0.9620086479583546 +com CA 2 0.9554328911992007 +com CA 3 1.0717394284679624 +com CA 4 0.8939035850671421 +com CA 5 0.8276960364160172 +com CA 6 0.9459137086260733 +com CA 7 0.8465622593397304 +com CA 8 0.8403866095243809 +com CA 9 1.007802460360389 +com CA 10 1.0456905784975172 +com CA 11 0.8819753427810917 +com CA 12 1.0158659096437834 +com CO 1 0.7748244505514448 +com CO 2 0.7894558962610458 +com CO 3 0.8208224730001693 +com CO 4 0.8288207522908522 +com CO 5 0.8599617022054512 +com CO 6 0.8384901156594088 +com CO 7 0.8210911488761632 +com CO 8 0.909410830024748 +com CO 9 0.9221364984434648 +com CO 10 0.8445940372053388 +com CO 11 0.7299862977804188 +com CO 12 0.7108486335924142 +com CT 1 0.8020223343478783 +com CT 2 0.9087000780115169 +com CT 3 0.8570601362234388 +com CT 4 0.8158075463836391 +com CT 5 0.8973390912948087 +com CT 6 0.9764700484462326 +com CT 7 0.9328941319549399 +com CT 8 0.869940127563029 +com CT 9 0.891447752226385 +com CT 10 0.8520633520538843 +com CT 11 0.8125860534652228 +com CT 12 0.8234764602785346 +com DC 1 1.0396952906841233 +com DC 2 1.1273010341332048 +com DC 3 1.0265165102938758 +com DC 4 1.0257493831253799 +com DC 5 1.0296821521539037 +com DC 6 1.0590420001475749 +com DC 7 1.1399609728007105 +com DC 8 1.0694064104313676 +com DC 9 1.0496393568513558 +com DC 10 1.0210262443952909 +com DC 11 1.0420604150145774 +com DC 12 1.0553712856849047 +com DE 1 0.8742778681879225 +com DE 2 0.9941288106446348 +com DE 3 0.9406970785943712 +com DE 4 0.9075711774882519 +com DE 5 0.9144435915802639 +com DE 6 1.066809527232165 +com DE 7 1.0130829165938762 +com DE 8 0.9577889803253337 +com DE 9 0.94395184959019 +com DE 10 0.9397059086025055 +com DE 11 0.8880216026539031 +com DE 12 0.965527715253857 +com FL 1 0.8090473644817442 +com FL 2 0.8936157153301949 +com FL 3 0.9632161294554664 +com FL 4 0.8852589995052014 +com FL 5 0.9023824174212378 +com FL 6 0.9099653763774395 +com FL 7 0.9313973117995762 +com FL 8 0.93128502748755 +com FL 9 0.9373958675219192 +com FL 10 0.9070139333397959 +com FL 11 0.9037084887810202 +com FL 12 0.9198194574028119 +com GA 1 0.7815366651482619 +com GA 2 0.9917684505892013 +com GA 3 0.9463158977636656 +com GA 4 0.9786910144504638 +com GA 5 0.8582808251125885 +com GA 6 0.8858502688822584 +com GA 7 0.919033257965023 +com GA 8 0.9226041551775312 +com GA 9 0.8649137742411053 +com GA 10 0.9372858006248113 +com GA 11 0.9099769733650047 +com GA 12 0.8968332961707334 +com IA 1 0.9175553797828006 +com IA 2 1.016871171807455 +com IA 3 0.9908722967289592 +com IA 4 0.928899182779317 +com IA 5 0.8399854547002277 +com IA 6 0.8716451545635276 +com IA 7 0.9015465473413334 +com IA 8 0.8951390525177961 +com IA 9 0.8959209388903874 +com IA 10 0.9663220248385317 +com IA 11 0.9015840469807629 +com IA 12 0.970970505293048 +com ID 1 1.041999767805036 +com ID 2 0.9927171400231133 +com ID 3 1.0286705965913716 +com ID 4 1.095494660837371 +com ID 5 0.9522664513147908 +com ID 6 0.8234291641495963 +com ID 7 0.7742840317049182 +com ID 8 0.8495913280681626 +com ID 9 1.0132408649682736 +com ID 10 1.15847488467453 +com ID 11 1.0239256248133684 +com ID 12 0.9845194167129617 +com IL 1 0.9690066388334161 +com IL 2 1.0845132122967256 +com IL 3 1.0586006671437238 +com IL 4 1.0037561891459053 +com IL 5 0.9583664052092825 +com IL 6 0.9890081943402416 +com IL 7 0.9970162558082868 +com IL 8 0.9756487894522068 +com IL 9 0.9873710526268432 +com IL 10 1.029718706938148 +com IL 11 0.9580831518933028 +com IL 12 1.0012279832528312 +com IN 1 0.8328182629359789 +com IN 2 1.0229701650859655 +com IN 3 0.9772762202938642 +com IN 4 0.961012203937866 +com IN 5 0.8868214413538308 +com IN 6 0.91594664813944 +com IN 7 0.9251268667308461 +com IN 8 0.9396037956514617 +com IN 9 0.9546115640062004 +com IN 10 0.9790675652561267 +com IN 11 0.8999276776459105 +com IN 12 0.9034436107512731 +com KS 1 0.9529639429780178 +com KS 2 1.0442881845924472 +com KS 3 1.0011907651935044 +com KS 4 0.9808165675316785 +com KS 5 0.9617549026989495 +com KS 6 1.0172505503003726 +com KS 7 1.002876525670101 +com KS 8 1.0508298016628388 +com KS 9 1.1237948048075967 +com KS 10 1.0461141822596185 +com KS 11 0.9324759744940687 +com KS 12 0.9229224127143691 +com KY 1 0.8699380694726911 +com KY 2 0.9954530119025011 +com KY 3 0.9060151791718057 +com KY 4 0.9091588386332088 +com KY 5 0.8480537646165321 +com KY 6 0.9351382621116149 +com KY 7 0.9975619737910602 +com KY 8 0.9786962935271764 +com KY 9 0.9436924669255505 +com KY 10 0.9184631079612162 +com KY 11 0.8929537885315117 +com KY 12 0.9105825731104474 +com LA 1 1.0133859108492556 +com LA 2 1.127771102907283 +com LA 3 1.033110247404683 +com LA 4 1.040169407199121 +com LA 5 0.9029174098927454 +com LA 6 0.9579681910518665 +com LA 7 0.9942027297002645 +com LA 8 1.0060488183220544 +com LA 9 1.0733568576126147 +com LA 10 1.0660232154469256 +com LA 11 1.0298422032131753 +com LA 12 1.0287987409397854 +com MA 1 0.9172547295861062 +com MA 2 1.0635815704804985 +com MA 3 0.9779177057297647 +com MA 4 0.9834412260909985 +com MA 5 0.9609360634113215 +com MA 6 1.020159065835309 +com MA 7 0.979068330670458 +com MA 8 0.942029673298046 +com MA 9 1.0127208591241528 +com MA 10 0.9352162083237118 +com MA 11 0.9039437687341838 +com MA 12 0.9108850521154878 +com MD 1 0.9068554712091107 +com MD 2 1.0338190760746824 +com MD 3 0.9512432922244604 +com MD 4 0.9696716958699435 +com MD 5 0.9872146593611442 +com MD 6 1.0599147025669908 +com MD 7 1.084479400054159 +com MD 8 1.0222224287571537 +com MD 9 0.9943280438791754 +com MD 10 0.981411355843943 +com MD 11 0.948867158872359 +com MD 12 0.993097580445921 +com ME 1 0.8707891188029222 +com ME 2 0.9854710849604171 +com ME 3 0.9579692048658875 +com ME 4 0.933894983248759 +com ME 5 0.8820169688252716 +com ME 6 0.9108631374456172 +com ME 7 0.8645424117045337 +com ME 8 0.870781630602072 +com ME 9 0.961874548440401 +com ME 10 0.8636505082776126 +com ME 11 0.7937065736681974 +com ME 12 0.8512471808139314 +com MI 1 1.1468866984811157 +com MI 2 1.3252150986736468 +com MI 3 1.2722302241156915 +com MI 4 1.2110341486359322 +com MI 5 1.0705540180494562 +com MI 6 1.0678352700468605 +com MI 7 1.1288008757126682 +com MI 8 1.0988836557577757 +com MI 9 1.0848391460130553 +com MI 10 1.1585696368303489 +com MI 11 1.1118932643992578 +com MI 12 1.185479722246629 +com MN 1 0.826234908768013 +com MN 2 0.9135181868845483 +com MN 3 0.9331991874402009 +com MN 4 0.8580643082072918 +com MN 5 0.7996811110531065 +com MN 6 0.8211199409877962 +com MN 7 0.8645608043101163 +com MN 8 0.8497928945183854 +com MN 9 0.8446072879014259 +com MN 10 0.8723550213835564 +com MN 11 0.8223943491779344 +com MN 12 0.875188614582943 +com MO 1 0.8320303149723695 +com MO 2 0.9247650148210115 +com MO 3 0.8651129351024871 +com MO 4 0.8430152275853843 +com MO 5 0.7983541389497049 +com MO 6 0.8453004035863148 +com MO 7 0.8637942531452476 +com MO 8 0.8638836682961328 +com MO 9 0.9082073068902821 +com MO 10 0.8457410507414753 +com MO 11 0.7665476062715647 +com MO 12 0.7945407734444192 +com MS 1 1.0430008236455044 +com MS 2 1.2311144709684196 +com MS 3 1.1535752613717025 +com MS 4 1.1583935438402913 +com MS 5 1.0325928951421819 +com MS 6 1.1245534585082215 +com MS 7 1.1943361290110026 +com MS 8 1.2297245868071391 +com MS 9 1.249487850104944 +com MS 10 1.2084628192909392 +com MS 11 1.1310776736365353 +com MS 12 1.125590524307422 +com MT 1 1.6158751657137569 +com MT 2 1.7119922059995494 +com MT 3 1.5307038423756627 +com MT 4 1.6323805176816248 +com MT 5 1.5635244786258444 +com MT 6 1.4578053526299022 +com MT 7 1.3112181815361053 +com MT 8 1.4193254563632085 +com MT 9 1.51263158164298 +com MT 10 1.5036801829438984 +com MT 11 1.3735559412196656 +com MT 12 1.4724736627868444 +com NC 1 0.8343143450172019 +com NC 2 1.0213365849169656 +com NC 3 0.945515006673993 +com NC 4 0.9956217630630115 +com NC 5 0.930736867033225 +com NC 6 0.9188325434782206 +com NC 7 1.0017682145028495 +com NC 8 0.9750683179951178 +com NC 9 0.9743043091013298 +com NC 10 0.9806932540805466 +com NC 11 0.930950779762137 +com NC 12 0.8736084784071104 +com ND 1 2.461073267103038 +com ND 2 2.5986043413813396 +com ND 3 3.0755209488760586 +com ND 4 2.9745397289620312 +com ND 5 2.882483741029716 +com ND 6 2.6995913618403247 +com ND 7 2.6559797301621186 +com ND 8 2.668785139605397 +com ND 9 2.930221975969698 +com ND 10 3.1087719387166524 +com ND 11 2.9221488637466857 +com ND 12 2.890950997488286 +com NE 1 1.1495150120009199 +com NE 2 1.2589539737394386 +com NE 3 1.2545163393343832 +com NE 4 1.206010070574605 +com NE 5 1.1772588675641893 +com NE 6 1.227897568382134 +com NE 7 1.1702717833985539 +com NE 8 1.2334914885009554 +com NE 9 1.3169446934021534 +com NE 10 1.325070766952327 +com NE 11 1.1649745821581163 +com NE 12 1.182288788597402 +com NH 1 0.9408036514737055 +com NH 2 1.0533539744889642 +com NH 3 0.9860672098933884 +com NH 4 0.9658413065909989 +com NH 5 0.9714881939662843 +com NH 6 1.0545906592453773 +com NH 7 1.0113446367330554 +com NH 8 0.9317130418768446 +com NH 9 0.9884707269578676 +com NH 10 0.9380432560476121 +com NH 11 0.9232541856416312 +com NH 12 0.9529447131924965 +com NJ 1 1.0512082386063675 +com NJ 2 1.2303283163155774 +com NJ 3 1.1853410179659682 +com NJ 4 1.1177496201174117 +com NJ 5 1.1282122056412371 +com NJ 6 1.1939508515616333 +com NJ 7 1.2066138327951592 +com NJ 8 1.139384302372383 +com NJ 9 1.1319324519037193 +com NJ 10 1.1481882991563117 +com NJ 11 1.0526993178106854 +com NJ 12 1.136928231657364 +com NM 1 1.1608385157124461 +com NM 2 1.2159400824941753 +com NM 3 1.2220483583023778 +com NM 4 1.2203529823311237 +com NM 5 1.2797851593412435 +com NM 6 1.3196326547210413 +com NM 7 1.3199086083910532 +com NM 8 1.3889941426755366 +com NM 9 1.4191323473676216 +com NM 10 1.2499331656600758 +com NM 11 1.105098315672585 +com NM 12 1.0373265388836799 +com NV 1 0.7617864005401633 +com NV 2 0.8297272358482048 +com NV 3 0.784785504551143 +com NV 4 0.8069891769769677 +com NV 5 0.8132717354799328 +com NV 6 0.8018507388109793 +com NV 7 0.7032742322156954 +com NV 8 0.7178245457397272 +com NV 9 0.8172380417222396 +com NV 10 0.8489500816220947 +com NV 11 0.6986377652149248 +com NV 12 0.6404760501850544 +com NY 1 1.0452631546291518 +com NY 2 1.2116513248364322 +com NY 3 1.1113390040242643 +com NY 4 1.1429929561508043 +com NY 5 1.0702756306678751 +com NY 6 1.1247828599930254 +com NY 7 1.0858949021140947 +com NY 8 1.0653347097558983 +com NY 9 1.1556759350468895 +com NY 10 1.1064380103455416 +com NY 11 1.0830686784203378 +com NY 12 1.1087028775095649 +com OH 1 0.839558510677348 +com OH 2 0.9883083703408599 +com OH 3 0.9452816306184258 +com OH 4 0.9634538297930171 +com OH 5 0.9828511588547021 +com OH 6 0.9888566217140289 +com OH 7 0.9938671477773328 +com OH 8 0.9357958336538159 +com OH 9 0.9474616019355002 +com OH 10 1.0144542338068914 +com OH 11 0.9274698557062042 +com OH 12 0.9306571765413573 +com OK 1 0.9787584930912535 +com OK 2 1.0369038737322083 +com OK 3 1.0556084103322185 +com OK 4 1.0522832111811924 +com OK 5 1.0299190747458296 +com OK 6 1.0754109852764233 +com OK 7 1.0711099476338066 +com OK 8 1.1119809842556414 +com OK 9 1.1732160104736578 +com OK 10 1.1430331397039744 +com OK 11 1.0332008005102713 +com OK 12 1.0046564027287757 +com OR 1 1.2690224217155708 +com OR 2 1.2618559493197414 +com OR 3 1.140246685058584 +com OR 4 1.1015771791490718 +com OR 5 1.0474598406112265 +com OR 6 1.0104533297074838 +com OR 7 0.9877941695657988 +com OR 8 1.0250191573617833 +com OR 9 1.0979928187689216 +com OR 10 1.1137820523004032 +com OR 11 1.144777119701505 +com OR 12 1.2236630512433329 +com PA 1 0.7010742967197269 +com PA 2 0.8102652712432833 +com PA 3 0.7295087198502338 +com PA 4 0.7511071206123365 +com PA 5 0.7483069904059869 +com PA 6 0.7625099671039313 +com PA 7 0.8032565108229692 +com PA 8 0.7662910530317908 +com PA 9 0.7665546260708522 +com PA 10 0.7593637891814025 +com PA 11 0.7065786808471942 +com PA 12 0.7381410649882046 +com RI 1 0.9920666770817314 +com RI 2 1.096753808832468 +com RI 3 1.1479465754485851 +com RI 4 1.1604030606391922 +com RI 5 1.1857040469838025 +com RI 6 1.224232449047427 +com RI 7 1.1764783977035473 +com RI 8 1.0821259015804827 +com RI 9 1.1300502076415717 +com RI 10 1.0613317644244527 +com RI 11 0.9689179136190664 +com RI 12 0.9813121787158064 +com SC 1 0.7592548631287441 +com SC 2 0.9318211651786593 +com SC 3 0.9007154002668667 +com SC 4 0.8905571365774368 +com SC 5 0.8688696914187329 +com SC 6 0.8345069385767524 +com SC 7 0.8907710122049823 +com SC 8 0.89705786704033 +com SC 9 0.8719923249927082 +com SC 10 0.8813669831059266 +com SC 11 0.8239889426448024 +com SC 12 0.8770592393495645 +com SD 1 1.7112110251711505 +com SD 2 1.8302672099386865 +com SD 3 1.9419762940129504 +com SD 4 1.9129423752871977 +com SD 5 1.724641218780873 +com SD 6 1.7649214392678296 +com SD 7 1.773353268590038 +com SD 8 1.847585047873495 +com SD 9 1.9574708711799156 +com SD 10 1.9168746097940534 +com SD 11 1.7365843141613222 +com SD 12 1.775746883717903 +com TN 1 0.8530615885811551 +com TN 2 1.0966371945948767 +com TN 3 0.9805793944995187 +com TN 4 0.999591718778859 +com TN 5 0.9098743485315082 +com TN 6 0.9756937206822508 +com TN 7 1.0459220612170823 +com TN 8 1.0741511498373009 +com TN 9 1.093217646666976 +com TN 10 1.0315673131997292 +com TN 11 0.9398477684758689 +com TN 12 0.9453782494409443 +com TX 1 1.0044792683022048 +com TX 2 1.1255375382330808 +com TX 3 1.0400651585798548 +com TX 4 1.0646729974615634 +com TX 5 0.8789950575308244 +com TX 6 0.9307178481478641 +com TX 7 0.9501454293764231 +com TX 8 0.94864664616628 +com TX 9 1.0015541353168878 +com TX 10 1.0618227619508562 +com TX 11 1.0103894955939425 +com TX 12 1.030522092319196 +com UT 1 1.030885054441491 +com UT 2 1.1259281868252213 +com UT 3 1.0101135335393998 +com UT 4 1.0374942293284883 +com UT 5 1.0693167897400042 +com UT 6 1.0342353324956128 +com UT 7 0.9714599027106017 +com UT 8 1.0691215832513061 +com UT 9 1.0586733621309046 +com UT 10 1.1446124959168418 +com UT 11 1.1144093071633545 +com UT 12 1.0059935559382525 +com VA 1 1.3660514365385794 +com VA 2 1.7110268706070464 +com VA 3 1.547485177296715 +com VA 4 1.6746863044997258 +com VA 5 1.6191544826978856 +com VA 6 1.659292216608425 +com VA 7 1.7446611834388148 +com VA 8 1.6692411890209964 +com VA 9 1.6348023977863397 +com VA 10 1.6907608122316302 +com VA 11 1.6924667455868418 +com VA 12 1.584402401964673 +com VT 1 1.3323016759969584 +com VT 2 1.496291038835033 +com VT 3 1.4637549220126105 +com VT 4 1.412932439699685 +com VT 5 1.4511025366110524 +com VT 6 1.524788167174155 +com VT 7 1.4351808076165107 +com VT 8 1.3897496775906093 +com VT 9 1.4073301246716066 +com VT 10 1.3617737068665694 +com VT 11 1.2975451643297418 +com VT 12 1.3560190537854886 +com WA 1 1.1908050450295455 +com WA 2 1.1794944934913112 +com WA 3 1.0486833494386694 +com WA 4 1.0939255327767246 +com WA 5 1.0852471441290743 +com WA 6 1.0511706205217304 +com WA 7 1.045671915822018 +com WA 8 1.1018558286718292 +com WA 9 1.1601144260002159 +com WA 10 1.15254888614983 +com WA 11 1.1580466890478451 +com WA 12 1.1433100783314794 +com WI 1 1.0483649668526513 +com WI 2 1.2109588322115157 +com WI 3 1.2228943700479564 +com WI 4 1.1436689557757893 +com WI 5 1.0236801439121577 +com WI 6 1.0167476275153973 +com WI 7 1.0650170925589029 +com WI 8 1.0447180904673585 +com WI 9 1.0512351866329717 +com WI 10 1.1258076834517254 +com WI 11 1.0550883838268765 +com WI 12 1.1243187816326434 +com WV 1 0.7929602080886056 +com WV 2 0.8832770189419327 +com WV 3 0.8379240156641996 +com WV 4 0.8192629059691501 +com WV 5 0.8424132968895421 +com WV 6 0.8559966336029667 +com WV 7 0.8904320261484641 +com WV 8 0.8521938345738486 +com WV 9 0.8077720469052427 +com WV 10 0.8675769294639728 +com WV 11 0.8223507599165292 +com WV 12 0.8353695610484624 +com WY 1 1.8713970625737752 +com WY 2 1.9228867459592172 +com WY 3 1.930100282519891 +com WY 4 2.0141660819511307 +com WY 5 1.990971308949358 +com WY 6 1.7946794199347402 +com WY 7 1.5950192640908585 +com WY 8 1.8137491125260115 +com WY 9 1.9058715247490257 +com WY 10 2.024997846716625 +com WY 11 1.9385467612394396 +com WY 12 1.794268715003201 +res AL 1 0.9872165547708712 +res AL 2 1.3045012580318762 +res AL 3 1.0740539239246198 +res AL 4 1.0309360707157367 +res AL 5 0.9335167377469358 +res AL 6 1.1022517460796535 +res AL 7 1.2302040082729446 +res AL 8 1.2727659071772428 +res AL 9 1.0739312477186946 +res AL 10 0.9695751157832407 +res AL 11 1.0155150854480026 +res AL 12 1.1510920609253037 +res AR 1 0.8343879547775964 +res AR 2 1.0550837743694823 +res AR 3 1.0699110504298779 +res AR 4 0.8844368442520059 +res AR 5 0.72799602015073 +res AR 6 0.845651047009245 +res AR 7 1.0432067521532007 +res AR 8 1.1573555093366827 +res AR 9 1.1577262718854118 +res AR 10 0.9854306949800519 +res AR 11 0.8090766683760511 +res AR 12 0.8915764778509404 +res AZ 1 1.1485523793296486 +res AZ 2 1.072608660154025 +res AZ 3 0.9975579238179922 +res AZ 4 0.9271373282602151 +res AZ 5 1.0032391065020834 +res AZ 6 1.0716463545248736 +res AZ 7 1.1848951979066709 +res AZ 8 1.1640392384949123 +res AZ 9 1.0478220506907574 +res AZ 10 1.162527220069273 +res AZ 11 1.0249872916279918 +res AZ 12 1.083419662210019 +res CA 1 0.9959250147369296 +res CA 2 0.8758814812730998 +res CA 3 0.9490540560727747 +res CA 4 0.8728420716730084 +res CA 5 0.9460525462517391 +res CA 6 1.0097374135551673 +res CA 7 1.087400789011782 +res CA 8 1.180063350792202 +res CA 9 1.1823412674462959 +res CA 10 0.9891491115817448 +res CA 11 0.8989469823261153 +res CA 12 0.9550813088697836 +res CO 1 0.8323268271638493 +res CO 2 0.8135622985737591 +res CO 3 0.8957643445121282 +res CO 4 0.8665642946343428 +res CO 5 0.8989013964792493 +res CO 6 1.011934804944445 +res CO 7 1.1233572860486989 +res CO 8 1.2257296524846482 +res CO 9 1.0590670031799778 +res CO 10 0.9169787224689024 +res CO 11 0.8469874277224512 +res CO 12 0.8317049316744716 +res CT 1 1.1160528800989924 +res CT 2 1.1531887901144529 +res CT 3 1.0658191032775282 +res CT 4 1.0424415142690655 +res CT 5 1.0318923753442955 +res CT 6 1.280528597412473 +res CT 7 1.3756607369773282 +res CT 8 1.2813197864553612 +res CT 9 1.1585402302724503 +res CT 10 1.0120801824188952 +res CT 11 1.0700894124339335 +res CT 12 1.1854462583331509 +res DC 1 0.7680621233124993 +res DC 2 0.9138956801480689 +res DC 3 0.7918083689445015 +res DC 4 0.8658769063121562 +res DC 5 0.7695090014860693 +res DC 6 0.8746895702831289 +res DC 7 0.9570852978322859 +res DC 8 0.9099547165446155 +res DC 9 0.9485393173855193 +res DC 10 0.8296717830891058 +res DC 11 0.8026993971986128 +res DC 12 0.8624977822752661 +res DE 1 0.8355100372009033 +res DE 2 1.076528189841396 +res DE 3 0.9460247129476603 +res DE 4 0.9533311820722438 +res DE 5 0.833123284754069 +res DE 6 0.9978932454447851 +res DE 7 1.0972667633795787 +res DE 8 1.0654914156715025 +res DE 9 1.1167252536787575 +res DE 10 0.8739334444961758 +res DE 11 0.8277471796845735 +res DE 12 0.9933306348588 +res FL 1 1.0134720879392636 +res FL 2 1.1073291708968789 +res FL 3 1.1459565582518363 +res FL 4 1.1204875028924874 +res FL 5 1.1520462670800875 +res FL 6 1.2123663291791065 +res FL 7 1.295693108954451 +res FL 8 1.2983101149956684 +res FL 9 1.1788790524907835 +res FL 10 1.0590855473212835 +res FL 11 1.0936253713387891 +res FL 12 1.09217820513474 +res GA 1 0.9895984192712864 +res GA 2 1.2244893194604787 +res GA 3 1.0128963836336318 +res GA 4 1.0029852138492097 +res GA 5 0.922546877215695 +res GA 6 1.0784043546959714 +res GA 7 1.2136770860862567 +res GA 8 1.226829910092504 +res GA 9 0.9930838160823555 +res GA 10 0.9416068291259159 +res GA 11 1.0228519282626556 +res GA 12 1.1268328725920833 +res IA 1 1.0355636428922113 +res IA 2 1.000386841135155 +res IA 3 1.0016975720380557 +res IA 4 0.9214413379864144 +res IA 5 0.8383272815762973 +res IA 6 1.0235194774275989 +res IA 7 1.1132322380448283 +res IA 8 1.1279415707333786 +res IA 9 1.0258640976070175 +res IA 10 0.9587109979735609 +res IA 11 0.8758506342328092 +res IA 12 1.0693977533725323 +res ID 1 1.299150221033535 +res ID 2 1.2402696615309474 +res ID 3 1.1927520295953535 +res ID 4 1.1945035719099784 +res ID 5 1.0958292555627833 +res ID 6 1.2377176001109202 +res ID 7 1.3236298127222816 +res ID 8 1.2968029041679305 +res ID 9 1.1673391723171058 +res ID 10 1.1135687057643935 +res ID 11 1.2521063691099883 +res ID 12 1.260578261564926 +res IL 1 0.9837997644350556 +res IL 2 1.0400093527531398 +res IL 3 0.9541485655430831 +res IL 4 0.9141991324436538 +res IL 5 0.9164566849594867 +res IL 6 1.1591938940175779 +res IL 7 1.2098486349574273 +res IL 8 1.2022667529976776 +res IL 9 1.02830469218227 +res IL 10 0.9810665302272445 +res IL 11 0.9397709536107026 +res IL 12 1.0490737660718532 +res IN 1 1.0977575951981469 +res IN 2 1.292860439943186 +res IN 3 1.1083733725129747 +res IN 4 1.084663236051764 +res IN 5 1.0134944560612162 +res IN 6 1.2332105655318037 +res IN 7 1.3646726368677715 +res IN 8 1.405633603420201 +res IN 9 1.2500464662730206 +res IN 10 1.096554252428455 +res IN 11 1.0630813495591747 +res IN 12 1.2070378326971383 +res KS 1 0.988270738219101 +res KS 2 0.9792146684113014 +res KS 3 0.9107569859790476 +res KS 4 0.8342990254567434 +res KS 5 0.7303748064602663 +res KS 6 0.9392853473912055 +res KS 7 1.0350548556898327 +res KS 8 1.1244835236543762 +res KS 9 1.069755362227263 +res KS 10 0.9793158283376643 +res KS 11 0.8793428452505018 +res KS 12 0.9501559447974974 +res KY 1 0.7743520271628259 +res KY 2 1.0509310926617683 +res KY 3 0.8648053454914941 +res KY 4 0.880713032689874 +res KY 5 0.8275412390539778 +res KY 6 0.9822244525973022 +res KY 7 1.14784680877881 +res KY 8 1.1576425107168304 +res KY 9 1.0301532187000817 +res KY 10 0.87106338491359 +res KY 11 0.8028214069136561 +res KY 12 0.9367517090225205 +res LA 1 0.913435150588217 +res LA 2 1.251793073618591 +res LA 3 1.1289699922083332 +res LA 4 1.0298549343641907 +res LA 5 0.8362530598332102 +res LA 6 1.0576338991295096 +res LA 7 1.1708014108626863 +res LA 8 1.238050831922635 +res LA 9 1.2097345841171738 +res LA 10 1.065493717229391 +res LA 11 1.0440958733254584 +res LA 12 1.0614265375801932 +res MA 1 0.9475644523116598 +res MA 2 1.0652576129131472 +res MA 3 0.9606766208247249 +res MA 4 0.9733349146317837 +res MA 5 0.9283193720428398 +res MA 6 1.0624444517306741 +res MA 7 1.0943634588821252 +res MA 8 1.1336085055521012 +res MA 9 1.152508344831755 +res MA 10 0.9771081772176146 +res MA 11 0.9158001108006566 +res MA 12 0.9287617325594069 +res MD 1 0.7405615342137319 +res MD 2 0.9021399831639972 +res MD 3 0.7599112631272159 +res MD 4 0.8184914037043273 +res MD 5 0.7791332924951956 +res MD 6 0.9275696214257566 +res MD 7 1.0113311744592615 +res MD 8 0.931265583863417 +res MD 9 0.8593105887801167 +res MD 10 0.7629735634047128 +res MD 11 0.8073160744228024 +res MD 12 0.9112241294392979 +res ME 1 1.0803172522081792 +res ME 2 1.1975157037056996 +res ME 3 1.136592994559607 +res ME 4 1.1114991249991082 +res ME 5 0.9803617882144197 +res ME 6 1.0466554830913346 +res ME 7 1.0923884261930543 +res ME 8 1.1836104279374247 +res ME 9 1.158562432971967 +res ME 10 0.9702959740407419 +res ME 11 0.9576317784979725 +res ME 12 1.0073847998023049 +res MI 1 0.9071856066361723 +res MI 2 0.9427070685918559 +res MI 3 0.911478600929973 +res MI 4 0.8987779475633259 +res MI 5 0.9147822233216648 +res MI 6 1.1281129287964191 +res MI 7 1.1462730261126313 +res MI 8 1.0996081012858845 +res MI 9 0.9637183143607635 +res MI 10 0.9566767299651732 +res MI 11 0.9215882848066544 +res MI 12 0.9761000164538115 +res MN 1 0.9587593575813871 +res MN 2 0.9363933058066013 +res MN 3 0.9893482457899049 +res MN 4 0.9186317520858444 +res MN 5 0.8810409078280949 +res MN 6 1.0891207775259422 +res MN 7 1.1234845768699435 +res MN 8 1.1333124044167415 +res MN 9 1.026600584064669 +res MN 10 0.935875736456676 +res MN 11 0.8961638347365055 +res MN 12 0.9970115378965793 +res MO 1 1.2001510308718084 +res MO 2 1.3034094320692082 +res MO 3 1.136493739940923 +res MO 4 1.0372108531001438 +res MO 5 0.8634949389100459 +res MO 6 1.0489574420918486 +res MO 7 1.1833313848945992 +res MO 8 1.2159843590930794 +res MO 9 1.1042176184470447 +res MO 10 1.0413749949742257 +res MO 11 1.0376615795071773 +res MO 12 1.2068510896263183 +res MS 1 0.993603510889827 +res MS 2 1.3472247733981948 +res MS 3 1.1503202263132188 +res MS 4 1.035984106377276 +res MS 5 0.8312173229098292 +res MS 6 1.028429702938229 +res MS 7 1.179272605753503 +res MS 8 1.255705710667046 +res MS 9 1.217770644955756 +res MS 10 1.067114423488522 +res MS 11 1.0185761392089843 +res MS 12 1.0914134903863872 +res MT 1 1.1977058208390603 +res MT 2 1.0975442975299796 +res MT 3 1.1698834023139562 +res MT 4 1.1264203746318375 +res MT 5 1.0661794769027073 +res MT 6 1.1005572361475051 +res MT 7 1.14099422388319 +res MT 8 1.2900875622203398 +res MT 9 1.1437433605611944 +res MT 10 0.9482815599338987 +res MT 11 1.0528132324257844 +res MT 12 1.1798939365970529 +res NC 1 0.8163710716075419 +res NC 2 1.1195408843671597 +res NC 3 0.8439529237885136 +res NC 4 0.9455170693292458 +res NC 5 0.8713338296297375 +res NC 6 1.0033417843548476 +res NC 7 1.1935328808069303 +res NC 8 1.1603140720189646 +res NC 9 0.9887347995750823 +res NC 10 0.8853561521217318 +res NC 11 0.908051691978221 +res NC 12 1.0293684826511056 +res ND 1 1.3074266290423708 +res ND 2 1.226706220837485 +res ND 3 1.3214100167276033 +res ND 4 1.2251130226835443 +res ND 5 1.1525462979061922 +res ND 6 1.2424101250251414 +res ND 7 1.3071094378645636 +res ND 8 1.3349764233822023 +res ND 9 1.2652267479679025 +res ND 10 1.1615187143216943 +res ND 11 1.2213373564097465 +res ND 12 1.3798138168040561 +res NE 1 1.1707546183810897 +res NE 2 1.1108247878192916 +res NE 3 1.187636287212202 +res NE 4 1.0110495913129773 +res NE 5 0.9598104423688096 +res NE 6 1.1165922238881067 +res NE 7 1.2809751035828143 +res NE 8 1.3139912126897884 +res NE 9 1.2373937373302109 +res NE 10 1.129720636917199 +res NE 11 0.9927211088827865 +res NE 12 1.1697660223334505 +res NH 1 1.0752182624084494 +res NH 2 1.1318268185651172 +res NH 3 1.050758293365842 +res NH 4 0.9947515126293456 +res NH 5 0.9348250248659588 +res NH 6 1.0931194800078083 +res NH 7 1.220565552483399 +res NH 8 1.215792590598341 +res NH 9 1.0797325694915572 +res NH 10 0.942440789749683 +res NH 11 0.9761323761967365 +res NH 12 1.0841578401385623 +res NJ 1 1.0219507267457946 +res NJ 2 1.0674847779460768 +res NJ 3 0.9558414592071736 +res NJ 4 1.0049380087482003 +res NJ 5 1.0022886262884962 +res NJ 6 1.2685998682199446 +res NJ 7 1.3846171072068032 +res NJ 8 1.219366600270002 +res NJ 9 1.0820300208451186 +res NJ 10 0.9552055094540199 +res NJ 11 1.013979656390989 +res NJ 12 1.0819029417705568 +res NM 1 0.8873446376082733 +res NM 2 0.9265884876982448 +res NM 3 0.8337190094443687 +res NM 4 0.7675030217753931 +res NM 5 0.704581657972546 +res NM 6 0.7705900236578721 +res NM 7 0.8962522494581746 +res NM 8 0.9209204238732625 +res NM 9 0.867261752353268 +res NM 10 0.8632973910392034 +res NM 11 0.8608041167807003 +res NM 12 0.8630951594090741 +res NV 1 1.0764305938007372 +res NV 2 1.0220832443544445 +res NV 3 1.0106444817920008 +res NV 4 0.9356456085964622 +res NV 5 1.0298766335235165 +res NV 6 1.080935806950794 +res NV 7 1.1646865779616962 +res NV 8 1.115564461092879 +res NV 9 1.0585842643734211 +res NV 10 1.073163347271535 +res NV 11 1.0595516713324882 +res NV 12 1.0881722110809056 +res NY 1 0.8930980236019318 +res NY 2 1.0131198080994768 +res NY 3 0.9180785565075946 +res NY 4 0.9212665721524215 +res NY 5 0.8842728758840445 +res NY 6 1.0415899559021196 +res NY 7 1.1137169693601288 +res NY 8 1.1174800421935398 +res NY 9 1.1437041786319833 +res NY 10 0.9726172275613864 +res NY 11 0.8977112809815102 +res NY 12 0.9517777654079077 +res OH 1 1.0523084096124167 +res OH 2 1.2001137532975625 +res OH 3 1.0302212018627825 +res OH 4 1.0254406934976663 +res OH 5 0.9683757597188912 +res OH 6 1.189106620867398 +res OH 7 1.295342125866699 +res OH 8 1.274770374190815 +res OH 9 1.1285494980171848 +res OH 10 1.0271966010775708 +res OH 11 1.0003958907094819 +res OH 12 1.1335476045400952 +res OK 1 0.9057415940067005 +res OK 2 0.9504330621896757 +res OK 3 0.9913668588250015 +res OK 4 0.8403529056139727 +res OK 5 0.7356056847833347 +res OK 6 0.8979564799965473 +res OK 7 1.0096586795677631 +res OK 8 1.096606484173588 +res OK 9 1.0794211516702021 +res OK 10 0.9648224738153652 +res OK 11 0.8461280829729463 +res OK 12 0.9329487200160197 +res OR 1 1.195731793052862 +res OR 2 1.1390641960528014 +res OR 3 1.1571777773026646 +res OR 4 1.1419245665532014 +res OR 5 1.1122755384301475 +res OR 6 1.2023863575167484 +res OR 7 1.2529679263073312 +res OR 8 1.2803010606076872 +res OR 9 1.158169381264129 +res OR 10 1.1145259205618543 +res OR 11 1.1966476983958463 +res OR 12 1.1933586286714988 +res PA 1 1.0779147133323557 +res PA 2 1.210030079981672 +res PA 3 1.0292554420580842 +res PA 4 1.0434511681157996 +res PA 5 0.9833172223153731 +res PA 6 1.144623923398484 +res PA 7 1.2578540944825496 +res PA 8 1.2414165401247652 +res PA 9 1.1659109887184458 +res PA 10 1.016874901488071 +res PA 11 1.0404040775521963 +res PA 12 1.1699208539435655 +res RI 1 0.9229905117835512 +res RI 2 0.9575769533879578 +res RI 3 0.8863449199599169 +res RI 4 0.9204508321945943 +res RI 5 0.8716233301507312 +res RI 6 1.0251506105551953 +res RI 7 1.2303124941246173 +res RI 8 1.2094536423947446 +res RI 9 1.0973415384008247 +res RI 10 0.9446004121601084 +res RI 11 0.8908657796971183 +res RI 12 0.8849628783323457 +res SC 1 0.9031218479520571 +res SC 2 1.2012396388449114 +res SC 3 0.9273745265061606 +res SC 4 0.9965471532211718 +res SC 5 0.9524420439625111 +res SC 6 1.0759116785723652 +res SC 7 1.3107663471648583 +res SC 8 1.2606670630371575 +res SC 9 1.0460407416248652 +res SC 10 0.947135462014817 +res SC 11 0.9752391801468462 +res SC 12 1.0833606314130582 +res SD 1 1.2402010707386855 +res SD 2 1.2020544974993637 +res SD 3 1.272260395309746 +res SD 4 1.1996327865141894 +res SD 5 1.1080057431620731 +res SD 6 1.2432091147263395 +res SD 7 1.3117039417333225 +res SD 8 1.4077593443116396 +res SD 9 1.3229979472716396 +res SD 10 1.1403059344797049 +res SD 11 1.1051896523792624 +res SD 12 1.234970326068415 +res TN 1 0.8217399105644407 +res TN 2 1.2758283147774447 +res TN 3 1.0201445576650783 +res TN 4 1.012643186746268 +res TN 5 0.8374310390705161 +res TN 6 1.0004426957533519 +res TN 7 1.184673897638009 +res TN 8 1.2705634361165645 +res TN 9 1.2205829496174208 +res TN 10 0.9980749465241715 +res TN 11 0.8538768261722793 +res TN 12 0.9807231571558607 +res TX 1 0.9255123763029075 +res TX 2 1.0875141308773983 +res TX 3 1.0795988222027635 +res TX 4 0.9910474346176037 +res TX 5 0.8412216370773872 +res TX 6 0.9815230560716145 +res TX 7 1.1078488203007655 +res TX 8 1.1791396436536754 +res TX 9 1.3014578142431006 +res TX 10 1.1393771896916831 +res TX 11 0.9865546770689988 +res TX 12 0.9916996644202877 +res UT 1 1.0780926263255508 +res UT 2 1.0770535642279755 +res UT 3 1.0683666821857933 +res UT 4 1.0298798590633684 +res UT 5 1.0182165642440262 +res UT 6 1.1260970777263715 +res UT 7 1.2303601954791208 +res UT 8 1.2627435901299378 +res UT 9 1.138840369810695 +res UT 10 1.1133845225020746 +res UT 11 1.1072497108406256 +res UT 12 1.0833657884856496 +res VA 1 0.79442200883594 +res VA 2 1.0139394482953519 +res VA 3 0.7847264945017354 +res VA 4 0.823961248490998 +res VA 5 0.810167714370267 +res VA 6 1.020194953813866 +res VA 7 1.1540951084138398 +res VA 8 1.085543965655475 +res VA 9 0.9435199240617872 +res VA 10 0.8145672023788614 +res VA 11 0.8559256018701744 +res VA 12 0.9844201742192006 +res VT 1 1.098651586749065 +res VT 2 1.166763739192769 +res VT 3 1.0547386117877795 +res VT 4 1.0051229831197694 +res VT 5 0.9659801983406298 +res VT 6 1.109430123409055 +res VT 7 1.1750856126339533 +res VT 8 1.1604428633063728 +res VT 9 1.0551009823574342 +res VT 10 0.9892880220739368 +res VT 11 1.009676995505541 +res VT 12 1.0999845866380946 +res WA 1 1.24689596541807 +res WA 2 1.1878297408357716 +res WA 3 1.2927048689493512 +res WA 4 1.2763667352424655 +res WA 5 1.2371411382746675 +res WA 6 1.2828640869334498 +res WA 7 1.3006509242126203 +res WA 8 1.3268537619336274 +res WA 9 1.2377311787995975 +res WA 10 1.1337623257200402 +res WA 11 1.1633659598691053 +res WA 12 1.2233674014235305 +res WI 1 0.9789901775830249 +res WI 2 0.9586269133310317 +res WI 3 0.9728139291643428 +res WI 4 0.9324865378248999 +res WI 5 0.9273037218786054 +res WI 6 1.1689527903198305 +res WI 7 1.2048837546156108 +res WI 8 1.1887355070635293 +res WI 9 1.0562630973852347 +res WI 10 0.9945262104651079 +res WI 11 0.9510687097052113 +res WI 12 1.0370296889213586 +res WV 1 0.8311024944221076 +res WV 2 1.054454091136733 +res WV 3 0.8396021932221986 +res WV 4 0.8332660055161539 +res WV 5 0.806118342840943 +res WV 6 0.8932264399673899 +res WV 7 1.0278509776431064 +res WV 8 1.025203833889218 +res WV 9 0.8625438015257332 +res WV 10 0.8060336717443736 +res WV 11 0.850900698731967 +res WV 12 1.019493070774263 +res WY 1 1.2173818456975307 +res WY 2 1.1452528165700084 +res WY 3 1.1901917382144669 +res WY 4 1.1199246171679245 +res WY 5 1.020884420167496 +res WY 6 1.0919196657448518 +res WY 7 1.1260757079772756 +res WY 8 1.1582447236456224 +res WY 9 1.0270190999208748 +res WY 10 0.9541451564107349 +res WY 11 1.0535906238715436 +res WY 12 1.1330528058864229 diff --git a/map_meas/measure_map.tsv b/map_meas/measure_map.tsv index db4ff83..39b56dc 100644 --- a/map_meas/measure_map.tsv +++ b/map_meas/measure_map.tsv @@ -130,7 +130,7 @@ meas Scout_end_use original_ann measure_ann original_ts measure_ts sector origin (C) Ref. Case Elec. Boiler FS (Other Fossil Boiler) Cooling (Equip.) com_hvac_ann_22 com_hvac_ann_22 com_cooling_ts_9 com_cooling_ts_9 com Other fossil boiler + RTAC or chiller Boiler, electric RTAC or chiller Boiler, electric (C) Ref. Case Elec. Boiler FS (Other Fossil Boiler) Heating (Equip.) com_hvac_ann_22 com_hvac_ann_22 com_heating_ts_9 com_heating_ts_4 com Other fossil boiler + RTAC or chiller Boiler, electric fossil Boiler, electric (C) Ref. Case Elec. Boiler FS (Other Fossil Boiler) Ventilation com_hvac_ann_22 com_hvac_ann_22 com_ventilation_4 com_ventilation_4 com Other fossil boiler + RTAC or chiller Boiler, electric RTAC or chiller Boiler, electric -(C) Ref. Case Electric Other Other com_gap_ann_1 com_gap_ann_1 com_gap_ts_1 com_gap_ts_1 com Other Other Other Other +(C) Ref. Case Electric Other Other com_misc_ann_1 com_misc_ann_1 com_misc_ts_1 com_misc_ts_1 com Other Other Other Other (C) Ref. Case Electric Range Cooking com_cook_ann_2 com_cook_ann_2 com_cook_ts_1 com_cook_ts_1 com Range, electric Range, electric Range, electric Range, electric (C) Ref. Case Electric Range FS Cooking com_cook_ann_1 com_cook_ann_1 com_cook_ts_1 com_cook_ts_1 com Range, fossil Range, electric Range, fossil Range, electric (C) Ref. Case Fossil Other Other com_misc_ann_1 com_misc_ann_1 com_misc_ts_1 com_misc_ts_1 com Other, fossil Other, fossil Other, fossil Other, fossil @@ -450,6 +450,6 @@ Gap Cooking com_gap_ann_1 com_gap_ann_1 com_gap_ts_1 com_gap_ts_1 com Cooking, g (C) Ref. Case Electric Range TS Cooking com_cook_ann_2 com_cook_ann_2 com_cook_ts_1 com_cook_ts_1 com Range, electric Range, electric Range, electric Range, electric (C) Ref. Case Fossil Other FS Other com_misc_ann_1 com_misc_ann_1 com_misc_ts_1 com_misc_ts_1 com Other, fossil Other Other, fossil Other (R) Ref. Case Electric Dryer TS Other res_dry_ann_3 res_dry_ann_3 res_dry_ts_2 res_dry_ts_2 res Dryer, resistance Dryer, ESTAR Dryer, resistance Dryer, ESTAR -(C) Ref. Case Electric Other TS Other com_gap_ann_1 com_gap_ann_1 com_gap_ts_1 com_gap_ts_1 com Other Other Other Other +(C) Ref. Case Electric Other TS Other com_misc_ann_1 com_misc_ann_1 com_misc_ts_1 com_misc_ts_1 com Other Other Other Other (R) Ref. Case Electric Range TS Cooking res_cook_ann_3 res_cook_ann_3 res_cook_ts_2 res_cook_ts_2 res Range, electric Range, electric Range, electric Range, electric -(R) Ref. Case Fossil Other FS Other res_misc_ann_1 res_misc_ann_1 res_misc_ts_1 res_misc_ts_1 res Other, fossil Other Other, fossil Other \ No newline at end of file +(R) Ref. Case Fossil Other FS Other res_misc_ann_1 res_misc_ann_1 res_misc_ts_1 res_misc_ts_1 res Other, fossil Other Other, fossil Other diff --git a/rename_multiplier_tables.py b/rename_multiplier_tables.py new file mode 100644 index 0000000..8842a2c --- /dev/null +++ b/rename_multiplier_tables.py @@ -0,0 +1,95 @@ +import boto3 +import logging +from botocore.exceptions import ClientError + +# Configure logging +logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') +logger = logging.getLogger(__name__) + +# AWS Glue client setup +glue_client = boto3.client('glue') + +def copy_tables_with_new_names(database_name, table_mappings): + """ + Copy tables with new names within the same database while preserving original tables. + + :param database_name: Target database name + :param table_mappings: Dictionary of {old_table_name: new_table_name} + """ + try: + total_tables_copied = 0 + total_tables_failed = 0 + + for old_table_name, new_table_name in table_mappings.items(): + try: + # Retrieve the existing table metadata + response = glue_client.get_table( + DatabaseName=database_name, + Name=old_table_name + ) + table = response['Table'] + + # Prepare new table input + new_table_input = { + key: value for key, value in table.items() + if key in ['StorageDescriptor', 'PartitionKeys', 'TableType', 'Parameters', 'Description'] + } + new_table_input['Name'] = new_table_name + + # Check if the new table already exists + try: + glue_client.get_table(DatabaseName=database_name, Name=new_table_name) + logger.warning(f"Table {new_table_name} already exists in {database_name}. Skipping.") + continue + except glue_client.exceptions.EntityNotFoundException: + # Create the new table + glue_client.create_table( + DatabaseName=database_name, + TableInput=new_table_input + ) + logger.info(f"Successfully created new table {new_table_name} as a copy of {old_table_name}") + total_tables_copied += 1 + + except ClientError as e: + logger.error(f"Failed to copy table {old_table_name}: {e}") + total_tables_failed += 1 + + # Summary logging + logger.info(f"Table Copy Complete - Total Copied: {total_tables_copied}, Total Failed: {total_tables_failed}") + + return total_tables_copied, total_tables_failed + + except Exception as e: + logger.error(f"Unexpected error during table copy: {e}") + raise + +def main(): + # Specify the table mappings + table_mappings = { + # these are table names from crawling oedi data lake, created empty tables + # "com_annual_multipliers_amy_parquet": "com_annual_disaggregation_multipliers_amy", + # "res_annual_multipliers_amy_parquet": "res_annual_disaggregation_multipliers_amy", + # these are table names from crawling com_annual_multipliers_amy folder in my bucket + # "com_annual_multipliers_amy": "com_annual_disaggregation_multipliers_amy", + # "res_annual_multipliers_amy": "res_annual_disaggregation_multipliers_amy", + # "com_hourly_multipliers_amy": "com_hourly_disaggregation_multipliers_amy", + # "res_hourly_multipliers_amy": "res_hourly_disaggregation_multipliers_amy" + # these are generated multiplier tables from the original code, don't need this when the version suffix are consistent + "com_annual_disaggregation_multipliers": "com_annual_disaggregation_multipliers_amy", + "res_annual_disaggregation_multipliers": "res_annual_disaggregation_multipliers_amy", + "com_hourly_disaggregation_multipliers": "com_hourly_disaggregation_multipliers_amy", + "res_hourly_disaggregation_multipliers": "res_hourly_disaggregation_multipliers_amy" + } + + # database_name = "default2" + # database_name = "baseline" + database_name = "rerun" + + try: + copied, failed = copy_tables_with_new_names(database_name, table_mappings) + print(f"Copied {copied} tables. {failed} tables failed to copy.") + except Exception as e: + print(f"Failed to copy tables: {e}") + +if __name__ == "__main__": + main() diff --git a/sql/com/com_ann_shares_fossil_heat.sql b/sql/com/com_ann_shares_fossil_heat.sql index 65ace8d..16d382e 100644 --- a/sql/com/com_ann_shares_fossil_heat.sql +++ b/sql/com/com_ann_shares_fossil_heat.sql @@ -6,7 +6,6 @@ WITH meta_filtered AS ( SELECT meta."in.nhgis_county_gisjoin", meta."in.state", chars.group_ann, - chars."version", sum(meta."calc.weighted.natural_gas.heating.energy_consumption..tbtu" + meta."calc.weighted.other_fuel.heating.energy_consumption..tbtu" + meta."calc.weighted.electricity.heat_recovery.energy_consumption..tbtu") as heating FROM "{meta_com}" as meta RIGHT JOIN (SELECT * FROM com_ann_hvac WHERE group_ann in ('com_hvac_ann_12','com_hvac_ann_24')) as chars ON meta."in.heating_fuel" = chars."in.heating_fuel" @@ -16,16 +15,14 @@ WITH meta_filtered AS ( GROUP BY meta."in.nhgis_county_gisjoin", meta."in.state", - chars.group_ann, - chars."version" + chars.group_ann ), geo_shares AS ( SELECT "in.nhgis_county_gisjoin", "in.state", - "version", group_ann, heating, - heating / sum(heating) OVER (PARTITION BY "in.state", group_ann, "version") as heating_mult + heating / sum(heating) OVER (PARTITION BY "in.state", group_ann) as heating_mult FROM meta_filtered ) SELECT diff --git a/sql/com/com_ann_shares_hvac.sql b/sql/com/com_ann_shares_hvac.sql index ff5c962..a7474b0 100644 --- a/sql/com/com_ann_shares_hvac.sql +++ b/sql/com/com_ann_shares_hvac.sql @@ -6,7 +6,6 @@ WITH meta_filtered AS ( SELECT meta."in.nhgis_county_gisjoin", meta."in.state", chars.group_ann, - chars."version", sum(meta."calc.weighted.electricity.heating.energy_consumption..tbtu" + meta."calc.weighted.electricity.heat_recovery.energy_consumption..tbtu") as heating, sum(meta."calc.weighted.electricity.cooling.energy_consumption..tbtu" + meta."calc.weighted.electricity.heat_rejection.energy_consumption..tbtu" + meta."calc.weighted.district_cooling.cooling.energy_consumption..tbtu" + meta."calc.weighted.electricity.pumps.energy_consumption..tbtu") as cooling, sum(meta."calc.weighted.electricity.fans.energy_consumption..tbtu") as ventilation @@ -19,20 +18,18 @@ WITH meta_filtered AS ( GROUP BY meta."in.nhgis_county_gisjoin", meta."in.state", - chars.group_ann, - chars."version" + chars.group_ann ), geo_shares AS ( SELECT "in.nhgis_county_gisjoin", "in.state", - "version", group_ann, heating, - heating / sum(heating) OVER (PARTITION BY "in.state", group_ann, "version") as heating_mult, + heating / sum(heating) OVER (PARTITION BY "in.state", group_ann) as heating_mult, cooling, - cooling / sum(cooling) OVER (PARTITION BY "in.state", group_ann, "version") as cooling_mult, + cooling / sum(cooling) OVER (PARTITION BY "in.state", group_ann) as cooling_mult, ventilation, - ventilation / sum(ventilation) OVER (PARTITION BY "in.state", group_ann, "version") as ventilation_mult + ventilation / sum(ventilation) OVER (PARTITION BY "in.state", group_ann) as ventilation_mult FROM meta_filtered ) SELECT diff --git a/sql/com/com_ann_shares_wh.sql b/sql/com/com_ann_shares_wh.sql index 76c6dd8..ac66401 100644 --- a/sql/com/com_ann_shares_wh.sql +++ b/sql/com/com_ann_shares_wh.sql @@ -3,7 +3,6 @@ WITH meta_filtered AS ( SELECT meta."in.nhgis_county_gisjoin", meta."in.state", chars.group_ann, - chars."version", sum(meta."calc.weighted.electricity.water_systems.energy_consumption..tbtu" + meta."calc.weighted.natural_gas.water_systems.energy_consumption..tbtu" + meta."calc.weighted.other_fuel.water_systems.energy_consumption..tbtu" + meta."calc.weighted.district_heating.water_systems.energy_consumption..tbtu") as wh FROM "{meta_com}" as meta RIGHT JOIN com_ann_wh as chars ON meta."in.service_water_heating_fuel" = chars."in.service_water_heating_fuel" @@ -12,12 +11,11 @@ WITH meta_filtered AS ( GROUP BY meta."in.nhgis_county_gisjoin", meta."in.state", - chars.group_ann, - chars."version" + chars.group_ann ) SELECT "in.nhgis_county_gisjoin" as "in.county", group_ann, - wh / sum(wh) OVER (PARTITION BY "in.state", group_ann, "version") as multiplier_annual, + wh / sum(wh) OVER (PARTITION BY "in.state", group_ann) as multiplier_annual, 'com' AS sector, "in.state", 'Water Heating' AS end_use diff --git a/sql/com/com_hourly_hvac_norm.sql b/sql/com/com_hourly_hvac_norm.sql index 683e000..3a2244c 100644 --- a/sql/com/com_hourly_hvac_norm.sql +++ b/sql/com/com_hourly_hvac_norm.sql @@ -1,4 +1,15 @@ INSERT INTO {mult_com_hourly} +( +"in.county", + shape_ts, + timestamp_hour, + kwh, + multiplier_hourly, + sector, + "in.state", + end_use +) +SELECT "in.county", shape_ts, timestamp_hour, @@ -8,4 +19,4 @@ INSERT INTO {mult_com_hourly} "in.state", end_use FROM com_hourly_hvac_temp_{version} -; \ No newline at end of file +; diff --git a/sql/com/com_hourly_shares_cooling.sql b/sql/com/com_hourly_shares_cooling.sql index 71cfe15..0d42a8e 100644 --- a/sql/com/com_hourly_shares_cooling.sql +++ b/sql/com/com_hourly_shares_cooling.sql @@ -13,7 +13,6 @@ WITH meta_shapes AS ( meta."in.state", chars.shape_ts, chars.upgrade, - chars."version", meta.weight FROM "{meta_com}" as meta RIGHT JOIN com_ts_cooling as chars ON meta."in.hvac_cool_type" = chars."in.hvac_cool_type" @@ -30,7 +29,6 @@ ts_not_agg AS ( SELECT meta_shapes."in.county", meta_shapes."in.state", meta_shapes.shape_ts, - meta_shapes."version", -- make sure all the hours are 2018 CASE WHEN extract(YEAR FROM DATE_TRUNC('hour', from_unixtime(ts."timestamp" / 1000000000)) + INTERVAL '1' HOUR) = 2019 THEN DATE_TRUNC('hour', from_unixtime(ts."timestamp" / 1000000000)) - INTERVAL '1' YEAR + INTERVAL '1' HOUR @@ -48,13 +46,11 @@ ts_agg AS( "in.state", shape_ts, timestamp_hour, - "version", sum(cooling) as cooling FROM ts_not_agg GROUP BY timestamp_hour, "in.state", "in.county", - "version", shape_ts ) -- don't normalize the shapes diff --git a/sql/com/com_hourly_shares_heating.sql b/sql/com/com_hourly_shares_heating.sql index f42f76c..00c75b3 100644 --- a/sql/com/com_hourly_shares_heating.sql +++ b/sql/com/com_hourly_shares_heating.sql @@ -13,7 +13,6 @@ WITH meta_shapes AS ( meta."in.state", chars.shape_ts, chars.upgrade, - chars."version", meta.weight FROM "{meta_com}" as meta RIGHT JOIN com_ts_heating as chars ON meta."in.heating_fuel" = chars."in.heating_fuel" @@ -30,7 +29,6 @@ ts_not_agg AS ( SELECT meta_shapes."in.county", meta_shapes."in.state", meta_shapes.shape_ts, - meta_shapes."version", -- make sure all the hours are 2018 CASE WHEN extract(YEAR FROM DATE_TRUNC('hour', from_unixtime(ts."timestamp" / 1000000000)) + INTERVAL '1' HOUR) = 2019 THEN DATE_TRUNC('hour', from_unixtime(ts."timestamp" / 1000000000)) - INTERVAL '1' YEAR + INTERVAL '1' HOUR @@ -48,14 +46,12 @@ ts_agg AS( "in.state", shape_ts, timestamp_hour, - "version", sum(heating) as heating FROM ts_not_agg GROUP BY timestamp_hour, "in.state", "in.county", - shape_ts, - "version" + shape_ts ) -- don't normalize the shapes SELECT "in.county", diff --git a/sql/com/com_hourly_shares_ventilation.sql b/sql/com/com_hourly_shares_ventilation.sql index c896e97..e7083c5 100644 --- a/sql/com/com_hourly_shares_ventilation.sql +++ b/sql/com/com_hourly_shares_ventilation.sql @@ -13,7 +13,6 @@ WITH meta_shapes AS ( meta."in.state", chars.shape_ts, chars.upgrade, - chars."version", meta.weight FROM "{meta_com}" as meta RIGHT JOIN com_ts_ventilation as chars ON meta."in.hvac_cool_type" = chars."in.hvac_cool_type" @@ -30,7 +29,6 @@ ts_not_agg AS ( SELECT meta_shapes."in.county", meta_shapes."in.state", meta_shapes.shape_ts, - meta_shapes."version", -- make sure all the hours are 2018 CASE WHEN extract(YEAR FROM DATE_TRUNC('hour', from_unixtime(ts."timestamp" / 1000000000)) + INTERVAL '1' HOUR) = 2019 THEN DATE_TRUNC('hour', from_unixtime(ts."timestamp" / 1000000000)) - INTERVAL '1' YEAR + INTERVAL '1' HOUR @@ -49,13 +47,11 @@ ts_agg AS( "in.state", shape_ts, timestamp_hour, - "version", sum(ventilation) as ventilation FROM ts_not_agg GROUP BY timestamp_hour, "in.state", "in.county", - "version", shape_ts ) -- don't normalize the shapes diff --git a/sql/data_downloads/county_hourly_examples_60_days.sql b/sql/data_downloads/county_hourly_examples_60_days.sql index 8c97c0f..80425e3 100644 --- a/sql/data_downloads/county_hourly_examples_60_days.sql +++ b/sql/data_downloads/county_hourly_examples_60_days.sql @@ -17,7 +17,7 @@ FROM ns LEFT JOIN long_county_hourly_{turnover}_{weather} lch ON ns."in.county" = lch."in.county" WHERE turnover!='baseline' AND lch.county_hourly_cal_kwh = lch.county_hourly_cal_kwh -AND "year" IN (2024, 2050) +AND "year" IN ({baseyear}, 2050) GROUP BY lch."in.county",turnover,"in.state","year" ), @@ -25,8 +25,8 @@ county_differences AS ( SELECT "in.county",turnover,"in.state", (MAX(CASE WHEN year = 2050 THEN county_total_ann_kwh END) - - MAX(CASE WHEN year = 2024 THEN county_total_ann_kwh END)) - / NULLIF(MAX(CASE WHEN year = 2024 THEN county_total_ann_kwh END), 0) AS percent_difference + MAX(CASE WHEN year = {baseyear} THEN county_total_ann_kwh END)) + / NULLIF(MAX(CASE WHEN year = {baseyear} THEN county_total_ann_kwh END), 0) AS percent_difference FROM county_totals GROUP BY @@ -87,7 +87,7 @@ hourly_data AS ( FROM long_county_hourly_{turnover}_{weather} lch INNER JOIN example_counties ec ON lch."in.county" = ec."in.county" - WHERE lch.year IN (2024, 2050) + WHERE lch.year IN ({baseyear}, 2050) GROUP BY lch."in.county", ec.example_type, diff --git a/sql/res/annual_county.sql b/sql/res/annual_county.sql index 902563a..bc0d0ed 100644 --- a/sql/res/annual_county.sql +++ b/sql/res/annual_county.sql @@ -46,6 +46,7 @@ AND elec.tech_stage = mm.tech_stage SELECT ann_disag."in.county", ann_disag."in.weather_file_city", + ann_disag."in.weather_file_longitude", scout_meas.fuel, scout_meas.meas, scout_meas.tech_stage, @@ -60,7 +61,7 @@ SELECT scout_meas.end_use FROM scout_meas JOIN ( - SELECT "in.county", "in.weather_file_city", multiplier_annual, "in.state", group_ann, end_use + SELECT "in.county", "in.weather_file_city", "in.weather_file_longitude", multiplier_annual, "in.state", group_ann, end_use FROM res_annual_disaggregation_multipliers_{weather} WHERE end_use = '{enduse}' ) as ann_disag diff --git a/sql/res/hourly_county.sql b/sql/res/hourly_county.sql index 47d68b6..f4b5aa5 100644 --- a/sql/res/hourly_county.sql +++ b/sql/res/hourly_county.sql @@ -2,6 +2,7 @@ INSERT INTO county_hourly_res_{year}_{turnover}_{weather} WITH filtered_annual AS ( SELECT "in.county", "in.weather_file_city", + "in.weather_file_longitude", meas, tech_stage, turnover, @@ -42,6 +43,7 @@ to_disagg AS ( fa."year", fa."in.county", fa."in.weather_file_city", + fa."in.weather_file_longitude", fa.end_use, mmtsl.shape_ts, fa.turnover, @@ -60,6 +62,7 @@ grouped_disagg AS ( "year", "in.county", "in.weather_file_city", + "in.weather_file_longitude", end_use, shape_ts, turnover, @@ -71,6 +74,7 @@ grouped_disagg AS ( "year", "in.county", "in.weather_file_city", + "in.weather_file_longitude", end_use, shape_ts, turnover, @@ -90,7 +94,7 @@ hourly_ungrouped AS ( gd.scout_run FROM grouped_disagg AS gd LEFT JOIN (SELECT - "in.weather_file_city", "in.state", end_use, shape_ts, timestamp_hour, sector, multiplier_hourly + "in.weather_file_city", "in.weather_file_longitude", "in.state", end_use, shape_ts, timestamp_hour, sector, multiplier_hourly FROM res_hourly_disaggregation_multipliers_{weather} WHERE multiplier_hourly >= 0 AND end_use = '{enduse}') AS h diff --git a/sql/res/res_ann_shares_cook.sql b/sql/res/res_ann_shares_cook.sql index 97ed67f..8348cf4 100644 --- a/sql/res/res_ann_shares_cook.sql +++ b/sql/res/res_ann_shares_cook.sql @@ -2,11 +2,12 @@ -- res_ann_cook defines the grouping characteristics for cooking -INSERT INTO res_annual_disaggregation_multipliers_{version} +INSERT INTO {mult_res_annual} WITH meta_filtered AS ( SELECT meta."in.county", meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state", chars.group_ann, sum(meta."out.electricity.range_oven.energy_consumption") as cooking @@ -17,11 +18,13 @@ WITH meta_filtered AS ( GROUP BY meta."in.county", meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state", chars.group_ann ) SELECT "in.county", "in.weather_file_city", + "in.weather_file_longitude", group_ann, cooking / sum(cooking) OVER (PARTITION BY "in.state", group_ann) as multiplier_annual, 'res' AS sector, diff --git a/sql/res/res_ann_shares_cw.sql b/sql/res/res_ann_shares_cw.sql index 7d62e1a..8a867e0 100644 --- a/sql/res/res_ann_shares_cw.sql +++ b/sql/res/res_ann_shares_cw.sql @@ -1,8 +1,9 @@ -INSERT INTO res_annual_disaggregation_multipliers_{version} +INSERT INTO {mult_res_annual} WITH meta_filtered AS ( SELECT meta."in.county", meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state", 'res_cw_ann_1' AS group_ann, sum(meta."out.electricity.clothes_washer.energy_consumption") as cw @@ -11,10 +12,12 @@ WITH meta_filtered AS ( GROUP BY meta."in.county", meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state" ) SELECT "in.county", "in.weather_file_city", + "in.weather_file_longitude", group_ann, cw / sum(cw) OVER (PARTITION BY "in.state", group_ann) as multiplier_annual, 'res' AS sector, diff --git a/sql/res/res_ann_shares_deliveredcooling.sql b/sql/res/res_ann_shares_deliveredcooling.sql index f33179a..d6f4ffa 100644 --- a/sql/res/res_ann_shares_deliveredcooling.sql +++ b/sql/res/res_ann_shares_deliveredcooling.sql @@ -1,10 +1,11 @@ -INSERT INTO res_annual_disaggregation_multipliers_{version} +INSERT INTO {mult_res_annual} WITH meta_filtered AS ( SELECT "in.county", "in.weather_file_city", + "in.weather_file_longitude", "in.state", sum("out.load.cooling.energy_delivered.kbtu") as delivered_cool, 'res_hvac_ann_87' AS group_ann @@ -13,11 +14,13 @@ WITH meta_filtered AS ( GROUP BY "in.county", "in.weather_file_city", + "in.weather_file_longitude", "in.state" ), geo_shares AS ( SELECT "in.county", "in.weather_file_city", + "in.weather_file_longitude", "in.state", group_ann, delivered_cool, @@ -28,6 +31,7 @@ geo_shares AS ( SELECT "in.county", "in.weather_file_city", + "in.weather_file_longitude", group_ann, cooling_mult AS multiplier_annual, 'res' AS sector, diff --git a/sql/res/res_ann_shares_deliveredheat.sql b/sql/res/res_ann_shares_deliveredheat.sql index ea10b86..232ec49 100644 --- a/sql/res/res_ann_shares_deliveredheat.sql +++ b/sql/res/res_ann_shares_deliveredheat.sql @@ -1,11 +1,12 @@ -- we're disaggregating secondary heating based on delivered heat, not energy consumption for heating -- rerun if another group_ann is added that's based on delivered heat -INSERT INTO res_annual_disaggregation_multipliers_{version} +INSERT INTO {mult_res_annual} WITH meta_filtered AS ( SELECT "in.county", "in.weather_file_city", + "in.weather_file_longitude", "in.state", sum("out.load.heating.energy_delivered.kbtu") as delivered_heat, 'res_hvac_ann_52' AS group_ann @@ -14,12 +15,14 @@ WITH meta_filtered AS ( GROUP BY "in.county", "in.weather_file_city", + "in.weather_file_longitude", "in.state" UNION ALL SELECT "in.county", "in.weather_file_city", + "in.weather_file_longitude", "in.state", sum("out.load.heating.energy_delivered.kbtu") as delivered_heat, 'res_hvac_ann_84' AS group_ann @@ -29,12 +32,14 @@ WITH meta_filtered AS ( GROUP BY "in.county", "in.weather_file_city", + "in.weather_file_longitude", "in.state" UNION ALL SELECT "in.county", "in.weather_file_city", + "in.weather_file_longitude", "in.state", sum("out.load.heating.energy_delivered.kbtu") as delivered_heat, 'res_hvac_ann_86' AS group_ann @@ -44,11 +49,13 @@ WITH meta_filtered AS ( GROUP BY "in.county", "in.weather_file_city", + "in.weather_file_longitude", "in.state" ), geo_shares AS ( SELECT "in.county", "in.weather_file_city", + "in.weather_file_longitude", "in.state", group_ann, delivered_heat, @@ -59,6 +66,7 @@ geo_shares AS ( SELECT "in.county", "in.weather_file_city", + "in.weather_file_longitude", group_ann, heating_mult AS multiplier_annual, 'res' AS sector, diff --git a/sql/res/res_ann_shares_deliveredwh.sql b/sql/res/res_ann_shares_deliveredwh.sql index c4372ee..36aa483 100644 --- a/sql/res/res_ann_shares_deliveredwh.sql +++ b/sql/res/res_ann_shares_deliveredwh.sql @@ -1,10 +1,11 @@ -INSERT INTO res_annual_disaggregation_multipliers_{version} +INSERT INTO {mult_res_annual} WITH meta_filtered AS ( SELECT "in.county", "in.weather_file_city", + "in.weather_file_longitude", "in.state", sum("out.load.hot_water.energy_delivered.kbtu") as delivered_wh, 'res_wh_ann_6' AS group_ann @@ -13,11 +14,13 @@ WITH meta_filtered AS ( GROUP BY "in.county", "in.weather_file_city", + "in.weather_file_longitude", "in.state" ), geo_shares AS ( SELECT "in.county", "in.weather_file_city", + "in.weather_file_longitude", "in.state", group_ann, delivered_wh, @@ -28,6 +31,7 @@ geo_shares AS ( SELECT "in.county", "in.weather_file_city", + "in.weather_file_longitude", group_ann, wh_mult AS multiplier_annual, 'res' AS sector, diff --git a/sql/res/res_ann_shares_dry.sql b/sql/res/res_ann_shares_dry.sql index 88e237c..d8868f3 100644 --- a/sql/res/res_ann_shares_dry.sql +++ b/sql/res/res_ann_shares_dry.sql @@ -1,11 +1,12 @@ -- rerun if there have been updates to res_ann_dry -- res_ann_dry defines the grouping characteristics for clothes drying -INSERT INTO res_annual_disaggregation_multipliers_{version} +INSERT INTO {mult_res_annual} WITH meta_filtered AS ( SELECT meta."in.county", meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state", chars.group_ann, sum(meta."out.electricity.clothes_dryer.energy_consumption") as drying @@ -16,11 +17,13 @@ WITH meta_filtered AS ( GROUP BY meta."in.county", meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state", chars.group_ann ) SELECT "in.county", "in.weather_file_city", + "in.weather_file_longitude", group_ann, drying / sum(drying) OVER (PARTITION BY "in.state", group_ann) as multiplier_annual, 'res' AS sector, diff --git a/sql/res/res_ann_shares_dw.sql b/sql/res/res_ann_shares_dw.sql index 8e15afc..977e6e3 100644 --- a/sql/res/res_ann_shares_dw.sql +++ b/sql/res/res_ann_shares_dw.sql @@ -1,8 +1,9 @@ -INSERT INTO res_annual_disaggregation_multipliers_{version} +INSERT INTO {mult_res_annual} WITH meta_filtered AS ( SELECT meta."in.county", meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state", 'res_dw_ann_1' AS group_ann, sum(meta."out.electricity.dishwasher.energy_consumption") as dw @@ -11,10 +12,12 @@ WITH meta_filtered AS ( GROUP BY meta."in.county", meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state" ) SELECT "in.county", "in.weather_file_city", + "in.weather_file_longitude", group_ann, dw / sum(dw) OVER (PARTITION BY "in.state", group_ann) as multiplier_annual, 'res' AS sector, diff --git a/sql/res/res_ann_shares_fanspumps.sql b/sql/res/res_ann_shares_fanspumps.sql index 0adec35..d8b7d65 100644 --- a/sql/res/res_ann_shares_fanspumps.sql +++ b/sql/res/res_ann_shares_fanspumps.sql @@ -1,8 +1,9 @@ -INSERT INTO res_annual_disaggregation_multipliers_{version} +INSERT INTO {mult_res_annual} WITH meta_filtered AS ( SELECT meta."in.county", meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state", 'res_fanspumps_ann_1' AS group_ann, sum(meta."out.electricity.mech_vent.energy_consumption" + meta."out.electricity.ceiling_fan.energy_consumption" + meta."out.electricity.cooling_fans_pumps.energy_consumption" + meta."out.electricity.heating_fans_pumps.energy_consumption" + meta."out.electricity.heating_hp_bkup_fa.energy_consumption") as fanspumps @@ -11,10 +12,12 @@ WITH meta_filtered AS ( GROUP BY meta."in.county", meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state" ) SELECT "in.county", "in.weather_file_city", + "in.weather_file_longitude", group_ann, fanspumps / sum(fanspumps) OVER (PARTITION BY "in.state", group_ann) as multiplier_annual, 'res' AS sector, diff --git a/sql/res/res_ann_shares_hvac.sql b/sql/res/res_ann_shares_hvac.sql index 435ffce..d3823d6 100644 --- a/sql/res/res_ann_shares_hvac.sql +++ b/sql/res/res_ann_shares_hvac.sql @@ -5,10 +5,11 @@ -- disaggregate by new characteristics (e.g. building type, LMI status) -- after making the new table, run 'res delivered heat.sql' to add the groups for secondary heating -INSERT INTO res_annual_disaggregation_multipliers_{version} +INSERT INTO {mult_res_annual} WITH meta_filtered AS ( SELECT meta."in.county", meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state", chars.group_ann, sum(meta."out.electricity.heating.energy_consumption" + meta."out.electricity.heating_hp_bkup.energy_consumption") as heating, @@ -22,12 +23,14 @@ WITH meta_filtered AS ( GROUP BY meta."in.county", meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state", chars.group_ann ), geo_shares AS ( SELECT "in.county", "in.weather_file_city", + "in.weather_file_longitude", "in.state", group_ann, heating, @@ -39,6 +42,7 @@ FROM meta_filtered SELECT "in.county", "in.weather_file_city", + "in.weather_file_longitude", group_ann, heating_mult AS multiplier_annual, 'res' AS sector, @@ -52,6 +56,7 @@ UNION ALL SELECT "in.county", "in.weather_file_city", + "in.weather_file_longitude", group_ann, cooling_mult AS multiplier_annual, 'res' AS sector, diff --git a/sql/res/res_ann_shares_lighting.sql b/sql/res/res_ann_shares_lighting.sql index 77557d7..b98431f 100644 --- a/sql/res/res_ann_shares_lighting.sql +++ b/sql/res/res_ann_shares_lighting.sql @@ -1,8 +1,9 @@ -INSERT INTO res_annual_disaggregation_multipliers_{version} +INSERT INTO {mult_res_annual} WITH meta_filtered AS ( SELECT meta."in.county", meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state", 'res_light_ann_1' AS group_ann, sum(meta."out.electricity.lighting_exterior.energy_consumption" + meta."out.electricity.lighting_interior.energy_consumption" + meta."out.electricity.lighting_garage.energy_consumption") as lighting @@ -11,10 +12,12 @@ WITH meta_filtered AS ( GROUP BY meta."in.county", meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state" ) SELECT "in.county", "in.weather_file_city", + "in.weather_file_longitude", group_ann, lighting / sum(lighting) OVER (PARTITION BY "in.state", group_ann) as multiplier_annual, 'res' AS sector, diff --git a/sql/res/res_ann_shares_misc.sql b/sql/res/res_ann_shares_misc.sql index 5f5b73c..3079344 100644 --- a/sql/res/res_ann_shares_misc.sql +++ b/sql/res/res_ann_shares_misc.sql @@ -1,8 +1,9 @@ -INSERT INTO res_annual_disaggregation_multipliers_{version} +INSERT INTO {mult_res_annual} WITH meta_filtered AS ( SELECT meta."in.county", meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state", 'res_misc_ann_1' AS group_ann, sum(meta."out.electricity.plug_loads.energy_consumption" + meta."out.electricity.permanent_spa_heat.energy_consumption" + meta."out.electricity.permanent_spa_pump.energy_consumption" + meta."out.electricity.pool_heater.energy_consumption" + meta."out.electricity.well_pump.energy_consumption") as misc @@ -11,10 +12,12 @@ WITH meta_filtered AS ( GROUP BY meta."in.county", meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state" ) SELECT "in.county", "in.weather_file_city", + "in.weather_file_longitude", group_ann, misc / sum(misc) OVER (PARTITION BY "in.state", group_ann) as multiplier_annual, 'res' AS sector, @@ -26,6 +29,7 @@ UNION ALL SELECT "in.county", "in.weather_file_city", + "in.weather_file_longitude", group_ann, misc / sum(misc) OVER (PARTITION BY "in.state", group_ann) as multiplier_annual, 'res' AS sector, diff --git a/sql/res/res_ann_shares_poolpump.sql b/sql/res/res_ann_shares_poolpump.sql index dfc666b..1c161c0 100644 --- a/sql/res/res_ann_shares_poolpump.sql +++ b/sql/res/res_ann_shares_poolpump.sql @@ -1,8 +1,9 @@ -INSERT INTO res_annual_disaggregation_multipliers_{version} +INSERT INTO {mult_res_annual} WITH meta_filtered AS ( SELECT meta."in.county", meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state", 'res_pp_ann_1' AS group_ann, sum(meta."out.electricity.pool_pump.energy_consumption") as poolpump @@ -11,10 +12,12 @@ WITH meta_filtered AS ( GROUP BY meta."in.county", meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state" ) SELECT "in.county", "in.weather_file_city", + "in.weather_file_longitude", group_ann, poolpump / sum(poolpump) OVER (PARTITION BY "in.state", group_ann) as multiplier_annual, 'res' AS sector, diff --git a/sql/res/res_ann_shares_refrig.sql b/sql/res/res_ann_shares_refrig.sql index a7f05d5..9d800ec 100644 --- a/sql/res/res_ann_shares_refrig.sql +++ b/sql/res/res_ann_shares_refrig.sql @@ -1,8 +1,9 @@ -INSERT INTO res_annual_disaggregation_multipliers_{version} +INSERT INTO {mult_res_annual} WITH meta_filtered AS ( SELECT meta."in.county", meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state", 'res_refrig_ann_1' AS group_ann, sum(meta."out.electricity.freezer.energy_consumption" + meta."out.electricity.refrigerator.energy_consumption") as refrig @@ -11,10 +12,12 @@ WITH meta_filtered AS ( GROUP BY meta."in.county", meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state" ) SELECT "in.county", "in.weather_file_city", + "in.weather_file_longitude", group_ann, refrig / sum(refrig) OVER (PARTITION BY "in.state", group_ann) as multiplier_annual, 'res' AS sector, diff --git a/sql/res/res_ann_shares_wh.sql b/sql/res/res_ann_shares_wh.sql index 8e6e10a..679a602 100644 --- a/sql/res/res_ann_shares_wh.sql +++ b/sql/res/res_ann_shares_wh.sql @@ -1,11 +1,12 @@ -- rerun if there have been updates to res_ann_wh -- res_ann_wh defines the grouping characteristics for water heating (e.g. ER water heating HPWH, fossil water heating HPWH) -INSERT INTO res_annual_disaggregation_multipliers_{version} +INSERT INTO {mult_res_annual} WITH meta_filtered AS ( SELECT meta."in.county", meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state", chars.group_ann, sum(meta."out.electricity.hot_water.energy_consumption") as wh @@ -17,11 +18,13 @@ WITH meta_filtered AS ( GROUP BY meta."in.county", meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state", chars.group_ann ) SELECT "in.county", "in.weather_file_city", + "in.weather_file_longitude", group_ann, wh / sum(wh) OVER (PARTITION BY "in.state", group_ann) as multiplier_annual, 'res' AS sector, diff --git a/sql/res/res_hourly_shares_cook.sql b/sql/res/res_hourly_shares_cook.sql index de85d8d..bdb9671 100644 --- a/sql/res/res_hourly_shares_cook.sql +++ b/sql/res/res_hourly_shares_cook.sql @@ -4,11 +4,12 @@ -- new ResStock upgrades -- disaggregate by new characteristics (e.g. building type, LMI status) -INSERT INTO res_hourly_disaggregation_multipliers_{version} +INSERT INTO {mult_res_hourly} WITH meta_shapes AS ( -- assign each building id and upgrade combo to the appropriate shape based on the characteristics SELECT meta.bldg_id, meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state", chars.shape_ts, chars.upgrade @@ -22,6 +23,7 @@ WITH meta_shapes AS ( -- filter to the appropriate partitions!!!! doing it here vastly reduces the data scanned and therefore runtime ts_not_agg AS ( SELECT meta_shapes."in.weather_file_city", + meta_shapes."in.weather_file_longitude", meta_shapes."in.state", meta_shapes.shape_ts, CASE @@ -36,6 +38,7 @@ ts_not_agg AS ( -- aggregate to hourly by weather file, and shape ts_agg AS( SELECT "in.weather_file_city", + "in.weather_file_longitude", "in.state", shape_ts, timestamp_hour, @@ -44,14 +47,16 @@ ts_agg AS( GROUP BY timestamp_hour, "in.state", "in.weather_file_city", + "in.weather_file_longitude", shape_ts ) -- normalize the shapes SELECT "in.weather_file_city", + "in.weather_file_longitude", shape_ts, timestamp_hour, cooking as kwh, - cooking / sum(cooking) OVER (PARTITION BY "in.state", "in.weather_file_city", shape_ts) as multiplier_hourly, + cooking / sum(cooking) OVER (PARTITION BY "in.state", "in.weather_file_city", "in.weather_file_longitude", shape_ts) as multiplier_hourly, 'res' AS sector, "in.state", 'Cooking' as end_use diff --git a/sql/res/res_hourly_shares_cooling.sql b/sql/res/res_hourly_shares_cooling.sql index c004d61..25e2222 100644 --- a/sql/res/res_hourly_shares_cooling.sql +++ b/sql/res/res_hourly_shares_cooling.sql @@ -4,11 +4,12 @@ -- new ResStock upgrades -- disaggregate by new characteristics (e.g. building type, LMI status) -INSERT INTO res_hourly_disaggregation_multipliers_{version} +INSERT INTO {mult_res_hourly} WITH meta_shapes AS ( -- assign each building id and upgrade combo to the appropriate shape based on the characteristics SELECT meta.bldg_id, meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state", chars.shape_ts, chars.upgrade @@ -22,6 +23,7 @@ WITH meta_shapes AS ( -- filter to the appropriate partitions!!!! doing it here vastly reduces the data scanned and therefore runtime ts_not_agg AS ( SELECT meta_shapes."in.weather_file_city", + meta_shapes."in.weather_file_longitude", meta_shapes."in.state", meta_shapes.shape_ts, CASE @@ -38,6 +40,7 @@ ts_not_agg AS ( -- aggregate to hourly by weather file, and shape ts_agg AS( SELECT "in.weather_file_city", + "in.weather_file_longitude", "in.state", shape_ts, timestamp_hour, @@ -46,14 +49,16 @@ ts_agg AS( GROUP BY timestamp_hour, "in.state", "in.weather_file_city", + "in.weather_file_longitude", shape_ts ) -- normalize the shapes SELECT "in.weather_file_city", + "in.weather_file_longitude", shape_ts, timestamp_hour, cooling as kwh, - cooling / sum(cooling) OVER (PARTITION BY "in.state", "in.weather_file_city", shape_ts) as multiplier_hourly, + cooling / sum(cooling) OVER (PARTITION BY "in.state", "in.weather_file_city", "in.weather_file_longitude", shape_ts) as multiplier_hourly, 'res' AS sector, "in.state", 'Cooling (Equip.)' as end_use diff --git a/sql/res/res_hourly_shares_cw.sql b/sql/res/res_hourly_shares_cw.sql index 6bd49bd..e82f831 100644 --- a/sql/res/res_hourly_shares_cw.sql +++ b/sql/res/res_hourly_shares_cw.sql @@ -1,10 +1,11 @@ -INSERT INTO res_hourly_disaggregation_multipliers_{version} +INSERT INTO {mult_res_hourly} WITH -- get the timeseries data for the building ids -- calculate simplified end uses -- filter to the appropriate partitions ts_not_agg AS ( SELECT meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state", 'res_cw_ts_1' AS shape_ts, CASE @@ -20,6 +21,7 @@ ts_not_agg AS ( -- aggregate to hourly by weather file, and shape ts_agg AS( SELECT "in.weather_file_city", + "in.weather_file_longitude", "in.state", shape_ts, timestamp_hour, @@ -28,14 +30,16 @@ ts_agg AS( GROUP BY timestamp_hour, "in.state", "in.weather_file_city", + "in.weather_file_longitude", shape_ts ) -- normalize the shapes SELECT "in.weather_file_city", + "in.weather_file_longitude", shape_ts, timestamp_hour, cw as kwh, - cw / sum(cw) OVER (PARTITION BY "in.state", "in.weather_file_city", shape_ts) as multiplier_hourly, + cw / sum(cw) OVER (PARTITION BY "in.state", "in.weather_file_city", "in.weather_file_longitude", shape_ts) as multiplier_hourly, 'res' AS sector, "in.state", 'Other' as end_use diff --git a/sql/res/res_hourly_shares_dry.sql b/sql/res/res_hourly_shares_dry.sql index 8752c9b..9b27269 100644 --- a/sql/res/res_hourly_shares_dry.sql +++ b/sql/res/res_hourly_shares_dry.sql @@ -4,11 +4,12 @@ -- new ResStock upgrades -- disaggregate by new characteristics (e.g. building type, LMI status) -INSERT INTO res_hourly_disaggregation_multipliers_{version} +INSERT INTO {mult_res_hourly} WITH meta_shapes AS ( -- assign each building id and upgrade combo to the appropriate shape based on the characteristics SELECT meta.bldg_id, meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state", chars.shape_ts, chars.upgrade @@ -22,6 +23,7 @@ WITH meta_shapes AS ( -- filter to the appropriate partitions!!!! doing it here vastly reduces the data scanned and therefore runtime ts_not_agg AS ( SELECT meta_shapes."in.weather_file_city", + meta_shapes."in.weather_file_longitude", meta_shapes."in.state", meta_shapes.shape_ts, CASE @@ -36,6 +38,7 @@ ts_not_agg AS ( -- aggregate to hourly by weather file, and shape ts_agg AS( SELECT "in.weather_file_city", + "in.weather_file_longitude", "in.state", shape_ts, timestamp_hour, @@ -44,14 +47,16 @@ ts_agg AS( GROUP BY timestamp_hour, "in.state", "in.weather_file_city", + "in.weather_file_longitude", shape_ts ) -- normalize the shapes SELECT "in.weather_file_city", +"in.weather_file_longitude", shape_ts, timestamp_hour, drying as kwh, - drying / sum(drying) OVER (PARTITION BY "in.state","in.weather_file_city", shape_ts) as multiplier_hourly, + drying / sum(drying) OVER (PARTITION BY "in.state","in.weather_file_city", "in.weather_file_longitude", shape_ts) as multiplier_hourly, 'res' AS sector, "in.state", 'Other' as end_use diff --git a/sql/res/res_hourly_shares_dw.sql b/sql/res/res_hourly_shares_dw.sql index 8091aaa..1db07a5 100644 --- a/sql/res/res_hourly_shares_dw.sql +++ b/sql/res/res_hourly_shares_dw.sql @@ -1,10 +1,11 @@ -INSERT INTO res_hourly_disaggregation_multipliers_{version} +INSERT INTO {mult_res_hourly} WITH -- get the timeseries data for the building ids -- calculate simplified end uses -- filter to the appropriate partitions ts_not_agg AS ( SELECT meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state", 'res_dw_ts_1' AS shape_ts, CASE @@ -20,6 +21,7 @@ ts_not_agg AS ( -- aggregate to hourly by upgrade, weather file, and shape ts_agg AS( SELECT "in.weather_file_city", + "in.weather_file_longitude", "in.state", shape_ts, timestamp_hour, @@ -28,14 +30,16 @@ ts_agg AS( GROUP BY timestamp_hour, "in.state", "in.weather_file_city", + "in.weather_file_longitude", shape_ts ) -- normalize the shapes SELECT "in.weather_file_city", +"in.weather_file_longitude", shape_ts, timestamp_hour, dw as kwh, - dw / sum(dw) OVER (PARTITION BY "in.state", "in.weather_file_city", shape_ts) as multiplier_hourly, + dw / sum(dw) OVER (PARTITION BY "in.state", "in.weather_file_city", "in.weather_file_longitude", shape_ts) as multiplier_hourly, 'res' AS sector, "in.state", 'Other' as end_use diff --git a/sql/res/res_hourly_shares_fanspumps.sql b/sql/res/res_hourly_shares_fanspumps.sql index 987d7fe..02449c5 100644 --- a/sql/res/res_hourly_shares_fanspumps.sql +++ b/sql/res/res_hourly_shares_fanspumps.sql @@ -1,10 +1,11 @@ -INSERT INTO res_hourly_disaggregation_multipliers_{version} +INSERT INTO {mult_res_hourly} WITH -- get the timeseries data for the building ids -- calculate simplified end uses -- filter to the appropriate partitions ts_not_agg AS ( SELECT meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state", 'res_fanspumps_ts_1' AS shape_ts, CASE @@ -20,6 +21,7 @@ ts_not_agg AS ( -- aggregate to hourly by weather file, and shape ts_agg AS( SELECT "in.weather_file_city", + "in.weather_file_longitude", "in.state", shape_ts, timestamp_hour, @@ -28,14 +30,16 @@ ts_agg AS( GROUP BY timestamp_hour, "in.state", "in.weather_file_city", + "in.weather_file_longitude", shape_ts ) -- normalize the shapes SELECT "in.weather_file_city", +"in.weather_file_longitude", shape_ts, timestamp_hour, fanspumps as kwh, - fanspumps / sum(fanspumps) OVER (PARTITION BY "in.state", "in.weather_file_city", shape_ts) as multiplier_hourly, + fanspumps / sum(fanspumps) OVER (PARTITION BY "in.state", "in.weather_file_city", "in.weather_file_longitude", shape_ts) as multiplier_hourly, 'res' AS sector, "in.state", 'Other' as end_use diff --git a/sql/res/res_hourly_shares_gap.sql b/sql/res/res_hourly_shares_gap.sql index 7ec4936..a482ad2 100644 --- a/sql/res/res_hourly_shares_gap.sql +++ b/sql/res/res_hourly_shares_gap.sql @@ -1,16 +1,17 @@ -INSERT INTO res_hourly_disaggregation_multipliers_{version} +INSERT INTO {mult_res_hourly} WITH weather as( - SELECT "in.weather_file_city", "in.state", "in.county" + SELECT "in.weather_file_city", "in.weather_file_longitude", "in.state", "in.county" FROM "resstock_amy2018_release_2024.2_metadata" WHERE upgrade = 0 - GROUP BY "in.weather_file_city", "in.state", "in.county" + GROUP BY "in.weather_file_city", "in.weather_file_longitude", "in.state", "in.county" ), unformatted as (SELECT "in.weather_file_city", +"in.weather_file_longitude", 'res_gap_ts_1' shape_ts, CAST("timestamp" AS timestamp(3)) as ts, "out.electricity.total.energy_consumption..kwh" as kwh, - "out.electricity.total.energy_consumption..kwh" / sum("out.electricity.total.energy_consumption..kwh") OVER (PARTITION BY "in.state", "in.weather_file_city") as multiplier_hourly, + "out.electricity.total.energy_consumption..kwh" / sum("out.electricity.total.energy_consumption..kwh") OVER (PARTITION BY "in.state", "in.weather_file_city", "in.weather_file_longitude") as multiplier_hourly, 'res' AS sector, "in.state", 'Other' as end_use @@ -21,6 +22,7 @@ LEFT JOIN weather ON weather."in.county" = g."in.county" SELECT "in.weather_file_city", +"in.weather_file_longitude", shape_ts, CASE WHEN extract(YEAR FROM ts) = 2019 THEN ts - INTERVAL '1' YEAR diff --git a/sql/res/res_hourly_shares_heating.sql b/sql/res/res_hourly_shares_heating.sql index 19f4095..13cd3df 100644 --- a/sql/res/res_hourly_shares_heating.sql +++ b/sql/res/res_hourly_shares_heating.sql @@ -4,11 +4,12 @@ -- new ResStock upgrades -- disaggregate by new characteristics (e.g. building type, LMI status) -INSERT INTO res_hourly_disaggregation_multipliers_{version} +INSERT INTO {mult_res_hourly} WITH meta_shapes AS ( -- assign each building id and upgrade combo to the appropriate shape based on the characteristics SELECT meta.bldg_id, meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state", chars.shape_ts, chars.upgrade @@ -23,6 +24,7 @@ WITH meta_shapes AS ( -- filter to the appropriate partitions!!!! doing it here vastly reduces the data scanned and therefore runtime ts_not_agg AS ( SELECT meta_shapes."in.weather_file_city", + meta_shapes."in.weather_file_longitude", meta_shapes."in.state", meta_shapes.shape_ts, CASE @@ -38,6 +40,7 @@ ts_not_agg AS ( -- aggregate to hourly by weather file, and shape ts_agg AS( SELECT "in.weather_file_city", + "in.weather_file_longitude", "in.state", shape_ts, timestamp_hour, @@ -46,14 +49,16 @@ ts_agg AS( GROUP BY timestamp_hour, "in.state", "in.weather_file_city", + "in.weather_file_longitude", shape_ts ) -- normalize the shapes SELECT "in.weather_file_city", + "in.weather_file_longitude", shape_ts, timestamp_hour, heating as kwh, - heating / sum(heating) OVER (PARTITION BY "in.state", "in.weather_file_city", shape_ts) as multiplier_hourly, + heating / sum(heating) OVER (PARTITION BY "in.state", "in.weather_file_city", "in.weather_file_longitude", shape_ts) as multiplier_hourly, 'res' AS sector, "in.state", 'Heating (Equip.)' as end_use diff --git a/sql/res/res_hourly_shares_lighting.sql b/sql/res/res_hourly_shares_lighting.sql index 3b31109..db11685 100644 --- a/sql/res/res_hourly_shares_lighting.sql +++ b/sql/res/res_hourly_shares_lighting.sql @@ -1,10 +1,11 @@ -INSERT INTO res_hourly_disaggregation_multipliers_{version} +INSERT INTO {mult_res_hourly} WITH -- get the timeseries data for the building ids -- calculate simplified end uses -- filter to the appropriate partitions ts_not_agg AS ( SELECT meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state", 'res_light_ts_1' AS shape_ts, CASE @@ -20,6 +21,7 @@ ts_not_agg AS ( -- aggregate to hourly by weather file, and shape ts_agg AS( SELECT "in.weather_file_city", + "in.weather_file_longitude", "in.state", shape_ts, timestamp_hour, @@ -28,14 +30,16 @@ ts_agg AS( GROUP BY timestamp_hour, "in.state", "in.weather_file_city", + "in.weather_file_longitude", shape_ts ) -- normalize the shapes SELECT "in.weather_file_city", + "in.weather_file_longitude", shape_ts, timestamp_hour, lighting as kwh, - lighting / sum(lighting) OVER (PARTITION BY "in.state", "in.weather_file_city", shape_ts) as multiplier_hourly, + lighting / sum(lighting) OVER (PARTITION BY "in.state", "in.weather_file_city", "in.weather_file_longitude", shape_ts) as multiplier_hourly, 'res' AS sector, "in.state", 'Lighting' as end_use diff --git a/sql/res/res_hourly_shares_misc.sql b/sql/res/res_hourly_shares_misc.sql index cc10391..bbc3c2c 100644 --- a/sql/res/res_hourly_shares_misc.sql +++ b/sql/res/res_hourly_shares_misc.sql @@ -1,10 +1,11 @@ -INSERT INTO res_hourly_disaggregation_multipliers_{version} +INSERT INTO {mult_res_hourly} WITH -- get the timeseries data for the building ids -- calculate simplified end uses -- filter to the appropriate partitions ts_not_agg AS ( SELECT meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state", 'res_misc_ts_1' AS shape_ts, CASE @@ -20,6 +21,7 @@ ts_not_agg AS ( -- aggregate to hourly by weather file, and shape ts_agg AS( SELECT "in.weather_file_city", + "in.weather_file_longitude", "in.state", shape_ts, timestamp_hour, @@ -28,14 +30,16 @@ ts_agg AS( GROUP BY timestamp_hour, "in.state", "in.weather_file_city", + "in.weather_file_longitude", shape_ts ) -- normalize the shapes SELECT "in.weather_file_city", + "in.weather_file_longitude", shape_ts, timestamp_hour, misc as kwh, - misc / sum(misc) OVER (PARTITION BY "in.state", "in.weather_file_city", shape_ts) as multiplier_hourly, + misc / sum(misc) OVER (PARTITION BY "in.state", "in.weather_file_city", "in.weather_file_longitude", shape_ts) as multiplier_hourly, 'res' AS sector, "in.state", 'Other' as end_use @@ -44,10 +48,11 @@ FROM ts_agg UNION ALL SELECT "in.weather_file_city", + "in.weather_file_longitude", shape_ts, timestamp_hour, misc as kwh, - misc / sum(misc) OVER (PARTITION BY "in.state", "in.weather_file_city", shape_ts) as multiplier_hourly, + misc / sum(misc) OVER (PARTITION BY "in.state", "in.weather_file_city", "in.weather_file_longitude", shape_ts) as multiplier_hourly, 'res' AS sector, "in.state", 'Computers and Electronics' as end_use diff --git a/sql/res/res_hourly_shares_misc_flat.sql b/sql/res/res_hourly_shares_misc_flat.sql index bb42b27..da39053 100644 --- a/sql/res/res_hourly_shares_misc_flat.sql +++ b/sql/res/res_hourly_shares_misc_flat.sql @@ -1,10 +1,11 @@ -INSERT INTO res_hourly_disaggregation_multipliers_{version} +INSERT INTO {mult_res_hourly} WITH -- get the timeseries data for the building ids -- calculate simplified end uses -- filter to the appropriate partitions ts_not_agg AS ( SELECT meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state", 'res_misc_ts_2' as shape_ts, CASE @@ -21,6 +22,7 @@ ts_not_agg AS ( -- aggregate to hourly by weather file, and shape ts_agg AS( SELECT "in.weather_file_city", + "in.weather_file_longitude", "in.state", shape_ts, timestamp_hour, @@ -30,6 +32,7 @@ ts_agg AS( GROUP BY timestamp_hour, "in.state", "in.weather_file_city", + "in.weather_file_longitude", "month", shape_ts ), @@ -62,6 +65,7 @@ ts_flattening_mult AS( -- apply the monthly state-level multipliers so that each month will have the same misc consumption ts_agg_flat AS( SELECT "in.weather_file_city", + "in.weather_file_longitude", ts_agg."in.state", shape_ts, timestamp_hour, @@ -73,10 +77,11 @@ ts_agg_flat AS( ) -- normalize the shapes SELECT "in.weather_file_city", + "in.weather_file_longitude", shape_ts, timestamp_hour, misc as kwh, - misc / sum(misc) OVER (PARTITION BY "in.state", "in.weather_file_city", shape_ts) as multiplier_hourly, + misc / sum(misc) OVER (PARTITION BY "in.state", "in.weather_file_city", "in.weather_file_longitude", shape_ts) as multiplier_hourly, 'res' AS sector, "in.state", 'Other' as end_use diff --git a/sql/res/res_hourly_shares_poolpump.sql b/sql/res/res_hourly_shares_poolpump.sql index d74f391..9b50465 100644 --- a/sql/res/res_hourly_shares_poolpump.sql +++ b/sql/res/res_hourly_shares_poolpump.sql @@ -1,10 +1,11 @@ -INSERT INTO res_hourly_disaggregation_multipliers_{version} +INSERT INTO {mult_res_hourly} WITH -- get the timeseries data for the building ids -- calculate simplified end uses -- filter to the appropriate partitions ts_not_agg AS ( SELECT meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state", 'res_pp_ts_1' AS shape_ts, CASE @@ -20,6 +21,7 @@ ts_not_agg AS ( -- aggregate to hourly by weather file, and shape ts_agg AS( SELECT "in.weather_file_city", + "in.weather_file_longitude", "in.state", shape_ts, timestamp_hour, @@ -28,14 +30,16 @@ ts_agg AS( GROUP BY timestamp_hour, "in.state", "in.weather_file_city", + "in.weather_file_longitude", shape_ts ) -- normalize the shapes SELECT "in.weather_file_city", + "in.weather_file_longitude", shape_ts, timestamp_hour, poolpump as kwh, - poolpump / sum(poolpump) OVER (PARTITION BY "in.state", "in.weather_file_city", shape_ts) as multiplier_hourly, + poolpump / sum(poolpump) OVER (PARTITION BY "in.state", "in.weather_file_city", "in.weather_file_longitude", shape_ts) as multiplier_hourly, 'res' AS sector, "in.state", 'Other' as end_use diff --git a/sql/res/res_hourly_shares_refrig.sql b/sql/res/res_hourly_shares_refrig.sql index 2f174a8..fc214ef 100644 --- a/sql/res/res_hourly_shares_refrig.sql +++ b/sql/res/res_hourly_shares_refrig.sql @@ -1,10 +1,11 @@ -INSERT INTO res_hourly_disaggregation_multipliers_{version} +INSERT INTO {mult_res_hourly} WITH -- get the timeseries data for the building ids -- calculate simplified end uses -- filter to the appropriate partitions ts_not_agg AS ( SELECT meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state", 'res_refrig_ts_1' AS shape_ts, CASE @@ -20,6 +21,7 @@ ts_not_agg AS ( -- aggregate to hourly by weather file, and shape ts_agg AS( SELECT "in.weather_file_city", + "in.weather_file_longitude", "in.state", shape_ts, timestamp_hour, @@ -28,14 +30,16 @@ ts_agg AS( GROUP BY timestamp_hour, "in.state", "in.weather_file_city", + "in.weather_file_longitude", shape_ts ) -- normalize the shapes SELECT "in.weather_file_city", + "in.weather_file_longitude", shape_ts, timestamp_hour, refrig as kwh, - refrig / sum(refrig) OVER (PARTITION BY "in.state", "in.weather_file_city", shape_ts) as multiplier_hourly, + refrig / sum(refrig) OVER (PARTITION BY "in.state", "in.weather_file_city", "in.weather_file_longitude", shape_ts) as multiplier_hourly, 'res' AS sector, "in.state", 'Refrigeration' as end_use diff --git a/sql/res/res_hourly_shares_wh.sql b/sql/res/res_hourly_shares_wh.sql index 03839be..14b1a57 100644 --- a/sql/res/res_hourly_shares_wh.sql +++ b/sql/res/res_hourly_shares_wh.sql @@ -4,11 +4,12 @@ -- new ResStock upgrades -- disaggregate by new characteristics (e.g. building type, LMI status) -INSERT INTO res_hourly_disaggregation_multipliers_{version} +INSERT INTO {mult_res_hourly} WITH meta_shapes AS ( -- assign each building id and upgrade combo to the appropriate shape based on the characteristics SELECT meta.bldg_id, meta."in.weather_file_city", + meta."in.weather_file_longitude", meta."in.state", chars.shape_ts, chars.upgrade @@ -22,6 +23,7 @@ WITH meta_shapes AS ( -- filter to the appropriate partitions!!!! doing it here vastly reduces the data scanned and therefore runtime ts_not_agg AS ( SELECT meta_shapes."in.weather_file_city", + meta_shapes."in.weather_file_longitude", meta_shapes."in.state", meta_shapes.shape_ts, CASE @@ -36,6 +38,7 @@ ts_not_agg AS ( -- aggregate to hourly by weather file, and shape ts_agg AS( SELECT "in.weather_file_city", + "in.weather_file_longitude", "in.state", shape_ts, timestamp_hour, @@ -44,14 +47,16 @@ ts_agg AS( GROUP BY timestamp_hour, "in.state", "in.weather_file_city", + "in.weather_file_longitude", shape_ts ) -- normalize the shapes SELECT "in.weather_file_city", + "in.weather_file_longitude", shape_ts, timestamp_hour, wh as kwh, - wh / sum(wh) OVER (PARTITION BY "in.state", "in.weather_file_city", shape_ts) as multiplier_hourly, + wh / sum(wh) OVER (PARTITION BY "in.state", "in.weather_file_city", "in.weather_file_longitude", shape_ts) as multiplier_hourly, 'res' AS sector, "in.state", 'Water Heating' as end_use diff --git a/sql/res/tbl_ann_county.sql b/sql/res/tbl_ann_county.sql index d8f7fc4..354de3e 100644 --- a/sql/res/tbl_ann_county.sql +++ b/sql/res/tbl_ann_county.sql @@ -2,6 +2,7 @@ CREATE EXTERNAL TABLE county_annual_res_{year}_{turnover}_{weather} ( `in.county` string, `in.weather_file_city` string, + `in.weather_file_longitude` double, fuel string, meas string, tech_stage string, diff --git a/sql/res/tbl_ann_mult.sql b/sql/res/tbl_ann_mult.sql index 62f6335..2ea150f 100644 --- a/sql/res/tbl_ann_mult.sql +++ b/sql/res/tbl_ann_mult.sql @@ -1,7 +1,8 @@ -- to hold annual geographic disaggregation multipliers calculated from BuildStock -CREATE EXTERNAL TABLE res_annual_disaggregation_multipliers_{version}( +CREATE EXTERNAL TABLE {mult_res_annual}( `in.county` string, `in.weather_file_city` string, + `in.weather_file_longitude` double, group_ann string, multiplier_annual double, sector string, @@ -9,5 +10,5 @@ CREATE EXTERNAL TABLE res_annual_disaggregation_multipliers_{version}( end_use string ) STORED AS parquet -LOCATION 's3://{dest_bucket}/res_annual_multipliers_{version}/' +LOCATION 's3://{dest_bucket}/{mult_res_annual}/' ; \ No newline at end of file diff --git a/sql/res/tbl_hr_mult.sql b/sql/res/tbl_hr_mult.sql index aa04cd2..22aa396 100644 --- a/sql/res/tbl_hr_mult.sql +++ b/sql/res/tbl_hr_mult.sql @@ -1,6 +1,7 @@ -- to hold hourly disaggregation multipliers calculated from BuildStock -CREATE EXTERNAL TABLE res_hourly_disaggregation_multipliers_{version}( +CREATE EXTERNAL TABLE {mult_res_hourly}( `in.weather_file_city` string, + `in.weather_file_longitude` double, shape_ts string, timestamp_hour timestamp, kwh double, @@ -10,5 +11,5 @@ CREATE EXTERNAL TABLE res_hourly_disaggregation_multipliers_{version}( end_use string ) STORED AS parquet -LOCATION 's3://{dest_bucket}/res_hourly_multipliers_{version}/' +LOCATION 's3://{dest_bucket}/{mult_res_hourly}/' ; diff --git a/sql/run_check/test_missing_group_ann.sql b/sql/run_check/test_missing_group_ann.sql index 898c679..1bc0429 100644 --- a/sql/run_check/test_missing_group_ann.sql +++ b/sql/run_check/test_missing_group_ann.sql @@ -37,14 +37,14 @@ AND elec.tech_stage = mm.tech_stage), good_group_ann as( SELECT group_ann,"in.state",end_use, 1 as present -FROM com_annual_disaggregation_multipliers_{version} +FROM com_annual_disaggregation_multipliers_{weather} WHERE multiplier_annual=multiplier_annual GROUP BY group_ann,"in.state",end_use UNION ALL SELECT group_ann,"in.state",end_use, 1 as present -FROM res_annual_disaggregation_multipliers_{version} +FROM res_annual_disaggregation_multipliers_{weather} WHERE multiplier_annual=multiplier_annual GROUP BY group_ann,"in.state",end_use ) diff --git a/sql/run_check/test_missing_group_ann_hourly.sql b/sql/run_check/test_missing_group_ann_hourly.sql index 21dea9d..ea16a55 100644 --- a/sql/run_check/test_missing_group_ann_hourly.sql +++ b/sql/run_check/test_missing_group_ann_hourly.sql @@ -1,5 +1,5 @@ -- Flag states and group_ann that have electricity assigned but the disaggregation multipliers aren't defined --- Parameters: {turnover}, {weather}, {version} +-- Parameters: {turnover}, {weather} WITH electric_df AS ( SELECT @@ -47,14 +47,14 @@ combos AS ( good_group_ann AS ( SELECT group_ann, "in.state", end_use, 1 AS present - FROM com_annual_disaggregation_multipliers_{version} + FROM com_annual_disaggregation_multipliers_{weather} WHERE multiplier_annual = multiplier_annual GROUP BY group_ann, "in.state", end_use UNION ALL SELECT group_ann, "in.state", end_use, 1 AS present - FROM res_annual_disaggregation_multipliers_{version} + FROM res_annual_disaggregation_multipliers_{weather} WHERE multiplier_annual = multiplier_annual GROUP BY group_ann, "in.state", end_use ) diff --git a/sql/run_check/test_missing_shape_ts_com.sql b/sql/run_check/test_missing_shape_ts_com.sql new file mode 100644 index 0000000..1ee7251 --- /dev/null +++ b/sql/run_check/test_missing_shape_ts_com.sql @@ -0,0 +1,73 @@ +-- Flag counties and shape_ts that have energy assigned but the shape isn't defined +-- Parameters: {turnover}, {weather}, {version} +WITH df AS ( + SELECT + "in.county", + "in.state", + meas, + end_use, + fuel, + turnover, + tech_stage, + county_ann_kwh + FROM county_annual_com_{year}_{turnover}_{weather} + WHERE county_ann_kwh > 0 + AND sector = 'com' +), + +measure_map_ts AS ( + SELECT + meas, + Scout_end_use, + 'original_ann' AS tech_stage, + original_ts AS shape_ts + FROM measure_map + + UNION ALL + + SELECT + meas, + Scout_end_use, + 'measure_ann' AS tech_stage, + measure_ts AS shape_ts + FROM measure_map +), + +combos AS ( + SELECT DISTINCT + df."in.county", + df."in.state", + m.shape_ts, + df.end_use, + df.fuel, + df.turnover, + df.meas, + df.tech_stage + FROM df + JOIN measure_map_ts AS m + ON df.meas = m.meas + AND df.end_use = m.Scout_end_use + AND df.tech_stage = m.tech_stage +), + +good_shape_ts AS ( + SELECT shape_ts, "in.county", "in.state", end_use, sum(multiplier_hourly) as mult_sum + FROM com_hourly_disaggregation_multipliers_{weather} + WHERE multiplier_hourly = multiplier_hourly + GROUP BY shape_ts, "in.county", "in.state", end_use +) + +SELECT DISTINCT + c."in.state", + c."in.county", + c.shape_ts, + c.end_use, + c.fuel, + mult_sum +FROM combos AS c +LEFT JOIN good_shape_ts AS g + ON c."in.county" = g."in.county" + AND c."in.state" = g."in.state" + AND c.shape_ts = g.shape_ts + AND c.end_use = g.end_use +ORDER BY c."in.state", c."in.county", c.shape_ts, c.end_use, c.fuel; \ No newline at end of file diff --git a/sql/run_check/test_missing_shape_ts_hourly.sql b/sql/run_check/test_missing_shape_ts_hourly.sql index 94f9a3e..4e60f67 100644 --- a/sql/run_check/test_missing_shape_ts_hourly.sql +++ b/sql/run_check/test_missing_shape_ts_hourly.sql @@ -49,14 +49,14 @@ combos AS ( good_shape_ts AS ( SELECT shape_ts, "in.county", "in.state", end_use, 1 AS present - FROM com_hourly_disaggregation_multipliers_{version} + FROM com_hourly_disaggregation_multipliers_{weather} WHERE multiplier_hourly = multiplier_hourly GROUP BY shape_ts, "in.county", "in.state", end_use UNION ALL SELECT shape_ts, "in.county", "in.state", end_use, 1 AS present - FROM res_hourly_disaggregation_multipliers_{version} + FROM res_hourly_disaggregation_multipliers_{weather} WHERE multiplier_hourly = multiplier_hourly GROUP BY shape_ts, "in.county", "in.state", end_use ) diff --git a/sql/run_check/test_missing_shape_ts_res.sql b/sql/run_check/test_missing_shape_ts_res.sql new file mode 100644 index 0000000..fda8c59 --- /dev/null +++ b/sql/run_check/test_missing_shape_ts_res.sql @@ -0,0 +1,74 @@ +-- Flag counties and shape_ts that have energy assigned but the shape isn't defined +-- Parameters: {year}, {turnover}, {weather}, {version} + +WITH df AS ( + SELECT + "in.weather_file_city", + "in.weather_file_longitude", + meas, + end_use, + fuel, + turnover, + tech_stage, + county_ann_kwh + FROM county_annual_res_{year}_{turnover}_{weather} + WHERE county_ann_kwh > 0 + AND sector = 'res' +), + +measure_map_ts AS ( + SELECT + meas, + Scout_end_use, + 'original_ann' AS tech_stage, + original_ts AS shape_ts + FROM measure_map + + UNION ALL + + SELECT + meas, + Scout_end_use, + 'measure_ann' AS tech_stage, + measure_ts AS shape_ts + FROM measure_map +), + +combos AS ( + SELECT DISTINCT + df."in.weather_file_city", + df."in.weather_file_longitude", + m.shape_ts, + df.end_use, + df.fuel, + df.turnover, + df.meas, + df.tech_stage + FROM df + JOIN measure_map_ts AS m + ON df.meas = m.meas + AND df.end_use = m.Scout_end_use + AND df.tech_stage = m.tech_stage +), + +good_shape_ts AS ( + SELECT shape_ts, "in.weather_file_city", "in.weather_file_longitude", end_use, sum(multiplier_hourly) as mult_sum + FROM res_hourly_disaggregation_multipliers_{weather} + WHERE multiplier_hourly = multiplier_hourly + GROUP BY shape_ts, "in.weather_file_city", "in.weather_file_longitude", end_use +) + +SELECT DISTINCT + c."in.weather_file_city", + c."in.weather_file_longitude", + c.shape_ts, + c.end_use, + c.fuel, + mult_sum +FROM combos AS c +LEFT JOIN good_shape_ts AS g + ON c."in.weather_file_city" = g."in.weather_file_city" + AND c."in.weather_file_longitude" = g."in.weather_file_longitude" + AND c.shape_ts = g.shape_ts + AND c.end_use = g.end_use +ORDER BY c."in.weather_file_city", c."in.weather_file_longitude", c.shape_ts, c.end_use, c.fuel; \ No newline at end of file diff --git a/sql/run_check/test_multipliers_annual.sql b/sql/run_check/test_multipliers_annual.sql index dc1af94..26f7e39 100644 --- a/sql/run_check/test_multipliers_annual.sql +++ b/sql/run_check/test_multipliers_annual.sql @@ -1,3 +1,3 @@ SELECT end_use,COUNT(DISTINCT("in.county")) as n_counties -FROM {sector}_annual_disaggregation_multipliers_{version} +FROM {sector}_annual_{suffix} WHERE multiplier_annual=multiplier_annual GROUP BY end_use; \ No newline at end of file diff --git a/sql/run_check/test_multipliers_hourly_com.sql b/sql/run_check/test_multipliers_hourly_com.sql index 3c7472a..46fbf17 100644 --- a/sql/run_check/test_multipliers_hourly_com.sql +++ b/sql/run_check/test_multipliers_hourly_com.sql @@ -1,3 +1,3 @@ SELECT end_use,COUNT(DISTINCT("in.county")) as n_counties -FROM {sector}_hourly_disaggregation_multipliers_{version} +FROM {sector}_hourly_{suffix} WHERE multiplier_hourly=multiplier_hourly GROUP BY end_use; \ No newline at end of file diff --git a/sql/run_check/test_multipliers_hourly_res.sql b/sql/run_check/test_multipliers_hourly_res.sql index 61175b7..b6fcf83 100644 --- a/sql/run_check/test_multipliers_hourly_res.sql +++ b/sql/run_check/test_multipliers_hourly_res.sql @@ -1,3 +1,3 @@ SELECT end_use,COUNT(DISTINCT("in.weather_file_city","in.state")) as n_weatherfile_city -FROM {sector}_hourly_disaggregation_multipliers_{version} +FROM {sector}_hourly_{suffix} WHERE multiplier_hourly=multiplier_hourly GROUP BY end_use; \ No newline at end of file