sgb-figures
Figures, Code and Data for Stadt.Geschichte.Basel
This repository contains code and data for creating plots used in the Stadt.Geschichte.Basel research project. The data in this repository is openly available to everyone and is intended to support reproducible research.
Repository Structure
The structure of this repository follows the Advanced Structure for Data Analysis of The Turing Way and is organized as follows:
build/
: scripts and notebooks used to build the datadata/
: data filesdocs/
: documentation for the data and the repositoryoutput/
: generated PDF filessrc/
: source code for the data (e.g., scripts used to collect or process the data)
Data Description
This repository stores data and R code used by the Team for Research Data Management and Public History of the Stadt.Geschichte.Basel research project to create figures published in the nine-volume book series.
One task of the Stadt.Geschichte.Basel RDM team is to provide visualisations for data used by the individual authors to support their arguments. Using raw data provided by the researchers, the RDM team created maps, diagrams and other types of visualisations for publication in the print and online (OA) versions of Stadt.Geschichte.Basel.
To support open research with FAIR data, the RDM team developed a research data platform to ensure open, long-term access to sources and research data regarding the history of Basel. The platform facilitates access to the data behind the publication, with metadata annotation following the Manual for Creating Non-Discriminatory Metadata for Historical Sources and Research Data developed by Stadt.Geschichte.Basel.
Plots
This GitHub repository provides the source code used to create the plots. In addition to the data already made available on the research data platform, the source code published here makes the figures even more customisable.
Following the steps below, users can build plots from the book series by themselves. The workflow produces the plots, as published, as PDF
files in CMYK
colour mode using the dimensions from the printed volumes. For technical reasons, plots and legends are written to separate PDF files. The plots are not shipped with the project’s signature font family, but are generated with a generic system font due to copyright. Users can easily customise the plots’ dimensions, colours, labels etc. by changing the parameters in the corresponding source code.
The (mostly numerical) data behind the plots, also available in interactive tables on the research data platform, is additionally stored in this repository in csv
format. For each dataset, a json
file is generated, providing metadata according to the W3C standard for tabular data and metadata on the web.
Installation
Install Node.js, Quarto and R. Run the following commands in the root directory of the repository:
npm install
Set up the R environment using renv:
npm run setup
Build
Build an individual plot as PDF and save it to output/
by running the following command:
npm run plot
Specify the ID of the plot when prompted, e.g.:
Bitte ID des Plots eingeben (z.B. 39017 für abb39017): 39017
You can also specify the plot directly:
npm run plot 39017
Print a list of all plots that can be built from this repository:
npm run list
Use
These data are openly available to everyone and can be used for any research or educational purpose. If you use this data in your research, please cite as specified in CITATION.cff.
Support
This project is maintained by @Stadt-Geschichte-Basel. Please understand that we can’t provide individual support via email. We also believe that help is much more valuable when it’s shared publicly, so more people can benefit from it.
Type | Platforms |
---|---|
🚨 Bug Reports | GitHub Issue Tracker |
📊 Report bad data | GitHub Issue Tracker |
📚 Docs Issue | GitHub Issue Tracker |
🎁 Feature Requests | GitHub Issue Tracker |
🛡 Report a security vulnerability | See SECURITY.md |
💬 General Questions | GitHub Discussions |
Roadmap
- add plot source code and data from volumes 1 to 9
- archive repository on Zenodo
- add DOIs
- add individual
index.qmd
for plots
Contributing
All contributions to this repository are welcome! If you find errors or problems with the data, or if you want to add new data or features, please open an issue or pull request. Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
Versioning
We use SemVer for versioning. The available versions are listed in the tags on this repository.
License
This codebase is released under the GNU Affero General Public License v3.0. See the LICENSE-AGPL file for details. By using this code, you agree to make any modifications available under the same license.
The output of the code in this repository is released under the Creative Commons Attribution 4.0 International (CC BY 4.0) License - see the LICENSE-CCBY file for details. By using this data, you agree to give appropriate credit to the original author(s) and to indicate if any modifications have been made.
The raw data in this repository, specifically in data/
, is released according to the individual licensing as stated in the respective metadata files.