├── .ipynb_checkpoints
└── Part3_Github_ResolvingMergeConflicts-checkpoint.ipynb
├── README.md
├── github_instructions
├── .ipynb_checkpoints
│ └── Part2_ForkingTheClassRepository-checkpoint.ipynb
├── Part1_IntroGitAndGithub.ipynb
├── Part2_ForkingTheClassRepository.ipynb
├── Part3_Github_ResolvingMergeConflicts.ipynb
└── images
│ └── screenshot.jpg
├── test
└── test.txt
├── week1
├── .ipynb_checkpoints
│ ├── PSet0_HelloWorld_Setup_Github-checkpoint.ipynb
│ ├── Part1_IntroGitAndGithub-checkpoint.ipynb
│ ├── Part1b_GithubDesktop-checkpoint.ipynb
│ ├── Part2_Anaconda_Setup-checkpoint.ipynb
│ ├── Part2_ForkingTheClassRepository-checkpoint.ipynb
│ └── Part3_Github_ResolvingMergeConflicts-checkpoint.ipynb
├── PSet0_HelloWorld_Setup_Github.ipynb
├── Part1b_GithubDesktop.ipynb
├── Part2_Anaconda_Setup.ipynb
└── images
│ ├── GithubDesktopHomepage.jpg
│ ├── addrepo.png
│ ├── branchdiagram.png
│ ├── changes.png
│ ├── commit.png
│ ├── deletebranch.png
│ ├── history.png
│ ├── homepage.png
│ ├── newbranch.png
│ └── startscreen.png
├── week10
├── 10_PSET7_sliderMap.md
├── 10_d3_mapping.md
├── d3-examples
│ ├── boston-hover-map.html
│ ├── boston-slider-map.html
│ ├── choropleth-map.html
│ ├── data
│ │ ├── boston_neighborhoods.json
│ │ ├── boston_rodents.json
│ │ ├── countries.json
│ │ ├── ky-counties.json
│ │ ├── problem_set_data
│ │ │ └── election_results_2000_2016.json
│ │ ├── unemployment.tsv
│ │ ├── us.json
│ │ └── us_unemployment_2008.tsv
│ ├── employment-map-quantize.html
│ ├── employment-map-threshold.html
│ └── projections-example.html
└── images
│ └── elections_2000_2016.png
├── week11
├── 12_d3_transitions.md
├── d3-examples
│ ├── barchart.html
│ ├── data
│ │ ├── coffee_rodents_transform.csv
│ │ ├── rat-data-larger-v2.csv
│ │ ├── rat-data-larger.csv
│ │ └── unemployment_2005_2015.csv
│ ├── drag.html
│ ├── linechart.html
│ ├── scatterplot.html
│ └── transitions.html
└── supplemental_examples
│ ├── linked_map_chart
│ ├── data
│ │ ├── election_2016_state_results.csv
│ │ ├── election_2016_state_results2.csv
│ │ └── us.json
│ └── index.html
│ └── unstacking_bar_chart
│ ├── data
│ └── election_2016_state_results.csv
│ └── index.html
├── week2
├── .ipynb_checkpoints
│ ├── 01. Python Introduction-checkpoint.ipynb
│ └── PSET_1_Intro to Python-checkpoint.ipynb
├── 01. Python Introduction.ipynb
├── PSET_1_Intro to Python.ipynb
└── images
│ └── ipython.png
├── week3
├── .ipynb_checkpoints
│ ├── 02. Pandas Introduction-checkpoint.ipynb
│ └── PSET_2_Pandas-checkpoint.ipynb
├── 02. Pandas Introduction.ipynb
├── PSET_2_Pandas.ipynb
├── data
│ ├── CENTRE_FVE_20170123.csv
│ ├── center_county_precinct_centroids.csv
│ ├── centrecounty_precinct_results_nov2016.txt
│ └── voter_registration_list_documentation.doc
└── images
│ └── pandas.png
├── week4
├── 03_API_Data_Scraping.ipynb
├── EXTRA_Scraping_with_Beautiful_Soup.ipynb
├── data
│ └── example_tweets
│ │ └── 20170223-211946tweets.json
├── rat_data.txt
├── scripts
│ └── starter_script.py
└── twitter_key.py
├── week5
├── 04. Networks and Distributions.ipynb
├── PSET_4_Networks.ipynb
├── images
│ ├── 151110_Congestion.jpg
│ └── Graph_theory_tree.jpg
├── jsons
│ ├── 12wonderwomentweets.json
│ ├── 15nowPhillytweets.json
│ ├── 1lovemovement1tweets.json
│ ├── AORTACooptweets.json
│ ├── ActionUnitedtweets.json
│ ├── ArdellasHousetweets.json
│ ├── AsAmUnitedtweets.json
│ ├── EastwickFNCtweets.json
│ ├── ElevationProjttweets.json
│ ├── Grounded215tweets.json
│ ├── JondhiTCRCtweets.json
│ ├── MaypopPhillytweets.json
│ ├── NSMPhillytweets.json
│ ├── NewVoicesPghtweets.json
│ ├── PGHCoopstweets.json
│ ├── PPF_PAtweets.json
│ ├── PhillyCoopstweets.json
│ ├── PhillyJwJtweets.json
│ ├── PhillyStaysPuttweets.json
│ ├── PrisonRadiotweets.json
│ ├── Prison_Societytweets.json
│ ├── REALjusticePHLtweets.json
│ ├── ReDesignReadingtweets.json
│ ├── RegenFinancetweets.json
│ ├── SRH_Phillytweets.json
│ ├── Spiralqtweets.json
│ ├── StudentsDivesttweets.json
│ ├── Vamos_Juntos_tweets.json
│ ├── YASP2tweets.json
│ ├── YSRPinPhillytweets.json
│ ├── YUCphillytweets.json
│ ├── btbphillytweets.json
│ ├── eqattweets.json
│ ├── innocencepatweets.json
│ ├── onamovetweets.json
│ ├── philaposhtweets.json
│ ├── powerinterfaithtweets.json
│ ├── sanctuarymvmttweets.json
│ ├── tmcpghtweets.json
│ ├── urbancreator215tweets.json
│ └── whynotprospertweets.json
└── social_justice_orgs_pa.csv
├── week6
├── 06_PSET5_project_website.md
├── 06_midterm_presentations.md
├── 06_part1_front_end_environments.md
├── 06_part2_front_end_environments.md
├── d3-example
│ ├── index.html
│ └── unemployment.tsv
├── images
│ ├── dom.png
│ ├── environment.png
│ └── simple_page.png
└── www
│ ├── css
│ └── main.css
│ ├── images
│ └── cat.jpg
│ └── js
│ └── main.js
└── week9
├── 09_D3intro_inclass.md
├── 09_PSET6_d3_introduction.md
├── data
├── age-groups.csv
├── election_2016_county_results.csv
├── election_2016_state_results.csv
├── unemployment.tsv
└── us.json
├── images
├── county-result-map.png
└── state-result-barchart.png
├── simple-bar-chart-completed.html
└── stacked-barchart-completed.html
/.ipynb_checkpoints/Part3_Github_ResolvingMergeConflicts-checkpoint.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "# Resolving Merge Conflicts (Command Line)\n",
8 | "\n",
9 | "***\n",
10 | "\n",
11 | "Sometimes, when working on a project, you and your colleagues will change the same line of code. This often happens unintentionally, and you end up with a conflict between two files. No need to panic, simply read the \n",
12 | "\n",
13 | "When this happens, you will see an error message similar to the following:\n",
14 | "\n",
15 | "\n",
16 | "\n",
17 | "\n",
18 | "\n",
19 | "Find the class repository here:\n",
20 | "\n",
21 | "[https://github.com/civic-data-design-lab/big-data-spring2017](https://github.com/civic-data-design-lab/big-data-spring2017)\n",
22 | "\n",
23 | "To get a copy of the files, **fork** a copy of the class repository into your own profile. **You only need to do this once.** This will give you your own version of the class repository, and it is still linked to the main class repository, meaning you can **fetch** and **pull** materials from it as needed. Let's start be making our **fork**.\n",
24 | "\n",
25 | "### A. Fork the Class Repository\n",
26 | "\n",
27 | "Create your own personal copy, or ‘fork’, of the class repository.\n"
28 | ]
29 | }
30 | ],
31 | "metadata": {
32 | "kernelspec": {
33 | "display_name": "Python 3",
34 | "language": "python",
35 | "name": "python3"
36 | },
37 | "language_info": {
38 | "codemirror_mode": {
39 | "name": "ipython",
40 | "version": 3
41 | },
42 | "file_extension": ".py",
43 | "mimetype": "text/x-python",
44 | "name": "python",
45 | "nbconvert_exporter": "python",
46 | "pygments_lexer": "ipython3",
47 | "version": "3.6.0"
48 | }
49 | },
50 | "nbformat": 4,
51 | "nbformat_minor": 2
52 | }
53 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # big-data-spring2017
2 | Materials for the Big Data, Visualization, and Society course at MIT DUSP - Spring 2017
3 |
--------------------------------------------------------------------------------
/github_instructions/Part3_Github_ResolvingMergeConflicts.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "# Resolving Merge Conflicts (Command Line)\n",
8 | "\n",
9 | "***\n",
10 | "\n",
11 | "Sometimes, when working on a project, you and your colleagues will change the same line of code. This often happens unintentionally, and you end up with a conflict between two files. No need to panic, simply read the message, and locate what the error might be. If two people change the same line of code, Github will not know which one it should keep, so you have to tell which one, and remove the other.\n",
12 | "\n",
13 | "When this happens, you will see an error similar to the following:\n",
14 | "\n",
15 | "***\n",
16 | "\n",
17 | "```sh\n",
18 | "Auto-merging test.txt\n",
19 | "CONFLICT (content): Merge conflict in test.txt\n",
20 | "Automatic merge failed; fix conflicts and then commit the result.\n",
21 | "\n",
22 | "```\n",
23 | "\n",
24 | "***\n",
25 | "\n",
26 | "What this is saying is that there is a conflict in the file **test.txt**. When we try to pull and there are conflicts, Github will add the conflicts to our file. To fix this conflict, we need to open the file and choose which of the competing lines we want to use.\n",
27 | "\n",
28 | "\n",
29 | "### 1. Navigate to and Open the File\n",
30 | "\n",
31 | "Navigate to the file with conflicts on your computer and open it up using your favorite text editor (i.e. Sublime Text). We'll make all of the changes that are needed to resolve the conflicts in the text editor.\n",
32 | "\n",
33 | "### 2. Identify the Merge Conflicts\n",
34 | "\n",
35 | "With the file open, locate the merge conflicts. They are signified using **conflict markers**. The conflict markers are signifed by **<<<<<<<**, **=======**, **>>>>>>>**. The **<<<<<<<** signified the start of the conflicted lines and represents the changes on your local machine. It is separated by a **=======** marker, and the **>>>>>>>** marker signals the remote conflict.\n",
36 | "\n",
37 | "Conflicts in the conflicted file will look like the following.\n",
38 | "\n",
39 | "***\n",
40 | "\n",
41 | "```sh\n",
42 | "<<<<<<< HEAD # Start of changes made on your local machine\n",
43 | "\n",
44 | "Hello. # Your changes and edits\n",
45 | "======= # Comparison marker\n",
46 | "Good bye. # Other changes and edits\n",
47 | "\n",
48 | ">>>>>>> ANOTHER BRANCH # End of changes made on the remote repository\n",
49 | "```\n",
50 | "\n",
51 | "***\n",
52 | "\n",
53 | "### 3. Edit the File to Resolve Conflicts\n",
54 | "\n",
55 | "To resolve these conflicts, determine which lines you want to keep, and remove the conflict markers and lines of code you don't want. Clean the file so that only the lines of code you want to keep are in it.\n",
56 | "\n",
57 | "For example, to keep the local changes in the above example, remove the conflict markers, and delete the lines of code that came from the remote repository, keeping only the edits you've made.\n",
58 | "\n",
59 | "***\n",
60 | "\n",
61 | "```sh\n",
62 | "Hello. # Your changes and edits\n",
63 | "```\n",
64 | "\n",
65 | "***\n",
66 | "\n",
67 | "Save your file once you've made the edit and resolved the conflict.\n",
68 | "\n",
69 | "### 4. Fix all of the Merge Conflicts\n",
70 | "\n",
71 | "In order to complete the merge and get the commit to properly perform, you need to fix **all** of the merge conflicts. Unfortunately, often you have to do this manually, as Github will not know which of the conflicts it should keep. There is a way to force Github to take changes using **git pull --force** but you almost never want to do this, it will overwrite all of your changes!\n",
72 | "\n",
73 | "### 5. Commit and Push your Change\n",
74 | "\n",
75 | "Once you have completed resolving conflicts, you can push just as you would any other commit. First **commit** your changes, include a message that you are resolving conflicts in addition to your changes, then **push** them to the remote.\n",
76 | "\n",
77 | "### Read the Docs\n",
78 | "\n",
79 | "Github has nice documentation on merge conflicts, read them at the following:\n",
80 | "\n",
81 | "[https://help.github.com/articles/resolving-a-merge-conflict-on-github/](https://help.github.com/articles/resolving-a-merge-conflict-on-github/)\n",
82 | "\n",
83 | "If you run into any messages you don't understand, don't forget to read the documentation, or search Stack Exchange!"
84 | ]
85 | },
86 | {
87 | "cell_type": "code",
88 | "execution_count": null,
89 | "metadata": {
90 | "collapsed": true
91 | },
92 | "outputs": [],
93 | "source": []
94 | }
95 | ],
96 | "metadata": {
97 | "kernelspec": {
98 | "display_name": "Python 3",
99 | "language": "python",
100 | "name": "python3"
101 | },
102 | "language_info": {
103 | "codemirror_mode": {
104 | "name": "ipython",
105 | "version": 3
106 | },
107 | "file_extension": ".py",
108 | "mimetype": "text/x-python",
109 | "name": "python",
110 | "nbconvert_exporter": "python",
111 | "pygments_lexer": "ipython3",
112 | "version": "3.6.0"
113 | }
114 | },
115 | "nbformat": 4,
116 | "nbformat_minor": 2
117 | }
118 |
--------------------------------------------------------------------------------
/github_instructions/images/screenshot.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/civic-data-design-lab/big-data-spring2017/f284d43965a46d5fca63899e49b7e02e916635e7/github_instructions/images/screenshot.jpg
--------------------------------------------------------------------------------
/test/test.txt:
--------------------------------------------------------------------------------
1 | testing123
--------------------------------------------------------------------------------
/week1/.ipynb_checkpoints/PSet0_HelloWorld_Setup_Github-checkpoint.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "# Problem Set 0: \"Hello World\" - Setup a Github Homepage"
8 | ]
9 | },
10 | {
11 | "cell_type": "markdown",
12 | "metadata": {},
13 | "source": [
14 | "This problem set is straightforward and designed to get you started, and has a goal of helping you set up a website and becoming more familiar with Github. For your deliverable, you are going to create a simple website that says Hello World. You can customize it and add your bio, a couple of links, whatever you want.\n",
15 | "\n",
16 | "`On the assignment tab of the course Stellar website, submit the link to your github page.`"
17 | ]
18 | },
19 | {
20 | "cell_type": "markdown",
21 | "metadata": {},
22 | "source": [
23 | "### 1. Create your github.io page"
24 | ]
25 | },
26 | {
27 | "cell_type": "markdown",
28 | "metadata": {},
29 | "source": [
30 | "Following the instructions found in Part 1 of the in-class tutorial, create your github homepage. On this page, include atleast the following:\n",
31 | "\n",
32 | "1. Heading with your name\n",
33 | "2. Paragraph containing a short text bio or introduction\n",
34 | "3. An image and link to a visualization project you find inspiring\n",
35 | "\n",
36 | "This is your github homepage that you can use as your own website. You can set this up however you like, and can take it with you after you leave MIT. In class, we will revisit this page later in the course when we work to expand our knowledge of HTML, CSS, and JavaScript, and it can ultimately be used to host your final project. You can then customize it further, add more content, and do some design and styling.\n",
37 | "\n",
38 | "Use this exercise to get all of the software and tools, ie Github, Conda, Sublime Text, installed and running on your machine.\n",
39 | "\n",
40 | "Next week, we will **DIVE INTO PYTHON!**"
41 | ]
42 | },
43 | {
44 | "cell_type": "markdown",
45 | "metadata": {
46 | "collapsed": true
47 | },
48 | "source": [
49 | "### 2. Clone your copy of the Course Github Repository\n",
50 | "\n",
51 | "For next week, you want your own copy of the course Github repo. Once you have completed setup, clone a copy of the course repository into your own Github folder on your machine."
52 | ]
53 | },
54 | {
55 | "cell_type": "markdown",
56 | "metadata": {},
57 | "source": [
58 | "***\n",
59 | "\n",
60 | "```sh\n",
61 | "git clone git@github.com:civic-data-design-lab/big-data-spring2017.git\n",
62 | "```\n",
63 | "\n",
64 | "***"
65 | ]
66 | },
67 | {
68 | "cell_type": "markdown",
69 | "metadata": {},
70 | "source": [
71 | "Next week, we will add more materials for the course, and you can pull them into your remote repository."
72 | ]
73 | },
74 | {
75 | "cell_type": "code",
76 | "execution_count": null,
77 | "metadata": {
78 | "collapsed": true
79 | },
80 | "outputs": [],
81 | "source": []
82 | }
83 | ],
84 | "metadata": {
85 | "kernelspec": {
86 | "display_name": "Python 3",
87 | "language": "python",
88 | "name": "python3"
89 | },
90 | "language_info": {
91 | "codemirror_mode": {
92 | "name": "ipython",
93 | "version": 3
94 | },
95 | "file_extension": ".py",
96 | "mimetype": "text/x-python",
97 | "name": "python",
98 | "nbconvert_exporter": "python",
99 | "pygments_lexer": "ipython3",
100 | "version": "3.6.0"
101 | }
102 | },
103 | "nbformat": 4,
104 | "nbformat_minor": 0
105 | }
106 |
--------------------------------------------------------------------------------
/week1/.ipynb_checkpoints/Part1b_GithubDesktop-checkpoint.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "# Git Crash Course: Setting up Git and Github (Desktop) \n",
8 | "\n",
9 | "***\n",
10 | "\n",
11 | "While using the command is the standard method for interacting with Git and Github, Github Desktop makes tracking changes and updating your files even easier by providing a desktop application and graphic user interface (no command line coding necessary!).\n",
12 | "\n",
13 | "***\n",
14 | "\n",
15 | "## 1. Download and Install Github Desktop\n",
16 | "\n",
17 | "If you've already gone through the steps from [Part 1](https://github.com/lukemich47/big-data-spring2017/blob/master/week1/Part1_IntroGitAndGithub.ipynb), then you've already set up a Github account. So we'll jump to installing Github Desktop.\n",
18 | "\n",
19 | "Navigate to the [Github Desktop homepage](https://desktop.github.com/) and download the client.\n",
20 | "\n",
21 | "\n",
22 | "\n",
23 | "***\n",
24 | "\n",
25 | "## 2. Using the Application\n",
26 | "\n",
27 | "Once you start the application, you'll be prompted to authenticate to Github using your login information. Next, a series of information windows will open to step you through an entry tutorial.\n",
28 | "\n",
29 | "\n",
30 | "\n",
31 | "While you should definitely take some time to walk through this built-in tutorial, we'll skip this for now to show you the basics.\n",
32 | "\n",
33 | "***\n",
34 | "\n",
35 | "### Adding a Repo\n",
36 | "\n",
37 | "Click on the plus sign in the upper left corner of the Github Desktop start screen to add a repo.\n",
38 | "\n",
39 | "\n",
40 | "\n",
41 | "From here, we can create a new Git repository, clone a repo from a remote location, or add an existing repo. Since we created a repo in Part 1, let's select the \"Add\" tab. Then click \"Browse\" to navigate through our local file structure. Select the folder that contains our root working directory. In my case, I'll be adding the repo that contains this tutorial.\n",
42 | "\n",
43 | "***\n",
44 | "\n",
45 | "### Viewing Changes\n",
46 | "\n",
47 | "Now that we've added our local repo to the desktop app, we can view, commit, and push any changes that we make locally. With the recently-added repo selected in the left panel, select the \"Changes\" tab at the top of the screen, which will let you view your recent changes.\n",
48 | "\n",
49 | "\n",
50 | "\n",
51 | "If you don't see any changes here, navigate to your repo location on your local machine and make a change (create a blank text file, for example).\n",
52 | "\n",
53 | "***\n",
54 | "\n",
55 | "### Committing Changes\n",
56 | "\n",
57 | "To commit our new changes, first give your commit a comment and, if you'd like, a more specific description. Then click \"Commit to master.\"\n",
58 | "\n",
59 | "\n",
60 | "\n",
61 | "***\n",
62 | "\n",
63 | "### Working with Branches\n",
64 | "\n",
65 | "To create a branch, simply click the branch button at the top of the application, and name the branch.\n",
66 | "\n",
67 | "\n",
68 | "\n",
69 | "You can publish this branch to your remote repo (the existence of the branch, not the changes on it) with the \"Publish\" button in the upper right.\n",
70 | "\n",
71 | "To delete a branch, select the gear symbol in the upper right corner and select \"Delete branch_name.\"\n",
72 | "\n",
73 | "\n",
74 | "\n",
75 | "***\n",
76 | "\n",
77 | "### The Branch Diagram\n",
78 | "\n",
79 | "Across the top of the application's layout, we see the branch diagram. This shows us how our project has evolved and let's us quickly see the various branching steps and committed changes that have occured. Your diagram will be a bit simpler than the one shown here, but you should see the commit we just completed in the previous step (committed changes show as open circles; synced changes show as filled dots).\n",
80 | "\n",
81 | "\n",
82 | "\n",
83 | "***\n",
84 | "\n",
85 | "### Viewing History\n",
86 | "\n",
87 | "If we click on the \"History\" tab at the top of the application, we can see a list of our previous commits. Select one of your commits on the left to view the list of changes. We can then click the small arrow next to each change to view the specific lines of text that have been changed.\n",
88 | "\n",
89 | "\n",
90 | "\n",
91 | "If we want to return to a state of our code prior to a given commit, we can click the \"Revert button.\"\n",
92 | "\n",
93 | "***\n",
94 | "\n",
95 | "### Syncing Changes\n",
96 | "\n",
97 | "To sync our changes, simply click the Sync button in the top right corner. This pushes our commit to our remote repo on the Github site. You'll see the open circle(s) in the branch diagram turn into closed dots.\n",
98 | "\n",
99 | "***\n",
100 | "\n",
101 | "## 3. Additional Resources\n",
102 | "\n",
103 | "Feel free to read more about [Getting Started](https://help.github.com/desktop/guides/getting-started/) and [Contributing to Projects](https://help.github.com/desktop/guides/contributing/) with Github Desktop.\n",
104 | "\n",
105 | "\n",
106 | "\n"
107 | ]
108 | }
109 | ],
110 | "metadata": {
111 | "kernelspec": {
112 | "display_name": "Python 3",
113 | "language": "python",
114 | "name": "python3"
115 | },
116 | "language_info": {
117 | "codemirror_mode": {
118 | "name": "ipython",
119 | "version": 3
120 | },
121 | "file_extension": ".py",
122 | "mimetype": "text/x-python",
123 | "name": "python",
124 | "nbconvert_exporter": "python",
125 | "pygments_lexer": "ipython3",
126 | "version": "3.6.0"
127 | }
128 | },
129 | "nbformat": 4,
130 | "nbformat_minor": 0
131 | }
132 |
--------------------------------------------------------------------------------
/week1/.ipynb_checkpoints/Part2_Anaconda_Setup-checkpoint.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "# Anaconda Crash Course: Using Anaconda (“Conda”) to Supplement Python\n",
8 | "\n",
9 | "***\n",
10 | "\n",
11 | "Python is a valuable scripting language for data analysis and management; however managing a Python project environment can be nuanced and tricky. Anaconda is a platform built to complement Python by creating customizable and easily accessible environments in which you can run Python scripts. \n",
12 | "\n",
13 | "For reference, the Anaconda homepage is found at the following address.\n",
14 | "\n",
15 | "https://www.continuum.io/why-anaconda\n",
16 | "\n",
17 | "The following tutorial runs through the installation of Anaconda, and then introduces you to the concepts behind Anaconda that make it a nice and useful Python development environment.\n",
18 | "\n",
19 | "***\n",
20 | "\n",
21 | "### Install Anaconda (aka Conda)\n",
22 | "\n",
23 | "The Anaconda homepage contains the materials that you need to install Anaconda on your machine. You will primarily be using Anaconda through the command line, so you will have to get comfortable working on the command line. \n",
24 | "\n",
25 | "## 1. Check Anaconda Version and Install\n",
26 | "\n",
27 | "The first step is to open Terminal and check to see if you have Anaconda installed. If not, we will install it. To check the version, follow the following commands.\n",
28 | "\n",
29 | "#### i. Open Terminal\n",
30 | "#### ii. Check Version\n",
31 | "\n",
32 | "The syntax to access Anaconda on the command line is simply ‘conda’. To check the version you have installed, use the following:\n",
33 | "\n",
34 | "```sh\n",
35 | "\tconda info\n",
36 | "```\n",
37 | "\n",
38 | "If you have it installed, you will see platform information, version details, and environment paths after you hit enter, if not, the terminal will not recognize the command.\n",
39 | "\n",
40 | "\n",
41 | "#### iii. Install Anaconda\n",
42 | "\n",
43 | "To install ‘Conda’, navigate to the Anaconda downloads page at:\n",
44 | "\n",
45 | "[Anaconda Homepage and Downloads](https://www.continuum.io/downloads)\n",
46 | "\n",
47 | "Here, pick your system (Mac/Windows) and the Python version. In our case, we are going to pick Mac and select **version 3.6**. Use the graphical installer, it will provide us a wizard that will step us through the installation process. Download the installer, double click the package file and follow the instructions. Just a heads up, the installation process takes 5-10 minutes, its a big program, but is straight forward.\n",
48 | "\n",
49 | "If you run into problems installing, or you get an error that states that Anaconda cannot be install in the default location, visit this page for short instructions on how to troubleshoot installation.\n",
50 | "\n",
51 | "[Anaconda Installation Docs](http://docs.continuum.io/anaconda/install#anaconda-install)\n",
52 | "\n",
53 | "Anaconda is contained in one directory, so if you ever need to uninstall Anaconda, use Terminal to remove the entire Anaconda directory using **rm -rf ~/anaconda**.\n",
54 | "\n",
55 | "We used Python 3, not Python 2. The guidelines on the site describe that we should use whichever version we intend to use most often, but ultimately it will not matter that much. Anaconda supports both, and if you ever want to use Python 2, you can create an environment that uses Python 2 and activate it. The main reason you would want to use Python 2 is that Linux distributions and Macs, Python 2.7 is still the default, and because the Python ecosystem has amassed a significant amount of quality software over the years in which some of it does not yet work on 3. Python 3, however, is designed to be more robust and fixes a lot of bugs in Python 2, so in the future, expect to see a continued migration to Python 3. We are set up with Python 3 as our default, but since we are using Anaconda, if we want to set up a Python 2 instance at some point, it will be easy to do!\n",
56 | "\n",
57 | "## 2. Confirm the installation worked properly\n",
58 | "\n",
59 | "Once we are finished with the installation, check to make sure it installed correctly by performing a version check.\n",
60 | "\n",
61 | "```sh\n",
62 | "\tconda info\n",
63 | "```\n",
64 | "\n",
65 | "If you see a 4.X.X version number popup, and with platform and environment information, the installation worked. Now we can begin working with Conda.\n",
66 | "\n",
67 | "***\n",
68 | "\n",
69 | "## 3. The Anaconda 30-minute Test Drive\n",
70 | "\n",
71 | "Now let’s familiarize with what exactly Anaconda allows us to do. On a basic level, Anaconda is a Python distribution that adds many features and streamlines work with the language. It does this by creating specific environments on your machine in which you can specify the packages that are installed and used, and easily lets you toggle between environments. With in the individual environments, you can perform analysis, run scripts, and develop code.\n",
72 | "\n",
73 | "Environments are the bread and butter of Anaconda, because not all Python scripts you run will use the same packages, so you can customize exactly what you need, and create a sandbox that lets you try new things. Your environments will save the packages you have installed, allowing you to easily load an environment and run your scripts.\n",
74 | "\n",
75 | "The Anaconda team has put together a very nice Test Drive that is designed to take about a half hour that will introduce you to concepts around Anaconda, including setting up an environment, toggling between environments, managing the Python version you are using, managing the Python packages you are using in your environments, and finally, removing or uninstall packages and environments if you no longer need them.\n",
76 | "\n",
77 | "Follow the Test Drive at the following link:\n",
78 | "\n",
79 | "[Anaconda 30-minute Test Drive](http://conda.pydata.org/docs/test-drive.html)\n",
80 | "\n",
81 | "Working with Anaconda can make working with Python a much more pleasant experience. For additional resources, including cheatsheets and useful links, see the following materials."
82 | ]
83 | },
84 | {
85 | "cell_type": "markdown",
86 | "metadata": {
87 | "collapsed": true
88 | },
89 | "source": [
90 | "***\n",
91 | "\n",
92 | "## Additional Reading and Resources\n",
93 | "\n",
94 | "#### Conda Command Line Cheatsheet -\n",
95 | "http://conda.pydata.org/docs/_downloads/conda-cheatsheet.pdf\n",
96 | "\n",
97 | "#### Mac Command Line Cheatsheet –\n",
98 | "https://github.com/0nn0/terminal-mac-cheatsheet/wiki/Terminal-Cheatsheet-for-Mac-(-basics-)\n",
99 | "\n",
100 | "#### Python Documentation -\n",
101 | "https://docs.python.org/3/library/index.html"
102 | ]
103 | },
104 | {
105 | "cell_type": "code",
106 | "execution_count": null,
107 | "metadata": {
108 | "collapsed": true
109 | },
110 | "outputs": [],
111 | "source": []
112 | }
113 | ],
114 | "metadata": {
115 | "kernelspec": {
116 | "display_name": "Python 3",
117 | "language": "python",
118 | "name": "python3"
119 | },
120 | "language_info": {
121 | "codemirror_mode": {
122 | "name": "ipython",
123 | "version": 3
124 | },
125 | "file_extension": ".py",
126 | "mimetype": "text/x-python",
127 | "name": "python",
128 | "nbconvert_exporter": "python",
129 | "pygments_lexer": "ipython3",
130 | "version": "3.6.0"
131 | }
132 | },
133 | "nbformat": 4,
134 | "nbformat_minor": 0
135 | }
136 |
--------------------------------------------------------------------------------
/week1/.ipynb_checkpoints/Part3_Github_ResolvingMergeConflicts-checkpoint.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "# Resolving Merge Conflicts (Command Line)\n",
8 | "\n",
9 | "***\n",
10 | "\n",
11 | "Sometimes, when working on a project, you and your colleagues will change the same line of code. This often happens unintentionally, and you end up with a conflict between two files. No need to panic, simply read the \n",
12 | "\n",
13 | "When this happens, you will see an error like the following:\n",
14 | "\n",
15 | "***\n",
16 | "\n",
17 | "```sh\n",
18 | "git clone git@github.com:username/big-data-spring2017.git\n",
19 | "```\n",
20 | "\n",
21 | "***\n",
22 | "\n",
23 | "\n",
24 | "### 1. Navigate to and Open the File\n",
25 | "\n",
26 | "### 2. Identify the Merge Conflicts\n",
27 | "\n",
28 | "***\n",
29 | "\n",
30 | "```sh\n",
31 | "<<<<<<< HEAD # Changes made on your local machine\n",
32 | "\n",
33 | "Hello. # Your changes and edits\n",
34 | "=======\n",
35 | "Good bye. # Other changes and edits\n",
36 | "\n",
37 | ">>>>>>> ANOTHER BRANCH # Changes made on the remote repository\n",
38 | "```\n",
39 | "\n",
40 | "***\n",
41 | "\n",
42 | "### 3. Edit the File to Resolve Conflicts\n",
43 | "\n",
44 | "***\n",
45 | "\n",
46 | "```sh\n",
47 | "Hello. # Your changes and edits\n",
48 | "```\n",
49 | "\n",
50 | "***\n",
51 | "\n",
52 | "### 4. Fix all of the Merge Conflicts\n",
53 | "\n",
54 | "In order to complete the merge and get the commit to properly perform, you need to fix **all** of the merge conflicts. Unfortunately, often you have to do this manually, as Github will not know which of the conflicts it should keep. There is a way to force Github to take changes using **git pull --force** but you never want to do this, it will overwrite all of your changes!\n",
55 | "\n",
56 | "### 5. Commit and Push your Change\n",
57 | "\n",
58 | "Once you have completed \n",
59 | "\n",
60 | "### Read the Docs\n",
61 | "\n",
62 | "Github has nice documentation on merge conflicts, read them at the following:\n",
63 | "\n",
64 | "[https://help.github.com/articles/resolving-a-merge-conflict-on-github/](https://help.github.com/articles/resolving-a-merge-conflict-on-github/)\n",
65 | "\n",
66 | "If you run into any messages you don't understand, don't forget to read the documentation, or search Stack Exchange!"
67 | ]
68 | }
69 | ],
70 | "metadata": {
71 | "kernelspec": {
72 | "display_name": "Python 3",
73 | "language": "python",
74 | "name": "python3"
75 | },
76 | "language_info": {
77 | "codemirror_mode": {
78 | "name": "ipython",
79 | "version": 3
80 | },
81 | "file_extension": ".py",
82 | "mimetype": "text/x-python",
83 | "name": "python",
84 | "nbconvert_exporter": "python",
85 | "pygments_lexer": "ipython3",
86 | "version": "3.6.0"
87 | }
88 | },
89 | "nbformat": 4,
90 | "nbformat_minor": 2
91 | }
92 |
--------------------------------------------------------------------------------
/week1/PSet0_HelloWorld_Setup_Github.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "# Problem Set 0: \"Hello World\" - Setup a Github Homepage"
8 | ]
9 | },
10 | {
11 | "cell_type": "markdown",
12 | "metadata": {},
13 | "source": [
14 | "This problem set is straightforward and designed to get you started, and has a goal of helping you set up a website and becoming more familiar with Github. For your deliverable, you are going to create a simple website that says Hello World. You can customize it and add your bio, a couple of links, whatever you want.\n",
15 | "\n",
16 | "`On the assignment tab of the course Stellar website, submit the link to your github page.`"
17 | ]
18 | },
19 | {
20 | "cell_type": "markdown",
21 | "metadata": {},
22 | "source": [
23 | "### 1. Create your github.io page"
24 | ]
25 | },
26 | {
27 | "cell_type": "markdown",
28 | "metadata": {},
29 | "source": [
30 | "Following the instructions found in Part 1 of the in-class tutorial, create your github homepage. On this page, include atleast the following:\n",
31 | "\n",
32 | "1. Heading with your name\n",
33 | "2. Paragraph containing a short text bio or introduction\n",
34 | "3. An image and link to a visualization project you find inspiring\n",
35 | "\n",
36 | "This is your github homepage that you can use as your own website. You can set this up however you like, and can take it with you after you leave MIT. In class, we will revisit this page later in the course when we work to expand our knowledge of HTML, CSS, and JavaScript, and it can ultimately be used to host your final project. You can then customize it further, add more content, and do some design and styling.\n",
37 | "\n",
38 | "Use this exercise to get all of the software and tools, ie Github, Conda, Sublime Text, installed and running on your machine.\n",
39 | "\n",
40 | "Next week, we will **DIVE INTO PYTHON!**"
41 | ]
42 | },
43 | {
44 | "cell_type": "markdown",
45 | "metadata": {
46 | "collapsed": true
47 | },
48 | "source": [
49 | "### 2. Clone your copy of the Course Github Repository\n",
50 | "\n",
51 | "For next week, you want your own copy of the course Github repo. Once you have completed setup, clone a copy of the course repository into your own Github folder on your machine."
52 | ]
53 | },
54 | {
55 | "cell_type": "markdown",
56 | "metadata": {},
57 | "source": [
58 | "***\n",
59 | "\n",
60 | "```sh\n",
61 | "git clone git@github.com:civic-data-design-lab/big-data-spring2017.git\n",
62 | "```\n",
63 | "\n",
64 | "***"
65 | ]
66 | },
67 | {
68 | "cell_type": "markdown",
69 | "metadata": {},
70 | "source": [
71 | "Next week, we will add more materials for the course, and you can pull them into your remote repository."
72 | ]
73 | },
74 | {
75 | "cell_type": "code",
76 | "execution_count": null,
77 | "metadata": {
78 | "collapsed": true
79 | },
80 | "outputs": [],
81 | "source": []
82 | }
83 | ],
84 | "metadata": {
85 | "kernelspec": {
86 | "display_name": "Python 3",
87 | "language": "python",
88 | "name": "python3"
89 | },
90 | "language_info": {
91 | "codemirror_mode": {
92 | "name": "ipython",
93 | "version": 3
94 | },
95 | "file_extension": ".py",
96 | "mimetype": "text/x-python",
97 | "name": "python",
98 | "nbconvert_exporter": "python",
99 | "pygments_lexer": "ipython3",
100 | "version": "3.6.0"
101 | }
102 | },
103 | "nbformat": 4,
104 | "nbformat_minor": 0
105 | }
106 |
--------------------------------------------------------------------------------
/week1/Part1b_GithubDesktop.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "# Git Crash Course: Setting up Git and Github (Desktop) \n",
8 | "\n",
9 | "***\n",
10 | "\n",
11 | "While using the command is the standard method for interacting with Git and Github, Github Desktop makes tracking changes and updating your files even easier by providing a desktop application and graphic user interface (no command line coding necessary!).\n",
12 | "\n",
13 | "***\n",
14 | "\n",
15 | "## 1. Download and Install Github Desktop\n",
16 | "\n",
17 | "If you've already gone through the steps from [Part 1](https://github.com/lukemich47/big-data-spring2017/blob/master/week1/Part1_IntroGitAndGithub.ipynb), then you've already set up a Github account. So we'll jump to installing Github Desktop.\n",
18 | "\n",
19 | "Navigate to the [Github Desktop homepage](https://desktop.github.com/) and download the client.\n",
20 | "\n",
21 | "\n",
22 | "\n",
23 | "***\n",
24 | "\n",
25 | "## 2. Using the Application\n",
26 | "\n",
27 | "Once you start the application, you'll be prompted to authenticate to Github using your login information. Next, a series of information windows will open to step you through an entry tutorial.\n",
28 | "\n",
29 | "\n",
30 | "\n",
31 | "While you should definitely take some time to walk through this built-in tutorial, we'll skip this for now to show you the basics.\n",
32 | "\n",
33 | "***\n",
34 | "\n",
35 | "### Adding a Repo\n",
36 | "\n",
37 | "Click on the plus sign in the upper left corner of the Github Desktop start screen to add a repo.\n",
38 | "\n",
39 | "\n",
40 | "\n",
41 | "From here, we can create a new Git repository, clone a repo from a remote location, or add an existing repo. Since we created a repo in Part 1, let's select the \"Add\" tab. Then click \"Browse\" to navigate through our local file structure. Select the folder that contains our root working directory. In my case, I'll be adding the repo that contains this tutorial.\n",
42 | "\n",
43 | "***\n",
44 | "\n",
45 | "### Viewing Changes\n",
46 | "\n",
47 | "Now that we've added our local repo to the desktop app, we can view, commit, and push any changes that we make locally. With the recently-added repo selected in the left panel, select the \"Changes\" tab at the top of the screen, which will let you view your recent changes.\n",
48 | "\n",
49 | "\n",
50 | "\n",
51 | "If you don't see any changes here, navigate to your repo location on your local machine and make a change (create a blank text file, for example).\n",
52 | "\n",
53 | "***\n",
54 | "\n",
55 | "### Committing Changes\n",
56 | "\n",
57 | "To commit our new changes, first give your commit a comment and, if you'd like, a more specific description. Then click \"Commit to master.\"\n",
58 | "\n",
59 | "\n",
60 | "\n",
61 | "***\n",
62 | "\n",
63 | "### Working with Branches\n",
64 | "\n",
65 | "To create a branch, simply click the branch button at the top of the application, and name the branch.\n",
66 | "\n",
67 | "\n",
68 | "\n",
69 | "You can publish this branch to your remote repo (the existence of the branch, not the changes on it) with the \"Publish\" button in the upper right.\n",
70 | "\n",
71 | "To delete a branch, select the gear symbol in the upper right corner and select \"Delete branch_name.\"\n",
72 | "\n",
73 | "\n",
74 | "\n",
75 | "***\n",
76 | "\n",
77 | "### The Branch Diagram\n",
78 | "\n",
79 | "Across the top of the application's layout, we see the branch diagram. This shows us how our project has evolved and let's us quickly see the various branching steps and committed changes that have occured. Your diagram will be a bit simpler than the one shown here, but you should see the commit we just completed in the previous step (committed changes show as open circles; synced changes show as filled dots).\n",
80 | "\n",
81 | "\n",
82 | "\n",
83 | "***\n",
84 | "\n",
85 | "### Viewing History\n",
86 | "\n",
87 | "If we click on the \"History\" tab at the top of the application, we can see a list of our previous commits. Select one of your commits on the left to view the list of changes. We can then click the small arrow next to each change to view the specific lines of text that have been changed.\n",
88 | "\n",
89 | "\n",
90 | "\n",
91 | "If we want to return to a state of our code prior to a given commit, we can click the \"Revert button.\"\n",
92 | "\n",
93 | "***\n",
94 | "\n",
95 | "### Syncing Changes\n",
96 | "\n",
97 | "To sync our changes, simply click the Sync button in the top right corner. This pushes our commit to our remote repo on the Github site. You'll see the open circle(s) in the branch diagram turn into closed dots.\n",
98 | "\n",
99 | "***\n",
100 | "\n",
101 | "## 3. Additional Resources\n",
102 | "\n",
103 | "Feel free to read more about [Getting Started](https://help.github.com/desktop/guides/getting-started/) and [Contributing to Projects](https://help.github.com/desktop/guides/contributing/) with Github Desktop.\n",
104 | "\n",
105 | "\n",
106 | "\n"
107 | ]
108 | }
109 | ],
110 | "metadata": {
111 | "kernelspec": {
112 | "display_name": "Python 3",
113 | "language": "python",
114 | "name": "python3"
115 | },
116 | "language_info": {
117 | "codemirror_mode": {
118 | "name": "ipython",
119 | "version": 3
120 | },
121 | "file_extension": ".py",
122 | "mimetype": "text/x-python",
123 | "name": "python",
124 | "nbconvert_exporter": "python",
125 | "pygments_lexer": "ipython3",
126 | "version": "3.6.0"
127 | }
128 | },
129 | "nbformat": 4,
130 | "nbformat_minor": 0
131 | }
132 |
--------------------------------------------------------------------------------
/week1/Part2_Anaconda_Setup.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "markdown",
5 | "metadata": {},
6 | "source": [
7 | "# Anaconda Crash Course: Using Anaconda (“Conda”) to Supplement Python\n",
8 | "\n",
9 | "***\n",
10 | "\n",
11 | "Python is a valuable scripting language for data analysis and management; however managing a Python project environment can be nuanced and tricky. Anaconda is a platform built to complement Python by creating customizable and easily accessible environments in which you can run Python scripts. \n",
12 | "\n",
13 | "For reference, the Anaconda homepage is found at the following address.\n",
14 | "\n",
15 | "https://www.continuum.io/why-anaconda\n",
16 | "\n",
17 | "The following tutorial runs through the installation of Anaconda, and then introduces you to the concepts behind Anaconda that make it a nice and useful Python development environment.\n",
18 | "\n",
19 | "***\n",
20 | "\n",
21 | "### Install Anaconda (aka Conda)\n",
22 | "\n",
23 | "The Anaconda homepage contains the materials that you need to install Anaconda on your machine. You will primarily be using Anaconda through the command line, so you will have to get comfortable working on the command line. \n",
24 | "\n",
25 | "## 1. Check Anaconda Version and Install\n",
26 | "\n",
27 | "The first step is to open Terminal and check to see if you have Anaconda installed. If not, we will install it. To check the version, follow the following commands.\n",
28 | "\n",
29 | "#### i. Open Terminal\n",
30 | "#### ii. Check Version\n",
31 | "\n",
32 | "The syntax to access Anaconda on the command line is simply ‘conda’. To check the version you have installed, use the following:\n",
33 | "\n",
34 | "```sh\n",
35 | "\tconda info\n",
36 | "```\n",
37 | "\n",
38 | "If you have it installed, you will see platform information, version details, and environment paths after you hit enter, if not, the terminal will not recognize the command.\n",
39 | "\n",
40 | "\n",
41 | "#### iii. Install Anaconda\n",
42 | "\n",
43 | "To install ‘Conda’, navigate to the Anaconda downloads page at:\n",
44 | "\n",
45 | "[Anaconda Homepage and Downloads](https://www.continuum.io/downloads)\n",
46 | "\n",
47 | "Here, pick your system (Mac/Windows) and the Python version. In our case, we are going to pick Mac and select **version 3.6**. Use the graphical installer, it will provide us a wizard that will step us through the installation process. Download the installer, double click the package file and follow the instructions. Just a heads up, the installation process takes 5-10 minutes, its a big program, but is straight forward.\n",
48 | "\n",
49 | "If you run into problems installing, or you get an error that states that Anaconda cannot be install in the default location, visit this page for short instructions on how to troubleshoot installation.\n",
50 | "\n",
51 | "[Anaconda Installation Docs](http://docs.continuum.io/anaconda/install#anaconda-install)\n",
52 | "\n",
53 | "Anaconda is contained in one directory, so if you ever need to uninstall Anaconda, use Terminal to remove the entire Anaconda directory using **rm -rf ~/anaconda**.\n",
54 | "\n",
55 | "We used Python 3, not Python 2. The guidelines on the site describe that we should use whichever version we intend to use most often, but ultimately it will not matter that much. Anaconda supports both, and if you ever want to use Python 2, you can create an environment that uses Python 2 and activate it. The main reason you would want to use Python 2 is that Linux distributions and Macs, Python 2.7 is still the default, and because the Python ecosystem has amassed a significant amount of quality software over the years in which some of it does not yet work on 3. Python 3, however, is designed to be more robust and fixes a lot of bugs in Python 2, so in the future, expect to see a continued migration to Python 3. We are set up with Python 3 as our default, but since we are using Anaconda, if we want to set up a Python 2 instance at some point, it will be easy to do!\n",
56 | "\n",
57 | "## 2. Confirm the installation worked properly\n",
58 | "\n",
59 | "Once we are finished with the installation, check to make sure it installed correctly by performing a version check.\n",
60 | "\n",
61 | "```sh\n",
62 | "\tconda info\n",
63 | "```\n",
64 | "\n",
65 | "If you see a 4.X.X version number popup, and with platform and environment information, the installation worked. Now we can begin working with Conda.\n",
66 | "\n",
67 | "***\n",
68 | "\n",
69 | "## 3. The Anaconda 30-minute Test Drive\n",
70 | "\n",
71 | "Now let’s familiarize with what exactly Anaconda allows us to do. On a basic level, Anaconda is a Python distribution that adds many features and streamlines work with the language. It does this by creating specific environments on your machine in which you can specify the packages that are installed and used, and easily lets you toggle between environments. With in the individual environments, you can perform analysis, run scripts, and develop code.\n",
72 | "\n",
73 | "Environments are the bread and butter of Anaconda, because not all Python scripts you run will use the same packages, so you can customize exactly what you need, and create a sandbox that lets you try new things. Your environments will save the packages you have installed, allowing you to easily load an environment and run your scripts.\n",
74 | "\n",
75 | "The Anaconda team has put together a very nice Test Drive that is designed to take about a half hour that will introduce you to concepts around Anaconda, including setting up an environment, toggling between environments, managing the Python version you are using, managing the Python packages you are using in your environments, and finally, removing or uninstall packages and environments if you no longer need them.\n",
76 | "\n",
77 | "Follow the Test Drive at the following link:\n",
78 | "\n",
79 | "[Anaconda 30-minute Test Drive](http://conda.pydata.org/docs/test-drive.html)\n",
80 | "\n",
81 | "Working with Anaconda can make working with Python a much more pleasant experience. For additional resources, including cheatsheets and useful links, see the following materials."
82 | ]
83 | },
84 | {
85 | "cell_type": "markdown",
86 | "metadata": {
87 | "collapsed": true
88 | },
89 | "source": [
90 | "***\n",
91 | "\n",
92 | "## Additional Reading and Resources\n",
93 | "\n",
94 | "#### Conda Command Line Cheatsheet -\n",
95 | "http://conda.pydata.org/docs/_downloads/conda-cheatsheet.pdf\n",
96 | "\n",
97 | "#### Mac Command Line Cheatsheet –\n",
98 | "https://github.com/0nn0/terminal-mac-cheatsheet/wiki/Terminal-Cheatsheet-for-Mac-(-basics-)\n",
99 | "\n",
100 | "#### Python Documentation -\n",
101 | "https://docs.python.org/3/library/index.html"
102 | ]
103 | },
104 | {
105 | "cell_type": "code",
106 | "execution_count": null,
107 | "metadata": {
108 | "collapsed": true
109 | },
110 | "outputs": [],
111 | "source": []
112 | }
113 | ],
114 | "metadata": {
115 | "kernelspec": {
116 | "display_name": "Python 3",
117 | "language": "python",
118 | "name": "python3"
119 | },
120 | "language_info": {
121 | "codemirror_mode": {
122 | "name": "ipython",
123 | "version": 3
124 | },
125 | "file_extension": ".py",
126 | "mimetype": "text/x-python",
127 | "name": "python",
128 | "nbconvert_exporter": "python",
129 | "pygments_lexer": "ipython3",
130 | "version": "3.6.0"
131 | }
132 | },
133 | "nbformat": 4,
134 | "nbformat_minor": 0
135 | }
136 |
--------------------------------------------------------------------------------
/week1/images/GithubDesktopHomepage.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/civic-data-design-lab/big-data-spring2017/f284d43965a46d5fca63899e49b7e02e916635e7/week1/images/GithubDesktopHomepage.jpg
--------------------------------------------------------------------------------
/week1/images/addrepo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/civic-data-design-lab/big-data-spring2017/f284d43965a46d5fca63899e49b7e02e916635e7/week1/images/addrepo.png
--------------------------------------------------------------------------------
/week1/images/branchdiagram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/civic-data-design-lab/big-data-spring2017/f284d43965a46d5fca63899e49b7e02e916635e7/week1/images/branchdiagram.png
--------------------------------------------------------------------------------
/week1/images/changes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/civic-data-design-lab/big-data-spring2017/f284d43965a46d5fca63899e49b7e02e916635e7/week1/images/changes.png
--------------------------------------------------------------------------------
/week1/images/commit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/civic-data-design-lab/big-data-spring2017/f284d43965a46d5fca63899e49b7e02e916635e7/week1/images/commit.png
--------------------------------------------------------------------------------
/week1/images/deletebranch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/civic-data-design-lab/big-data-spring2017/f284d43965a46d5fca63899e49b7e02e916635e7/week1/images/deletebranch.png
--------------------------------------------------------------------------------
/week1/images/history.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/civic-data-design-lab/big-data-spring2017/f284d43965a46d5fca63899e49b7e02e916635e7/week1/images/history.png
--------------------------------------------------------------------------------
/week1/images/homepage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/civic-data-design-lab/big-data-spring2017/f284d43965a46d5fca63899e49b7e02e916635e7/week1/images/homepage.png
--------------------------------------------------------------------------------
/week1/images/newbranch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/civic-data-design-lab/big-data-spring2017/f284d43965a46d5fca63899e49b7e02e916635e7/week1/images/newbranch.png
--------------------------------------------------------------------------------
/week1/images/startscreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/civic-data-design-lab/big-data-spring2017/f284d43965a46d5fca63899e49b7e02e916635e7/week1/images/startscreen.png
--------------------------------------------------------------------------------
/week10/10_PSET7_sliderMap.md:
--------------------------------------------------------------------------------
1 | # Data Visualization with D3
2 | ## D3 Mapping: Create a Temporal Election Map
3 |
4 | For the PSET this week, we are going to create an interactive map using state-level results of presidential election data from 2000-2016. This will utilize and build from the examples created during the in-class exercise.
5 |
6 | We would like you to recreate the following map showing election map showing . In the **data/problem_set_data** folder on Github you will find a file for your use named **election_results_2000_2016.json**. Use this JSON for your visualization.
7 |
8 | The JSON was created from records from the U.S. Electoral College datasets from the [U.S. National Archives and Records Administration](https://www.archives.gov/federal-register/electoral-college/historical.html).
9 |
10 | You can take some liberty with your design, but should atleast include the following.
11 |
12 | 
13 |
14 | #### Requirements
15 |
16 | 1. Show Presidential Election Results for five election cycles. (2000, 2004, 2008, 2012, and 2016)
17 | 2. Use a Range Slider to navigate between the five elections.
18 | 3. Change the color of the state depending on the result, red should be republican, blue should be democrat.
19 | 4. Add an informative title, source, and supplemental information to your visualization.
20 |
21 | ### Help and Hints
22 |
23 | Fields of relevance in **election_results_2000_2016.json** are:
24 |
25 | * elect2000 - state-by-state results from November 2000
26 | * elect2000 - state-by-state results from November 2004
27 | * elect2000 - state-by-state results from November 2008
28 | * elect2000 - state-by-state results from November 2012
29 | * elect2016 - state-by-state results from November 2016
30 |
31 | R - Republican
32 | D - Democrat
33 |
34 | * Data is from [National Archives and Records Administration](https://www.archives.gov/federal-register/electoral-college/historical.html)
35 |
36 | You can refer to the slider example made in class for this exercise to help you figure out a solution.
37 |
38 | * [Slider Map Example - Mike Foster](http://duspviz.mit.edu/d3-workshop/examples/session4/boston-slider-map.html)
39 |
40 | * Documentation on the range slider and what it returns are located here:
41 |
42 | [http://www.w3schools.com/jsref/dom_obj_range.asp](http://www.w3schools.com/jsref/dom_obj_range.asp)
43 | *Use console.log to see what values are being returned by the range slider.*
44 |
45 | ### In-class Exercise
46 |
47 | In-class exercise for this week located at:
48 |
49 | [http://duspviz.mit.edu/d3-workshop/mapping-data-with-d3/](http://duspviz.mit.edu/d3-workshop/mapping-data-with-d3/)
--------------------------------------------------------------------------------
/week10/10_d3_mapping.md:
--------------------------------------------------------------------------------
1 | # Data Visualization with D3
2 | ## Intro to D3: Mapping and Time Sliders
3 |
4 | This week, we are running through the basics of mapping with D3! Our exercise this week is going to involve creating a map, adding data, and then interaction using a time slider. We will then show a number of examples, and introduce the concepts of working with projections, TopoJSON, choropleths, and tabular data.
5 |
6 | ### Instructions
7 |
8 | 1. The first thing you will want to do is grab a current copy of the repo from Github. In here, you will find data and code examples for the exercises, and some supplemental files for your reference.
9 |
10 | 2. Start up a localhost python server in the directory named *d3-examples*. This folder contains code examples and data folder. This is where we will do our map design and coding.
11 |
12 | 3. Find the in-class exercise at:
13 |
14 | [http://duspviz.mit.edu/d3-workshop/mapping-data-with-d3/](http://duspviz.mit.edu/d3-workshop/mapping-data-with-d3/)
15 |
16 | This page will contain the tutorial for the week. We are going to make a map using JavaScript and D3 methods!
17 |
18 | 4. The take-home problem set (10_PSET7_sliderMap) is found at the following in this weeks folder.
19 |
20 | [https://github.com/civic-data-design-lab/big-data-spring2017/blob/master/week10/10_PSET7_sliderMap.md](https://github.com/civic-data-design-lab/big-data-spring2017/blob/master/week10/10_PSET7_sliderMap.md)
21 |
--------------------------------------------------------------------------------
/week10/d3-examples/boston-hover-map.html:
--------------------------------------------------------------------------------
1 |
2 |
40 |
125 |
126 |
--------------------------------------------------------------------------------
/week10/d3-examples/choropleth-map.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | A D3 county choropleth map of Kentucky oil or gas wells
6 |
7 |
8 |
9 |
10 |
19 |
20 |
21 |
74 |
75 |
--------------------------------------------------------------------------------
/week10/d3-examples/employment-map-quantize.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/week10/d3-examples/employment-map-threshold.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
12 |
13 |
14 |
15 |
16 |
58 |
--------------------------------------------------------------------------------
/week10/d3-examples/projections-example.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/week10/images/elections_2000_2016.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/civic-data-design-lab/big-data-spring2017/f284d43965a46d5fca63899e49b7e02e916635e7/week10/images/elections_2000_2016.png
--------------------------------------------------------------------------------
/week11/12_d3_transitions.md:
--------------------------------------------------------------------------------
1 | # Data Visualization with D3
2 | ## Intro to D3: Transitions and Animations
3 |
4 | This week, we are looking at transitions and animations. In other words, transitions are the way you add animation and movement to your map that work with interactions and make your visualizations visually interesting and appealing.
5 |
6 | ### Instructions
7 |
8 | 1. The first thing you will want to do is grab a current copy of the repo from Github. Follow the same process as in previous weeks. In here, you will find data and code examples for the exercises.
9 |
10 | 2. Start up a localhost python server in the directory. This is where we will do our visualization design and coding.
11 |
12 | 3. Find the in-class exercise at:
13 |
14 | [http://duspviz.mit.edu/d3-workshop/transitions-animation/](http://duspviz.mit.edu/d3-workshop/transitions-animation/)
15 |
16 | This page will contain the tutorial for the week. We are going working through making transitions and animations using javascript and D3 methods!
17 |
18 | 4. There is no take home problem set this week, you should spend the time working on your projects.
19 |
20 | #### Take the knowledge from today and continue to learn D3!
21 |
--------------------------------------------------------------------------------
/week11/d3-examples/barchart.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | I'm Learning D3
6 |
7 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
25 |
28 |
29 |
30 |
131 |
132 |
--------------------------------------------------------------------------------
/week11/d3-examples/data/coffee_rodents_transform.csv:
--------------------------------------------------------------------------------
1 | city,rats_2015,coffee_2015,rats_2016,coffee_2016
2 | Somerville,60,40,40,60
3 | Cambridge,30,90,80,100
4 | Boston,90,120,10,30
5 | Brookline,40,50,60,30
6 | Chelsea,10,10,100,120
--------------------------------------------------------------------------------
/week11/d3-examples/data/rat-data-larger-v2.csv:
--------------------------------------------------------------------------------
1 | city,rats
2 | Brookline,60
3 | Boston,20
4 | Cambridge,50
5 | Somerville,90
6 | Watertown,60
7 | Medford,40
8 | Chelsea,10
--------------------------------------------------------------------------------
/week11/d3-examples/data/rat-data-larger.csv:
--------------------------------------------------------------------------------
1 | city,rats
2 | Brookline,40
3 | Boston,90
4 | Cambridge,30
5 | Somerville,60
6 | Watertown,75
7 | Medford,10
8 | Chelsea,55
--------------------------------------------------------------------------------
/week11/d3-examples/data/unemployment_2005_2015.csv:
--------------------------------------------------------------------------------
1 | date,rate
2 | Jan 2005,5.3
3 | Feb 2005,5.4
4 | Mar 2005,5.2
5 | Apr 2005,5.2
6 | May 2005,5.1
7 | Jun 2005,5.0
8 | Jul 2005,5.0
9 | Aug 2005,4.9
10 | Sep 2005,5.0
11 | Oct 2005,5.0
12 | Nov 2005,5.0
13 | Dec 2005,4.9
14 | Jan 2006,4.7
15 | Feb 2006,4.8
16 | Mar 2006,4.7
17 | Apr 2006,4.7
18 | May 2006,4.6
19 | Jun 2006,4.6
20 | Jul 2006,4.7
21 | Aug 2006,4.7
22 | Sep 2006,4.5
23 | Oct 2006,4.4
24 | Nov 2006,4.5
25 | Dec 2006,4.4
26 | Jan 2007,4.6
27 | Feb 2007,4.5
28 | Mar 2007,4.4
29 | Apr 2007,4.5
30 | May 2007,4.4
31 | Jun 2007,4.6
32 | Jul 2007,4.7
33 | Aug 2007,4.6
34 | Sep 2007,4.7
35 | Oct 2007,4.7
36 | Nov 2007,4.7
37 | Dec 2007,5.0
38 | Jan 2008,5.0
39 | Feb 2008,4.9
40 | Mar 2008,5.1
41 | Apr 2008,5.0
42 | May 2008,5.4
43 | Jun 2008,5.6
44 | Jul 2008,5.8
45 | Aug 2008,6.1
46 | Sep 2008,6.1
47 | Oct 2008,6.5
48 | Nov 2008,6.8
49 | Dec 2008,7.3
50 | Jan 2009,7.8
51 | Feb 2009,8.3
52 | Mar 2009,8.7
53 | Apr 2009,9.0
54 | May 2009,9.4
55 | Jun 2009,9.5
56 | Jul 2009,9.5
57 | Aug 2009,9.6
58 | Sep 2009,9.8
59 | Oct 2009,10.0
60 | Nov 2009,9.9
61 | Dec 2009,9.9
62 | Jan 2010,9.8
63 | Feb 2010,9.8
64 | Mar 2010,9.9
65 | Apr 2010,9.9
66 | May 2010,9.6
67 | Jun 2010,9.4
68 | Jul 2010,9.4
69 | Aug 2010,9.5
70 | Sep 2010,9.5
71 | Oct 2010,9.4
72 | Nov 2010,9.8
73 | Dec 2010,9.3
74 | Jan 2011,9.2
75 | Feb 2011,9.0
76 | Mar 2011,9.0
77 | Apr 2011,9.1
78 | May 2011,9.0
79 | Jun 2011,9.1
80 | Jul 2011,9.0
81 | Aug 2011,9.0
82 | Sep 2011,9.0
83 | Oct 2011,8.8
84 | Nov 2011,8.6
85 | Dec 2011,8.5
86 | Jan 2012,8.3
87 | Feb 2012,8.3
88 | Mar 2012,8.2
89 | Apr 2012,8.2
90 | May 2012,8.2
91 | Jun 2012,8.2
92 | Jul 2012,8.2
93 | Aug 2012,8.0
94 | Sep 2012,7.8
95 | Oct 2012,7.8
96 | Nov 2012,7.7
97 | Dec 2012,7.9
98 | Jan 2013,8.0
99 | Feb 2013,7.7
100 | Mar 2013,7.5
101 | Apr 2013,7.6
102 | May 2013,7.5
103 | Jun 2013,7.5
104 | Jul 2013,7.3
105 | Aug 2013,7.2
106 | Sep 2013,7.2
107 | Oct 2013,7.2
108 | Nov 2013,7.0
109 | Dec 2013,6.7
110 | Jan 2014,6.6
111 | Feb 2014,6.7
112 | Mar 2014,6.6
113 | Apr 2014,6.2
114 | May 2014,6.3
115 | Jun 2014,6.1
116 | Jul 2014,6.2
117 | Aug 2014,6.1
118 | Sep 2014,5.9
119 | Oct 2014,5.7
120 | Nov 2014,5.8
121 | Dec 2014,5.6
122 | Jan 2015,5.7
123 | Feb 2015,5.5
124 | Mar 2015,5.5
125 | Apr 2015,5.4
126 | May 2015,5.5
127 | Jun 2015,5.3
--------------------------------------------------------------------------------
/week11/d3-examples/drag.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | I'm Learning D3
5 |
6 |
20 |
21 |
22 |
Click and Drag the Circles! The radius of them is determined by our data.