Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Class-Activity-3.Rproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Version: 1.0

RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 8
Encoding: UTF-8

RnwWeave: Sweave
LaTeX: pdfLaTeX
14 changes: 12 additions & 2 deletions class-activity-3.Rmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "class activity 3"
author: "Charles Lang"
author: "Bernell Downer"
date: "10/2/2018"
output: html_document
---
Expand Down Expand Up @@ -43,13 +43,23 @@ ggplot(mpg, aes(displ, hwy, color = class)) +
Can you create a line graph using the "economics_long" data set that shows change over time in "value01" for different categories of "variable"?

```{r}

d <- economics_long
d
ggplot(data=d, aes(x=date, y=value01, group=variable, color = variable)) +
geom_line()+facet_grid(d$variable~.)
```

If you would like to recreate the Minard graphic of Napoleon's Troops the code is below and the data is in this repo.

```{r}
cities = as.data.frame("cities.txt")
cities
troops = as.data.frame("troops.txt")
troops
```


```{r}
ggplot(cities, aes(long, lat)) +
geom_path(aes(size = survivors, colour =
direction,
Expand Down