Skip to content

Commit

Permalink
Merge in UM county page
Browse files Browse the repository at this point in the history
  • Loading branch information
awunderground committed Jun 23, 2023
2 parents a7c5cf6 + 41f0a91 commit 9083bde
Show file tree
Hide file tree
Showing 17 changed files with 14,170 additions and 581 deletions.
10 changes: 5 additions & 5 deletions R/prep_pages.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ library(glue)
#' columns of the datasets pointed to by the url argument
#' dirname - location of where knitted hmtl files should be saved
#'
prep_pages <- function(url, output_directory, state_title = FALSE, bespoke = TRUE) {
prep_pages <- function(url, output_directory, state_title = FALSE, fake_labels = FALSE, bespoke = TRUE) {

# read in the applicant list
app_list <- read_csv(url)
Expand Down Expand Up @@ -57,16 +57,16 @@ prep_pages <- function(url, output_directory, state_title = FALSE, bespoke = TRU
# create a data frame with parameters and output file names
runs <- tibble(
filename = "index.html", # creates a string with output file names in the form <index>.pdf
params = map(app_indexes, ~list(state_county = ., state_title = state_title)),
dir_name = paste0(output_directory, '/', full_name_lst, "_", app_list$random_id)
params = map(app_indexes, ~list(state_county = ., state_title = state_title, fake_labels = fake_labels)),
dir_name = paste0(output_directory, '/', full_name_lst, "_", app_list$random_id, "/")
) # creates a nest list of parameters for each object in the index

} else {
# create a data frame with parameters and output file names
runs <- tibble(
filename = "index.html", # creates a string with output file names in the form <index>.pdf
params = map(app_indexes, ~list(state_county = ., state_title = state_title)),
dir_name = map(full_name_lst, function(x) paste0(output_directory, glue('/{x}')))
params = map(app_indexes, ~list(state_county = ., state_title = state_title, fake_labels = fake_labels)),
dir_name = map(full_name_lst, function(x) paste0(output_directory, glue('/{x}/')))
) # creates a nest list of parameters for each object in the index

}
Expand Down
5 changes: 5 additions & 0 deletions create_bespoke_pages.R
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,9 @@ prepped24 <- prep_pages(url = "data/24_website_requests.csv",

render_pages(prepped_object = prepped24)

# Upward County, MB
prepped25 <- prep_pages(url = "data/25_upward-county.csv",
output_directory = "factsheets/25_upward-county",
fake_labels = "yes")

render_pages(prepped_object = prepped25, input = "index-county.qmd")
2 changes: 2 additions & 0 deletions data/25_upward-county.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
state,county,fips,comparisons,random_id
MB, Upward County,51760,,
1 change: 1 addition & 0 deletions factsheets/25_upward-county/51760-Upward-MB_NA/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.quarto/
4,688 changes: 4,688 additions & 0 deletions factsheets/25_upward-county/51760-Upward-MB_NA/description.html

Large diffs are not rendered by default.

8,664 changes: 8,664 additions & 0 deletions factsheets/25_upward-county/51760-Upward-MB_NA/index.html

Large diffs are not rendered by default.

44 changes: 44 additions & 0 deletions factsheets/25_upward-county/51760-Upward-MB_NA/search.json

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
185 changes: 185 additions & 0 deletions factsheets/25_upward-county/51760-Upward-MB_NA/www/web_report.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
/* Global Formats */
.container-fluid {
font-family: Lato, Arial, sans-serif;
}

.main-container {
font-family: Lato, Arial, sans-serif;
}

/* title styles */
.h1 {
color: #000000;
font: 700 36px/1.3em Lato, Arial, sans-serif;
margin: 0 0 .5em;
}

h2 {
color: #353535;
font: 700;
border-bottom: 1 px;
border-bottom-color: #d2d2d2;
padding-bottom: 12px;

}

h4 {
font: 700 24px/30px Lato, Arial, sans-serif;
font-style: normal;
font-variant-ligatures: normal;
font-variant-caps: normal;
font-variant-numeric: normal;
font-variant-east-asian: normal;
font-weight: 700;
font-stretch: normal;
font-size: 24px;
line-height: 30px;
font-family: Lato, Arial, sans-serif;
color: #353535;
}

/* paragraph styles */
p {
font-size: 14px;
margin: 0 0 8px 0;
color: #353535;
}

/* image styles */
img {
padding: 0 0 0 0;
}

.navbar {
background-color: #1696d2;
color: #ffffff;
font-weight: bold;
}

.navbar-default .navbar-brand {
color: #FFFFFF;
}

.navbar-default .navbar-nav>li>a {
background-color: #FFFFFF;

}

.navbar-default .navbar-nav>.active>a, .navbar-default .navbar-nav>.active>a:focus, .navbar-default .navbar-nav>.active>a:hover {
background-color: #FFFFFF;
}


/* Styling for the different tabs for the tables */
.nav-tabs{
background-color:#ffffff;
}
.nav-tabs a {
color: #1696d2;
font-weight: 700;
}

/* list styles */
li {
font-size: 16px;
}


/* link styles */
a:link {
outline: none;
text-decoration: none;
padding: 2px 1px 0;
color: #1696d2;
}

a:visited {
color: #1696d2;
}


/* font size on tables */
.panel-tabset .nav-item {
font-size: 16px;
color: #1696d2
}

.tbody.gt_table_body{
font-size: 45px;
}

/* Header image formatting */
#header {
padding-top: 12px;
}

/* Legend Formatting */
.list-group-item.active, .list-group-item.active:focus {
background-color: #1696d2;
border-color: #1696d2;
}

.list-group-item.active:hover {
background-color: #000000;
border-color: #000000;
}

.tocify {
border-radius: 0;
}

/* Button Formatting */
.btn {
border-radius: 0;
}

/* special styles */
#date {
text-align: center;
font: italic 14px Georgia,serif;
color: #666;
margin-bottom: 2em;
margin-top: 2em;
}

@media print{
/* remove elements */
#TOC, #toc, #header-pinned{
display: none;
}
.nav-tabs{
display: none;
}
.exclude{
display: none;
font: 18px;
}
.contentBlock.title{
padding-top: 0px;
}
.expandContainer{
height: fit-content !important;
height: -moz-fit-content;
}
.expandFull{
display: block !important;
}
@page {
size: 210mm 297mm; /* portrait
/* you can also specify margins here: */
margin: 15mm;
/*margin-right: 45mm; for compatibility with both A4 and Letter */
}
/* page breaks */
.printbreak {
page-break-before: always;
}
.avoidpagebreak {
break-inside: avoid-page;
}
}

.p2 {
font-size: 14px;
margin: 0 0 8px 0;
}
Loading

0 comments on commit 9083bde

Please sign in to comment.