Setup

This is a comprehensive list of what you are going to need throughout these lessons. To participate in the MicroData workflow, you will need access to the software described below. In addition, you will need an up-to-date web browser. The Carpemtries maintain a list of common issues that occur during installation as a reference for instructors that may be useful on the Configuration Problems and Solutions wiki page.We will go into details after a quick overview:

Key requirements

  • Python 3 installation with pip3 and virtualenv

  • BEAD executable

  • Git installation, Git Bash on Windows

A useful script to install required programs on Linux can be found here: https://github.com/ceumicrodata/handbook/blob/master/post_install.sh. Let's go through them one by one.

The Bash Shell

Bash is a commonly-used shell that gives you the power to do simple tasks more quickly.

Video Tutorial

  1. Download the Git for Windows installer.

  2. Run the installer and follow the steps below:

    1. Click on "Next" four times (two times if you've previously installed Git). You don't need to change anything in the Information, location, components, and start menu screens.

    2. Select "Use the nano editor by default" and click on "Next".

    3. Keep "Git from the command line and also from 3rd-party software" selected and click on "Next". If you forgot to do this programs that you need for the workshop will not work properly. If this happens rerun the installer and select the appropriate option.

    4. Click on "Next".

    5. Select "Use the native Windows Secure Channel library", and click "Next".

    6. Keep "Checkout Windows-style, commit Unix-style line endings" selected and click on "Next".

    7. Select "Use Windows' default console window" and click on "Next".

    8. Leave all three items selected, and click on "Next".

    9. Do not select the experimental option. Click "Install".

    10. Click on "Finish".

  3. If your "HOME" environment variable is not set (or you don't know what this is): 1. Open command prompt (Open Start Menu then type cmd and press [Enter]) 2. Type the following line into the command prompt window exactly as shown:

    setx HOME "%USERPROFILE%"

    1. Press [Enter], you should see SUCCESS: Specified value was saved.

    2. Quit command prompt by typing exit then pressing [Enter]

This will provide you with both Git and Bash in the Git Bash program.

Git

Git is a version control system that lets you track who made changes to what when and has options for easily updating a shared or public version of your code on github.com. You will need a supported web browser.

You will need an account at github.com for parts of the Git lesson. Basic GitHub accounts are free. We encourage you to create a GitHub account if you don't have one already. Please consider what personal information you'd like to reveal. For example, you may want to review these instructions for keeping your email address private provided at GitHub.

Git should be installed on your computer as part of your Bash install (described above).

After installation, the further steps are recommended:

  • Configure installation

    • git config --global user.name "your-full-name"

    • git config --global user.email "your-email-address"

  • SSH key: for faster usage (no password will be needed afterwards)

    • Check if you already have: Is it anything in .ssh? ls .ssh

    • Add new SSH key to your github account

  • Download Sublime Merge (recommended git client)

Text Editor

When you're writing code, it's nice to have a text editor that is optimized for writing code, with features like automatic color-coding of key words. The default text editor on macOS and Linux is usually set to Vim, which is not famous for being intuitive. If you accidentally find yourself stuck in it, hit the Esc key, followed by :+Q+! (colon, lower-case 'q', exclamation mark), then hitting Return to return to the shell.

nano is a basic editor and the default that we use, it is installed along with Git.

Other editors that you can use are Notepad++ or Sublime Text. Be aware that you must add its installation directory to your system path. Please ask your instructor to help you do this.

Stata

In MicroData we use the statistical package Stata, version Stata 17 MP. If you do not have a single user Stata license, please let your instructor know so that they can request one for you. We prefer to use the server version of the Stata. You can start Stata from VNC bash command line by the help of xstata-mp command.

If you are newly installing single user Stata on your computer, follow these instructions.

  1. Log in using your username and password.

  2. Download and launch the installer: SetupStata17.exe version 64.bit.

  3. Once the installation is done, start Stata from the Start Menu. The first time you do this, you will have to activate your licence.

  4. Choose version StataMP.

  5. Enter the serial number provided and press enter.

  6. Enter the code and press enter.

  7. Enter the authorization and press enter.

  8. It should return “Good. The serial number, code, and authorization make sense. Shall we continue?” Type Y and press enter.

  9. When it asks for the first line, it should say “CEU”.

  10. When it asks for the second line, it should say “CEU”.

  11. It will ask for confirmation. Type “Y” and press enter.

Python 3

If you use Ubuntu 20.04 LTS or newer, you are good to go. Otherwise you should visit Python's official page and download the latest python version for your operating system. Always follow the installation guide on Python's website.

Bead

  1. (windows only:) Install Git Bash

  2. Install python if not already installed.

Latest release depends on Python 3.8.5., Python 3 only (requires at least 3.7). You can check the version of your Python from the terminal with python -V.

  1. Download latest version from https://github.com/e3krisztian/bead/releases/tag/v0.8.1

    you will need only the platform specific binary: bead

  2. Put the downloaded file in a location, that is on the PATH

    • $HOME/bin (single-user, laptop, desktop, traditional location)

    • $HOME/.local/bin (single-user, laptop, desktop, new XDG standard?)

    • /usr/local/bin (system, servers, multi-user)

  3. (linux and mac only): make the file executable

E.g. the following commands would install version v0.8.1 (latest release at the time of writing) on linux and mac:

# ensure user bin directory existst (for user specific scripts)
mkdir -p ~/.local/bin
# download bead
cd ~/.local/bin
curl -sLo bead https://github.com/e3krisztian/bead/releases/download/v0.8.1/bead
# make executable
chmod +x bead

At the end, you can check whether your installation was successful by typing bead version to the terminal, then it should show v0.8.1.

(source: https://stackoverflow.com/c/ceu-microdata/questions/18)

Make

Linux and Mac users don't have to install it. Windows users should follow the next steps:

  1. Install chocolatey

    We are going to install make through the package manager chocolatey, therefore first we have to install chocolatey. Follow the instructions on: chocolatey website

    • search for powershell in the windows start menu and run it as administrator

    • run the command in the field under the second point (install with powershell.exe)

  2. Install gnu-make

    • type in the powershell choco install make.

Last updated