Skip to content

Commit f0e4d1c

Browse files
committed
Updates to draft Ind. Methodology RMD/HTML. Typo fix to Race-Eth Methodology.
1 parent fa822d1 commit f0e4d1c

File tree

4 files changed

+2493
-29
lines changed

4 files changed

+2493
-29
lines changed

Methodology/Indicator_Methodology_County_State.Rmd

Lines changed: 38 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ title: "RACE COUNTS: Indicator Methodology"
33
subtitle: "County and State Data"
44
date: "October 2024"
55
output:
6-
word_document:
6+
html_document:
77
toc: true
8-
toc_depth: 3
8+
toc_depth: 4
9+
toc_float:
10+
collapsed: true
911

1012
---
1113

@@ -35,6 +37,12 @@ con <- connect_to_db("racecounts")
3537
3638
```
3739

40+
```{css echo=FALSE}
41+
.bold-inline {
42+
font-weight: 700
43+
}
44+
```
45+
3846

3947
```{r}
4048
#### UPDATE EACH YEAR
@@ -47,7 +55,8 @@ curr_yr <- '2024'
4755
##### IMPORT METHODOLOGY DATA FROM POSTGRESQL DATABASE
4856
geo <- 'cntyst' # once we convert this to an fx, this will be a input into the fx so it works for cntyst/city/leg dist
4957
methodology <- dbGetQuery(con, paste0("SELECT arei_indicator, arei_issue_area, methodology, bar_chart_header, data_source, race_type FROM ", curr_schema, ".arei_indicator_list_", geo))
50-
issues <- dbGetQuery(con, paste0("SELECT arei_issue_area, api_name_short FROM ", curr_schema, ".arei_issue_list"))
58+
issues <- dbGetQuery(con, paste0("SELECT arei_issue_area, api_name_short FROM ", curr_schema, ".arei_issue_list")) %>%
59+
arrange(api_name_short) # reorder so matches order of issues in fx
5160
races_ <- dbGetQuery(con, paste0("SELECT * FROM ", curr_schema, ".arei_race_type"))
5261
5362
# generate race-eth strings
@@ -80,78 +89,80 @@ invisible(list2env(method_list,envir=.GlobalEnv))
8089
#text <- paste0(first(justice$arei_issue_area), " has ", nrow(justice), " indicators.")
8190
```
8291

83-
```{r, comment = ""}
92+
```{r, comment = "", results = 'asis'}
8493
# Function to print methodology for each indicator within an issue area
8594
indicators <- function(x) {
8695
for(i in 1:nrow(x)) {
87-
cat(x$arei_indicator[i], "\n")
88-
cat("Indicator: ", x$bar_chart_header[i], "\n")
96+
cat("###",x$arei_indicator[i], "\n")
97+
cat("\n")
98+
cat(sprintf("<span class='bold-inline'>Indicator: </span>"), x$bar_chart_header[i], "\n")
8999
cat(x$methodology[i], "\n", "\n")
90-
cat("\t", "Source: ", x$data_source[i], "\n")
91-
cat("\t", "Link(s): ", x$links[i], "\n")
92-
cat("\t", "Racial/Ethnic Categories: ", x$race_eth[i], "\n")
100+
cat(sprintf("<span class='bold-inline'>Source: </span>"), x$data_source[i], "\n", "\n")
101+
cat(sprintf("<span class='bold-inline'>Link(s): </span>"), x$links[i], "\n", "\n")
102+
cat(sprintf("<span class='bold-inline'>Racial/Ethnic Categories: </span>"), x$race_eth[i], "\n", "\n")
93103
cat("\n")
94104
}
95105
}
96106
```
97107

