*! version 2.1.3

Title

boilerplate template dta_g -- data preparation for a project using git

Description

This is a template for a .do file that cleans the data.

Boilerplate

This template creates a .do file with the following content:

capture log close
log using <stub>.txt, replace text

// What this .do file does
// Who wrote it

version <stata_version>
clear all
macro drop _all

*use ../data/[original_data_file.dta]

*rename *, lower
*keep

// prepare data

*gen some_var = ...
*note some_var: based on [original vars] \ <fn> \ [author] TS

*compress
*note: <abbrev>##.dta \ [description] \ <fn> \ [author] TS
*label data [description]
*datasignature set, reset
*save <abbrev>##.dta, replace

log close
exit

Tags

This file may contain one or more of the following tags:

<stata_version> will be replaced by the Stata version

<date> will be replaced by the date

<fn> will be replaced by the file name

<stub> will be replaced by the file name without the suffix

<abbrev> will be replaced by the file name without the suffix up to the last underscore

<basedir> will be replaced by the directory in which the file is saved

<as of #> will include whatever comes after that tag only if the Stata version is # or higher

Source code

mp_dta_g.mpb