Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
a5c2257
Homework 2 first upload
NathanCoyote Jul 27, 2021
83e0158
Homework 1
jtmann1 Jul 28, 2021
0dc0954
Merge branch 'atkissoncj:main' into main
jtmann1 Jul 29, 2021
3ce8682
HW 2
SCortezW Jul 29, 2021
3557a65
Homework 2 reattempt
SCortezW Jul 29, 2021
2becbcc
Homework 3 First Post
NathanCoyote Jul 30, 2021
ae55b37
Homework 2 submission
jtmann1 Jul 30, 2021
2f6bb2e
I posted HW 1 twice. The first time I did not use the correct filepat…
chrelwood Jul 30, 2021
2f18503
This is an updated commit today
alyamuya257 Aug 1, 2021
e425daf
Homework 3
SCortezW Aug 1, 2021
0818329
Homework 3
kbec19 Aug 2, 2021
82a837a
Homework 4
SCortezW Aug 2, 2021
e0a4c64
Submit HW1 and HW2
sstcloud Aug 3, 2021
dda00c7
Homework 4 submit
NathanCoyote Aug 4, 2021
c103544
HW4
kbec19 Aug 4, 2021
66fb56c
Homework 2 including the World Bank China dataset.
chrelwood Aug 4, 2021
6b1aee1
Merge branch 'atkissoncj:main' into main
jtmann1 Aug 8, 2021
59d7dc9
HW5
kbec19 Aug 9, 2021
e90b517
Homework 5
SCortezW Aug 9, 2021
d83c760
Merge pull request #50 from NathanCoyote/main
atkissoncj Aug 9, 2021
0a0710f
NC234 and move posts to _oldDrafts
atkissoncj Aug 9, 2021
8a2d498
Merge pull request #53 from jtmann1/main
atkissoncj Aug 9, 2021
4221020
JM2
atkissoncj Aug 9, 2021
5af30bb
Merge pull request #54 from SCortezW/main
atkissoncj Aug 9, 2021
1b63001
SC 2345
atkissoncj Aug 9, 2021
34def2c
_posts disappeared?
atkissoncj Aug 9, 2021
461c7a2
Merge pull request #57 from alyamuya257/main
atkissoncj Aug 9, 2021
c752a98
Revert "_posts disappeared?"
atkissoncj Aug 9, 2021
d5e270c
Revert "HW 3 and HW 4"
atkissoncj Aug 9, 2021
ad0868c
Merge pull request #62 from atkissoncj/revert-57-main
atkissoncj Aug 9, 2021
8f9631e
Merge branch 'main' of https://github.com/atkissoncj/DACSS601SS22021 …
atkissoncj Aug 9, 2021
20762b5
Merge pull request #58 from kbec19/main
atkissoncj Aug 9, 2021
8e0403f
KB345
atkissoncj Aug 9, 2021
04c36d3
Merge pull request #60 from sstcloud/main
atkissoncj Aug 9, 2021
8d9ed84
Merge pull request #61 from chrelwood/main
atkissoncj Aug 9, 2021
2c3398e
SJ12
atkissoncj Aug 9, 2021
a52202f
Merge branch 'main' of https://github.com/atkissoncj/DACSS601SS22021 …
atkissoncj Aug 9, 2021
d44ef5d
CE2
atkissoncj Aug 9, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19,384 changes: 9,692 additions & 9,692 deletions _data/EJSCREEN_2020_IL.csv

Large diffs are not rendered by default.

160 changes: 160 additions & 0 deletions _data/MBTA Systemwide Survey 2015-2017 Line Percentages.csv

Large diffs are not rendered by default.

1,444 changes: 1,444 additions & 0 deletions _data/chinaWorldBank.csv

Large diffs are not rendered by default.

