Skip to content

Commit

Permalink
new render
Browse files Browse the repository at this point in the history
  • Loading branch information
fcorowe committed Feb 1, 2024
1 parent 69f11e0 commit 6ea7a94
Show file tree
Hide file tree
Showing 128 changed files with 35,225 additions and 5,748 deletions.
32 changes: 22 additions & 10 deletions 01-overview.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ By the end of the module, students should be able to:

To reproduce the code in the book, you need the following software packages:

- R-4.2.2
- RStudio 2022.12.0-353
- Quarto 1.2.280
- R-4.3.1
- RStudio 2023.09.0+463
- Quarto 1.3.450
- the list of libraries in the next section

To check your version of:
Expand All @@ -64,6 +64,7 @@ The list of libraries used in this book is provided below:
- `arm`
- `car`
- `corrplot`
- `devtools`
- `FRK`
- `gghighlight`
- `ggplot2`
Expand Down Expand Up @@ -94,15 +95,19 @@ The list of libraries used in this book is provided below:
- `tmap`
- `tufte`
- `viridis`
- `basemapR`

Copy, paste and run the code below in your console. Ensure all packages are installed on your computer.

```{r}
#| eval: false
deps <- list(
# package names
packages <- c(
"arm",
"car",
"corrplot",
"devtools",
"FRK",
"gghighlight",
"ggplot2",
Expand All @@ -120,7 +125,6 @@ deps <- list(
"merTools",
"plyr",
"RColorBrewer",
"rgdal",
"sf",
"sjPlot",
"sp",
Expand All @@ -133,14 +137,22 @@ deps <- list(
"tufte",
"viridis"
)
```
```{r}
#| eval: false
# we can load them all to make sure they are installed:
for(lib in deps){library(lib, character.only = TRUE)}
# install packages not yet installed
installed_packages <- packages %in% rownames(installed.packages())
if (any(installed_packages == FALSE)) {
install.packages(packages[!installed_packages])
}
# packages loading
invisible(lapply(packages, library, character.only = TRUE))
```

::: column-margin ::: callout-note To install the library `basemapR`, you need to install from source by running:

`library(devtools)`\
`install_github('Chrisjb/basemapR')` ::: ::: column-margin

## Assessment

The final module mark is composed of the *two computational essays*. Together they are designed to cover the materials introduced in the entirety of content covered during the semester. A computational essay is an essay whose narrative is supported by code and computational results that are included in the essay itself. Each teaching week, you will be required to address a set of questions relating to the module content covered in that week, and to use the material that you will produce for this purpose to build your computational essay.
Expand Down
2 changes: 1 addition & 1 deletion 02-spatial_data.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ An alternative approach is to use the smallest geographical system available and

### Ecological Fallacy

Ecological fallacy is an error in the interpretation of statistical data based on aggregate information. Specifically it refers to inferences made about the nature of specific individuals based solely on statistics aggregated for a given group. It is about thinking that relationships observed for groups necessarily hold for individuals. A key example is @robinson1950ecological who illustrates this problem exploring the difference between ecological correlations and individual correlations. He looked at the relationship between country of birth and literacy. @robinson1950ecological used the percent of foreign-born population and percent of literate population for the 48 states in the United States in 1930. The ecological correlation based on these data was `0.53`. This suggests a positive association between foreign birth and literacy, and could be interpreted as foreign born individuals being more likely to be literate than native-born individuals. Yet, the correlation based on individual data was negative `-0.11` which indicates the opposite. The main point emerging from this example is to carefully interpret analysis based on spatial data and avoid making inferences about individuals from these data.
Ecological fallacy is an error in the interpretation of statistical data based on aggregate information. Specifically it refers to inferences made about the nature of specific individuals based solely on statistics aggregated for a given group. It is about thinking that relationships observed for groups necessarily hold for individuals. A key example is @robinson1950ecological who illustrates this problem exploring the difference between ecological correlations and individual correlations. He looked at the relationship between country of birth and literacy. @robinson1950ecological used the percent of foreign-born population and percent of literate population for the 48 states in the United States in 1930. The ecological correlation based on these data was 0.53. This suggests a positive association between foreign birth and literacy, and could be interpreted as foreign born individuals being more likely to be literate than native-born individuals. Yet, the correlation based on individual data was negative -0.11 which indicates the opposite. The main point emerging from this example is to carefully interpret analysis based on spatial data and avoid making inferences about individuals from these data.

### Spatial Dependence

Expand Down
Loading

0 comments on commit 6ea7a94

Please sign in to comment.