Code Monkey home page Code Monkey logo

psci232's Introduction

PSCI232

This repository contains all the data and code we'll be working with in PSCI 232.

Code

All the code here is available for you to use. To download some code ("code" is anything with a .R at the end), you can do one of two things:

Thing one

  1. From the main page (https://github.com/ameliahg/PSCI232), click the .R file you want to put on your computer. This will take you to the file's page.
  2. In the second gray bar, you should see some buttons: Raw, Blame, a screen, two squares, a pencil, and a garbage can.
  3. Click the two squares to copy the whole contents of the code to the clipboard.
  4. In RStudio, open a new script file (remember, that's the little green plus sign at the top left).
  5. Paste the code you just copied into the file.
  6. Save the file to your PSCI 232 folder.

The advantage of Thing One is that you won't be downloading unnecessary data.

Thing two

  1. From the main page (https://github.com/ameliahg/PSCI232), click the green Code button and choose "Download ZIP." This will download the ENTIRE repository -- all the data and all the code -- as a giant zip file.
  2. Click the file to "unzip" it. The code you want, and all the other stuff from the PSCI232 repository, will be in a new folder called PSCI232-main.
  3. Open the file you want to play with.

The advantage of Thing Two is that it automatically creates the PSCI 232 folder I'd like you to have! It has the disadvantage that, each time you download the repository, you'll be getting the whole folder, potentially creating confusing multiple copies. My suggestion that you either (1) always save the zip file with the same name or (2) make sure to discard old downloads as soon as the new one is in place.

Data

You are welcome to download data directly to your computer, but as we've seen in class, this can create complexity (and take up a lot of extra space on your computer). My preference is that you read data directly from a Github URL rather than downloading and reading from a file. If you want to look at the raw data, feel free to download and open in Excel (or copy-paste into Excel via the Raw button), but for the purposes of our work, I'll always ask you to read from Github. Here is how you read from Github:

  1. From the main PSCI 232 page, click the folder you want and, within the folder, the file you want to use.
  2. Find the button (at the top, toward the right) that says "Raw." Click it! You should see the data --- not in tabular format but in plain text.
  3. Copy the URL of this page.
  4. Paste the URL into your code, as in cy <- read_csv("https://raw.githubusercontent.com/ameliahg/PSCI232/main/country-data/country_stats_byyear.csv").
  5. As long as you have a wifi connection, you should be good to go.

psci232's People

Contributors

ameliahg avatar

Stargazers

Brie avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.