Binary file added _data/~$SENIScoresElementaryShools-20212022.xlsx
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -1544,19 +1544,8 @@ <h2 id="statistical-analysis-in-r">Statistical Analysis in R</h2>
8 EV 557 -3 709 -14 5708 LGA IAD
9 B6 557 -3 838 -8 79 JFK MCO
10 AA 558 -2 753 8 301 LGA ORD
air_time distance
&lt;dbl&gt; &lt;dbl&gt;
1 227 1400
2 227 1416
3 160 1089
4 183 1576
5 116 762
6 150 719
7 158 1065
8 53 229
9 140 944
10 138 733
# ... with 336,766 more rows</code></pre>
# ... with 336,766 more rows, and 2 more variables: air_time &lt;dbl&gt;,
# distance &lt;dbl&gt;</code></pre>
</div>
<hr />
<p>Distill is a publication format for scientific and technical writing, native to the web.</p>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -1590,7 +1590,7 @@ <h2 id="i-found-the-column-names-and-listed-them">I found the column names and l
<h2 id="i-would-use-the-gather-function-to-collect-the-where-the-bills-originated-into-the-chamber-column.-i-would-argue-that-the-chambers-column-could-be-created-using-gather-if-it-was-not-already-there.-otherwise-no.-our-gather-function-could-look-like-this">I would use the gather() function to collect the where the bills originated into the Chamber column. I would argue that the Chambers column could be created using gather() if it was not already there. Otherwise, no. Our gather() function could look like this:</h2>
<div class="layout-chunk" data-layout="l-body">
<div class="sourceCode">
<pre class="sourceCode r"><code class="sourceCode r"><span class='va'>tidymyData</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://tidyr.tidyverse.org/reference/gather.html'>gather</a></span><span class='op'>(</span><span class='va'>myData</span>, key <span class='op'>=</span> <span class='st'>"Chamber"</span>, value <span class='op'>=</span> <span class='st'>"ChamberNumber"</span>, <span class='fl'>6</span><span class='op'>:</span><span class='fl'>8</span><span class='op'>)</span>
<pre class="sourceCode r"><code class="sourceCode r"><span class='va'>tidymyData</span> <span class='op'>&lt;-</span> <span class='fu'>gather</span><span class='op'>(</span><span class='va'>myData</span>, key <span class='op'>=</span> <span class='st'>"Chamber"</span>, value <span class='op'>=</span> <span class='st'>"ChamberNumber"</span>, <span class='fl'>6</span><span class='op'>:</span><span class='fl'>8</span><span class='op'>)</span>
</code></pre>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,7 @@ <h1>Elwood HW 1</h1>
<span class='va'>wd</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://rdrr.io/r/base/getwd.html'>getwd</a></span><span class='op'>(</span><span class='op'>)</span>
<span class='fu'><a href='https://rdrr.io/r/base/getwd.html'>setwd</a></span><span class='op'>(</span><span class='st'>".."</span><span class='op'>)</span>
<span class='fu'><a href='https://rdrr.io/r/base/getwd.html'>setwd</a></span><span class='op'>(</span><span class='st'>".."</span><span class='op'>)</span>
<span class='va'>myData</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://readr.tidyverse.org/reference/read_delim.html'>read_tsv</a></span><span class='op'>(</span><span class='st'>"_data/covid-responses.tab"</span><span class='op'>)</span>
<span class='va'>myData</span> <span class='op'>&lt;-</span> <span class='fu'>read_tsv</span><span class='op'>(</span><span class='st'>"_data/covid-responses.tab"</span><span class='op'>)</span>
<span class='fu'><a href='https://rdrr.io/r/base/getwd.html'>setwd</a></span><span class='op'>(</span><span class='va'>wd</span><span class='op'>)</span>

<span class='co'># let's unpack that a bit.</span>
Expand Down Expand Up @@ -1828,7 +1828,7 @@ <h1>Elwood HW 1</h1>
<span class='co'># "percievedreaction" to "Q26". If we wanted to focus in on this block for whatever reason, </span>
<span class='co'># we could use select() to make a new dataset with only those columns.</span>

<span class='va'>perPolAnx</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://dplyr.tidyverse.org/reference/select.html'>select</a></span><span class='op'>(</span><span class='va'>myData</span>, <span class='va'>perceivedreaction</span><span class='op'>:</span><span class='va'>Q26</span><span class='op'>)</span>
<span class='va'>perPolAnx</span> <span class='op'>&lt;-</span> <span class='fu'>select</span><span class='op'>(</span><span class='va'>myData</span>, <span class='va'>perceivedreaction</span><span class='op'>:</span><span class='va'>Q26</span><span class='op'>)</span>
<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span><span class='op'>(</span><span class='va'>perPolAnx</span><span class='op'>)</span>
</code></pre>
</div>
Expand Down Expand Up @@ -1950,12 +1950,12 @@ <h1>Elwood HW 1</h1>
<span class='co'># numeric operations on these responses (such as finding the mean) we have to convert them back</span>
<span class='co'># to numeric form using mutate() and recode(). Here this is done for Q36:</span>

