Skip to content

Instantly share code, notes, and snippets.

View zackbatist's full-sized avatar

Zack Batist zackbatist

View GitHub Profile
@zackbatist
zackbatist / MAXQDA to textfiles.md
Last active November 3, 2021 21:40
Potential workflow for exporting a MAXQDA document as textfiles with html-style tagging.

Prepare textfile with codes marked up as html tags (<>)

This is a proposed workflow for exporting a MAXQDA document as html with semantic tags, inspired by Anselm (https://github.com/edsu/anselm). Once it's all formatted as text it will presumably be much easier to work with.

A significant challenge that this is meant to resolve is that MAXQDA does not export character-level positions of codings, only paragraph-level positions. But it stores this info in the database, I just have to get it out and assign it to the relevant parts of the text.

I need to consult with someone who is more knowledgable with CSS to design better tag templates that would allow tags to be formatted according to custom styles. For example, the ID schema may be used to apply style to sets of codes based on their semantic position in the code tree. Some ideas to check out:

  • Include all parental codes in the code name, so instead of:

``

@zackbatist
zackbatist / MaxQDA-to-Neo4j-docs.md
Last active December 20, 2020 15:32
Documenting how I migrate data from MaxQDA to a Neo4j graph database.

These notes are meant to document the processes through which I migrate data from MaxQDA 2020 to a Neo4j graph database.

Some of these processes depend on certain coding conventions when marking up documents in MaxQDA, which will be documented elsewhere soon.

Some processes documented here generated results that needed to be hand-edited, and therefore this is not meant to be used as an aide for reproducible research. Instead, it is a series of processes that I'm sharing in case others might find them useful.

Migrating the code system

Creating nodes from codes

Export a table with all codes.

@zackbatist
zackbatist / carpentries-training-workshop.md
Last active July 19, 2019 19:52
My notes from the carpentries training workshop
#QueryInputs is a list or dataframe containing selectInput values
#We would just have to update the QueryInputs object and then re-run QueryResults to refresh the output and regenerate the table (I hope)
QueryResults <- function(QueryInputs) {
Level2 <- dbReadTable(pool, 'level2')
filtered <- Level2
if (!is.null(QueryInputs$Locus)) {
filtered <- filtered %>% filter(Locus %in% QueryInputs$Locus)
}
if (!is.null(QueryInputs$Blank)) {
@zackbatist
zackbatist / getHex.gs
Created February 17, 2019 18:59
Google Sheets function that returns the hex code for the background colour of a cell
/**
* getHex.gs
* =getHex(cell("address",A1)) returns hex code for background colour of cell A1
* taken from https://stackoverflow.com/questions/28962526/google-spreadsheets-sort-filter-by-background-fill
*/
function getHex(input) {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var cell = ss.getRange(input);
var result = cell.getBackground();
@zackbatist
zackbatist / FetchAbstracts.R
Created September 19, 2018 18:27
A small script that reads DOIs from a bibtex file, fetches abstracts from Crossref when they are available, and exports another bibtex file with that added info.
# install and run packages
# install.packages("bib2df")
# install.packages("rcrossref")
library(bib2df)
library(rcrossref)
# import the bibtex to a data frame
# biblio.bib is a file in the working directory
df <- bib2df("biblio.bib")
@zackbatist
zackbatist / GS01a.bib
Last active September 13, 2018 19:26
x
@article{pop00001,
author = {M Rothenberg},
type = {HTML},
title = {Review of Cadw Mobile App [application]},
journal = {Internet Archaeology},
publisher = {intarch.ac.uk},
url = {http://intarch.ac.uk/journal/issue44/14/},
year = {2017},
note = {Query date: 2018-09-10},
}

Quals reading lists

Methodological approaches to understanding and representing (archaeological) knowledge work - Costis Dallas

This reading list explores the different ways in which research practice and knowledge construction may be studied. It surveys various relevant methodologies, and assesses the implications that come to bear through their use. What kinds of information are collected through different data collection protocols? How does this contribute to different research outcomes down the road? How might insights garnered through different approaches lead to different ways of extending or applying them? How might the freedom and flexibility afforded by the use of grounded theory be leveraged effectively?

Theoretical and applied approaches to cognition and action - Matt Ratto

The starting point for this reading list is the assumption that archaeological projects be considered as cooperatively constructed socio-technical mechanisms that are iteratively designed and tinkered with to construct

@zackbatist
zackbatist / SNAP DIY Database Docs.md
Last active May 1, 2019 20:23
SNAP DIY Database

Overview of the system

I put together a little DIY fieldwork database server using nearly entirely open source tools and software. It consists of a Raspberry Pi operating on a local network, which contains a MariaDB server, a SMB file sharing server, an R Shiny server, and automatic scheduled backups, but can be configured or extended to suit whatever situation you're in. This is a more collaborative and distributed setup than a typical Microsoft Access setup (or even worse, a series of scattered spreadsheets :z), since multiple users can simultaneously enter data stored in a unified and central directory, share files across the network, and browse what's going on across an entire project. Microsoft Access, on the other hand, is proprietary, expensive and windows-only software that has poor multi-user support and the learning curve is steeper than its worth (I could go on...).

Moreover, this is a very inexpensive and portable setup. In terms of hardware, you will need a 35$ Raspberry Pi, a 32GB SD card (al

Detailed media editing procedure for my thesis

My thesis involves the use of multiple GoPro action cameras, as well as an external microphone, to observe work being done from multiple angles and perspectives. This file outlines how I process all the media that I collect.

Hardware

GoPro Hero 4 Silver action cameras

Three refurbished GoPro Hero 4 Silver action cameras are used. Each writes to a 64GB microSD card, which I reformatted to the exFAT file system. exFAT limits the size of each file to 4GB, so I have to concatenate the split mp4 files using ffmpeg. Also, GoPro action cameras record notoriously poor quality audio, and attempts to clean the audio may produce varying results depending on the circumstances under which you are recording.

SONY ICD-UX560 audio recorder

I use a SONY ICD-UX560 audio recorder as an additional source for audio input, to fall back on in case cleaning the GoPro audio fails or is insufficient. It comes with 4GB of built-in storage include an additional 32GB microSD c