ARCHIVED/DEPRECATED
This directory contains R scripts for transforming raw data exports from DataScribe into CSV files used for importing into a PostgreSQL database.
This file handles most of the work in developing the datasets for importing into PostgreSQL. The file does several things to the DataScribe files:
- Weekly and general bills are pivoted into long tables, which also adds the columns
parish_nameandcount - Mentions of plague, christenings, and burials are extracted into their own dataframes and written as CSVs.
- With the provided data, the script generates a dataframe of unique weeks which are then assigned their own unique IDs that we use as foreign keys in PostgreSQL.
The data directory contains transcribed data that's been tidied.
all_bills.csv: This contains all of the weekly and general bills. This data is also available in the data API.all_christenings.csv: This contains all of the christenings data. This data is also available in the data API. These are compiled from the following datasets:laxton_christenings.csvwellcome_christenings.csv
bills_general.csv: This is only the general bills data. It's combined withall_bills.csv.bills_weekly.csv: This is only the weekly bills data. It's combined withall_bills.csv.burials_counts.csv: This is burial data. It is not currently available in the API.causes_of_death.csv: This is causes of death across the bills and their associated values. This data is also available in the data API. This is compiled from the following datasets:laxton_causes_1700.csvlaxton_causes.csvwellcome_causes.csv
christenings_counts.csv:deaths_unique.csv: This is a list of unique deaths across the datasets.foodstuffs.csv: This is foodstuffs data extracted from the transcriptions. It is not currently available from the data API.week_unique.csv: These are the unique weeks across the datasets. This is also available in the data API.year_unique.csv: These are the unique years across the datasets.
This directory contains a Makefile for aiding in using Datasette and primarily exists here to explore and double-check the data locally.
Requirements for using the Makefile are:
- Datasette (
brew install datasetteorpip install datasette) - SQLite (
brew install sqlite)
The commands are:
create: This creates an sqlitedata.dbfile, if none exists.insert: This inserts the CSV records intodata.db.schema: This lets you look over the schema of the database.serve: This locally servesdata.dbin Datasette.