<span class='va'>perPolAnx</span> <span class='op'>&lt;-</span> <span class='fu'><a href='https://dplyr.tidyverse.org/reference/mutate.html'>mutate</a></span><span class='op'>(</span><span class='va'>perPolAnx</span>, Q36N <span class='op'>=</span> <span class='fu'><a href='https://dplyr.tidyverse.org/reference/recode.html'>recode</a></span><span class='op'>(</span><span class='va'>Q36</span>, <span class='st'>"Strongly distrust"</span> <span class='op'>=</span> <span class='fl'>1</span>, <span class='st'>"Distrust"</span> <span class='op'>=</span> <span class='fl'>2</span>, <span class='st'>"Neither trust nor
<span class='va'>perPolAnx</span> <span class='op'>&lt;-</span> <span class='fu'>mutate</span><span class='op'>(</span><span class='va'>perPolAnx</span>, Q36N <span class='op'>=</span> <span class='fu'>recode</span><span class='op'>(</span><span class='va'>Q36</span>, <span class='st'>"Strongly distrust"</span> <span class='op'>=</span> <span class='fl'>1</span>, <span class='st'>"Distrust"</span> <span class='op'>=</span> <span class='fl'>2</span>, <span class='st'>"Neither trust nor
distrust"</span> <span class='op'>=</span> <span class='fl'>3</span>, <span class='st'>"Somewhat trust"</span> <span class='op'>=</span> <span class='fl'>4</span>, <span class='st'>"Strongly trust"</span> <span class='op'>=</span> <span class='fl'>5</span><span class='op'>)</span><span class='op'>)</span>
<span class='co'>#print(perPolAnx)</span>

<span class='co'># Now we can find the mean:</span>
<span class='fu'><a href='https://dplyr.tidyverse.org/reference/summarise.html'>summarize</a></span><span class='op'>(</span><span class='va'>perPolAnx</span>, Q36mean <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/mean.html'>mean</a></span><span class='op'>(</span><span class='va'>Q36N</span>, na.rm <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span><span class='op'>)</span>
<span class='fu'>summarize</span><span class='op'>(</span><span class='va'>perPolAnx</span>, Q36mean <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/mean.html'>mean</a></span><span class='op'>(</span><span class='va'>Q36N</span>, na.rm <span class='op'>=</span> <span class='cn'>TRUE</span><span class='op'>)</span><span class='op'>)</span>
</code></pre>
</div>
<pre><code># A tibble: 1 x 1
Expand Down
46 changes: 46 additions & 0 deletions _oldDrafts/2021-07-20-homework-two/homework-two.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: Homework Two
description: Armed Conflict Location & Event Data (ACLED) on Disorder Involving Journalists
and Media Workers
author: Nathan Cote
date: 07-20-2021
output:
distill::distill_article:
self_contained: no
draft: yes
---

```{r LOAD DATA, include=FALSE}
library(tidyverse)
library(readxl)
journalists <- read_excel("../../_data/journalists_Jul02.xlsx")
```

# An Introduction to ACLED

ACLED is a dataset for use in conflict analysis and crisis mapping. Each individual event in the dataset in an observation. The particular dataset that I have chosen for analysis pertains to events associated with disorder involving journalists and media workers.

The question I will be answering is twofold. Firstly, what interaction between actors (for instance, events between rioters and civilians) is most prominent among all countries? Secondly, of those interactions, what event types are most prominent within those interactions? For instance, out of all countries where interactions between Civilians and Political Militias are the most prominent Interaction variable, within that what is the most prominent Event Type?

First I will show you the variables in the dataset prior to tidying.

# Column Names

```{r Describe Data, echo=FALSE}
colnames(journalists)
```

The above variables provide varying levels of specificity. For my analysis, I do not need all of them on display. For instance, I am not interested in `Latitude`, `Longitude`, or `Geo_Precision` when `Country` will suffice for my purposes.

Prior to tidying the data, there are `r nrow(journalists)` rows, which may still be the case after tidying. On the other hand, there are `r ncol(journalists)`, which will be reduced.

I will now reduce the data to the variables I may need.

```{r Variable Reduction, echo=FALSE}
select(journalists, 5, 7,8, 9, 12, 15, 17)
```
There are two variables which I will take out, but have left in for clarity at the moment. `ACTOR1` AND `ACTOR2` are both included in the `INTERACTION` column. In the codebook for the ACLED dataset, the actors are given a single digit number for representation. For instance, Political Militias are given the code "4", while Civilians are given the code "7". In the `INTERACTION` column, this would be represented as "67". Therefore, for my purposes, I can take out the `ACTOR1` and `ACTOR2` columns. During my analysis, I may recode the numerical representations in `INTERACTION` to more descriptive language where one does not need to reference the codebook for base understanding. I may remove `SUB_EVENT_TYPE` as well. I have included it for potential further insight. If there are not too many variations of `SUB_EVENT_TYPE` I may combine it with `EVENT_TYPE`.

# Pending Further Analysis, Homework 3

My immediate task entering Homework 3 will be finding out the summations of event combinations in `INTERACTION`, and then putting them into a proportion table. I will also do the same, but will group them by country and then using the proportion table afterward. I will do the same with `EVENT_TYPE`.
Loading