108+
# Notes on Racial/Ethnic Categories
109+
Race is a social construct and a biological construct, neither of which are discussed in depth in this analysis. Thus, we use a simplified view of race to portray racial data to a broader audience. Ethnicity is also treated lightly, and while Latinx is an ethnicity, it is generally treated and spoken about as a race, even though Latinxs can be of any race. Additionally, each data source uses slightly different terminology and categorization. Considering all these factors, we use one simplified set of labels for the RACE COUNTS website and publications for consistency while maintaining fidelity to the data sources as much as possible. To find out more, please see our [Race & Ethnicity Methodology](https://github.com/catalystcalifornia/RaceCounts/blob/main/Methodology/README_Race_Ethnicity.md) documentation.
98110

99-
### A note on Racial/Ethnic Categories: Race is a social construct and a biological construct, neither of which are discussed in depth in this analysis. Thus, we use a simplified view of race to portray racial data to a broader audience. Ethnicity is also treated lightly, and while Latinx is an ethnicity, it is generally treated and spoken about as a race, even though Latinxs can be of any race. Additionally, each data source uses slightly different terminology and categorization. Considering all these factors, we use one simplified set of labels for the RACE COUNTS website and publications for consistency while maintaining fidelity to the data sources as much as possible. To find out more, please see our [Race & Ethnicity Methodology](https://github.com/catalystcalifornia/RaceCounts/blob/main/Methodology/README_Race_Ethnicity.md) documentation.
100-
101-
### In this document, groups marked with * are Latinx-inclusive, those without * are non-Latinx. Groups marked with ^ are that race alone or in combination with another race, groups without are that one race alone. Latinx always includes Latinxs of any race.
111+
In this document, groups marked with * are Latinx-inclusive, those without * are non-Latinx. Groups marked with ^ are that race alone or in combination with another race, groups without ^ are that one race alone. Latinx always includes Latinxs of any race.
102112

113+
\pagebreak
103114

104115
# `r first(method_list[[1]][['arei_issue_area']])`
105-
```{r, comment = ""}
116+
117+
```{r, comment = "", results = 'asis'}
106118
indicators(method_list[[1]])
107119
```
108-
120+
<p align="right">(<a href="#top">back to top</a>)</p>
109121
\pagebreak
110122

111123
# `r first(method_list[[2]][['arei_issue_area']])`
112124

113-
```{r, comment = ""}
125+
```{r, comment = "", results = 'asis'}
114126
indicators(method_list[[2]])
115127
```
116-
128+
<p align="right">(<a href="#top">back to top</a>)</p>
117129
\pagebreak
118130

119131
# `r first(method_list[[3]][['arei_issue_area']])`
120132

121-
```{r, comment = ""}
133+
```{r, comment = "", results = 'asis'}
122134
indicators(method_list[[3]])
123135
```
124-
136+
<p align="right">(<a href="#top">back to top</a>)</p>
125137
\pagebreak
126138

127139
# `r first(method_list[[4]][['arei_issue_area']])`
128140

129-
```{r, comment = ""}
141+
```{r, comment = "", results = 'asis'}
130142
indicators(method_list[[4]])
131143
```
132-
133-
144+
<p align="right">(<a href="#top">back to top</a>)</p>
134145
\pagebreak
135146

136147
# `r first(method_list[[6]][['arei_issue_area']])`
137148

138-
```{r, comment = ""}
149+
```{r, comment = "", results = 'asis'}
139150
indicators(method_list[[6]])
140151
```
141-
152+
<p align="right">(<a href="#top">back to top</a>)</p>
142153
\pagebreak
143154

144155
# `r first(method_list[[5]][['arei_issue_area']])`
145156

146-
```{r, comment = ""}
157+
```{r, comment = "", results = 'asis'}
147158
indicators(method_list[[5]])
148159
```
149-
150-
160+
<p align="right">(<a href="#top">back to top</a>)</p>
151161
\pagebreak
152162

153163
# `r first(method_list[[7]][['arei_issue_area']])`
154164

155-
```{r, comment = ""}
165+
```{r, comment = "", results = 'asis'}
156166
indicators(method_list[[7]])
157167
```
168+
<p align="right">(<a href="#top">back to top</a>)</p>
Binary file not shown.

Methodology/Indicator_Methodology_County_State.html

Lines changed: 2453 additions & 0 deletions
Large diffs are not rendered by default.

Methodology/README_Race_Ethnicity.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ We use one simplified set of terms for the RACE COUNTS website and publications,
5252
| Southwest Asian / North African* | Alone or in combination with another race | Includes |
5353
| White | Alone | Excludes |
5454
| Another Race | Alone | Excludes |
55-
| Multiracial | Alone or in combination with another race | Excludes |
55+
| Multiracial | Combination of two or more races | Excludes |
5656

5757
There are instances where we use different terms, or definitions, due to considerations like the preferences of our partners on a specific project or data considerations.
5858

@@ -78,7 +78,7 @@ Examples:
7878

7979
* Other datasets, such as American Community Survey Public Use Microdata (PUMS) include rich detail allowing us to calculate statistics for our standard RACE COUNTS race/ethnicity groupings.
8080

81-
Reliability of data is often low for groups that have smaller populations such as American Indian / Alaska Natives due to data collectors having inadequate sample sizes. As a result, we do our best to strike a balance between including data for as many groups as possible, while also only presenting statistics that we are confident are strong enough for advocacy and policymaking. At times this may mean that we suppress data for one or more groups.
81+
Reliability of data is often low for groups that have smaller populations such as American Indian / Alaska Natives due to data collectors having inadequate sample sizes. As a result, we do our best to strike a balance between including data for as many groups as possible, while also only presenting statistics that we are confident are strong enough for advocacy and policymaking. At times, this may mean that we suppress data for one or more groups.
8282

8383
<p align="right">(<a href="#top">back to top</a>)</p>
8484

0 commit comments

Comments
 (0)