Handbook
  • Welcome at MicroData!
  • Code of conduct
  • Onboarding
    • Checklist
    • Setup
    • Using the terminal
    • Git and GitHub
    • Server
    • Bead
    • Working with data
      • Storing CAT3 data
    • Best practices
    • Stata style guide
    • Project management
  • Tools
    • Datasets
    • Tools
    • How to work on server
      • PostgreSQL
    • Make
      • Make in Windows
    • Julia
    • Jupyter Notebook
    • Csvkit
    • Release
  • about us
    • People
    • Projects
Powered by GitBook
On this page
  • The Bash Shell
  • Git
  • Text Editor
  • Stata
  • Python 3
  • Bead
  • Make

Was this helpful?

  1. Onboarding

Setup

PreviousChecklistNextUsing the terminal

Last updated 3 years ago

Was this helpful?

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 .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: . 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.

  1. Download the Git for Windows .

  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.

The default shell is usually Bash, but if your machine is set up differently you can run it by opening a terminal and typing bash. There is no need to install anything.

Git

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

If Git is not already available on your machine you can try to install it via your distro's package manager. For Debian/Ubuntu run sudo apt-get install git and for Fedora run sudo dnf install git.

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

      • if yes, go to next step

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.

nano is a basic editor and the default that instructors use in the workshop. It should be pre-installed.

Stata

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.

  1. Download and launch the installer: Stata17.dmg

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

  3. Choose version StataMP.

  4. Enter the serial number provided and press enter.

  5. Enter the code and press enter.

  6. Enter the authorization and press enter.

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

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

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

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

  1. Download Stata17Linux64.tar.gz.

  2. Open a terminal and navigate to the directory where your downloaded file is located (e.g. cd ~/Downloads/)

  3. Get superuser rights (sudo su)

  4. Create a new directory (e.g. mkdir stata_install)

  5. Move the downloaded file to this new directory (mv Stata17Linux64.tar.gz. stata_install/)

  6. Enter the directory (cd stata_install)

  7. Extract the installation files using tar xzf Stata17Linux64.tar.gz

  8. Create a directory for your stata installation (mkdir /usr/local/stata17)

  9. Navigate to the stata directory (cd /usr/local/stata17)

  10. Start the installation by executing the extracted install file (e.g. /home/username/Downloads/stata_install/install)

  11. Choose version StataMP.

  12. Whenever the installer asks if you want to proceed type “y” and press enter

  13. Once the installation is done, type ./stinit to activate your licence

  14. Whenever it asks you if you want to continue, type “Y” and press enter

  15. Enter the serial number provided and press enter

  16. Enter the code and press enter

  17. Enter the authorization and press enter

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

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

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

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

  22. Try to start stata by ./xstata. If it gives you the following error message (./stata: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory), continue with the steps below:

Issue the following commands one by one in your terminal window: apt-get install zlib1g-dev wget http://mirrors.kernel.org/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb dpkg -i libpng12-0_1.2.54-1ubuntu1_amd64.deb

Python 3

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. 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.

Make

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

  1. Install chocolatey

    • 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.

The default shell in all versions of macOS is Bash, so no need to install anything. You access Bash from the Terminal (found in /Applications/Utilities). See the Git installation for an example on how to open the Terminal. You may want to keep Terminal in your dock.

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 . You will need a .

You will need an account at 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 provided at GitHub.

For OS X 10.9 and higher, install Git for Mac by downloading and running the most recent "mavericks" installer from . Because this installer is not signed by the developer, you may have to right click (control click) on the .pkg file, click Open, and click Open on the pop up window. After installing Git, there will not be anything in your /Applications folder, as Git is a command line program. For older versions of OS X (10.5-10.8) use the most recent available installer labelled "snow-leopard" .

if no, create a new one and

to your github account

Download (recommended git client)

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

nano is a basic editor and the default that we use. See the Git installation for an example on how to open nano. It should be pre-installed.

Other editors that you can use are or .

Other editors that you can use are , or .

In MicroData we use the statistical package , 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.

Go to

Go to

Go to

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

Download latest version from

(source: )

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

Configuration Problems and Solutions wiki page
https://github.com/ceumicrodata/handbook/blob/master/post_install.sh
Video Tutorial
installer
video tutorial
github.com
supported web browser
github.com
instructions for keeping your email address private
Video Tutorial
this list
available here
add to ssh agent
Add new SSH key
Sublime Merge
Notepad++
Sublime Text
video tutorial
BBEdit
Sublime Text
Gedit
Kate
Sublime Text
Stata
™
https://download.stata.com/download/
https://download.stata.com/download/
https://download.stata.com/download/
Python's official page
https://github.com/e3krisztian/bead/releases/tag/v0.8.1
https://stackoverflow.com/c/ceu-microdata/questions/18
chocolatey website