diff --git a/index.html b/index.html index cd7e6af..fd0ba75 100644 --- a/index.html +++ b/index.html @@ -197,5 +197,5 @@

Installation Guide

diff --git a/python-more/index.html b/python-more/index.html index 9252861..f2b2e2a 100644 --- a/python-more/index.html +++ b/python-more/index.html @@ -157,7 +157,7 @@

Additional Python packages

Press enter to accept the proposed package plan with 'y' and return.

This command installs those two packages into the default (base) environment. It is fine, as we would like those to be shared across all environments we later create. However, it is generally not the case, as we want dependencies for our different projects well separated. For example, packages for this course should be wholly independent from packages you are using to write a paper. The next command creates a conda environment called pp4rs and installs all the packages required for the course. It might take a while.

-
    conda env create -f https://pp4rs.github.io/2024-uzh-installation-guide/assets/pp4rs-environment.yml
+
    conda env create -f https://pp4rs.github.io/2024-uzh-installation-guide/assets/pp4rs_environment.yml
 

Generally, you should have such a file for each of your projects in order to easily reproduce the environment it was built in any time in the future.

diff --git a/search/search_index.json b/search/search_index.json index 6fd7e34..1790510 100644 --- a/search/search_index.json +++ b/search/search_index.json @@ -1 +1 @@ -{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"Installation Guide These pages should help you to get started setting up the computing environment on your machine ready for the course \"Programming Practices for Research in Economics\" at the University of Zurich in Fall 2024 . Please attempt to install necessary software and packages prior to the beginning of the course. If everything goes smoothly, you should be able to complete the installation in one sitting which should take about 2 hours. Please follow the steps one-by-one in the order they appear on the sidebar and do not deviate from them, unless you really know what you are doing. If you find any outdated links or unclear descriptions, message us in Teams so that we can update the instructions or clarify as needed. Where necessary, we have provided instructions for Mac, Windows and Linux machines. Department Managed Laptops The department has stopped to provide users with admin rights for their laptops. Anyone using one of those laptops won't be able to do run many of the commands used in this installation guide. We provide alternative solutions for installation and highlight those throughout the guide with notes like this. If there aren't any special notes for your device, just follow the normal installation guide. Installation Help We will provide installation help for learners struggling to set up their machines. Check the Schedule for details.","title":"Welcome"},{"location":"#installation-guide","text":"These pages should help you to get started setting up the computing environment on your machine ready for the course \"Programming Practices for Research in Economics\" at the University of Zurich in Fall 2024 . Please attempt to install necessary software and packages prior to the beginning of the course. If everything goes smoothly, you should be able to complete the installation in one sitting which should take about 2 hours. Please follow the steps one-by-one in the order they appear on the sidebar and do not deviate from them, unless you really know what you are doing. If you find any outdated links or unclear descriptions, message us in Teams so that we can update the instructions or clarify as needed. Where necessary, we have provided instructions for Mac, Windows and Linux machines. Department Managed Laptops The department has stopped to provide users with admin rights for their laptops. Anyone using one of those laptops won't be able to do run many of the commands used in this installation guide. We provide alternative solutions for installation and highlight those throughout the guide with notes like this. If there aren't any special notes for your device, just follow the normal installation guide. Installation Help We will provide installation help for learners struggling to set up their machines. Check the Schedule for details.","title":"Installation Guide"},{"location":"CONDUCT/","text":"Contributor Code of Conduct As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities. We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion. Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers. This Code of Conduct is adapted from the Contributor Covenant (http://contributor-covenant.org), version 1.0.0, available at http://contributor-covenant.org/version/1/0/0/","title":"Contributor Code of Conduct"},{"location":"CONDUCT/#contributor-code-of-conduct","text":"As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities. We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion. Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers. This Code of Conduct is adapted from the Contributor Covenant (http://contributor-covenant.org), version 1.0.0, available at http://contributor-covenant.org/version/1/0/0/","title":"Contributor Code of Conduct"},{"location":"CONTRIBUTING/","text":"Contributing Programming Practices for Research in Students is an open source project, and we welcome contributions of all kinds: new lessons, fixes to existing material, bug reports, and reviews of proposed changes are all welcome. Contributor Agreement By contributing, you agree that we may redistribute your work under our license . In exchange, we will address your issues and/or assess your change proposal as promptly as we can, and help you become a member of our community. Everyone involved agrees to abide by our code of conduct . Using GitHub If you choose to contribute via GitHub, you may want to look at How to Contribute to an Open Source Project on GitHub . To manage changes, we follow GitHub flow . Each lesson has one or two maintainers who review issues and pull requests or encourage others to do so. The maintainers have final say over what gets merged into the lesson. To use the web interface for contributing to a lesson: Fork the originating repository to your GitHub profile. Within your version of the forked repository, move to the master branch and create a new branch for each significant change being made. Navigate to the file(s) you wish to change within the new branches and make revisions as required. Commit all changed files within the appropriate branches. Create individual pull requests from each of your changed branches to the master branch within the originating repository. If you receive feedback, make changes using your issue-specific branches of the forked repository and the pull requests will update automatically. Repeat as needed until all feedback has been addressed. When starting work, please make sure your clone of the originating master branch is up-to-date before creating your own revision-specific branch(es) from there. Additionally, please only work from your newly-created branch(es) and not your clone of the originating master branch. Lastly, published copies of all the lessons are available in the master branch of the originating repository for reference while revising.","title":"Contributing"},{"location":"CONTRIBUTING/#contributing","text":"Programming Practices for Research in Students is an open source project, and we welcome contributions of all kinds: new lessons, fixes to existing material, bug reports, and reviews of proposed changes are all welcome.","title":"Contributing"},{"location":"CONTRIBUTING/#contributor-agreement","text":"By contributing, you agree that we may redistribute your work under our license . In exchange, we will address your issues and/or assess your change proposal as promptly as we can, and help you become a member of our community. Everyone involved agrees to abide by our code of conduct .","title":"Contributor Agreement"},{"location":"CONTRIBUTING/#using-github","text":"If you choose to contribute via GitHub, you may want to look at How to Contribute to an Open Source Project on GitHub . To manage changes, we follow GitHub flow . Each lesson has one or two maintainers who review issues and pull requests or encourage others to do so. The maintainers have final say over what gets merged into the lesson. To use the web interface for contributing to a lesson: Fork the originating repository to your GitHub profile. Within your version of the forked repository, move to the master branch and create a new branch for each significant change being made. Navigate to the file(s) you wish to change within the new branches and make revisions as required. Commit all changed files within the appropriate branches. Create individual pull requests from each of your changed branches to the master branch within the originating repository. If you receive feedback, make changes using your issue-specific branches of the forked repository and the pull requests will update automatically. Repeat as needed until all feedback has been addressed. When starting work, please make sure your clone of the originating master branch is up-to-date before creating your own revision-specific branch(es) from there. Additionally, please only work from your newly-created branch(es) and not your clone of the originating master branch. Lastly, published copies of all the lessons are available in the master branch of the originating repository for reference while revising.","title":"Using GitHub"},{"location":"acknowledgement/","text":"Acknowledgements This edition of Programming Practices is based on the previous versions of the course: 2017 edition , by Lachlan Deer, Adrian Etter, Julian Langer & Max Winkler 2018 edition , by Ulrich Bergmann, Ursina Schaede, Dora Simon, Carlo Zanella & Christian Zuend 2019 Foundations edition , by Lachlan Deer & Julian Langer 2020 edition , by Ulrich Bergmann, Matteo Courthoud & Lachlan Deer 2021 edition , by Lachlan Deer, Julian Langer, Lexi Schubert, Martin Stancsics 2022 edition , by Lachlan Deer, Julian Langer, Martin Stancsics It is designed after and borrows a lot from: Effective Programming Practices for Economists , a course by Hans-Martin von Gaudecker Software Carpentry's Managing Software Research Projects lesson Data Science for Economists , a course by Grant McDermott","title":"Acknowledgements"},{"location":"acknowledgement/#acknowledgements","text":"This edition of Programming Practices is based on the previous versions of the course: 2017 edition , by Lachlan Deer, Adrian Etter, Julian Langer & Max Winkler 2018 edition , by Ulrich Bergmann, Ursina Schaede, Dora Simon, Carlo Zanella & Christian Zuend 2019 Foundations edition , by Lachlan Deer & Julian Langer 2020 edition , by Ulrich Bergmann, Matteo Courthoud & Lachlan Deer 2021 edition , by Lachlan Deer, Julian Langer, Lexi Schubert, Martin Stancsics 2022 edition , by Lachlan Deer, Julian Langer, Martin Stancsics It is designed after and borrows a lot from: Effective Programming Practices for Economists , a course by Hans-Martin von Gaudecker Software Carpentry's Managing Software Research Projects lesson Data Science for Economists , a course by Grant McDermott","title":"Acknowledgements"},{"location":"citation-license/","text":"License Material is licensed under a CC-BY-SA license. Further information is available at our course homepage Suggested Citation Lachlan Deer, Julian Langer, Martin Stancsics and Julius Sch\u00e4per, 2023, Installation Guide , Programming Practices for Research in Economics, University of Zurich","title":"Citation & License"},{"location":"citation-license/#license","text":"Material is licensed under a CC-BY-SA license. Further information is available at our course homepage","title":"License"},{"location":"citation-license/#suggested-citation","text":"Lachlan Deer, Julian Langer, Martin Stancsics and Julius Sch\u00e4per, 2023, Installation Guide , Programming Practices for Research in Economics, University of Zurich","title":"Suggested Citation"},{"location":"commandLine/","text":"Command Line Tools A command-line interface or command language interpreter (CLI), also known as a terminal, is a means of interacting with a computer program where the user issues commands to the program in the form of successive lines of text. Throughout the course we will emphasize use of the terminal and executing commands within it as our modus operandi. Mac Users A command line interface comes already installed with OSX. You will need to install some other software from the terminal throughout the course, so it will be useful to install some additional \"command line tools\" now. Opening a Terminal Session To open a terminal session: Open spotlight with cmd + space Type in 'terminal' When the terminal appears, open it. Department Managed Macs Unfortunately, installation of Homebrew requires admin rights which aren't available on laptops newly issued by the department. Please move on to the next installation step Text Editor . Installing the X-code Tools We want to install 'X-code command line tools'. Copy and paste the following and press Return sudo xcode-select --install If you get a message that the command line tools are already installed, you can continue to the next step. Installing Homebrew Package Manager Homebrew is a package manager for Mac. Install Homebrew by opening a terminal and pasting the following command: /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\" Verify that Homebrew installed correctly, enter the following into your terminal: brew doctor And you should see the following output: Your system is ready to brew Before continuing, lets be sure everything in Homebrew is up to date by entering the following: brew upgrade brew upgrade on UZH MacOS We've seen some problems running brew upgrade on UZH computers with MacOS. If you are experiencing this, run the following two lines: sudo chown -R \"$USER\":admin/usr/local/Cellar and sudo chown -R \"$USER\":admin/usr/local/share Windows Users On Windows we will be using \"winget\" for most of our installations. Winget Installation Winget is part of Microsoft's App Installer which you can get here . Follow the link and install the application from the Microsoft Store. On machines managed by the department you might get a \"failure\" pop up, but just wait, it will install. After installation, open the Windows Search Bar and type \"cmd\" and hit return . This will open the Command Line Interface (CLI) of Windows with which we will be working during this course. Now type the following command into the CLI and press return winget --help Upon succesful installation, you should see a long this of possible command that \"winget\" can be supplied with. It should start like this: Windows Package Manager v1.5.2201 Copyright (c) Microsoft Corporation. All rights reserved. Feel free to try some commands such as \"list\" to see which programs are installed on your machine. Windows Terminal Installation In order work more comfortably with the CLI we will install a better version of the CLI you just used. To install \"Windows Terminal\" copy and paste the following command and accept the EULA when prompted, by typing 'yes' and hitting return : winget install -e --id Microsoft.WindowsTerminal Here, install tells winget which action it is supposed to take and \"--id\" is a flag providing winget with further information. In this case the id of the program we want to install and \"-e\" tell it to only use exactly this id. You would have been able to find this \"id\" by running the command: winget search WindowsTerminal Head over to the search in Windows and type \"terminal\" and hit return to open the WindowsTerminal. We will continue installations there.","title":"Command Line Tools"},{"location":"commandLine/#command-line-tools","text":"A command-line interface or command language interpreter (CLI), also known as a terminal, is a means of interacting with a computer program where the user issues commands to the program in the form of successive lines of text. Throughout the course we will emphasize use of the terminal and executing commands within it as our modus operandi.","title":"Command Line Tools"},{"location":"commandLine/#mac-users","text":"A command line interface comes already installed with OSX. You will need to install some other software from the terminal throughout the course, so it will be useful to install some additional \"command line tools\" now.","title":"Mac Users"},{"location":"commandLine/#opening-a-terminal-session","text":"To open a terminal session: Open spotlight with cmd + space Type in 'terminal' When the terminal appears, open it. Department Managed Macs Unfortunately, installation of Homebrew requires admin rights which aren't available on laptops newly issued by the department. Please move on to the next installation step Text Editor .","title":"Opening a Terminal Session"},{"location":"commandLine/#installing-the-x-code-tools","text":"We want to install 'X-code command line tools'. Copy and paste the following and press Return sudo xcode-select --install If you get a message that the command line tools are already installed, you can continue to the next step.","title":"Installing the X-code Tools"},{"location":"commandLine/#installing-homebrew-package-manager","text":"Homebrew is a package manager for Mac. Install Homebrew by opening a terminal and pasting the following command: /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\" Verify that Homebrew installed correctly, enter the following into your terminal: brew doctor And you should see the following output: Your system is ready to brew Before continuing, lets be sure everything in Homebrew is up to date by entering the following: brew upgrade brew upgrade on UZH MacOS We've seen some problems running brew upgrade on UZH computers with MacOS. If you are experiencing this, run the following two lines: sudo chown -R \"$USER\":admin/usr/local/Cellar and sudo chown -R \"$USER\":admin/usr/local/share","title":"Installing Homebrew Package Manager"},{"location":"commandLine/#windows-users","text":"On Windows we will be using \"winget\" for most of our installations.","title":"Windows Users"},{"location":"commandLine/#winget-installation","text":"Winget is part of Microsoft's App Installer which you can get here . Follow the link and install the application from the Microsoft Store. On machines managed by the department you might get a \"failure\" pop up, but just wait, it will install. After installation, open the Windows Search Bar and type \"cmd\" and hit return . This will open the Command Line Interface (CLI) of Windows with which we will be working during this course. Now type the following command into the CLI and press return winget --help Upon succesful installation, you should see a long this of possible command that \"winget\" can be supplied with. It should start like this: Windows Package Manager v1.5.2201 Copyright (c) Microsoft Corporation. All rights reserved. Feel free to try some commands such as \"list\" to see which programs are installed on your machine.","title":"Winget Installation"},{"location":"commandLine/#windows-terminal-installation","text":"In order work more comfortably with the CLI we will install a better version of the CLI you just used. To install \"Windows Terminal\" copy and paste the following command and accept the EULA when prompted, by typing 'yes' and hitting return : winget install -e --id Microsoft.WindowsTerminal Here, install tells winget which action it is supposed to take and \"--id\" is a flag providing winget with further information. In this case the id of the program we want to install and \"-e\" tell it to only use exactly this id. You would have been able to find this \"id\" by running the command: winget search WindowsTerminal Head over to the search in Windows and type \"terminal\" and hit return to open the WindowsTerminal. We will continue installations there.","title":"Windows Terminal Installation"},{"location":"contact/","text":"Contact Us Questions or Comments Please contact us via email: pp4rs@econ.uzh.ch with the title \"Installation Guide: Programming Practices for Research in Economics.\" We look forward to hearing from you if you have questions about the installation guide, found this installation guide useful, or have further comments or suggestions to improve it. Programming Practices Team Programming Practices for Research in Economics was created by Lachlan Deer Adrian Etter Julian Langer Max Winkler at the Department of Economics, University of Zurich in 2016. This installation guide is for the 2023 edition, conducted by Martin Stanscics Julius Sch\u00e4per","title":"Contact Us"},{"location":"contact/#contact-us","text":"","title":"Contact Us"},{"location":"contact/#questions-or-comments","text":"Please contact us via email: pp4rs@econ.uzh.ch with the title \"Installation Guide: Programming Practices for Research in Economics.\" We look forward to hearing from you if you have questions about the installation guide, found this installation guide useful, or have further comments or suggestions to improve it.","title":"Questions or Comments"},{"location":"contact/#programming-practices-team","text":"Programming Practices for Research in Economics was created by Lachlan Deer Adrian Etter Julian Langer Max Winkler at the Department of Economics, University of Zurich in 2016. This installation guide is for the 2023 edition, conducted by Martin Stanscics Julius Sch\u00e4per","title":"Programming Practices Team"},{"location":"finish-line/","text":"Installation Guide Complete Congrats! You've made it to the end of the Installation Guide. See you in class soon!","title":"The Finish Line!"},{"location":"finish-line/#installation-guide-complete","text":"Congrats! You've made it to the end of the Installation Guide. See you in class soon!","title":"Installation Guide Complete"},{"location":"gitInstall/","text":"Installing Git and Setting Up Accounts Git is a Version Control System (VCS) that has gained a lot of traction among the programming community. We will want to use version control to keep track of the files we write, and the changes we make to them. Account Creation During the course we will show you how to use GitHub to host some of your work and do code related project management. You will need to set up an account: Please register for a GitHub account When choosing a username we recommend not using a name that includes an employer or university in case you move later on i.e. 'johnsmith' or 'johnsmith86' are OK, 'johnsmithUZH' probably not Mac Users Department Managed Macs Git should already be install via \"xcode\". If it isn't, look for 'Software Update' in your System Settings and update \"xcode\". Verify your installation. . We will install Git using Homebrew. Enter the following lines of code into your terminal: brew install git brew link --force git Then close and reopen the terminal. Now Verify your installation . Linux Users Git should be installed already for you. To check if it is, enter the following in a terminal: git --version If you get a bunch of numbers (ideally starting with 2.15) or higher - you are good to move on. If not, install it by entering the following into the command line: sudo apt-get install git Once complete, verify your install . Windows Users Install git via the WindowsTerminal with the following command: winget install -e --id Git.Git --interactive Accept all defaults, apart from: Default Editor: Choose Visual Studio Code in the drop down menu Once installation is complete, restart WindowsTerminal and verify your install . Verifying your install To verify your installation, type the following command in a terminal and press the return key: git --version You should get an output that looks like: git version 2.25.1 Ensure that you have a version greater than 2.15.0 installed.","title":"Git"},{"location":"gitInstall/#installing-git-and-setting-up-accounts","text":"Git is a Version Control System (VCS) that has gained a lot of traction among the programming community. We will want to use version control to keep track of the files we write, and the changes we make to them.","title":"Installing Git and Setting Up Accounts"},{"location":"gitInstall/#account-creation","text":"During the course we will show you how to use GitHub to host some of your work and do code related project management. You will need to set up an account: Please register for a GitHub account When choosing a username we recommend not using a name that includes an employer or university in case you move later on i.e. 'johnsmith' or 'johnsmith86' are OK, 'johnsmithUZH' probably not","title":"Account Creation"},{"location":"gitInstall/#mac-users","text":"Department Managed Macs Git should already be install via \"xcode\". If it isn't, look for 'Software Update' in your System Settings and update \"xcode\". Verify your installation. . We will install Git using Homebrew. Enter the following lines of code into your terminal: brew install git brew link --force git Then close and reopen the terminal. Now Verify your installation .","title":"Mac Users"},{"location":"gitInstall/#linux-users","text":"Git should be installed already for you. To check if it is, enter the following in a terminal: git --version If you get a bunch of numbers (ideally starting with 2.15) or higher - you are good to move on. If not, install it by entering the following into the command line: sudo apt-get install git Once complete, verify your install .","title":"Linux Users"},{"location":"gitInstall/#windows-users","text":"Install git via the WindowsTerminal with the following command: winget install -e --id Git.Git --interactive Accept all defaults, apart from: Default Editor: Choose Visual Studio Code in the drop down menu Once installation is complete, restart WindowsTerminal and verify your install .","title":"Windows Users"},{"location":"gitInstall/#verifying-your-install","text":"To verify your installation, type the following command in a terminal and press the return key: git --version You should get an output that looks like: git version 2.25.1 Ensure that you have a version greater than 2.15.0 installed.","title":"Verifying your install"},{"location":"latex/","text":"LaTeX LaTeX is a document preparation system for high-quality typesetting most often used for medium-to-large technical or scientific documents. Most of you probably have some familiarity with LaTeX from your Master's Theses. We may want to build some PDF documents throughout the course using LaTeX - so let's install it. Department Managed Laptops Latex can be install from the Software Center. Search for \"Mactex\" on Mac and \"TeXLive\" won Windows and install the most recent version. LaTeX Install for Mac We again install from Homebrew. Enter the following into the terminal: brew install --cask mactex LaTeX Install for Linux LaTeX can be installed from the terminal by entering the following command and pressing Return : sudo apt-get install texlive-latex-extra Check everything went according to plan: tex --version which gives the following output: TeX 3.141592653 (TeX Live 2021) kpathsea version 6.3.3 Copyright 2021 D.E. Knuth. There is NO warranty. Redistribution of this software is covered by the terms of both the TeX copyright and the Lesser GNU General Public License. For more information about these matters, see the file named COPYING and the TeX source. Primary author of TeX: D.E. Knuth. LaTeX Install for Windows Unfortunately, we can't use winget for installation. Please download the TeXLive Exe and run it. Follow the instructions given.","title":"LaTeX"},{"location":"latex/#latex","text":"LaTeX is a document preparation system for high-quality typesetting most often used for medium-to-large technical or scientific documents. Most of you probably have some familiarity with LaTeX from your Master's Theses. We may want to build some PDF documents throughout the course using LaTeX - so let's install it. Department Managed Laptops Latex can be install from the Software Center. Search for \"Mactex\" on Mac and \"TeXLive\" won Windows and install the most recent version.","title":"LaTeX"},{"location":"latex/#latex-install-for-mac","text":"We again install from Homebrew. Enter the following into the terminal: brew install --cask mactex","title":"LaTeX Install for Mac"},{"location":"latex/#latex-install-for-linux","text":"LaTeX can be installed from the terminal by entering the following command and pressing Return : sudo apt-get install texlive-latex-extra Check everything went according to plan: tex --version which gives the following output: TeX 3.141592653 (TeX Live 2021) kpathsea version 6.3.3 Copyright 2021 D.E. Knuth. There is NO warranty. Redistribution of this software is covered by the terms of both the TeX copyright and the Lesser GNU General Public License. For more information about these matters, see the file named COPYING and the TeX source. Primary author of TeX: D.E. Knuth.","title":"LaTeX Install for Linux"},{"location":"latex/#latex-install-for-windows","text":"Unfortunately, we can't use winget for installation. Please download the TeXLive Exe and run it. Follow the instructions given.","title":"LaTeX Install for Windows"},{"location":"pandoc/","text":"Pandoc Pandoc is an extremely useful 'swiss army knife' for converting between different types of markup languages from the command line. For example, it readily builds PDFs with latex, and markdown - both of which are heavily used in academic research. Department Managed Laptops Admin User rights are required to install Pandoc. Unfortunately, only IT has those. Hence Pandoc can't be installed. Note We do not actively teach how to use Pandoc in the course - but we will utilize it in some lessons where we produce PDF, Word or HTML output from plain text files. Pandoc Install for Mac In a terminal window and type: brew install pandoc Now verify your install . Pandoc Install for Linux Open a terminal window and type sudo apt install pandoc to install pandoc from the command line. Now verify your install . Pandoc Install for Windows Open the terminal an run: winget install -e --id JohnMacFarlane.Pandoc Now verify your install . Verify Pandoc Install Verify your install by typing the following into a command line: pandoc --version The expected output starts with the following information: pandoc 2.x Ensure you have at least version 2.1.1 installed.","title":"Pandoc"},{"location":"pandoc/#pandoc","text":"Pandoc is an extremely useful 'swiss army knife' for converting between different types of markup languages from the command line. For example, it readily builds PDFs with latex, and markdown - both of which are heavily used in academic research. Department Managed Laptops Admin User rights are required to install Pandoc. Unfortunately, only IT has those. Hence Pandoc can't be installed. Note We do not actively teach how to use Pandoc in the course - but we will utilize it in some lessons where we produce PDF, Word or HTML output from plain text files.","title":"Pandoc"},{"location":"pandoc/#pandoc-install-for-mac","text":"In a terminal window and type: brew install pandoc Now verify your install .","title":"Pandoc Install for Mac"},{"location":"pandoc/#pandoc-install-for-linux","text":"Open a terminal window and type sudo apt install pandoc to install pandoc from the command line. Now verify your install .","title":"Pandoc Install for Linux"},{"location":"pandoc/#pandoc-install-for-windows","text":"Open the terminal an run: winget install -e --id JohnMacFarlane.Pandoc Now verify your install .","title":"Pandoc Install for Windows"},{"location":"pandoc/#verify-pandoc-install","text":"Verify your install by typing the following into a command line: pandoc --version The expected output starts with the following information: pandoc 2.x Ensure you have at least version 2.1.1 installed.","title":"Verify Pandoc Install"},{"location":"path-setting/","text":"Making Path Settings Permanent For our workflow be be command line driven, we need to be able to call software from the command line. Whilst much of the software we have installed as automatically made this possible, it is not universally the case. Here we will make the extra few changes we need to complete the installation guide. Windows Users (for Windows 8 and 10) You will need local administration rights for your computer, but you should have these on your personal computers or ones owned by the Department. Right-click on Computer. Then go to \"Properties\" and select the tab \"Advanced System settings\". Choose \"Environment Variables\" and select \"Path\" from the list of system variables. Choose \u201cEdit\u201d and append (i.e., do not overwrite the previous value): ;C:\\Path\\to\\program.exe to the variable value \u2013 make sure the rest remains as it is and do not include spaces between the \";\" and the text. Click on OK as often as needed. If you accepted all defaults during your installation, and didn't have any other non-default setting prior to starting this guide, modifying the following string, with your relevant username should work: ;C:\\Users\\ldeer\\AppData\\Local\\atom\\bin ;C:\\Program Files\\Git\\bin ;C:\\Program Files\\R\\R-3.X.X\\bin ; Mac Users (Slight Modifications for Linux Users) You will need to add a line to the file \".bash_profile\" or potentially create the file if it didn't already exist. This file lives in your home directory and it is hidden from your view by default. We now provide a guide of how to create / adjust this file using a tiny editor called nano, if you are familiar with editing text files, just use your editor of choice. Open a Terminal and type: nano ~/.bash_profile If .bash_profile already existed, you will see some text at this point. If so, use the arrow keys to scroll all the way to the bottom of the file. Add the following line at the end of the file: export PATH=\"${PATH}:/path/to/program/inside/package\" for each program we need to make accessible. For example to make matlab accessible from the command line: export PATH=\"${PATH}:/Applications/MATLAB_R2016a.app/bin/matlab Please do this for the following software: Sublime Text Git Matlab R Once you have finished, press Return and then ctrl+o (= WriteOut = save) and Return once more. Your default locale settings may conflict with some of the programs we'll need. If you want to be on the safe side, add these lines to your .bash_profile file: export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 Thanks for Hans-Martin von Gaudecker, and in turn Matthias Bannert for the tip on locale settings. Linux users : For most distributions, everything here applies to the file .bashrc instead of .bash_profile. The End Well done - it's time for a beer, or some other cold beverage to celebrate completing this guide.","title":"Making Path Settings Permanent"},{"location":"path-setting/#making-path-settings-permanent","text":"For our workflow be be command line driven, we need to be able to call software from the command line. Whilst much of the software we have installed as automatically made this possible, it is not universally the case. Here we will make the extra few changes we need to complete the installation guide.","title":"Making Path Settings Permanent"},{"location":"path-setting/#windows-users-for-windows-8-and-10","text":"You will need local administration rights for your computer, but you should have these on your personal computers or ones owned by the Department. Right-click on Computer. Then go to \"Properties\" and select the tab \"Advanced System settings\". Choose \"Environment Variables\" and select \"Path\" from the list of system variables. Choose \u201cEdit\u201d and append (i.e., do not overwrite the previous value): ;C:\\Path\\to\\program.exe to the variable value \u2013 make sure the rest remains as it is and do not include spaces between the \";\" and the text. Click on OK as often as needed. If you accepted all defaults during your installation, and didn't have any other non-default setting prior to starting this guide, modifying the following string, with your relevant username should work: ;C:\\Users\\ldeer\\AppData\\Local\\atom\\bin ;C:\\Program Files\\Git\\bin ;C:\\Program Files\\R\\R-3.X.X\\bin ;","title":"Windows Users (for Windows 8 and 10)"},{"location":"path-setting/#mac-users-slight-modifications-for-linux-users","text":"You will need to add a line to the file \".bash_profile\" or potentially create the file if it didn't already exist. This file lives in your home directory and it is hidden from your view by default. We now provide a guide of how to create / adjust this file using a tiny editor called nano, if you are familiar with editing text files, just use your editor of choice. Open a Terminal and type: nano ~/.bash_profile If .bash_profile already existed, you will see some text at this point. If so, use the arrow keys to scroll all the way to the bottom of the file. Add the following line at the end of the file: export PATH=\"${PATH}:/path/to/program/inside/package\" for each program we need to make accessible. For example to make matlab accessible from the command line: export PATH=\"${PATH}:/Applications/MATLAB_R2016a.app/bin/matlab Please do this for the following software: Sublime Text Git Matlab R Once you have finished, press Return and then ctrl+o (= WriteOut = save) and Return once more. Your default locale settings may conflict with some of the programs we'll need. If you want to be on the safe side, add these lines to your .bash_profile file: export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 Thanks for Hans-Martin von Gaudecker, and in turn Matthias Bannert for the tip on locale settings. Linux users : For most distributions, everything here applies to the file .bashrc instead of .bash_profile.","title":"Mac Users (Slight Modifications for Linux Users)"},{"location":"path-setting/#the-end","text":"Well done - it's time for a beer, or some other cold beverage to celebrate completing this guide.","title":"The End"},{"location":"python-more/","text":"Additional Python packages Miniforge is a very streamlined Python Distribution containing only the most necessary packages. In addition to these, there are many other packages we need to do scientific computing. We will install those in this section of the guide. Note Miniforge (also Mambaforge, Miniconda) is based on the Anaconda Python Distribution, which includes a large number of packages related to scientific computing by default. However, it also means, that it is rather large, and many of those packages are of no interest to most economists. (If you're interested in all the packages included, click here and go to the Python 3.9 tab.) For this reason, start from a barebones distribution and only install what we require instead. The following recipe works for all operating systems. There are a multitude of package management tools that work with Python packages. In this course, we use conda , which is the default one for Anaconda-based Python distributions. It combines dependency management and virtual environments in one program. Furthermore, it is designed with the scientific workflow in mind. For those packages that are not available in the conda repositories, we fall back to pip , Python's standard package manager. Note Mixing conda and pip is generally advised against, but sometimes it cannot be avoided. However, by using conda first and pip second, and utilizing virtual environments, you are mostly safe. You can find more info here . First let us update conda by typing the following into the terminal conda update conda --yes Next, install a handful of packages using the following command conda install numpy pandas Press enter to accept the proposed package plan with 'y' and return . This command installs those two packages into the default (base) environment. It is fine, as we would like those to be shared across all environments we later create. However, it is generally not the case, as we want dependencies for our different projects well separated. For example, packages for this course should be wholly independent from packages you are using to write a paper. The next command creates a conda environment called pp4rs and installs all the packages required for the course. It might take a while. conda env create -f https://pp4rs.github.io/2024-uzh-installation-guide/assets/pp4rs-environment.yml Generally, you should have such a file for each of your projects in order to easily reproduce the environment it was built in any time in the future. Note You can find more info on how to create such environment specifications here Now it is time to test your Python installation. Type into your shell the following conda activate pp4rs_backup You should now see that the CLI says (pp4rs_backup) in the beginning. To see which packages are install in this new pp4rs environment, run: conda list It should return a list with all of the packages that are installed in the pp4rs_backup environment. In order to use them, you will need to activate this environment in the beginning of every new shell session. You can always see which environment you are currently using, by looking at the beginning of the prompt in your terminal. If you open a new terminal it will say (base) , meaning your base environment. To use the pp4rs environment, you need to activate it.","title":"Python Extras"},{"location":"python-more/#additional-python-packages","text":"Miniforge is a very streamlined Python Distribution containing only the most necessary packages. In addition to these, there are many other packages we need to do scientific computing. We will install those in this section of the guide. Note Miniforge (also Mambaforge, Miniconda) is based on the Anaconda Python Distribution, which includes a large number of packages related to scientific computing by default. However, it also means, that it is rather large, and many of those packages are of no interest to most economists. (If you're interested in all the packages included, click here and go to the Python 3.9 tab.) For this reason, start from a barebones distribution and only install what we require instead. The following recipe works for all operating systems. There are a multitude of package management tools that work with Python packages. In this course, we use conda , which is the default one for Anaconda-based Python distributions. It combines dependency management and virtual environments in one program. Furthermore, it is designed with the scientific workflow in mind. For those packages that are not available in the conda repositories, we fall back to pip , Python's standard package manager. Note Mixing conda and pip is generally advised against, but sometimes it cannot be avoided. However, by using conda first and pip second, and utilizing virtual environments, you are mostly safe. You can find more info here . First let us update conda by typing the following into the terminal conda update conda --yes Next, install a handful of packages using the following command conda install numpy pandas Press enter to accept the proposed package plan with 'y' and return . This command installs those two packages into the default (base) environment. It is fine, as we would like those to be shared across all environments we later create. However, it is generally not the case, as we want dependencies for our different projects well separated. For example, packages for this course should be wholly independent from packages you are using to write a paper. The next command creates a conda environment called pp4rs and installs all the packages required for the course. It might take a while. conda env create -f https://pp4rs.github.io/2024-uzh-installation-guide/assets/pp4rs-environment.yml Generally, you should have such a file for each of your projects in order to easily reproduce the environment it was built in any time in the future. Note You can find more info on how to create such environment specifications here Now it is time to test your Python installation. Type into your shell the following conda activate pp4rs_backup You should now see that the CLI says (pp4rs_backup) in the beginning. To see which packages are install in this new pp4rs environment, run: conda list It should return a list with all of the packages that are installed in the pp4rs_backup environment. In order to use them, you will need to activate this environment in the beginning of every new shell session. You can always see which environment you are currently using, by looking at the beginning of the prompt in your terminal. If you open a new terminal it will say (base) , meaning your base environment. To use the pp4rs environment, you need to activate it.","title":"Additional Python packages"},{"location":"python/","text":"Python Conda is a pre-packaged Python distribution. It is mainly used as a package manager that enables simple creation of virtual enviroments for Python. More on this during the course. We will be installing either \"Miniforge\" or \"Miniconda\" for this course. Both can, for now, be regarded as equivalent. Some of you might have heard of \"Anaconda\". Anaconda is the bigger brother of Miniconda, but contains many packages we don't require. Installing Miniforge Python for Mac Open a new terminal and run the command corresponding to your processor: Apple Silicon Macs mkdir -p ~/miniconda3 curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh -o ~/miniconda3/miniconda.sh bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 rm -rf ~/miniconda3/miniconda.sh Intel Macs mkdir -p ~/miniconda3 curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o ~/miniconda3/miniconda.sh bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 rm -rf ~/miniconda3/miniconda.sh Initialization After installing (either versions of Mac), initialize your newly-installed Miniconda. The following commands initialize for bash and zsh shells: ~/miniconda3/bin/conda init bash ~/miniconda3/bin/conda init zsh Restart the terminal and then proceed to verify your install Installing Miniforge Python for Linux First, we need to download the Anaconda Bash Script (a file that will install things for us). Enter the following into the terminal: curl -L -O \"https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh\" Run the Anaconda Script by entering the following into the terminal: bash Miniforge3-$(uname)-$(uname -m).sh As this script runs through, review and accept the license agreement. To do this press Return until you reach the end, and type 'yes'. After you agree to the license, you will be prompted to choose the location of the installation: Miniforge3 will now be installed into this location: /home/lachlan/miniforge3 - Press ENTER to confirm the location - Press CTRL-C to abort the installation - Or specify a different location below [/home/lachlan/miniforge3] >>> Use the default. The installation will continue - it does take some time, so be patient. Once the installation is complete, you will get the following output, which asks a question of us: ... Preparing transaction: done Executing transaction: done installation finished. Do you wish the installer to initialize Miniforge3 by running conda init? [yes|no] Type 'yes'. Now we need to refresh our terminal settings, so type the following and press return: source ~/.bashrc Now proceed to verify your install . Installing Miniconda on Windows We are installing Miniconda via winget with the following command: winget install -e --id Anaconda.Miniconda3 --interactive Accept all defaults, except for 'Add Miniconda3 to my PATH environment variable' which needs to be checked. Restart the WindowsTerminal. After restarting the terminal, initialize your newly-installed Miniconda: conda init After restarting the WindowsTerminal once more, proceed to verify your install . Verifying Your Installation In order to activate Miniforge/Miniconda's environment, we have to start with conda activate Then, to verify that the correct version of Python has been installed, usually we would follow the programName --version logic from before. python --version which yields: Python 3.9.13 which tells us that Python is installed. But, because most operating systems these days have some additional version of Python installed, this doesn't guarantee that the Miniforge/Miniconda version is available for us to use from the terminal. To check, initiate Python by entering the following into a terminal and pressing Return : python You should now see something like: Python 3.9.13 | packaged by conda-forge | (main, May 27 2022, 16:56:21) [GCC 10.3.0] on linux Type \"help\", \"copyright\", \"credits\" or \"license\" for more information. where the operating system name should be different for Mac users. Now we see that the terminal is using the Miniforge/Miniconda version as we wanted. To quit the Python session we just opened, type the following at the >>> : >>> quit() and you will return to your terminal. This was successful if you now see a file path rather than the >>> . If you want to deactivate the Miniforge/Miniconda environment (e.g. so that you can use the system's Python interpreter), you simply have to type conda deactivate Updating the Conda Install The above procedure will always install the latest available Miniforge distribution for your platform. If you want to update an existing installation, you can generally do that using the command conda update --all , which updates all packages in a given environment (including conda itself). Python 2 vs Python 3 Python 2 and 3 are incompatible in syntax. If you had Python 2 previously installed on your machine, you might have seen Python 2.x.x above. In that case try typing python3 --version instead. Now you should see a message like the one above and are good to go for the course.","title":"Python"},{"location":"python/#python","text":"Conda is a pre-packaged Python distribution. It is mainly used as a package manager that enables simple creation of virtual enviroments for Python. More on this during the course. We will be installing either \"Miniforge\" or \"Miniconda\" for this course. Both can, for now, be regarded as equivalent. Some of you might have heard of \"Anaconda\". Anaconda is the bigger brother of Miniconda, but contains many packages we don't require.","title":"Python"},{"location":"python/#installing-miniforge-python-for-mac","text":"Open a new terminal and run the command corresponding to your processor:","title":"Installing Miniforge Python for Mac"},{"location":"python/#apple-silicon-macs","text":"mkdir -p ~/miniconda3 curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh -o ~/miniconda3/miniconda.sh bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 rm -rf ~/miniconda3/miniconda.sh","title":"Apple Silicon Macs"},{"location":"python/#intel-macs","text":"mkdir -p ~/miniconda3 curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o ~/miniconda3/miniconda.sh bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 rm -rf ~/miniconda3/miniconda.sh","title":"Intel Macs"},{"location":"python/#initialization","text":"After installing (either versions of Mac), initialize your newly-installed Miniconda. The following commands initialize for bash and zsh shells: ~/miniconda3/bin/conda init bash ~/miniconda3/bin/conda init zsh Restart the terminal and then proceed to verify your install","title":"Initialization"},{"location":"python/#installing-miniforge-python-for-linux","text":"First, we need to download the Anaconda Bash Script (a file that will install things for us). Enter the following into the terminal: curl -L -O \"https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh\" Run the Anaconda Script by entering the following into the terminal: bash Miniforge3-$(uname)-$(uname -m).sh As this script runs through, review and accept the license agreement. To do this press Return until you reach the end, and type 'yes'. After you agree to the license, you will be prompted to choose the location of the installation: Miniforge3 will now be installed into this location: /home/lachlan/miniforge3 - Press ENTER to confirm the location - Press CTRL-C to abort the installation - Or specify a different location below [/home/lachlan/miniforge3] >>> Use the default. The installation will continue - it does take some time, so be patient. Once the installation is complete, you will get the following output, which asks a question of us: ... Preparing transaction: done Executing transaction: done installation finished. Do you wish the installer to initialize Miniforge3 by running conda init? [yes|no] Type 'yes'. Now we need to refresh our terminal settings, so type the following and press return: source ~/.bashrc Now proceed to verify your install .","title":"Installing Miniforge Python for Linux"},{"location":"python/#installing-miniconda-on-windows","text":"We are installing Miniconda via winget with the following command: winget install -e --id Anaconda.Miniconda3 --interactive Accept all defaults, except for 'Add Miniconda3 to my PATH environment variable' which needs to be checked. Restart the WindowsTerminal. After restarting the terminal, initialize your newly-installed Miniconda: conda init After restarting the WindowsTerminal once more, proceed to verify your install .","title":"Installing Miniconda on Windows"},{"location":"python/#verifying-your-installation","text":"In order to activate Miniforge/Miniconda's environment, we have to start with conda activate Then, to verify that the correct version of Python has been installed, usually we would follow the programName --version logic from before. python --version which yields: Python 3.9.13 which tells us that Python is installed. But, because most operating systems these days have some additional version of Python installed, this doesn't guarantee that the Miniforge/Miniconda version is available for us to use from the terminal. To check, initiate Python by entering the following into a terminal and pressing Return : python You should now see something like: Python 3.9.13 | packaged by conda-forge | (main, May 27 2022, 16:56:21) [GCC 10.3.0] on linux Type \"help\", \"copyright\", \"credits\" or \"license\" for more information. where the operating system name should be different for Mac users. Now we see that the terminal is using the Miniforge/Miniconda version as we wanted. To quit the Python session we just opened, type the following at the >>> : >>> quit() and you will return to your terminal. This was successful if you now see a file path rather than the >>> . If you want to deactivate the Miniforge/Miniconda environment (e.g. so that you can use the system's Python interpreter), you simply have to type conda deactivate Updating the Conda Install The above procedure will always install the latest available Miniforge distribution for your platform. If you want to update an existing installation, you can generally do that using the command conda update --all , which updates all packages in a given environment (including conda itself). Python 2 vs Python 3 Python 2 and 3 are incompatible in syntax. If you had Python 2 previously installed on your machine, you might have seen Python 2.x.x above. In that case try typing python3 --version instead. Now you should see a message like the one above and are good to go for the course.","title":"Verifying Your Installation"},{"location":"r-packages/","text":"Additional R Packages We will need some additional libraries to conduct our statistical analysis. All Users Proceed as follows: Open RStudio In the console , copy and paste the following: to_install <-c( \"sandwich\", \"knitr\", \"tidyverse\", \"lmtest\", \"fixest\", \"lubridate\", \"dplyr\" ) install.packages(to_install) If you are asked if you want to install packages that need compilation, type y followed by Return to confirm this. Wait until all the packages have been installed and the you are done. It may take a while, so be patient Note that many dependencies get installed along the way.","title":"R Packages"},{"location":"r-packages/#additional-r-packages","text":"We will need some additional libraries to conduct our statistical analysis.","title":"Additional R Packages"},{"location":"r-packages/#all-users","text":"Proceed as follows: Open RStudio In the console , copy and paste the following: to_install <-c( \"sandwich\", \"knitr\", \"tidyverse\", \"lmtest\", \"fixest\", \"lubridate\", \"dplyr\" ) install.packages(to_install) If you are asked if you want to install packages that need compilation, type y followed by Return to confirm this. Wait until all the packages have been installed and the you are done. It may take a while, so be patient Note that many dependencies get installed along the way.","title":"All Users"},{"location":"r/","text":"R R is a language for statistical computing and graphics. R's use in the data science and econometrics community has taken off over recent years and (at a bare minimum) should be considered as an open source replacement to Stata. Department Managed Laptops Once again, just go to the Software Center. On windows laptops just install R Studio since this will include R. On Mac, install R and RStudio individually. Installing R for Mac Users Go to the R homepage and download the installer for your operating system. The current version for Mac and Windows is R version 4.3.1 . Once you have installed R, verify your install . Why Not Install via Homebrew? There are conflicting views on Homebrew's installation of R . Because we haven't tried it to ensure no problems will emerge, we recommend going with the installation based on the CRAN distributed package. Installing R for Linux Users First, we need to add a repository so that our operating system knows where to install the most recent version of R from. Enter the following into the terminal and press Return : wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc sudo add-apt-repository \"deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/\" Now, update to get the package manifests from the new repository: sudo apt-get update We can now install R as from the terminal by entering the following: sudo apt-get install r-base r-base-dev Install the multi-threaded OpenBlas library to get higher performance for linear algebra operations: sudo apt-get install libopenblas-base Now, verify your install . Installing R for Windows Users We are installing R with winget: winget install -e --id RProject.R Now, verify your install . Verifying your Install of R Open a terminal and enter: R --version followed by pressing Return . The expected return begins with: R version 4.2.x (2022-xx-xx) -- \"Some Funky Name\" Failure If this verification doesnt work, R has not been added to your PATH. This is no problem for us. Just check whether RStudio works after installing it in the next step.","title":"R"},{"location":"r/#r","text":"R is a language for statistical computing and graphics. R's use in the data science and econometrics community has taken off over recent years and (at a bare minimum) should be considered as an open source replacement to Stata. Department Managed Laptops Once again, just go to the Software Center. On windows laptops just install R Studio since this will include R. On Mac, install R and RStudio individually.","title":"R"},{"location":"r/#installing-r-for-mac-users","text":"Go to the R homepage and download the installer for your operating system. The current version for Mac and Windows is R version 4.3.1 . Once you have installed R, verify your install . Why Not Install via Homebrew? There are conflicting views on Homebrew's installation of R . Because we haven't tried it to ensure no problems will emerge, we recommend going with the installation based on the CRAN distributed package.","title":"Installing R for Mac Users"},{"location":"r/#installing-r-for-linux-users","text":"First, we need to add a repository so that our operating system knows where to install the most recent version of R from. Enter the following into the terminal and press Return : wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc sudo add-apt-repository \"deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/\" Now, update to get the package manifests from the new repository: sudo apt-get update We can now install R as from the terminal by entering the following: sudo apt-get install r-base r-base-dev Install the multi-threaded OpenBlas library to get higher performance for linear algebra operations: sudo apt-get install libopenblas-base Now, verify your install .","title":"Installing R for Linux Users"},{"location":"r/#installing-r-for-windows-users","text":"We are installing R with winget: winget install -e --id RProject.R Now, verify your install .","title":"Installing R for Windows Users"},{"location":"r/#verifying-your-install-of-r","text":"Open a terminal and enter: R --version followed by pressing Return . The expected return begins with: R version 4.2.x (2022-xx-xx) -- \"Some Funky Name\" Failure If this verification doesnt work, R has not been added to your PATH. This is no problem for us. Just check whether RStudio works after installing it in the next step.","title":"Verifying your Install of R"},{"location":"rstudio/","text":"RStudio RStudio provides an easy to work with graphical interface to R, and its format should feel familiar to Stata and Matlab users. Department Managed Laptops We already installed RStudio via the Software Center in a previous step. Just verify everything works by opening RStudio. Installing RStudio for Mac Users We can install RStudio with Homebrew: brew install --cask rstudio To see if it installed correctly, try and open RStudio from spotlight - there's not simple verification from the terminal. Installing RStudio for Linux Users Download the Latest Version of RStudio: wget https://download1.rstudio.org/desktop/bionic/amd64/rstudio-2022.02.3-492-amd64.deb Install it: sudo gdebi rstudio-2022.02.3-492-amd64.deb To see if it installed correctly, try and open RStudio from the GNOME menu - there's no simple verification from the terminal. Installing RStudio for Windows Users We can install RStudio via winget: winget install -e --id RStudio.RStudio.OpenSource To see if it installed correctly, try and open RStudio - there's not simple verification from the terminal.","title":"RStudio"},{"location":"rstudio/#rstudio","text":"RStudio provides an easy to work with graphical interface to R, and its format should feel familiar to Stata and Matlab users. Department Managed Laptops We already installed RStudio via the Software Center in a previous step. Just verify everything works by opening RStudio.","title":"RStudio"},{"location":"rstudio/#installing-rstudio-for-mac-users","text":"We can install RStudio with Homebrew: brew install --cask rstudio To see if it installed correctly, try and open RStudio from spotlight - there's not simple verification from the terminal.","title":"Installing RStudio for Mac Users"},{"location":"rstudio/#installing-rstudio-for-linux-users","text":"Download the Latest Version of RStudio: wget https://download1.rstudio.org/desktop/bionic/amd64/rstudio-2022.02.3-492-amd64.deb Install it: sudo gdebi rstudio-2022.02.3-492-amd64.deb To see if it installed correctly, try and open RStudio from the GNOME menu - there's no simple verification from the terminal.","title":"Installing RStudio for Linux Users"},{"location":"rstudio/#installing-rstudio-for-windows-users","text":"We can install RStudio via winget: winget install -e --id RStudio.RStudio.OpenSource To see if it installed correctly, try and open RStudio - there's not simple verification from the terminal.","title":"Installing RStudio for Windows Users"},{"location":"snakemake/","text":"Snakemake Snakemake is an easy to use workflow management system. It will allow us to control the execution of a set scripts by by running them from the command line. We will use make to automate the execution of our research projects with a \"single click\" so that our entire work flow is reproducible. Snakemake is a python package - so we can install using the default python installer, pip. All Users In a terminal window enter the command: pip install snakemake followed by pressing the Return key. Verify that your installation worked correctly by entering snakemake --version into a terminal and pressing Return. The expected output is the current version on the software, which should be greater than 6.7.0 --version on MacOS We have reports that snakemake --version does not print anything to screen on some Mac installations. If this happens to you, for now don't worry about it.","title":"Snakemake"},{"location":"snakemake/#snakemake","text":"Snakemake is an easy to use workflow management system. It will allow us to control the execution of a set scripts by by running them from the command line. We will use make to automate the execution of our research projects with a \"single click\" so that our entire work flow is reproducible. Snakemake is a python package - so we can install using the default python installer, pip.","title":"Snakemake"},{"location":"snakemake/#all-users","text":"In a terminal window enter the command: pip install snakemake followed by pressing the Return key. Verify that your installation worked correctly by entering snakemake --version into a terminal and pressing Return. The expected output is the current version on the software, which should be greater than 6.7.0 --version on MacOS We have reports that snakemake --version does not print anything to screen on some Mac installations. If this happens to you, for now don't worry about it.","title":"All Users"},{"location":"textEditor/","text":"Motivation A good text editor lies at the heart of any serious programmer's toolkit: It can do almost anything and makes you much more productive. The editors built into a specific program are generally are not a satisfying option (we will find certain cases where you may want to use them). There is a slight learning curve, but soon you hopefully be wondering why no-one forced you to do this before! We should get you past the steepest part of the learning curve during the course itself, so we don't anticipate you struggling on your own. Note None of the skills we learn in the course are tied to VS Code, so if you do decide to move away to another editor, nothing will be lost. VS Code VS Code is a relatively new text editor that works across all three platforms: Linux, Windows and Mac. In a short time it has already become one of most used text editors and we hope you will soon see why. It is built by Microsoft, but is open source, i.e. everyone can see and modify the program's internal code - so it is less nasty on the consciousness than some of Microsoft's traditional products. The main advantages for us are that it includes support for debugging, embedded Git control and GitHub, syntax highlighting, intelligent code completion, and many useful plugins - all of which make our lives much easier. Department Managed Laptops If your laptop is managed by the department, Visual Studio Code is most likely already installed on your device. If not, search for \"Software Center\" and install it. (Visual Studio Code = VS Code) Installing VS Code on Mac VS Code can be installed using homebrew. Type the following into your terminal and hit return: brew install --cask visual-studio-code Once it has been installed, verify your install by following the instructions below . Installing VS Code on Ubuntu VS Code is available to install via snap. Enter the following in your terminal and press Return : snap install code --classic Once it has been installed, verify your install by following the instructions below . Installing VS Code on Windows We are installing VS Code via winget by entering the following command in the terminal and hitting Return : winget install -e --id Microsoft.VisualStudioCode --interactive Accept any default options. At the end of the install, launch VS Code (it gives you this option on the last window). Windows Defender Firewall You will likely get the following pop-up during the above process: Click 'Allow access' if you do. Verifying Your Install After you have installed software via the terminal, we often want to verify the install was successful. For most programs we do this by typing the program name followed by --version in to the terminal. Let's do it: code --version which should yield output like: 1.59.0 379476f0e13988d90fab105c5c19e7abc8b1dea8 x64 if successful. Installing Extensions for VS Code VS Code is great straight of the box, but gets even better when we add some additional extensions to make our life easier. To add extensions: Open VS Code Press Ctrl + Shift + X to open the Extensions side bar (it opens on the left). Add extensions by: Searching for them in the Marketplace When you find them, click Install We recommend (but don't require) the following extensions to be added for this course: Git History GitLens Python","title":"Text Editor"},{"location":"textEditor/#motivation","text":"A good text editor lies at the heart of any serious programmer's toolkit: It can do almost anything and makes you much more productive. The editors built into a specific program are generally are not a satisfying option (we will find certain cases where you may want to use them). There is a slight learning curve, but soon you hopefully be wondering why no-one forced you to do this before! We should get you past the steepest part of the learning curve during the course itself, so we don't anticipate you struggling on your own. Note None of the skills we learn in the course are tied to VS Code, so if you do decide to move away to another editor, nothing will be lost.","title":"Motivation"},{"location":"textEditor/#vs-code","text":"VS Code is a relatively new text editor that works across all three platforms: Linux, Windows and Mac. In a short time it has already become one of most used text editors and we hope you will soon see why. It is built by Microsoft, but is open source, i.e. everyone can see and modify the program's internal code - so it is less nasty on the consciousness than some of Microsoft's traditional products. The main advantages for us are that it includes support for debugging, embedded Git control and GitHub, syntax highlighting, intelligent code completion, and many useful plugins - all of which make our lives much easier. Department Managed Laptops If your laptop is managed by the department, Visual Studio Code is most likely already installed on your device. If not, search for \"Software Center\" and install it. (Visual Studio Code = VS Code)","title":"VS Code"},{"location":"textEditor/#installing-vs-code-on-mac","text":"VS Code can be installed using homebrew. Type the following into your terminal and hit return: brew install --cask visual-studio-code Once it has been installed, verify your install by following the instructions below .","title":"Installing VS Code on Mac"},{"location":"textEditor/#installing-vs-code-on-ubuntu","text":"VS Code is available to install via snap. Enter the following in your terminal and press Return : snap install code --classic Once it has been installed, verify your install by following the instructions below .","title":"Installing VS Code on Ubuntu"},{"location":"textEditor/#installing-vs-code-on-windows","text":"We are installing VS Code via winget by entering the following command in the terminal and hitting Return : winget install -e --id Microsoft.VisualStudioCode --interactive Accept any default options. At the end of the install, launch VS Code (it gives you this option on the last window). Windows Defender Firewall You will likely get the following pop-up during the above process: Click 'Allow access' if you do.","title":"Installing VS Code on Windows"},{"location":"textEditor/#verifying-your-install","text":"After you have installed software via the terminal, we often want to verify the install was successful. For most programs we do this by typing the program name followed by --version in to the terminal. Let's do it: code --version which should yield output like: 1.59.0 379476f0e13988d90fab105c5c19e7abc8b1dea8 x64 if successful.","title":"Verifying Your Install"},{"location":"textEditor/#installing-extensions-for-vs-code","text":"VS Code is great straight of the box, but gets even better when we add some additional extensions to make our life easier. To add extensions: Open VS Code Press Ctrl + Shift + X to open the Extensions side bar (it opens on the left). Add extensions by: Searching for them in the Marketplace When you find them, click Install We recommend (but don't require) the following extensions to be added for this course: Git History GitLens Python","title":"Installing Extensions for VS Code"},{"location":"updates/","text":"Previous Versions of the Installation Guide Our installation guide is updated periodically to reflect changes in course content, and changes ways to install certain programs and packages. Here are the links to previous versions of the Installation Guide: 2017 edition , by Lachlan Deer, Adrian Etter, Julian Langer & Max Winkler 2018 edition , by Ulrich Bergmann, Ursina Schaede, Dora Simon, Carlo Zanella & Christian Zuend 2019 Foundations edition , by Lachlan Deer & Julian Langer 2020 edition , by Ulrich Bergmann, Matteo Courthoud & Lachlan Deer 2021 edition , by Lachlan Deer, Julian Langer, Lexi Schubert & Martin Stancsics 2022 edition , by Lachlan Deer, Julian Langer & Martin Stancsics Major Changes v2023 Due to loss of admin rights on UZH issued machines, many installations weren't possible anymore, demanding many changes during installation Switch to native Windows applications instead of WSL Usage of winget for Windows Alternative to homebrew on Mac v2022 Switch from the Anaconda to Miniforge to have a leaner Python distribution Use a separated conda environment for the course instead of the base environment Switch from vcxsrv to GWSL as it's more user-friendly Obtain Chromedriver through chromedriver_autoinstaller v2021.0.1 Update package versions for all Operating Systems Mac instructions using zsh rather than bash WSL instructions compliant with WSL2 Uses Google Chrome and Chromedriver from WSL for webscraping via an xserver v2020 Migrate from Cygwin to Windows Subsystem for Linux Higher dependency on Homebrew to install packages for Mac Emphasis on installation using terminal commands rather than graphical installers to enhance reproducibility Remove GIS guide Split's installation instructions of R, RStudio and additional R packaged into separate versions 2019 Foundations edition Focus only on R, terminal, Git and snakemake","title":"News & Updates"},{"location":"updates/#previous-versions-of-the-installation-guide","text":"Our installation guide is updated periodically to reflect changes in course content, and changes ways to install certain programs and packages. Here are the links to previous versions of the Installation Guide: 2017 edition , by Lachlan Deer, Adrian Etter, Julian Langer & Max Winkler 2018 edition , by Ulrich Bergmann, Ursina Schaede, Dora Simon, Carlo Zanella & Christian Zuend 2019 Foundations edition , by Lachlan Deer & Julian Langer 2020 edition , by Ulrich Bergmann, Matteo Courthoud & Lachlan Deer 2021 edition , by Lachlan Deer, Julian Langer, Lexi Schubert & Martin Stancsics 2022 edition , by Lachlan Deer, Julian Langer & Martin Stancsics","title":"Previous Versions of the Installation Guide"},{"location":"updates/#major-changes","text":"","title":"Major Changes"},{"location":"updates/#v2023","text":"Due to loss of admin rights on UZH issued machines, many installations weren't possible anymore, demanding many changes during installation Switch to native Windows applications instead of WSL Usage of winget for Windows Alternative to homebrew on Mac","title":"v2023"},{"location":"updates/#v2022","text":"Switch from the Anaconda to Miniforge to have a leaner Python distribution Use a separated conda environment for the course instead of the base environment Switch from vcxsrv to GWSL as it's more user-friendly Obtain Chromedriver through chromedriver_autoinstaller","title":"v2022"},{"location":"updates/#v202101","text":"Update package versions for all Operating Systems Mac instructions using zsh rather than bash WSL instructions compliant with WSL2 Uses Google Chrome and Chromedriver from WSL for webscraping via an xserver","title":"v2021.0.1"},{"location":"updates/#v2020","text":"Migrate from Cygwin to Windows Subsystem for Linux Higher dependency on Homebrew to install packages for Mac Emphasis on installation using terminal commands rather than graphical installers to enhance reproducibility Remove GIS guide Split's installation instructions of R, RStudio and additional R packaged into separate versions","title":"v2020"},{"location":"updates/#2019-foundations-edition","text":"Focus only on R, terminal, Git and snakemake","title":"2019 Foundations edition"},{"location":"webscraping_drivers/","text":"Web Scraping Using an Automated Browser Sometimes when we scrape the web, we need to automate our computer to open a web browser to gather information from each page. This is especially true when the site we want to scrape has content that is loaded dynamically with javascript. We will solve this by installing Google Chrome and using a tool called Chromedriver. The former has to be installed manually, but the latter will be handled by a very handy Python package we have already installed ( chromedriver-autoinstaller ). Installing this stuff is operating system specific, hence so are the instructions below. Department Managed Laptops Head over to the Sofware Center and install Google Chrome. Mac Users We need an up to date version of the web browser Google Chrome. We will install it via Homebrew. Enter the following into the terminal and hit Return : brew install --cask google-chrome Verify the install: google-chrome --version which should yield output similar to: Google Chrome 103.0.5060.53 Linux Users We need an up to date version of Google Chrome and some additional linux packages. First add the additional linux packages by entering the following into the terminal: sudo apt-get install libxss1 libappindicator1 libindicator7 Now let's download the latest stable version of Google Chrome using the terminal: wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb And now install it: sudo dpkg -i google-chrome*.deb sudo apt-get install -f Verify the install: google-chrome --version which should yield output similar to: Google Chrome 103.0.5060.53 Windows Users Everyone with admin right can install Google Chrome with: winget install -e --id Google.Chrome Verify the installation by opening Chrome.","title":"Webscraping"},{"location":"webscraping_drivers/#web-scraping-using-an-automated-browser","text":"Sometimes when we scrape the web, we need to automate our computer to open a web browser to gather information from each page. This is especially true when the site we want to scrape has content that is loaded dynamically with javascript. We will solve this by installing Google Chrome and using a tool called Chromedriver. The former has to be installed manually, but the latter will be handled by a very handy Python package we have already installed ( chromedriver-autoinstaller ). Installing this stuff is operating system specific, hence so are the instructions below. Department Managed Laptops Head over to the Sofware Center and install Google Chrome.","title":"Web Scraping Using an Automated Browser"},{"location":"webscraping_drivers/#mac-users","text":"We need an up to date version of the web browser Google Chrome. We will install it via Homebrew. Enter the following into the terminal and hit Return : brew install --cask google-chrome Verify the install: google-chrome --version which should yield output similar to: Google Chrome 103.0.5060.53","title":"Mac Users"},{"location":"webscraping_drivers/#linux-users","text":"We need an up to date version of Google Chrome and some additional linux packages. First add the additional linux packages by entering the following into the terminal: sudo apt-get install libxss1 libappindicator1 libindicator7 Now let's download the latest stable version of Google Chrome using the terminal: wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb And now install it: sudo dpkg -i google-chrome*.deb sudo apt-get install -f Verify the install: google-chrome --version which should yield output similar to: Google Chrome 103.0.5060.53","title":"Linux Users"},{"location":"webscraping_drivers/#windows-users","text":"Everyone with admin right can install Google Chrome with: winget install -e --id Google.Chrome Verify the installation by opening Chrome.","title":"Windows Users"},{"location":"windows-wsl/","text":"Windows Subsystem For Linux Windows Users Only! This page is only for those who are using Windows. Those with Mac or Linux operating systems can proceed to 'Command Line Tools.' Windows Subsystem for Linux (WSL) is a feature in Windows 10/11 that enables you to use Linux command-line tools on your Windows system. By installing this feature, everyone in the course will be able to run the same commands, and get the same output - an essential aspect of reproducibility. We hope that you will continue to use the WSL features we introduce over the next three weeks after the course is over for your own research related computing. The process for installing everything we need here is quite order dependent - follow the steps in the order they appear below. Want More Information? For more information about the Windows Subsystem for Linux, look here . Up to Date Windows 10/11 Required! To go further with this Installation Guide you need to have an up to date installation of Windows 10. IT Services in the Econ Department have assured us, if you update Windows to the latest version in your UZH laptop everything that follows will work. If you do not have a Windows 10 machine, Contact us! Install the Windows Subsystem for Linux Join the Windows Insider Program here Check that you have a recent build of Windows 10 (Build 19041 or above) Open up the run command with the Win + R key combo Type winver into the run command text box and hit OK . You should now see a dialogue screen with a OS build number. If the build number is older than 19041, update your windows to a later build. Open PowerShell as an administrator and type wsl --install The --install command performs the following actions: Enables the optional WSL and Virtual Machine Platform components Downloads and installs the latest Linux kernel Sets WSL 2 as the default Downloads and installs the Ubuntu Linux distribution (reboot may be required) You will likely be asked to restart your machine during this installation process. If you get error messages, you can check the troubleshooting pages . This can be a little daunting, come see us if you need in person help. WSL installation issues When we were trying this ourselves using Windows laptops provided by the University of Zurich we frequently got error messages saying the installation could not continue followed by an error code. The missing piece is a need to change a setting in the BIOS . Changing the 'Intel Virtualization Technology' setting to 'Enabled' fixed it for us. If you don't feel comfortable making this kind of BIOS change yourself, we'll help you if you come and see us. Set up your Linux user info Once the install is complete: Open the distribution using the start menu. You will be asked to create a username and password. Do so, and press Enter after each step. You might not see anything change as you type the password, that's OK -- it is recording what you write. Update and Upgrade your packages. In the shell that is open, use the command: sudo apt update && sudo apt upgrade Set up Windows Terminal Windows Terminal is our preferred terminal for Windows. Open the Microsoft Store Search for Windows Terminal Choose the first option - either Windows Terminal or Windows Terminal (Preview) Install it by clicking 'Get' Once installed, you will see it under 'Recently Added' in the Windows menu Open Windows Terminal To get access to your Ubuntu system, click the down arrow in the menu bar Select Ubuntu-xx.xx, and your Ubuntu terminal will open The Way Forward As you proceed through the remainder of the Installation Guide, you will generally follow the steps for 'Linux Users' and enter the commands into the Ubuntu Terminal we just installed. Occasionally there will be differences between Linux and Windows steps - these will be clearly marked by a separate header 'Windows Users.'","title":"Windows wsl"},{"location":"windows-wsl/#windows-subsystem-for-linux","text":"Windows Users Only! This page is only for those who are using Windows. Those with Mac or Linux operating systems can proceed to 'Command Line Tools.' Windows Subsystem for Linux (WSL) is a feature in Windows 10/11 that enables you to use Linux command-line tools on your Windows system. By installing this feature, everyone in the course will be able to run the same commands, and get the same output - an essential aspect of reproducibility. We hope that you will continue to use the WSL features we introduce over the next three weeks after the course is over for your own research related computing. The process for installing everything we need here is quite order dependent - follow the steps in the order they appear below. Want More Information? For more information about the Windows Subsystem for Linux, look here . Up to Date Windows 10/11 Required! To go further with this Installation Guide you need to have an up to date installation of Windows 10. IT Services in the Econ Department have assured us, if you update Windows to the latest version in your UZH laptop everything that follows will work. If you do not have a Windows 10 machine, Contact us!","title":"Windows Subsystem For Linux"},{"location":"windows-wsl/#install-the-windows-subsystem-for-linux","text":"Join the Windows Insider Program here Check that you have a recent build of Windows 10 (Build 19041 or above) Open up the run command with the Win + R key combo Type winver into the run command text box and hit OK . You should now see a dialogue screen with a OS build number. If the build number is older than 19041, update your windows to a later build. Open PowerShell as an administrator and type wsl --install The --install command performs the following actions: Enables the optional WSL and Virtual Machine Platform components Downloads and installs the latest Linux kernel Sets WSL 2 as the default Downloads and installs the Ubuntu Linux distribution (reboot may be required) You will likely be asked to restart your machine during this installation process. If you get error messages, you can check the troubleshooting pages . This can be a little daunting, come see us if you need in person help. WSL installation issues When we were trying this ourselves using Windows laptops provided by the University of Zurich we frequently got error messages saying the installation could not continue followed by an error code. The missing piece is a need to change a setting in the BIOS . Changing the 'Intel Virtualization Technology' setting to 'Enabled' fixed it for us. If you don't feel comfortable making this kind of BIOS change yourself, we'll help you if you come and see us.","title":"Install the Windows Subsystem for Linux"},{"location":"windows-wsl/#set-up-your-linux-user-info","text":"Once the install is complete: Open the distribution using the start menu. You will be asked to create a username and password. Do so, and press Enter after each step. You might not see anything change as you type the password, that's OK -- it is recording what you write. Update and Upgrade your packages. In the shell that is open, use the command: sudo apt update && sudo apt upgrade","title":"Set up your Linux user info"},{"location":"windows-wsl/#set-up-windows-terminal","text":"Windows Terminal is our preferred terminal for Windows. Open the Microsoft Store Search for Windows Terminal Choose the first option - either Windows Terminal or Windows Terminal (Preview) Install it by clicking 'Get' Once installed, you will see it under 'Recently Added' in the Windows menu Open Windows Terminal To get access to your Ubuntu system, click the down arrow in the menu bar Select Ubuntu-xx.xx, and your Ubuntu terminal will open","title":"Set up Windows Terminal"},{"location":"windows-wsl/#the-way-forward","text":"As you proceed through the remainder of the Installation Guide, you will generally follow the steps for 'Linux Users' and enter the commands into the Ubuntu Terminal we just installed. Occasionally there will be differences between Linux and Windows steps - these will be clearly marked by a separate header 'Windows Users.'","title":"The Way Forward"}]} \ No newline at end of file +{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"Installation Guide These pages should help you to get started setting up the computing environment on your machine ready for the course \"Programming Practices for Research in Economics\" at the University of Zurich in Fall 2024 . Please attempt to install necessary software and packages prior to the beginning of the course. If everything goes smoothly, you should be able to complete the installation in one sitting which should take about 2 hours. Please follow the steps one-by-one in the order they appear on the sidebar and do not deviate from them, unless you really know what you are doing. If you find any outdated links or unclear descriptions, message us in Teams so that we can update the instructions or clarify as needed. Where necessary, we have provided instructions for Mac, Windows and Linux machines. Department Managed Laptops The department has stopped to provide users with admin rights for their laptops. Anyone using one of those laptops won't be able to do run many of the commands used in this installation guide. We provide alternative solutions for installation and highlight those throughout the guide with notes like this. If there aren't any special notes for your device, just follow the normal installation guide. Installation Help We will provide installation help for learners struggling to set up their machines. Check the Schedule for details.","title":"Welcome"},{"location":"#installation-guide","text":"These pages should help you to get started setting up the computing environment on your machine ready for the course \"Programming Practices for Research in Economics\" at the University of Zurich in Fall 2024 . Please attempt to install necessary software and packages prior to the beginning of the course. If everything goes smoothly, you should be able to complete the installation in one sitting which should take about 2 hours. Please follow the steps one-by-one in the order they appear on the sidebar and do not deviate from them, unless you really know what you are doing. If you find any outdated links or unclear descriptions, message us in Teams so that we can update the instructions or clarify as needed. Where necessary, we have provided instructions for Mac, Windows and Linux machines. Department Managed Laptops The department has stopped to provide users with admin rights for their laptops. Anyone using one of those laptops won't be able to do run many of the commands used in this installation guide. We provide alternative solutions for installation and highlight those throughout the guide with notes like this. If there aren't any special notes for your device, just follow the normal installation guide. Installation Help We will provide installation help for learners struggling to set up their machines. Check the Schedule for details.","title":"Installation Guide"},{"location":"CONDUCT/","text":"Contributor Code of Conduct As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities. We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion. Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers. This Code of Conduct is adapted from the Contributor Covenant (http://contributor-covenant.org), version 1.0.0, available at http://contributor-covenant.org/version/1/0/0/","title":"Contributor Code of Conduct"},{"location":"CONDUCT/#contributor-code-of-conduct","text":"As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities. We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion. Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers. This Code of Conduct is adapted from the Contributor Covenant (http://contributor-covenant.org), version 1.0.0, available at http://contributor-covenant.org/version/1/0/0/","title":"Contributor Code of Conduct"},{"location":"CONTRIBUTING/","text":"Contributing Programming Practices for Research in Students is an open source project, and we welcome contributions of all kinds: new lessons, fixes to existing material, bug reports, and reviews of proposed changes are all welcome. Contributor Agreement By contributing, you agree that we may redistribute your work under our license . In exchange, we will address your issues and/or assess your change proposal as promptly as we can, and help you become a member of our community. Everyone involved agrees to abide by our code of conduct . Using GitHub If you choose to contribute via GitHub, you may want to look at How to Contribute to an Open Source Project on GitHub . To manage changes, we follow GitHub flow . Each lesson has one or two maintainers who review issues and pull requests or encourage others to do so. The maintainers have final say over what gets merged into the lesson. To use the web interface for contributing to a lesson: Fork the originating repository to your GitHub profile. Within your version of the forked repository, move to the master branch and create a new branch for each significant change being made. Navigate to the file(s) you wish to change within the new branches and make revisions as required. Commit all changed files within the appropriate branches. Create individual pull requests from each of your changed branches to the master branch within the originating repository. If you receive feedback, make changes using your issue-specific branches of the forked repository and the pull requests will update automatically. Repeat as needed until all feedback has been addressed. When starting work, please make sure your clone of the originating master branch is up-to-date before creating your own revision-specific branch(es) from there. Additionally, please only work from your newly-created branch(es) and not your clone of the originating master branch. Lastly, published copies of all the lessons are available in the master branch of the originating repository for reference while revising.","title":"Contributing"},{"location":"CONTRIBUTING/#contributing","text":"Programming Practices for Research in Students is an open source project, and we welcome contributions of all kinds: new lessons, fixes to existing material, bug reports, and reviews of proposed changes are all welcome.","title":"Contributing"},{"location":"CONTRIBUTING/#contributor-agreement","text":"By contributing, you agree that we may redistribute your work under our license . In exchange, we will address your issues and/or assess your change proposal as promptly as we can, and help you become a member of our community. Everyone involved agrees to abide by our code of conduct .","title":"Contributor Agreement"},{"location":"CONTRIBUTING/#using-github","text":"If you choose to contribute via GitHub, you may want to look at How to Contribute to an Open Source Project on GitHub . To manage changes, we follow GitHub flow . Each lesson has one or two maintainers who review issues and pull requests or encourage others to do so. The maintainers have final say over what gets merged into the lesson. To use the web interface for contributing to a lesson: Fork the originating repository to your GitHub profile. Within your version of the forked repository, move to the master branch and create a new branch for each significant change being made. Navigate to the file(s) you wish to change within the new branches and make revisions as required. Commit all changed files within the appropriate branches. Create individual pull requests from each of your changed branches to the master branch within the originating repository. If you receive feedback, make changes using your issue-specific branches of the forked repository and the pull requests will update automatically. Repeat as needed until all feedback has been addressed. When starting work, please make sure your clone of the originating master branch is up-to-date before creating your own revision-specific branch(es) from there. Additionally, please only work from your newly-created branch(es) and not your clone of the originating master branch. Lastly, published copies of all the lessons are available in the master branch of the originating repository for reference while revising.","title":"Using GitHub"},{"location":"acknowledgement/","text":"Acknowledgements This edition of Programming Practices is based on the previous versions of the course: 2017 edition , by Lachlan Deer, Adrian Etter, Julian Langer & Max Winkler 2018 edition , by Ulrich Bergmann, Ursina Schaede, Dora Simon, Carlo Zanella & Christian Zuend 2019 Foundations edition , by Lachlan Deer & Julian Langer 2020 edition , by Ulrich Bergmann, Matteo Courthoud & Lachlan Deer 2021 edition , by Lachlan Deer, Julian Langer, Lexi Schubert, Martin Stancsics 2022 edition , by Lachlan Deer, Julian Langer, Martin Stancsics It is designed after and borrows a lot from: Effective Programming Practices for Economists , a course by Hans-Martin von Gaudecker Software Carpentry's Managing Software Research Projects lesson Data Science for Economists , a course by Grant McDermott","title":"Acknowledgements"},{"location":"acknowledgement/#acknowledgements","text":"This edition of Programming Practices is based on the previous versions of the course: 2017 edition , by Lachlan Deer, Adrian Etter, Julian Langer & Max Winkler 2018 edition , by Ulrich Bergmann, Ursina Schaede, Dora Simon, Carlo Zanella & Christian Zuend 2019 Foundations edition , by Lachlan Deer & Julian Langer 2020 edition , by Ulrich Bergmann, Matteo Courthoud & Lachlan Deer 2021 edition , by Lachlan Deer, Julian Langer, Lexi Schubert, Martin Stancsics 2022 edition , by Lachlan Deer, Julian Langer, Martin Stancsics It is designed after and borrows a lot from: Effective Programming Practices for Economists , a course by Hans-Martin von Gaudecker Software Carpentry's Managing Software Research Projects lesson Data Science for Economists , a course by Grant McDermott","title":"Acknowledgements"},{"location":"citation-license/","text":"License Material is licensed under a CC-BY-SA license. Further information is available at our course homepage Suggested Citation Lachlan Deer, Julian Langer, Martin Stancsics and Julius Sch\u00e4per, 2023, Installation Guide , Programming Practices for Research in Economics, University of Zurich","title":"Citation & License"},{"location":"citation-license/#license","text":"Material is licensed under a CC-BY-SA license. Further information is available at our course homepage","title":"License"},{"location":"citation-license/#suggested-citation","text":"Lachlan Deer, Julian Langer, Martin Stancsics and Julius Sch\u00e4per, 2023, Installation Guide , Programming Practices for Research in Economics, University of Zurich","title":"Suggested Citation"},{"location":"commandLine/","text":"Command Line Tools A command-line interface or command language interpreter (CLI), also known as a terminal, is a means of interacting with a computer program where the user issues commands to the program in the form of successive lines of text. Throughout the course we will emphasize use of the terminal and executing commands within it as our modus operandi. Mac Users A command line interface comes already installed with OSX. You will need to install some other software from the terminal throughout the course, so it will be useful to install some additional \"command line tools\" now. Opening a Terminal Session To open a terminal session: Open spotlight with cmd + space Type in 'terminal' When the terminal appears, open it. Department Managed Macs Unfortunately, installation of Homebrew requires admin rights which aren't available on laptops newly issued by the department. Please move on to the next installation step Text Editor . Installing the X-code Tools We want to install 'X-code command line tools'. Copy and paste the following and press Return sudo xcode-select --install If you get a message that the command line tools are already installed, you can continue to the next step. Installing Homebrew Package Manager Homebrew is a package manager for Mac. Install Homebrew by opening a terminal and pasting the following command: /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\" Verify that Homebrew installed correctly, enter the following into your terminal: brew doctor And you should see the following output: Your system is ready to brew Before continuing, lets be sure everything in Homebrew is up to date by entering the following: brew upgrade brew upgrade on UZH MacOS We've seen some problems running brew upgrade on UZH computers with MacOS. If you are experiencing this, run the following two lines: sudo chown -R \"$USER\":admin/usr/local/Cellar and sudo chown -R \"$USER\":admin/usr/local/share Windows Users On Windows we will be using \"winget\" for most of our installations. Winget Installation Winget is part of Microsoft's App Installer which you can get here . Follow the link and install the application from the Microsoft Store. On machines managed by the department you might get a \"failure\" pop up, but just wait, it will install. After installation, open the Windows Search Bar and type \"cmd\" and hit return . This will open the Command Line Interface (CLI) of Windows with which we will be working during this course. Now type the following command into the CLI and press return winget --help Upon succesful installation, you should see a long this of possible command that \"winget\" can be supplied with. It should start like this: Windows Package Manager v1.5.2201 Copyright (c) Microsoft Corporation. All rights reserved. Feel free to try some commands such as \"list\" to see which programs are installed on your machine. Windows Terminal Installation In order work more comfortably with the CLI we will install a better version of the CLI you just used. To install \"Windows Terminal\" copy and paste the following command and accept the EULA when prompted, by typing 'yes' and hitting return : winget install -e --id Microsoft.WindowsTerminal Here, install tells winget which action it is supposed to take and \"--id\" is a flag providing winget with further information. In this case the id of the program we want to install and \"-e\" tell it to only use exactly this id. You would have been able to find this \"id\" by running the command: winget search WindowsTerminal Head over to the search in Windows and type \"terminal\" and hit return to open the WindowsTerminal. We will continue installations there.","title":"Command Line Tools"},{"location":"commandLine/#command-line-tools","text":"A command-line interface or command language interpreter (CLI), also known as a terminal, is a means of interacting with a computer program where the user issues commands to the program in the form of successive lines of text. Throughout the course we will emphasize use of the terminal and executing commands within it as our modus operandi.","title":"Command Line Tools"},{"location":"commandLine/#mac-users","text":"A command line interface comes already installed with OSX. You will need to install some other software from the terminal throughout the course, so it will be useful to install some additional \"command line tools\" now.","title":"Mac Users"},{"location":"commandLine/#opening-a-terminal-session","text":"To open a terminal session: Open spotlight with cmd + space Type in 'terminal' When the terminal appears, open it. Department Managed Macs Unfortunately, installation of Homebrew requires admin rights which aren't available on laptops newly issued by the department. Please move on to the next installation step Text Editor .","title":"Opening a Terminal Session"},{"location":"commandLine/#installing-the-x-code-tools","text":"We want to install 'X-code command line tools'. Copy and paste the following and press Return sudo xcode-select --install If you get a message that the command line tools are already installed, you can continue to the next step.","title":"Installing the X-code Tools"},{"location":"commandLine/#installing-homebrew-package-manager","text":"Homebrew is a package manager for Mac. Install Homebrew by opening a terminal and pasting the following command: /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\" Verify that Homebrew installed correctly, enter the following into your terminal: brew doctor And you should see the following output: Your system is ready to brew Before continuing, lets be sure everything in Homebrew is up to date by entering the following: brew upgrade brew upgrade on UZH MacOS We've seen some problems running brew upgrade on UZH computers with MacOS. If you are experiencing this, run the following two lines: sudo chown -R \"$USER\":admin/usr/local/Cellar and sudo chown -R \"$USER\":admin/usr/local/share","title":"Installing Homebrew Package Manager"},{"location":"commandLine/#windows-users","text":"On Windows we will be using \"winget\" for most of our installations.","title":"Windows Users"},{"location":"commandLine/#winget-installation","text":"Winget is part of Microsoft's App Installer which you can get here . Follow the link and install the application from the Microsoft Store. On machines managed by the department you might get a \"failure\" pop up, but just wait, it will install. After installation, open the Windows Search Bar and type \"cmd\" and hit return . This will open the Command Line Interface (CLI) of Windows with which we will be working during this course. Now type the following command into the CLI and press return winget --help Upon succesful installation, you should see a long this of possible command that \"winget\" can be supplied with. It should start like this: Windows Package Manager v1.5.2201 Copyright (c) Microsoft Corporation. All rights reserved. Feel free to try some commands such as \"list\" to see which programs are installed on your machine.","title":"Winget Installation"},{"location":"commandLine/#windows-terminal-installation","text":"In order work more comfortably with the CLI we will install a better version of the CLI you just used. To install \"Windows Terminal\" copy and paste the following command and accept the EULA when prompted, by typing 'yes' and hitting return : winget install -e --id Microsoft.WindowsTerminal Here, install tells winget which action it is supposed to take and \"--id\" is a flag providing winget with further information. In this case the id of the program we want to install and \"-e\" tell it to only use exactly this id. You would have been able to find this \"id\" by running the command: winget search WindowsTerminal Head over to the search in Windows and type \"terminal\" and hit return to open the WindowsTerminal. We will continue installations there.","title":"Windows Terminal Installation"},{"location":"contact/","text":"Contact Us Questions or Comments Please contact us via email: pp4rs@econ.uzh.ch with the title \"Installation Guide: Programming Practices for Research in Economics.\" We look forward to hearing from you if you have questions about the installation guide, found this installation guide useful, or have further comments or suggestions to improve it. Programming Practices Team Programming Practices for Research in Economics was created by Lachlan Deer Adrian Etter Julian Langer Max Winkler at the Department of Economics, University of Zurich in 2016. This installation guide is for the 2023 edition, conducted by Martin Stanscics Julius Sch\u00e4per","title":"Contact Us"},{"location":"contact/#contact-us","text":"","title":"Contact Us"},{"location":"contact/#questions-or-comments","text":"Please contact us via email: pp4rs@econ.uzh.ch with the title \"Installation Guide: Programming Practices for Research in Economics.\" We look forward to hearing from you if you have questions about the installation guide, found this installation guide useful, or have further comments or suggestions to improve it.","title":"Questions or Comments"},{"location":"contact/#programming-practices-team","text":"Programming Practices for Research in Economics was created by Lachlan Deer Adrian Etter Julian Langer Max Winkler at the Department of Economics, University of Zurich in 2016. This installation guide is for the 2023 edition, conducted by Martin Stanscics Julius Sch\u00e4per","title":"Programming Practices Team"},{"location":"finish-line/","text":"Installation Guide Complete Congrats! You've made it to the end of the Installation Guide. See you in class soon!","title":"The Finish Line!"},{"location":"finish-line/#installation-guide-complete","text":"Congrats! You've made it to the end of the Installation Guide. See you in class soon!","title":"Installation Guide Complete"},{"location":"gitInstall/","text":"Installing Git and Setting Up Accounts Git is a Version Control System (VCS) that has gained a lot of traction among the programming community. We will want to use version control to keep track of the files we write, and the changes we make to them. Account Creation During the course we will show you how to use GitHub to host some of your work and do code related project management. You will need to set up an account: Please register for a GitHub account When choosing a username we recommend not using a name that includes an employer or university in case you move later on i.e. 'johnsmith' or 'johnsmith86' are OK, 'johnsmithUZH' probably not Mac Users Department Managed Macs Git should already be install via \"xcode\". If it isn't, look for 'Software Update' in your System Settings and update \"xcode\". Verify your installation. . We will install Git using Homebrew. Enter the following lines of code into your terminal: brew install git brew link --force git Then close and reopen the terminal. Now Verify your installation . Linux Users Git should be installed already for you. To check if it is, enter the following in a terminal: git --version If you get a bunch of numbers (ideally starting with 2.15) or higher - you are good to move on. If not, install it by entering the following into the command line: sudo apt-get install git Once complete, verify your install . Windows Users Install git via the WindowsTerminal with the following command: winget install -e --id Git.Git --interactive Accept all defaults, apart from: Default Editor: Choose Visual Studio Code in the drop down menu Once installation is complete, restart WindowsTerminal and verify your install . Verifying your install To verify your installation, type the following command in a terminal and press the return key: git --version You should get an output that looks like: git version 2.25.1 Ensure that you have a version greater than 2.15.0 installed.","title":"Git"},{"location":"gitInstall/#installing-git-and-setting-up-accounts","text":"Git is a Version Control System (VCS) that has gained a lot of traction among the programming community. We will want to use version control to keep track of the files we write, and the changes we make to them.","title":"Installing Git and Setting Up Accounts"},{"location":"gitInstall/#account-creation","text":"During the course we will show you how to use GitHub to host some of your work and do code related project management. You will need to set up an account: Please register for a GitHub account When choosing a username we recommend not using a name that includes an employer or university in case you move later on i.e. 'johnsmith' or 'johnsmith86' are OK, 'johnsmithUZH' probably not","title":"Account Creation"},{"location":"gitInstall/#mac-users","text":"Department Managed Macs Git should already be install via \"xcode\". If it isn't, look for 'Software Update' in your System Settings and update \"xcode\". Verify your installation. . We will install Git using Homebrew. Enter the following lines of code into your terminal: brew install git brew link --force git Then close and reopen the terminal. Now Verify your installation .","title":"Mac Users"},{"location":"gitInstall/#linux-users","text":"Git should be installed already for you. To check if it is, enter the following in a terminal: git --version If you get a bunch of numbers (ideally starting with 2.15) or higher - you are good to move on. If not, install it by entering the following into the command line: sudo apt-get install git Once complete, verify your install .","title":"Linux Users"},{"location":"gitInstall/#windows-users","text":"Install git via the WindowsTerminal with the following command: winget install -e --id Git.Git --interactive Accept all defaults, apart from: Default Editor: Choose Visual Studio Code in the drop down menu Once installation is complete, restart WindowsTerminal and verify your install .","title":"Windows Users"},{"location":"gitInstall/#verifying-your-install","text":"To verify your installation, type the following command in a terminal and press the return key: git --version You should get an output that looks like: git version 2.25.1 Ensure that you have a version greater than 2.15.0 installed.","title":"Verifying your install"},{"location":"latex/","text":"LaTeX LaTeX is a document preparation system for high-quality typesetting most often used for medium-to-large technical or scientific documents. Most of you probably have some familiarity with LaTeX from your Master's Theses. We may want to build some PDF documents throughout the course using LaTeX - so let's install it. Department Managed Laptops Latex can be install from the Software Center. Search for \"Mactex\" on Mac and \"TeXLive\" won Windows and install the most recent version. LaTeX Install for Mac We again install from Homebrew. Enter the following into the terminal: brew install --cask mactex LaTeX Install for Linux LaTeX can be installed from the terminal by entering the following command and pressing Return : sudo apt-get install texlive-latex-extra Check everything went according to plan: tex --version which gives the following output: TeX 3.141592653 (TeX Live 2021) kpathsea version 6.3.3 Copyright 2021 D.E. Knuth. There is NO warranty. Redistribution of this software is covered by the terms of both the TeX copyright and the Lesser GNU General Public License. For more information about these matters, see the file named COPYING and the TeX source. Primary author of TeX: D.E. Knuth. LaTeX Install for Windows Unfortunately, we can't use winget for installation. Please download the TeXLive Exe and run it. Follow the instructions given.","title":"LaTeX"},{"location":"latex/#latex","text":"LaTeX is a document preparation system for high-quality typesetting most often used for medium-to-large technical or scientific documents. Most of you probably have some familiarity with LaTeX from your Master's Theses. We may want to build some PDF documents throughout the course using LaTeX - so let's install it. Department Managed Laptops Latex can be install from the Software Center. Search for \"Mactex\" on Mac and \"TeXLive\" won Windows and install the most recent version.","title":"LaTeX"},{"location":"latex/#latex-install-for-mac","text":"We again install from Homebrew. Enter the following into the terminal: brew install --cask mactex","title":"LaTeX Install for Mac"},{"location":"latex/#latex-install-for-linux","text":"LaTeX can be installed from the terminal by entering the following command and pressing Return : sudo apt-get install texlive-latex-extra Check everything went according to plan: tex --version which gives the following output: TeX 3.141592653 (TeX Live 2021) kpathsea version 6.3.3 Copyright 2021 D.E. Knuth. There is NO warranty. Redistribution of this software is covered by the terms of both the TeX copyright and the Lesser GNU General Public License. For more information about these matters, see the file named COPYING and the TeX source. Primary author of TeX: D.E. Knuth.","title":"LaTeX Install for Linux"},{"location":"latex/#latex-install-for-windows","text":"Unfortunately, we can't use winget for installation. Please download the TeXLive Exe and run it. Follow the instructions given.","title":"LaTeX Install for Windows"},{"location":"pandoc/","text":"Pandoc Pandoc is an extremely useful 'swiss army knife' for converting between different types of markup languages from the command line. For example, it readily builds PDFs with latex, and markdown - both of which are heavily used in academic research. Department Managed Laptops Admin User rights are required to install Pandoc. Unfortunately, only IT has those. Hence Pandoc can't be installed. Note We do not actively teach how to use Pandoc in the course - but we will utilize it in some lessons where we produce PDF, Word or HTML output from plain text files. Pandoc Install for Mac In a terminal window and type: brew install pandoc Now verify your install . Pandoc Install for Linux Open a terminal window and type sudo apt install pandoc to install pandoc from the command line. Now verify your install . Pandoc Install for Windows Open the terminal an run: winget install -e --id JohnMacFarlane.Pandoc Now verify your install . Verify Pandoc Install Verify your install by typing the following into a command line: pandoc --version The expected output starts with the following information: pandoc 2.x Ensure you have at least version 2.1.1 installed.","title":"Pandoc"},{"location":"pandoc/#pandoc","text":"Pandoc is an extremely useful 'swiss army knife' for converting between different types of markup languages from the command line. For example, it readily builds PDFs with latex, and markdown - both of which are heavily used in academic research. Department Managed Laptops Admin User rights are required to install Pandoc. Unfortunately, only IT has those. Hence Pandoc can't be installed. Note We do not actively teach how to use Pandoc in the course - but we will utilize it in some lessons where we produce PDF, Word or HTML output from plain text files.","title":"Pandoc"},{"location":"pandoc/#pandoc-install-for-mac","text":"In a terminal window and type: brew install pandoc Now verify your install .","title":"Pandoc Install for Mac"},{"location":"pandoc/#pandoc-install-for-linux","text":"Open a terminal window and type sudo apt install pandoc to install pandoc from the command line. Now verify your install .","title":"Pandoc Install for Linux"},{"location":"pandoc/#pandoc-install-for-windows","text":"Open the terminal an run: winget install -e --id JohnMacFarlane.Pandoc Now verify your install .","title":"Pandoc Install for Windows"},{"location":"pandoc/#verify-pandoc-install","text":"Verify your install by typing the following into a command line: pandoc --version The expected output starts with the following information: pandoc 2.x Ensure you have at least version 2.1.1 installed.","title":"Verify Pandoc Install"},{"location":"path-setting/","text":"Making Path Settings Permanent For our workflow be be command line driven, we need to be able to call software from the command line. Whilst much of the software we have installed as automatically made this possible, it is not universally the case. Here we will make the extra few changes we need to complete the installation guide. Windows Users (for Windows 8 and 10) You will need local administration rights for your computer, but you should have these on your personal computers or ones owned by the Department. Right-click on Computer. Then go to \"Properties\" and select the tab \"Advanced System settings\". Choose \"Environment Variables\" and select \"Path\" from the list of system variables. Choose \u201cEdit\u201d and append (i.e., do not overwrite the previous value): ;C:\\Path\\to\\program.exe to the variable value \u2013 make sure the rest remains as it is and do not include spaces between the \";\" and the text. Click on OK as often as needed. If you accepted all defaults during your installation, and didn't have any other non-default setting prior to starting this guide, modifying the following string, with your relevant username should work: ;C:\\Users\\ldeer\\AppData\\Local\\atom\\bin ;C:\\Program Files\\Git\\bin ;C:\\Program Files\\R\\R-3.X.X\\bin ; Mac Users (Slight Modifications for Linux Users) You will need to add a line to the file \".bash_profile\" or potentially create the file if it didn't already exist. This file lives in your home directory and it is hidden from your view by default. We now provide a guide of how to create / adjust this file using a tiny editor called nano, if you are familiar with editing text files, just use your editor of choice. Open a Terminal and type: nano ~/.bash_profile If .bash_profile already existed, you will see some text at this point. If so, use the arrow keys to scroll all the way to the bottom of the file. Add the following line at the end of the file: export PATH=\"${PATH}:/path/to/program/inside/package\" for each program we need to make accessible. For example to make matlab accessible from the command line: export PATH=\"${PATH}:/Applications/MATLAB_R2016a.app/bin/matlab Please do this for the following software: Sublime Text Git Matlab R Once you have finished, press Return and then ctrl+o (= WriteOut = save) and Return once more. Your default locale settings may conflict with some of the programs we'll need. If you want to be on the safe side, add these lines to your .bash_profile file: export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 Thanks for Hans-Martin von Gaudecker, and in turn Matthias Bannert for the tip on locale settings. Linux users : For most distributions, everything here applies to the file .bashrc instead of .bash_profile. The End Well done - it's time for a beer, or some other cold beverage to celebrate completing this guide.","title":"Making Path Settings Permanent"},{"location":"path-setting/#making-path-settings-permanent","text":"For our workflow be be command line driven, we need to be able to call software from the command line. Whilst much of the software we have installed as automatically made this possible, it is not universally the case. Here we will make the extra few changes we need to complete the installation guide.","title":"Making Path Settings Permanent"},{"location":"path-setting/#windows-users-for-windows-8-and-10","text":"You will need local administration rights for your computer, but you should have these on your personal computers or ones owned by the Department. Right-click on Computer. Then go to \"Properties\" and select the tab \"Advanced System settings\". Choose \"Environment Variables\" and select \"Path\" from the list of system variables. Choose \u201cEdit\u201d and append (i.e., do not overwrite the previous value): ;C:\\Path\\to\\program.exe to the variable value \u2013 make sure the rest remains as it is and do not include spaces between the \";\" and the text. Click on OK as often as needed. If you accepted all defaults during your installation, and didn't have any other non-default setting prior to starting this guide, modifying the following string, with your relevant username should work: ;C:\\Users\\ldeer\\AppData\\Local\\atom\\bin ;C:\\Program Files\\Git\\bin ;C:\\Program Files\\R\\R-3.X.X\\bin ;","title":"Windows Users (for Windows 8 and 10)"},{"location":"path-setting/#mac-users-slight-modifications-for-linux-users","text":"You will need to add a line to the file \".bash_profile\" or potentially create the file if it didn't already exist. This file lives in your home directory and it is hidden from your view by default. We now provide a guide of how to create / adjust this file using a tiny editor called nano, if you are familiar with editing text files, just use your editor of choice. Open a Terminal and type: nano ~/.bash_profile If .bash_profile already existed, you will see some text at this point. If so, use the arrow keys to scroll all the way to the bottom of the file. Add the following line at the end of the file: export PATH=\"${PATH}:/path/to/program/inside/package\" for each program we need to make accessible. For example to make matlab accessible from the command line: export PATH=\"${PATH}:/Applications/MATLAB_R2016a.app/bin/matlab Please do this for the following software: Sublime Text Git Matlab R Once you have finished, press Return and then ctrl+o (= WriteOut = save) and Return once more. Your default locale settings may conflict with some of the programs we'll need. If you want to be on the safe side, add these lines to your .bash_profile file: export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 Thanks for Hans-Martin von Gaudecker, and in turn Matthias Bannert for the tip on locale settings. Linux users : For most distributions, everything here applies to the file .bashrc instead of .bash_profile.","title":"Mac Users (Slight Modifications for Linux Users)"},{"location":"path-setting/#the-end","text":"Well done - it's time for a beer, or some other cold beverage to celebrate completing this guide.","title":"The End"},{"location":"python-more/","text":"Additional Python packages Miniforge is a very streamlined Python Distribution containing only the most necessary packages. In addition to these, there are many other packages we need to do scientific computing. We will install those in this section of the guide. Note Miniforge (also Mambaforge, Miniconda) is based on the Anaconda Python Distribution, which includes a large number of packages related to scientific computing by default. However, it also means, that it is rather large, and many of those packages are of no interest to most economists. (If you're interested in all the packages included, click here and go to the Python 3.9 tab.) For this reason, start from a barebones distribution and only install what we require instead. The following recipe works for all operating systems. There are a multitude of package management tools that work with Python packages. In this course, we use conda , which is the default one for Anaconda-based Python distributions. It combines dependency management and virtual environments in one program. Furthermore, it is designed with the scientific workflow in mind. For those packages that are not available in the conda repositories, we fall back to pip , Python's standard package manager. Note Mixing conda and pip is generally advised against, but sometimes it cannot be avoided. However, by using conda first and pip second, and utilizing virtual environments, you are mostly safe. You can find more info here . First let us update conda by typing the following into the terminal conda update conda --yes Next, install a handful of packages using the following command conda install numpy pandas Press enter to accept the proposed package plan with 'y' and return . This command installs those two packages into the default (base) environment. It is fine, as we would like those to be shared across all environments we later create. However, it is generally not the case, as we want dependencies for our different projects well separated. For example, packages for this course should be wholly independent from packages you are using to write a paper. The next command creates a conda environment called pp4rs and installs all the packages required for the course. It might take a while. conda env create -f https://pp4rs.github.io/2024-uzh-installation-guide/assets/pp4rs_environment.yml Generally, you should have such a file for each of your projects in order to easily reproduce the environment it was built in any time in the future. Note You can find more info on how to create such environment specifications here Now it is time to test your Python installation. Type into your shell the following conda activate pp4rs_backup You should now see that the CLI says (pp4rs_backup) in the beginning. To see which packages are install in this new pp4rs environment, run: conda list It should return a list with all of the packages that are installed in the pp4rs_backup environment. In order to use them, you will need to activate this environment in the beginning of every new shell session. You can always see which environment you are currently using, by looking at the beginning of the prompt in your terminal. If you open a new terminal it will say (base) , meaning your base environment. To use the pp4rs environment, you need to activate it.","title":"Python Extras"},{"location":"python-more/#additional-python-packages","text":"Miniforge is a very streamlined Python Distribution containing only the most necessary packages. In addition to these, there are many other packages we need to do scientific computing. We will install those in this section of the guide. Note Miniforge (also Mambaforge, Miniconda) is based on the Anaconda Python Distribution, which includes a large number of packages related to scientific computing by default. However, it also means, that it is rather large, and many of those packages are of no interest to most economists. (If you're interested in all the packages included, click here and go to the Python 3.9 tab.) For this reason, start from a barebones distribution and only install what we require instead. The following recipe works for all operating systems. There are a multitude of package management tools that work with Python packages. In this course, we use conda , which is the default one for Anaconda-based Python distributions. It combines dependency management and virtual environments in one program. Furthermore, it is designed with the scientific workflow in mind. For those packages that are not available in the conda repositories, we fall back to pip , Python's standard package manager. Note Mixing conda and pip is generally advised against, but sometimes it cannot be avoided. However, by using conda first and pip second, and utilizing virtual environments, you are mostly safe. You can find more info here . First let us update conda by typing the following into the terminal conda update conda --yes Next, install a handful of packages using the following command conda install numpy pandas Press enter to accept the proposed package plan with 'y' and return . This command installs those two packages into the default (base) environment. It is fine, as we would like those to be shared across all environments we later create. However, it is generally not the case, as we want dependencies for our different projects well separated. For example, packages for this course should be wholly independent from packages you are using to write a paper. The next command creates a conda environment called pp4rs and installs all the packages required for the course. It might take a while. conda env create -f https://pp4rs.github.io/2024-uzh-installation-guide/assets/pp4rs_environment.yml Generally, you should have such a file for each of your projects in order to easily reproduce the environment it was built in any time in the future. Note You can find more info on how to create such environment specifications here Now it is time to test your Python installation. Type into your shell the following conda activate pp4rs_backup You should now see that the CLI says (pp4rs_backup) in the beginning. To see which packages are install in this new pp4rs environment, run: conda list It should return a list with all of the packages that are installed in the pp4rs_backup environment. In order to use them, you will need to activate this environment in the beginning of every new shell session. You can always see which environment you are currently using, by looking at the beginning of the prompt in your terminal. If you open a new terminal it will say (base) , meaning your base environment. To use the pp4rs environment, you need to activate it.","title":"Additional Python packages"},{"location":"python/","text":"Python Conda is a pre-packaged Python distribution. It is mainly used as a package manager that enables simple creation of virtual enviroments for Python. More on this during the course. We will be installing either \"Miniforge\" or \"Miniconda\" for this course. Both can, for now, be regarded as equivalent. Some of you might have heard of \"Anaconda\". Anaconda is the bigger brother of Miniconda, but contains many packages we don't require. Installing Miniforge Python for Mac Open a new terminal and run the command corresponding to your processor: Apple Silicon Macs mkdir -p ~/miniconda3 curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh -o ~/miniconda3/miniconda.sh bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 rm -rf ~/miniconda3/miniconda.sh Intel Macs mkdir -p ~/miniconda3 curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o ~/miniconda3/miniconda.sh bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 rm -rf ~/miniconda3/miniconda.sh Initialization After installing (either versions of Mac), initialize your newly-installed Miniconda. The following commands initialize for bash and zsh shells: ~/miniconda3/bin/conda init bash ~/miniconda3/bin/conda init zsh Restart the terminal and then proceed to verify your install Installing Miniforge Python for Linux First, we need to download the Anaconda Bash Script (a file that will install things for us). Enter the following into the terminal: curl -L -O \"https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh\" Run the Anaconda Script by entering the following into the terminal: bash Miniforge3-$(uname)-$(uname -m).sh As this script runs through, review and accept the license agreement. To do this press Return until you reach the end, and type 'yes'. After you agree to the license, you will be prompted to choose the location of the installation: Miniforge3 will now be installed into this location: /home/lachlan/miniforge3 - Press ENTER to confirm the location - Press CTRL-C to abort the installation - Or specify a different location below [/home/lachlan/miniforge3] >>> Use the default. The installation will continue - it does take some time, so be patient. Once the installation is complete, you will get the following output, which asks a question of us: ... Preparing transaction: done Executing transaction: done installation finished. Do you wish the installer to initialize Miniforge3 by running conda init? [yes|no] Type 'yes'. Now we need to refresh our terminal settings, so type the following and press return: source ~/.bashrc Now proceed to verify your install . Installing Miniconda on Windows We are installing Miniconda via winget with the following command: winget install -e --id Anaconda.Miniconda3 --interactive Accept all defaults, except for 'Add Miniconda3 to my PATH environment variable' which needs to be checked. Restart the WindowsTerminal. After restarting the terminal, initialize your newly-installed Miniconda: conda init After restarting the WindowsTerminal once more, proceed to verify your install . Verifying Your Installation In order to activate Miniforge/Miniconda's environment, we have to start with conda activate Then, to verify that the correct version of Python has been installed, usually we would follow the programName --version logic from before. python --version which yields: Python 3.9.13 which tells us that Python is installed. But, because most operating systems these days have some additional version of Python installed, this doesn't guarantee that the Miniforge/Miniconda version is available for us to use from the terminal. To check, initiate Python by entering the following into a terminal and pressing Return : python You should now see something like: Python 3.9.13 | packaged by conda-forge | (main, May 27 2022, 16:56:21) [GCC 10.3.0] on linux Type \"help\", \"copyright\", \"credits\" or \"license\" for more information. where the operating system name should be different for Mac users. Now we see that the terminal is using the Miniforge/Miniconda version as we wanted. To quit the Python session we just opened, type the following at the >>> : >>> quit() and you will return to your terminal. This was successful if you now see a file path rather than the >>> . If you want to deactivate the Miniforge/Miniconda environment (e.g. so that you can use the system's Python interpreter), you simply have to type conda deactivate Updating the Conda Install The above procedure will always install the latest available Miniforge distribution for your platform. If you want to update an existing installation, you can generally do that using the command conda update --all , which updates all packages in a given environment (including conda itself). Python 2 vs Python 3 Python 2 and 3 are incompatible in syntax. If you had Python 2 previously installed on your machine, you might have seen Python 2.x.x above. In that case try typing python3 --version instead. Now you should see a message like the one above and are good to go for the course.","title":"Python"},{"location":"python/#python","text":"Conda is a pre-packaged Python distribution. It is mainly used as a package manager that enables simple creation of virtual enviroments for Python. More on this during the course. We will be installing either \"Miniforge\" or \"Miniconda\" for this course. Both can, for now, be regarded as equivalent. Some of you might have heard of \"Anaconda\". Anaconda is the bigger brother of Miniconda, but contains many packages we don't require.","title":"Python"},{"location":"python/#installing-miniforge-python-for-mac","text":"Open a new terminal and run the command corresponding to your processor:","title":"Installing Miniforge Python for Mac"},{"location":"python/#apple-silicon-macs","text":"mkdir -p ~/miniconda3 curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh -o ~/miniconda3/miniconda.sh bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 rm -rf ~/miniconda3/miniconda.sh","title":"Apple Silicon Macs"},{"location":"python/#intel-macs","text":"mkdir -p ~/miniconda3 curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o ~/miniconda3/miniconda.sh bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 rm -rf ~/miniconda3/miniconda.sh","title":"Intel Macs"},{"location":"python/#initialization","text":"After installing (either versions of Mac), initialize your newly-installed Miniconda. The following commands initialize for bash and zsh shells: ~/miniconda3/bin/conda init bash ~/miniconda3/bin/conda init zsh Restart the terminal and then proceed to verify your install","title":"Initialization"},{"location":"python/#installing-miniforge-python-for-linux","text":"First, we need to download the Anaconda Bash Script (a file that will install things for us). Enter the following into the terminal: curl -L -O \"https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh\" Run the Anaconda Script by entering the following into the terminal: bash Miniforge3-$(uname)-$(uname -m).sh As this script runs through, review and accept the license agreement. To do this press Return until you reach the end, and type 'yes'. After you agree to the license, you will be prompted to choose the location of the installation: Miniforge3 will now be installed into this location: /home/lachlan/miniforge3 - Press ENTER to confirm the location - Press CTRL-C to abort the installation - Or specify a different location below [/home/lachlan/miniforge3] >>> Use the default. The installation will continue - it does take some time, so be patient. Once the installation is complete, you will get the following output, which asks a question of us: ... Preparing transaction: done Executing transaction: done installation finished. Do you wish the installer to initialize Miniforge3 by running conda init? [yes|no] Type 'yes'. Now we need to refresh our terminal settings, so type the following and press return: source ~/.bashrc Now proceed to verify your install .","title":"Installing Miniforge Python for Linux"},{"location":"python/#installing-miniconda-on-windows","text":"We are installing Miniconda via winget with the following command: winget install -e --id Anaconda.Miniconda3 --interactive Accept all defaults, except for 'Add Miniconda3 to my PATH environment variable' which needs to be checked. Restart the WindowsTerminal. After restarting the terminal, initialize your newly-installed Miniconda: conda init After restarting the WindowsTerminal once more, proceed to verify your install .","title":"Installing Miniconda on Windows"},{"location":"python/#verifying-your-installation","text":"In order to activate Miniforge/Miniconda's environment, we have to start with conda activate Then, to verify that the correct version of Python has been installed, usually we would follow the programName --version logic from before. python --version which yields: Python 3.9.13 which tells us that Python is installed. But, because most operating systems these days have some additional version of Python installed, this doesn't guarantee that the Miniforge/Miniconda version is available for us to use from the terminal. To check, initiate Python by entering the following into a terminal and pressing Return : python You should now see something like: Python 3.9.13 | packaged by conda-forge | (main, May 27 2022, 16:56:21) [GCC 10.3.0] on linux Type \"help\", \"copyright\", \"credits\" or \"license\" for more information. where the operating system name should be different for Mac users. Now we see that the terminal is using the Miniforge/Miniconda version as we wanted. To quit the Python session we just opened, type the following at the >>> : >>> quit() and you will return to your terminal. This was successful if you now see a file path rather than the >>> . If you want to deactivate the Miniforge/Miniconda environment (e.g. so that you can use the system's Python interpreter), you simply have to type conda deactivate Updating the Conda Install The above procedure will always install the latest available Miniforge distribution for your platform. If you want to update an existing installation, you can generally do that using the command conda update --all , which updates all packages in a given environment (including conda itself). Python 2 vs Python 3 Python 2 and 3 are incompatible in syntax. If you had Python 2 previously installed on your machine, you might have seen Python 2.x.x above. In that case try typing python3 --version instead. Now you should see a message like the one above and are good to go for the course.","title":"Verifying Your Installation"},{"location":"r-packages/","text":"Additional R Packages We will need some additional libraries to conduct our statistical analysis. All Users Proceed as follows: Open RStudio In the console , copy and paste the following: to_install <-c( \"sandwich\", \"knitr\", \"tidyverse\", \"lmtest\", \"fixest\", \"lubridate\", \"dplyr\" ) install.packages(to_install) If you are asked if you want to install packages that need compilation, type y followed by Return to confirm this. Wait until all the packages have been installed and the you are done. It may take a while, so be patient Note that many dependencies get installed along the way.","title":"R Packages"},{"location":"r-packages/#additional-r-packages","text":"We will need some additional libraries to conduct our statistical analysis.","title":"Additional R Packages"},{"location":"r-packages/#all-users","text":"Proceed as follows: Open RStudio In the console , copy and paste the following: to_install <-c( \"sandwich\", \"knitr\", \"tidyverse\", \"lmtest\", \"fixest\", \"lubridate\", \"dplyr\" ) install.packages(to_install) If you are asked if you want to install packages that need compilation, type y followed by Return to confirm this. Wait until all the packages have been installed and the you are done. It may take a while, so be patient Note that many dependencies get installed along the way.","title":"All Users"},{"location":"r/","text":"R R is a language for statistical computing and graphics. R's use in the data science and econometrics community has taken off over recent years and (at a bare minimum) should be considered as an open source replacement to Stata. Department Managed Laptops Once again, just go to the Software Center. On windows laptops just install R Studio since this will include R. On Mac, install R and RStudio individually. Installing R for Mac Users Go to the R homepage and download the installer for your operating system. The current version for Mac and Windows is R version 4.3.1 . Once you have installed R, verify your install . Why Not Install via Homebrew? There are conflicting views on Homebrew's installation of R . Because we haven't tried it to ensure no problems will emerge, we recommend going with the installation based on the CRAN distributed package. Installing R for Linux Users First, we need to add a repository so that our operating system knows where to install the most recent version of R from. Enter the following into the terminal and press Return : wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc sudo add-apt-repository \"deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/\" Now, update to get the package manifests from the new repository: sudo apt-get update We can now install R as from the terminal by entering the following: sudo apt-get install r-base r-base-dev Install the multi-threaded OpenBlas library to get higher performance for linear algebra operations: sudo apt-get install libopenblas-base Now, verify your install . Installing R for Windows Users We are installing R with winget: winget install -e --id RProject.R Now, verify your install . Verifying your Install of R Open a terminal and enter: R --version followed by pressing Return . The expected return begins with: R version 4.2.x (2022-xx-xx) -- \"Some Funky Name\" Failure If this verification doesnt work, R has not been added to your PATH. This is no problem for us. Just check whether RStudio works after installing it in the next step.","title":"R"},{"location":"r/#r","text":"R is a language for statistical computing and graphics. R's use in the data science and econometrics community has taken off over recent years and (at a bare minimum) should be considered as an open source replacement to Stata. Department Managed Laptops Once again, just go to the Software Center. On windows laptops just install R Studio since this will include R. On Mac, install R and RStudio individually.","title":"R"},{"location":"r/#installing-r-for-mac-users","text":"Go to the R homepage and download the installer for your operating system. The current version for Mac and Windows is R version 4.3.1 . Once you have installed R, verify your install . Why Not Install via Homebrew? There are conflicting views on Homebrew's installation of R . Because we haven't tried it to ensure no problems will emerge, we recommend going with the installation based on the CRAN distributed package.","title":"Installing R for Mac Users"},{"location":"r/#installing-r-for-linux-users","text":"First, we need to add a repository so that our operating system knows where to install the most recent version of R from. Enter the following into the terminal and press Return : wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc sudo add-apt-repository \"deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/\" Now, update to get the package manifests from the new repository: sudo apt-get update We can now install R as from the terminal by entering the following: sudo apt-get install r-base r-base-dev Install the multi-threaded OpenBlas library to get higher performance for linear algebra operations: sudo apt-get install libopenblas-base Now, verify your install .","title":"Installing R for Linux Users"},{"location":"r/#installing-r-for-windows-users","text":"We are installing R with winget: winget install -e --id RProject.R Now, verify your install .","title":"Installing R for Windows Users"},{"location":"r/#verifying-your-install-of-r","text":"Open a terminal and enter: R --version followed by pressing Return . The expected return begins with: R version 4.2.x (2022-xx-xx) -- \"Some Funky Name\" Failure If this verification doesnt work, R has not been added to your PATH. This is no problem for us. Just check whether RStudio works after installing it in the next step.","title":"Verifying your Install of R"},{"location":"rstudio/","text":"RStudio RStudio provides an easy to work with graphical interface to R, and its format should feel familiar to Stata and Matlab users. Department Managed Laptops We already installed RStudio via the Software Center in a previous step. Just verify everything works by opening RStudio. Installing RStudio for Mac Users We can install RStudio with Homebrew: brew install --cask rstudio To see if it installed correctly, try and open RStudio from spotlight - there's not simple verification from the terminal. Installing RStudio for Linux Users Download the Latest Version of RStudio: wget https://download1.rstudio.org/desktop/bionic/amd64/rstudio-2022.02.3-492-amd64.deb Install it: sudo gdebi rstudio-2022.02.3-492-amd64.deb To see if it installed correctly, try and open RStudio from the GNOME menu - there's no simple verification from the terminal. Installing RStudio for Windows Users We can install RStudio via winget: winget install -e --id RStudio.RStudio.OpenSource To see if it installed correctly, try and open RStudio - there's not simple verification from the terminal.","title":"RStudio"},{"location":"rstudio/#rstudio","text":"RStudio provides an easy to work with graphical interface to R, and its format should feel familiar to Stata and Matlab users. Department Managed Laptops We already installed RStudio via the Software Center in a previous step. Just verify everything works by opening RStudio.","title":"RStudio"},{"location":"rstudio/#installing-rstudio-for-mac-users","text":"We can install RStudio with Homebrew: brew install --cask rstudio To see if it installed correctly, try and open RStudio from spotlight - there's not simple verification from the terminal.","title":"Installing RStudio for Mac Users"},{"location":"rstudio/#installing-rstudio-for-linux-users","text":"Download the Latest Version of RStudio: wget https://download1.rstudio.org/desktop/bionic/amd64/rstudio-2022.02.3-492-amd64.deb Install it: sudo gdebi rstudio-2022.02.3-492-amd64.deb To see if it installed correctly, try and open RStudio from the GNOME menu - there's no simple verification from the terminal.","title":"Installing RStudio for Linux Users"},{"location":"rstudio/#installing-rstudio-for-windows-users","text":"We can install RStudio via winget: winget install -e --id RStudio.RStudio.OpenSource To see if it installed correctly, try and open RStudio - there's not simple verification from the terminal.","title":"Installing RStudio for Windows Users"},{"location":"snakemake/","text":"Snakemake Snakemake is an easy to use workflow management system. It will allow us to control the execution of a set scripts by by running them from the command line. We will use make to automate the execution of our research projects with a \"single click\" so that our entire work flow is reproducible. Snakemake is a python package - so we can install using the default python installer, pip. All Users In a terminal window enter the command: pip install snakemake followed by pressing the Return key. Verify that your installation worked correctly by entering snakemake --version into a terminal and pressing Return. The expected output is the current version on the software, which should be greater than 6.7.0 --version on MacOS We have reports that snakemake --version does not print anything to screen on some Mac installations. If this happens to you, for now don't worry about it.","title":"Snakemake"},{"location":"snakemake/#snakemake","text":"Snakemake is an easy to use workflow management system. It will allow us to control the execution of a set scripts by by running them from the command line. We will use make to automate the execution of our research projects with a \"single click\" so that our entire work flow is reproducible. Snakemake is a python package - so we can install using the default python installer, pip.","title":"Snakemake"},{"location":"snakemake/#all-users","text":"In a terminal window enter the command: pip install snakemake followed by pressing the Return key. Verify that your installation worked correctly by entering snakemake --version into a terminal and pressing Return. The expected output is the current version on the software, which should be greater than 6.7.0 --version on MacOS We have reports that snakemake --version does not print anything to screen on some Mac installations. If this happens to you, for now don't worry about it.","title":"All Users"},{"location":"textEditor/","text":"Motivation A good text editor lies at the heart of any serious programmer's toolkit: It can do almost anything and makes you much more productive. The editors built into a specific program are generally are not a satisfying option (we will find certain cases where you may want to use them). There is a slight learning curve, but soon you hopefully be wondering why no-one forced you to do this before! We should get you past the steepest part of the learning curve during the course itself, so we don't anticipate you struggling on your own. Note None of the skills we learn in the course are tied to VS Code, so if you do decide to move away to another editor, nothing will be lost. VS Code VS Code is a relatively new text editor that works across all three platforms: Linux, Windows and Mac. In a short time it has already become one of most used text editors and we hope you will soon see why. It is built by Microsoft, but is open source, i.e. everyone can see and modify the program's internal code - so it is less nasty on the consciousness than some of Microsoft's traditional products. The main advantages for us are that it includes support for debugging, embedded Git control and GitHub, syntax highlighting, intelligent code completion, and many useful plugins - all of which make our lives much easier. Department Managed Laptops If your laptop is managed by the department, Visual Studio Code is most likely already installed on your device. If not, search for \"Software Center\" and install it. (Visual Studio Code = VS Code) Installing VS Code on Mac VS Code can be installed using homebrew. Type the following into your terminal and hit return: brew install --cask visual-studio-code Once it has been installed, verify your install by following the instructions below . Installing VS Code on Ubuntu VS Code is available to install via snap. Enter the following in your terminal and press Return : snap install code --classic Once it has been installed, verify your install by following the instructions below . Installing VS Code on Windows We are installing VS Code via winget by entering the following command in the terminal and hitting Return : winget install -e --id Microsoft.VisualStudioCode --interactive Accept any default options. At the end of the install, launch VS Code (it gives you this option on the last window). Windows Defender Firewall You will likely get the following pop-up during the above process: Click 'Allow access' if you do. Verifying Your Install After you have installed software via the terminal, we often want to verify the install was successful. For most programs we do this by typing the program name followed by --version in to the terminal. Let's do it: code --version which should yield output like: 1.59.0 379476f0e13988d90fab105c5c19e7abc8b1dea8 x64 if successful. Installing Extensions for VS Code VS Code is great straight of the box, but gets even better when we add some additional extensions to make our life easier. To add extensions: Open VS Code Press Ctrl + Shift + X to open the Extensions side bar (it opens on the left). Add extensions by: Searching for them in the Marketplace When you find them, click Install We recommend (but don't require) the following extensions to be added for this course: Git History GitLens Python","title":"Text Editor"},{"location":"textEditor/#motivation","text":"A good text editor lies at the heart of any serious programmer's toolkit: It can do almost anything and makes you much more productive. The editors built into a specific program are generally are not a satisfying option (we will find certain cases where you may want to use them). There is a slight learning curve, but soon you hopefully be wondering why no-one forced you to do this before! We should get you past the steepest part of the learning curve during the course itself, so we don't anticipate you struggling on your own. Note None of the skills we learn in the course are tied to VS Code, so if you do decide to move away to another editor, nothing will be lost.","title":"Motivation"},{"location":"textEditor/#vs-code","text":"VS Code is a relatively new text editor that works across all three platforms: Linux, Windows and Mac. In a short time it has already become one of most used text editors and we hope you will soon see why. It is built by Microsoft, but is open source, i.e. everyone can see and modify the program's internal code - so it is less nasty on the consciousness than some of Microsoft's traditional products. The main advantages for us are that it includes support for debugging, embedded Git control and GitHub, syntax highlighting, intelligent code completion, and many useful plugins - all of which make our lives much easier. Department Managed Laptops If your laptop is managed by the department, Visual Studio Code is most likely already installed on your device. If not, search for \"Software Center\" and install it. (Visual Studio Code = VS Code)","title":"VS Code"},{"location":"textEditor/#installing-vs-code-on-mac","text":"VS Code can be installed using homebrew. Type the following into your terminal and hit return: brew install --cask visual-studio-code Once it has been installed, verify your install by following the instructions below .","title":"Installing VS Code on Mac"},{"location":"textEditor/#installing-vs-code-on-ubuntu","text":"VS Code is available to install via snap. Enter the following in your terminal and press Return : snap install code --classic Once it has been installed, verify your install by following the instructions below .","title":"Installing VS Code on Ubuntu"},{"location":"textEditor/#installing-vs-code-on-windows","text":"We are installing VS Code via winget by entering the following command in the terminal and hitting Return : winget install -e --id Microsoft.VisualStudioCode --interactive Accept any default options. At the end of the install, launch VS Code (it gives you this option on the last window). Windows Defender Firewall You will likely get the following pop-up during the above process: Click 'Allow access' if you do.","title":"Installing VS Code on Windows"},{"location":"textEditor/#verifying-your-install","text":"After you have installed software via the terminal, we often want to verify the install was successful. For most programs we do this by typing the program name followed by --version in to the terminal. Let's do it: code --version which should yield output like: 1.59.0 379476f0e13988d90fab105c5c19e7abc8b1dea8 x64 if successful.","title":"Verifying Your Install"},{"location":"textEditor/#installing-extensions-for-vs-code","text":"VS Code is great straight of the box, but gets even better when we add some additional extensions to make our life easier. To add extensions: Open VS Code Press Ctrl + Shift + X to open the Extensions side bar (it opens on the left). Add extensions by: Searching for them in the Marketplace When you find them, click Install We recommend (but don't require) the following extensions to be added for this course: Git History GitLens Python","title":"Installing Extensions for VS Code"},{"location":"updates/","text":"Previous Versions of the Installation Guide Our installation guide is updated periodically to reflect changes in course content, and changes ways to install certain programs and packages. Here are the links to previous versions of the Installation Guide: 2017 edition , by Lachlan Deer, Adrian Etter, Julian Langer & Max Winkler 2018 edition , by Ulrich Bergmann, Ursina Schaede, Dora Simon, Carlo Zanella & Christian Zuend 2019 Foundations edition , by Lachlan Deer & Julian Langer 2020 edition , by Ulrich Bergmann, Matteo Courthoud & Lachlan Deer 2021 edition , by Lachlan Deer, Julian Langer, Lexi Schubert & Martin Stancsics 2022 edition , by Lachlan Deer, Julian Langer & Martin Stancsics Major Changes v2023 Due to loss of admin rights on UZH issued machines, many installations weren't possible anymore, demanding many changes during installation Switch to native Windows applications instead of WSL Usage of winget for Windows Alternative to homebrew on Mac v2022 Switch from the Anaconda to Miniforge to have a leaner Python distribution Use a separated conda environment for the course instead of the base environment Switch from vcxsrv to GWSL as it's more user-friendly Obtain Chromedriver through chromedriver_autoinstaller v2021.0.1 Update package versions for all Operating Systems Mac instructions using zsh rather than bash WSL instructions compliant with WSL2 Uses Google Chrome and Chromedriver from WSL for webscraping via an xserver v2020 Migrate from Cygwin to Windows Subsystem for Linux Higher dependency on Homebrew to install packages for Mac Emphasis on installation using terminal commands rather than graphical installers to enhance reproducibility Remove GIS guide Split's installation instructions of R, RStudio and additional R packaged into separate versions 2019 Foundations edition Focus only on R, terminal, Git and snakemake","title":"News & Updates"},{"location":"updates/#previous-versions-of-the-installation-guide","text":"Our installation guide is updated periodically to reflect changes in course content, and changes ways to install certain programs and packages. Here are the links to previous versions of the Installation Guide: 2017 edition , by Lachlan Deer, Adrian Etter, Julian Langer & Max Winkler 2018 edition , by Ulrich Bergmann, Ursina Schaede, Dora Simon, Carlo Zanella & Christian Zuend 2019 Foundations edition , by Lachlan Deer & Julian Langer 2020 edition , by Ulrich Bergmann, Matteo Courthoud & Lachlan Deer 2021 edition , by Lachlan Deer, Julian Langer, Lexi Schubert & Martin Stancsics 2022 edition , by Lachlan Deer, Julian Langer & Martin Stancsics","title":"Previous Versions of the Installation Guide"},{"location":"updates/#major-changes","text":"","title":"Major Changes"},{"location":"updates/#v2023","text":"Due to loss of admin rights on UZH issued machines, many installations weren't possible anymore, demanding many changes during installation Switch to native Windows applications instead of WSL Usage of winget for Windows Alternative to homebrew on Mac","title":"v2023"},{"location":"updates/#v2022","text":"Switch from the Anaconda to Miniforge to have a leaner Python distribution Use a separated conda environment for the course instead of the base environment Switch from vcxsrv to GWSL as it's more user-friendly Obtain Chromedriver through chromedriver_autoinstaller","title":"v2022"},{"location":"updates/#v202101","text":"Update package versions for all Operating Systems Mac instructions using zsh rather than bash WSL instructions compliant with WSL2 Uses Google Chrome and Chromedriver from WSL for webscraping via an xserver","title":"v2021.0.1"},{"location":"updates/#v2020","text":"Migrate from Cygwin to Windows Subsystem for Linux Higher dependency on Homebrew to install packages for Mac Emphasis on installation using terminal commands rather than graphical installers to enhance reproducibility Remove GIS guide Split's installation instructions of R, RStudio and additional R packaged into separate versions","title":"v2020"},{"location":"updates/#2019-foundations-edition","text":"Focus only on R, terminal, Git and snakemake","title":"2019 Foundations edition"},{"location":"webscraping_drivers/","text":"Web Scraping Using an Automated Browser Sometimes when we scrape the web, we need to automate our computer to open a web browser to gather information from each page. This is especially true when the site we want to scrape has content that is loaded dynamically with javascript. We will solve this by installing Google Chrome and using a tool called Chromedriver. The former has to be installed manually, but the latter will be handled by a very handy Python package we have already installed ( chromedriver-autoinstaller ). Installing this stuff is operating system specific, hence so are the instructions below. Department Managed Laptops Head over to the Sofware Center and install Google Chrome. Mac Users We need an up to date version of the web browser Google Chrome. We will install it via Homebrew. Enter the following into the terminal and hit Return : brew install --cask google-chrome Verify the install: google-chrome --version which should yield output similar to: Google Chrome 103.0.5060.53 Linux Users We need an up to date version of Google Chrome and some additional linux packages. First add the additional linux packages by entering the following into the terminal: sudo apt-get install libxss1 libappindicator1 libindicator7 Now let's download the latest stable version of Google Chrome using the terminal: wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb And now install it: sudo dpkg -i google-chrome*.deb sudo apt-get install -f Verify the install: google-chrome --version which should yield output similar to: Google Chrome 103.0.5060.53 Windows Users Everyone with admin right can install Google Chrome with: winget install -e --id Google.Chrome Verify the installation by opening Chrome.","title":"Webscraping"},{"location":"webscraping_drivers/#web-scraping-using-an-automated-browser","text":"Sometimes when we scrape the web, we need to automate our computer to open a web browser to gather information from each page. This is especially true when the site we want to scrape has content that is loaded dynamically with javascript. We will solve this by installing Google Chrome and using a tool called Chromedriver. The former has to be installed manually, but the latter will be handled by a very handy Python package we have already installed ( chromedriver-autoinstaller ). Installing this stuff is operating system specific, hence so are the instructions below. Department Managed Laptops Head over to the Sofware Center and install Google Chrome.","title":"Web Scraping Using an Automated Browser"},{"location":"webscraping_drivers/#mac-users","text":"We need an up to date version of the web browser Google Chrome. We will install it via Homebrew. Enter the following into the terminal and hit Return : brew install --cask google-chrome Verify the install: google-chrome --version which should yield output similar to: Google Chrome 103.0.5060.53","title":"Mac Users"},{"location":"webscraping_drivers/#linux-users","text":"We need an up to date version of Google Chrome and some additional linux packages. First add the additional linux packages by entering the following into the terminal: sudo apt-get install libxss1 libappindicator1 libindicator7 Now let's download the latest stable version of Google Chrome using the terminal: wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb And now install it: sudo dpkg -i google-chrome*.deb sudo apt-get install -f Verify the install: google-chrome --version which should yield output similar to: Google Chrome 103.0.5060.53","title":"Linux Users"},{"location":"webscraping_drivers/#windows-users","text":"Everyone with admin right can install Google Chrome with: winget install -e --id Google.Chrome Verify the installation by opening Chrome.","title":"Windows Users"},{"location":"windows-wsl/","text":"Windows Subsystem For Linux Windows Users Only! This page is only for those who are using Windows. Those with Mac or Linux operating systems can proceed to 'Command Line Tools.' Windows Subsystem for Linux (WSL) is a feature in Windows 10/11 that enables you to use Linux command-line tools on your Windows system. By installing this feature, everyone in the course will be able to run the same commands, and get the same output - an essential aspect of reproducibility. We hope that you will continue to use the WSL features we introduce over the next three weeks after the course is over for your own research related computing. The process for installing everything we need here is quite order dependent - follow the steps in the order they appear below. Want More Information? For more information about the Windows Subsystem for Linux, look here . Up to Date Windows 10/11 Required! To go further with this Installation Guide you need to have an up to date installation of Windows 10. IT Services in the Econ Department have assured us, if you update Windows to the latest version in your UZH laptop everything that follows will work. If you do not have a Windows 10 machine, Contact us! Install the Windows Subsystem for Linux Join the Windows Insider Program here Check that you have a recent build of Windows 10 (Build 19041 or above) Open up the run command with the Win + R key combo Type winver into the run command text box and hit OK . You should now see a dialogue screen with a OS build number. If the build number is older than 19041, update your windows to a later build. Open PowerShell as an administrator and type wsl --install The --install command performs the following actions: Enables the optional WSL and Virtual Machine Platform components Downloads and installs the latest Linux kernel Sets WSL 2 as the default Downloads and installs the Ubuntu Linux distribution (reboot may be required) You will likely be asked to restart your machine during this installation process. If you get error messages, you can check the troubleshooting pages . This can be a little daunting, come see us if you need in person help. WSL installation issues When we were trying this ourselves using Windows laptops provided by the University of Zurich we frequently got error messages saying the installation could not continue followed by an error code. The missing piece is a need to change a setting in the BIOS . Changing the 'Intel Virtualization Technology' setting to 'Enabled' fixed it for us. If you don't feel comfortable making this kind of BIOS change yourself, we'll help you if you come and see us. Set up your Linux user info Once the install is complete: Open the distribution using the start menu. You will be asked to create a username and password. Do so, and press Enter after each step. You might not see anything change as you type the password, that's OK -- it is recording what you write. Update and Upgrade your packages. In the shell that is open, use the command: sudo apt update && sudo apt upgrade Set up Windows Terminal Windows Terminal is our preferred terminal for Windows. Open the Microsoft Store Search for Windows Terminal Choose the first option - either Windows Terminal or Windows Terminal (Preview) Install it by clicking 'Get' Once installed, you will see it under 'Recently Added' in the Windows menu Open Windows Terminal To get access to your Ubuntu system, click the down arrow in the menu bar Select Ubuntu-xx.xx, and your Ubuntu terminal will open The Way Forward As you proceed through the remainder of the Installation Guide, you will generally follow the steps for 'Linux Users' and enter the commands into the Ubuntu Terminal we just installed. Occasionally there will be differences between Linux and Windows steps - these will be clearly marked by a separate header 'Windows Users.'","title":"Windows wsl"},{"location":"windows-wsl/#windows-subsystem-for-linux","text":"Windows Users Only! This page is only for those who are using Windows. Those with Mac or Linux operating systems can proceed to 'Command Line Tools.' Windows Subsystem for Linux (WSL) is a feature in Windows 10/11 that enables you to use Linux command-line tools on your Windows system. By installing this feature, everyone in the course will be able to run the same commands, and get the same output - an essential aspect of reproducibility. We hope that you will continue to use the WSL features we introduce over the next three weeks after the course is over for your own research related computing. The process for installing everything we need here is quite order dependent - follow the steps in the order they appear below. Want More Information? For more information about the Windows Subsystem for Linux, look here . Up to Date Windows 10/11 Required! To go further with this Installation Guide you need to have an up to date installation of Windows 10. IT Services in the Econ Department have assured us, if you update Windows to the latest version in your UZH laptop everything that follows will work. If you do not have a Windows 10 machine, Contact us!","title":"Windows Subsystem For Linux"},{"location":"windows-wsl/#install-the-windows-subsystem-for-linux","text":"Join the Windows Insider Program here Check that you have a recent build of Windows 10 (Build 19041 or above) Open up the run command with the Win + R key combo Type winver into the run command text box and hit OK . You should now see a dialogue screen with a OS build number. If the build number is older than 19041, update your windows to a later build. Open PowerShell as an administrator and type wsl --install The --install command performs the following actions: Enables the optional WSL and Virtual Machine Platform components Downloads and installs the latest Linux kernel Sets WSL 2 as the default Downloads and installs the Ubuntu Linux distribution (reboot may be required) You will likely be asked to restart your machine during this installation process. If you get error messages, you can check the troubleshooting pages . This can be a little daunting, come see us if you need in person help. WSL installation issues When we were trying this ourselves using Windows laptops provided by the University of Zurich we frequently got error messages saying the installation could not continue followed by an error code. The missing piece is a need to change a setting in the BIOS . Changing the 'Intel Virtualization Technology' setting to 'Enabled' fixed it for us. If you don't feel comfortable making this kind of BIOS change yourself, we'll help you if you come and see us.","title":"Install the Windows Subsystem for Linux"},{"location":"windows-wsl/#set-up-your-linux-user-info","text":"Once the install is complete: Open the distribution using the start menu. You will be asked to create a username and password. Do so, and press Enter after each step. You might not see anything change as you type the password, that's OK -- it is recording what you write. Update and Upgrade your packages. In the shell that is open, use the command: sudo apt update && sudo apt upgrade","title":"Set up your Linux user info"},{"location":"windows-wsl/#set-up-windows-terminal","text":"Windows Terminal is our preferred terminal for Windows. Open the Microsoft Store Search for Windows Terminal Choose the first option - either Windows Terminal or Windows Terminal (Preview) Install it by clicking 'Get' Once installed, you will see it under 'Recently Added' in the Windows menu Open Windows Terminal To get access to your Ubuntu system, click the down arrow in the menu bar Select Ubuntu-xx.xx, and your Ubuntu terminal will open","title":"Set up Windows Terminal"},{"location":"windows-wsl/#the-way-forward","text":"As you proceed through the remainder of the Installation Guide, you will generally follow the steps for 'Linux Users' and enter the commands into the Ubuntu Terminal we just installed. Occasionally there will be differences between Linux and Windows steps - these will be clearly marked by a separate header 'Windows Users.'","title":"The Way Forward"}]} \ No newline at end of file diff --git a/sitemap.xml.gz b/sitemap.xml.gz index 005495d..82e2714 100644 Binary files a/sitemap.xml.gz and b/sitemap.xml.gz differ