initial repo

This commit is contained in:
Jeremy Kidwell 2023-09-29 15:00:15 +01:00
commit f00080df6c
32 changed files with 638 additions and 0 deletions

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
/.quarto/
/_book/
.DS_Store

5
README.md Normal file
View file

@ -0,0 +1,5 @@
# Theology, Religious Studies, and Data Science
An open textbook introducing data science to religious studies.
Content here, unless otherwise indicated are copyright by Jeremy H. Kidwell and Alex Fenlon. But please re-use them as they are covered by Creative Commons Attribution 4.0 International Licence (CC BY 4.0).

View file

@ -0,0 +1 @@
{"index.qmd":[],"chapter_3.qmd":[],"references.qmd":[],"summary.qmd":[],"chapter_2.qmd":[],"chapter_4.qmd":[],"intro.qmd":[],"chapter_1.qmd":[]}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
{"options":{"chapters":true},"entries":[],"headings":["references"]}

View file

@ -0,0 +1 @@
{"headings":[],"entries":[],"options":{"chapters":true}}

View file

@ -0,0 +1 @@
{"options":{"chapters":true},"entries":[],"headings":["references"]}

View file

@ -0,0 +1 @@
{"entries":[],"headings":["how-to-get-data","what-is-data","your-first-project-building-a-pie-chart","references"],"options":{"chapters":true}}

View file

@ -0,0 +1,26 @@
{
"index.qmd": {
"index.html": "b2e733b4"
},
"intro.qmd": {
"intro.html": "f2b5a785"
},
"chapter_1.qmd": {
"chapter_1.html": "95a063b4"
},
"chapter_2.qmd": {
"chapter_2.html": "21758f67"
},
"chapter_3.qmd": {
"chapter_3.html": "e539172f"
},
"chapter_4.qmd": {
"chapter_4.html": "9455e529"
},
"summary.qmd": {
"summary.html": "eb97c3f4"
},
"references.qmd": {
"references.html": "44818966"
}
}

View file

@ -0,0 +1 @@
{"headings":["preface"],"options":{"chapters":true},"entries":[]}

View file

@ -0,0 +1 @@
{"headings":["references"],"options":{"chapters":true},"entries":[]}

View file

@ -0,0 +1 @@
{"headings":[],"options":{"chapters":true},"entries":[]}

View file

@ -0,0 +1 @@
{"options":{"chapters":true},"entries":[],"headings":["who-this-book-is-for","why-this-book","the-hacker-way","using-the-r-programming-language","other-useful-guides"]}

View file

@ -0,0 +1,27 @@
project:
type: book
book:
title: "Hacking Religion: TRS & Data Science in Action"
author: "Jeremy H. Kidwell"
date: "9/29/2023"
chapters:
- index.qmd
- intro.qmd
- chapter_1.qmd
- chapter_2.qmd
- chapter_3.qmd
- chapter_4.qmd
- summary.qmd
- references.qmd
bibliography: references.bib
format:
html:
theme: cosmo
pdf:
documentclass: scrreprt

View file

