Skip to content

Commit

Permalink
Week 7
Browse files Browse the repository at this point in the history
  • Loading branch information
Festuus committed Oct 24, 2024
1 parent 742896d commit cd6ea01
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 3 deletions.
27 changes: 24 additions & 3 deletions week_07/case_study_07.Rmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
---
title: "Case Study 07"
author: Your Name
date: August 1, 2020
author: Festus
date: Oct 24, 2024
output: github_document
---



```{r}
library(tidyverse)
library(reprex)
library(sf)
library(spData)
data(world)
```

make the figure

```{r}
reprex_plot <- ggplot(world, aes(x=gdpPercap, fill=continent))+
geom_density(alpha=0.5) +
labs(x = "GDP Per Capita", y = "Density") +
theme_classic()
reprex_plot
ggsave(reprex_plot, filename= "reprexplot.png")
```
56 changes: 56 additions & 0 deletions week_07/case_study_07.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
Case Study 07
================
Festus
Oct 24, 2024

``` r
library(tidyverse)
```

## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.1.5
## ✔ forcats 1.0.0 ✔ stringr 1.5.1
## ✔ ggplot2 3.5.1 ✔ tibble 3.2.1
## ✔ lubridate 1.9.3 ✔ tidyr 1.3.1
## ✔ purrr 1.0.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors

``` r
library(reprex)
library(sf)
```

## Linking to GEOS 3.11.0, GDAL 3.5.3, PROJ 9.1.0; sf_use_s2() is TRUE

``` r
library(spData)
data(world)
```

make the figure

``` r
reprex_plot <- ggplot(world, aes(x=gdpPercap, fill=continent))+
geom_density(alpha=0.5) +
labs(x = "GDP Per Capita", y = "Density") +
theme_classic()

reprex_plot
```

## Warning: Removed 17 rows containing non-finite outside the scale range
## (`stat_density()`).

![](case_study_07_files/figure-gfm/unnamed-chunk-2-1.png)<!-- -->

``` r
ggsave(reprex_plot, filename= "reprexplot.png")
```

## Saving 7 x 5 in image

## Warning: Removed 17 rows containing non-finite outside the scale range
## (`stat_density()`).
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added week_07/reprexplot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cd6ea01

Please sign in to comment.