@ -0,0 +1,52 @@
# The 2021 UK Census
## How to get data
## What is data?
## Your first project: building a pie chart
Importing data from a CSV file
Examining data:
```
dat
head
tail
```
<!--
Reference on callout box syntax here: https://quarto.org/docs/authoring/callouts.html
-->
::: {.callout-tip}
## What is Religion?
Content tbd
:::
::: {.callout-tip}
## Hybrid Religious Identity
Content tbd
:::
::: {.callout-tip}
## What is Secularisation?
Content tbd
:::
# References {.unnumbered}
::: {#refs}
:::

View file

@ -0,0 +1,19 @@
# Survey Data: Spotlight Project
::: {.callout-tip}
## How can we measure religion?
Content tbd
:::
# References {.unnumbered}
::: {#refs}
:::

View file

@ -0,0 +1,10 @@
# Mapping churches: geospatial data science
# References {.unnumbered}
::: {#refs}
:::

View file

@ -0,0 +1,9 @@
# Data scraping, corpus analysis and wordclouds
# References {.unnumbered}
::: {#refs}
:::

BIN
hacking_religion/cover.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View file

@ -0,0 +1,5 @@
# Preface {.unnumbered}
This is a Quarto book.
To learn more about Quarto books visit <https://quarto.org/docs/books>.

403
hacking_religion/index.tex Normal file
View file

@ -0,0 +1,403 @@
% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
\PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor}
%
\documentclass[
letterpaper,
DIV=11,
numbers=noendperiod]{scrreprt}
\usepackage{amsmath,amssymb}
\usepackage{iftex}
\ifPDFTeX
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
\usepackage{unicode-math}
\defaultfontfeatures{Scale=MatchLowercase}
\defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
\fi
\usepackage{lmodern}
\ifPDFTeX\else
% xetex/luatex font selection
\fi
% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\IfFileExists{microtype.sty}{% use microtype if available
\usepackage[]{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\makeatletter
\@ifundefined{KOMAClassName}{% if non-KOMA class
\IfFileExists{parskip.sty}{%
\usepackage{parskip}
}{% else
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}}
}{% if KOMA class
\KOMAoptions{parskip=half}}
\makeatother
\usepackage{xcolor}
\setlength{\emergencystretch}{3em} % prevent overfull lines
\setcounter{secnumdepth}{5}
% Make \paragraph and \subparagraph free-standing
\ifx\paragraph\undefined\else
\let\oldparagraph\paragraph
\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
\fi
\ifx\subparagraph\undefined\else
\let\oldsubparagraph\subparagraph
\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
\fi
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}\usepackage{longtable,booktabs,array}
\usepackage{calc} % for calculating minipage widths
% Correct order of tables after \paragraph or \subparagraph
\usepackage{etoolbox}
\makeatletter
\patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{}
\makeatother
% Allow footnotes in longtable head/foot
\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}}
\makesavenoteenv{longtable}
\usepackage{graphicx}
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
\makeatother
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
% Set default figure placement to htbp
\makeatletter
\def\fps@figure{htbp}
\makeatother
\newlength{\cslhangindent}
\setlength{\cslhangindent}{1.5em}
\newlength{\csllabelwidth}
\setlength{\csllabelwidth}{3em}
\newlength{\cslentryspacingunit} % times entry-spacing
\setlength{\cslentryspacingunit}{\parskip}
\newenvironment{CSLReferences}[2] % #1 hanging-ident, #2 entry spacing
{% don't indent paragraphs
\setlength{\parindent}{0pt}
% turn on hanging indent if param 1 is 1
\ifodd #1
\let\oldpar\par
\def\par{\hangindent=\cslhangindent\oldpar}
\fi
% set entry spacing
\setlength{\parskip}{#2\cslentryspacingunit}
}%
{}
\usepackage{calc}
\newcommand{\CSLBlock}[1]{#1\hfill\break}
\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}}
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break}
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
\KOMAoption{captions}{tableheading}
\makeatletter
\@ifpackageloaded{tcolorbox}{}{\usepackage[skins,breakable]{tcolorbox}}
\@ifpackageloaded{fontawesome5}{}{\usepackage{fontawesome5}}
\definecolor{quarto-callout-color}{HTML}{909090}
\definecolor{quarto-callout-note-color}{HTML}{0758E5}
\definecolor{quarto-callout-important-color}{HTML}{CC1914}
\definecolor{quarto-callout-warning-color}{HTML}{EB9113}
\definecolor{quarto-callout-tip-color}{HTML}{00A047}
\definecolor{quarto-callout-caution-color}{HTML}{FC5300}
\definecolor{quarto-callout-color-frame}{HTML}{acacac}
\definecolor{quarto-callout-note-color-frame}{HTML}{4582ec}
\definecolor{quarto-callout-important-color-frame}{HTML}{d9534f}
\definecolor{quarto-callout-warning-color-frame}{HTML}{f0ad4e}
\definecolor{quarto-callout-tip-color-frame}{HTML}{02b875}
\definecolor{quarto-callout-caution-color-frame}{HTML}{fd7e14}
\makeatother
\makeatletter
\makeatother
\makeatletter
\@ifpackageloaded{bookmark}{}{\usepackage{bookmark}}
\makeatother
\makeatletter
\@ifpackageloaded{caption}{}{\usepackage{caption}}
\AtBeginDocument{%
\ifdefined\contentsname
\renewcommand*\contentsname{Table of contents}
\else
\newcommand\contentsname{Table of contents}
\fi
\ifdefined\listfigurename
\renewcommand*\listfigurename{List of Figures}
\else
\newcommand\listfigurename{List of Figures}
\fi
\ifdefined\listtablename
\renewcommand*\listtablename{List of Tables}
\else
\newcommand\listtablename{List of Tables}
\fi
\ifdefined\figurename
\renewcommand*\figurename{Figure}
\else
\newcommand\figurename{Figure}
\fi
\ifdefined\tablename
\renewcommand*\tablename{Table}
\else
\newcommand\tablename{Table}
\fi
}
\@ifpackageloaded{float}{}{\usepackage{float}}
\floatstyle{ruled}
\@ifundefined{c@chapter}{\newfloat{codelisting}{h}{lop}}{\newfloat{codelisting}{h}{lop}[chapter]}
\floatname{codelisting}{Listing}
\newcommand*\listoflistings{\listof{codelisting}{List of Listings}}
\makeatother
\makeatletter
\@ifpackageloaded{caption}{}{\usepackage{caption}}
\@ifpackageloaded{subcaption}{}{\usepackage{subcaption}}
\makeatother
\makeatletter
\@ifpackageloaded{tcolorbox}{}{\usepackage[skins,breakable]{tcolorbox}}
\makeatother
\makeatletter
\@ifundefined{shadecolor}{\definecolor{shadecolor}{rgb}{.97, .97, .97}}
\makeatother
\makeatletter
\makeatother
\makeatletter
\makeatother
\ifLuaTeX
\usepackage{selnolig} % disable illegal ligatures
\fi
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\urlstyle{same} % disable monospaced font for URLs
\hypersetup{
pdftitle={Hacking Religion: TRS \& Data Science in Action},
pdfauthor={Jeremy H. Kidwell},
colorlinks=true,
linkcolor={blue},
filecolor={Maroon},
citecolor={Blue},
urlcolor={Blue},
pdfcreator={LaTeX via pandoc}}
\title{Hacking Religion: TRS \& Data Science in Action}
\author{Jeremy H. Kidwell}
\date{2023-09-29}
\begin{document}
\maketitle
\ifdefined\Shaded\renewenvironment{Shaded}{\begin{tcolorbox}[frame hidden, interior hidden, borderline west={3pt}{0pt}{shadecolor}, enhanced, boxrule=0pt, breakable, sharp corners]}{\end{tcolorbox}}\fi
\renewcommand*\contentsname{Table of contents}
{
\hypersetup{linkcolor=}
\setcounter{tocdepth}{2}
\tableofcontents
}
\bookmarksetup{startatroot}
\hypertarget{preface}{%
\chapter*{Preface}\label{preface}}
\addcontentsline{toc}{chapter}{Preface}
\markboth{Preface}{Preface}
This is a Quarto book.
To learn more about Quarto books visit
\url{https://quarto.org/docs/books}.
\bookmarksetup{startatroot}
\hypertarget{introduction-hacking-religion}{%
\chapter{Introduction: Hacking
Religion}\label{introduction-hacking-religion}}
\hypertarget{who-this-book-is-for}{%
\section{Who this book is for}\label{who-this-book-is-for}}
\hypertarget{why-this-book}{%
\section{Why this book?}\label{why-this-book}}
\hypertarget{the-hacker-way}{%
\section{The hacker way}\label{the-hacker-way}}
\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\item
Tell the truth
\item
Do not deceive using beauty
\item
Work transparently: research as open code using open data
\item
Draw others in: produce reproducible research
\item
Learn by doing
\end{enumerate}
\hypertarget{using-the-r-programming-language}{%
\section{Using the R programming
language}\label{using-the-r-programming-language}}
Why R?
Explain accelerated approach in this book, working from examples and
providing exposure to concepts in a streamlined way, pointing to other
resources
Point to other guides,
\hypertarget{other-useful-guides}{%
\section{Other useful guides:}\label{other-useful-guides}}
\href{https://r4ds.hadley.nz/}{R For Data Science 2e}
\href{https://melaniewalsh.github.io/Intro-Cultural-Analytics/welcome.html}{Intro
to Cultural Analytics and Python}
\href{https://datasciencebox.org/01-overview}{Data Science in a Box}
\bookmarksetup{startatroot}
\hypertarget{the-2021-uk-census}{%
\chapter{The 2021 UK Census}\label{the-2021-uk-census}}
\hypertarget{how-to-get-data}{%
\section{How to get data}\label{how-to-get-data}}
\hypertarget{what-is-data}{%
\section{What is data?}\label{what-is-data}}
\hypertarget{your-first-project-building-a-pie-chart}{%
\section{Your first project: building a pie
chart}\label{your-first-project-building-a-pie-chart}}
Importing data from a CSV file
Examining data:
\begin{verbatim}
dat
head
tail
\end{verbatim}
\begin{tcolorbox}[enhanced jigsaw, colback=white, opacityback=0, colframe=quarto-callout-tip-color-frame, toprule=.15mm, opacitybacktitle=0.6, bottomtitle=1mm, leftrule=.75mm, breakable, left=2mm, rightrule=.15mm, title=\textcolor{quarto-callout-tip-color}{\faLightbulb}\hspace{0.5em}{What is Religion?}, coltitle=black, arc=.35mm, titlerule=0mm, bottomrule=.15mm, toptitle=1mm, colbacktitle=quarto-callout-tip-color!10!white]
Content tbd
\end{tcolorbox}
\begin{tcolorbox}[enhanced jigsaw, colback=white, opacityback=0, colframe=quarto-callout-tip-color-frame, toprule=.15mm, opacitybacktitle=0.6, bottomtitle=1mm, leftrule=.75mm, breakable, left=2mm, rightrule=.15mm, title=\textcolor{quarto-callout-tip-color}{\faLightbulb}\hspace{0.5em}{Hybrid Religious Identity}, coltitle=black, arc=.35mm, titlerule=0mm, bottomrule=.15mm, toptitle=1mm, colbacktitle=quarto-callout-tip-color!10!white]
Content tbd
\end{tcolorbox}
\begin{tcolorbox}[enhanced jigsaw, colback=white, opacityback=0, colframe=quarto-callout-tip-color-frame, toprule=.15mm, opacitybacktitle=0.6, bottomtitle=1mm, leftrule=.75mm, breakable, left=2mm, rightrule=.15mm, title=\textcolor{quarto-callout-tip-color}{\faLightbulb}\hspace{0.5em}{What is Secularisation?}, coltitle=black, arc=.35mm, titlerule=0mm, bottomrule=.15mm, toptitle=1mm, colbacktitle=quarto-callout-tip-color!10!white]
Content tbd
\end{tcolorbox}
\bookmarksetup{startatroot}
\hypertarget{references}{%
\chapter*{References}\label{references}}
\addcontentsline{toc}{chapter}{References}
\markboth{References}{References}
\hypertarget{refs}{}
\begin{CSLReferences}{0}{0}
\end{CSLReferences}
\bookmarksetup{startatroot}
\hypertarget{survey-data-spotlight-project}{%
\chapter{Survey Data: Spotlight
Project}\label{survey-data-spotlight-project}}
\begin{tcolorbox}[enhanced jigsaw, colback=white, opacityback=0, colframe=quarto-callout-tip-color-frame, toprule=.15mm, opacitybacktitle=0.6, bottomtitle=1mm, leftrule=.75mm, breakable, left=2mm, rightrule=.15mm, title=\textcolor{quarto-callout-tip-color}{\faLightbulb}\hspace{0.5em}{How can we measure religion?}, coltitle=black, arc=.35mm, titlerule=0mm, bottomrule=.15mm, toptitle=1mm, colbacktitle=quarto-callout-tip-color!10!white]
Content tbd
\end{tcolorbox}
\bookmarksetup{startatroot}
\hypertarget{references-1}{%
\chapter*{References}\label{references-1}}
\addcontentsline{toc}{chapter}{References}
\markboth{References}{References}
\hypertarget{refs}{}
\begin{CSLReferences}{0}{0}
\end{CSLReferences}
\bookmarksetup{startatroot}
\hypertarget{mapping-churches-geospatial-data-science}{%
\chapter{Mapping churches: geospatial data
science}\label{mapping-churches-geospatial-data-science}}
\bookmarksetup{startatroot}
\hypertarget{references-2}{%
\chapter*{References}\label{references-2}}
\addcontentsline{toc}{chapter}{References}
\markboth{References}{References}
\hypertarget{refs}{}
\begin{CSLReferences}{0}{0}
\end{CSLReferences}
\bookmarksetup{startatroot}
\hypertarget{data-scraping-corpus-analysis-and-wordclouds}{%
\chapter{Data scraping, corpus analysis and
wordclouds}\label{data-scraping-corpus-analysis-and-wordclouds}}
\bookmarksetup{startatroot}
\hypertarget{references-3}{%
\chapter*{References}\label{references-3}}
\addcontentsline{toc}{chapter}{References}
\markboth{References}{References}
\hypertarget{refs}{}
\begin{CSLReferences}{0}{0}
\end{CSLReferences}
\bookmarksetup{startatroot}
\hypertarget{summary}{%
\chapter{Summary}\label{summary}}
An open textbook introducing data science to religious studies
\bookmarksetup{startatroot}
\hypertarget{references-4}{%
\chapter*{References}\label{references-4}}
\addcontentsline{toc}{chapter}{References}
\markboth{References}{References}
\hypertarget{refs}{}
\begin{CSLReferences}{0}{0}
\end{CSLReferences}
\end{document}

View file

@ -0,0 +1,36 @@
# Introduction: Hacking Religion
## Who this book is for
## Why this book?
## The hacker way
1. Tell the truth
2. Do not deceive using beauty
3. Work transparently: research as open code using open data
4. Draw others in: produce reproducible research
5. Learn by doing
## Using the R programming language
Why R?
Explain accelerated approach in this book, working from examples and providing exposure to concepts in a streamlined way, pointing to other resources
Point to other guides,
## Other useful guides:
[R For Data Science 2e](https://r4ds.hadley.nz/)
[Intro to Cultural Analytics and Python](https://melaniewalsh.github.io/Intro-Cultural-Analytics/welcome.html)
[Data Science in a Box](https://datasciencebox.org/01-overview)

View file

@ -0,0 +1,19 @@
@article{knuth84,
author = {Knuth, Donald E.},
title = {Literate Programming},
year = {1984},
issue_date = {May 1984},
publisher = {Oxford University Press, Inc.},
address = {USA},
volume = {27},
number = {2},
issn = {0010-4620},
url = {https://doi.org/10.1093/comjnl/27.2.97},
doi = {10.1093/comjnl/27.2.97},
journal = {Comput. J.},
month = may,
pages = {97111},
numpages = {15}
}

View file

@ -0,0 +1,4 @@
# References {.unnumbered}
::: {#refs}
:::

View file

@ -0,0 +1,3 @@
# Summary
An open textbook introducing data science to religious studies