Skip to content
Course Notes: Reporting with R Markdown
Course Notes
Use this workspace to take notes, store code snippets, or build your own interactive cheatsheet! The datasets used in this course are available in the datasets folder.
# Import any packages you want to use here
Take Notes
Add notes here about the concepts you've learned and code cells with code you want to keep.
Chapter1: first steps = display the df without modification or manipulation
---
title: "Investment Report"
output: html_document
---
```{r data, include = FALSE}
library(readr)
investment_annual_summary <- read_csv("https://assets.datacamp.com/production/repositories/5756/datasets/d0251f26117bbcf0ea96ac276555b9003f4f7372/investment_annual_summary.csv")
investment_services_projects <- read_csv("https://assets.datacamp.com/production/repositories/5756/datasets/78b002735b6f620df7f2767e63b76aaca317bf8d/investment_services_projects.csv")
```
```{r}
investment_annual_summary
investment_services_projects
```
Chapter1: first steps in formatting!
---
title: "Investment Report"
output: html_document
---
```{r data, include = FALSE}
library(readr)
investment_annual_summary <- read_csv("https://assets.datacamp.com/production/repositories/5756/datasets/d0251f26117bbcf0ea96ac276555b9003f4f7372/investment_annual_summary.csv")
investment_services_projects <- read_csv("https://assets.datacamp.com/production/repositories/5756/datasets/78b002735b6f620df7f2767e63b76aaca317bf8d/investment_services_projects.csv")
```
## Datasets
### Investment Annual Summary
The `investment_annual_summary` dataset provides a summary of the dollars in millions provided to each region for each fiscal year, from 2012 to 2018.
```{r}
investment_annual_summary
```
### Investment Services Projects
The `investment_services_projects` dataset provides information about each investment project from the 2012 to 2018 fiscal years. Information listed includes the project name, company name, sector, project status, and investment amounts.
```{r}
investment_services_projects
```
modifying the YAML
---
title: "Investment Report"
author: Cyril
date: "`r Sys.Date()`"
output: html_document
---
---
title: "Investment Report"
author: "Add your name"
date: "`r format(Sys.time(), '%d %B %Y')`"
output: html_document
---Chapter2: filtering data
---
title: "Investment Report"
date: "`r format(Sys.time(), '%d %B %Y')`"
output: html_document
---
```{r data, include = FALSE}
library(readr)
library(dplyr)
investment_annual_summary <- read_csv("https://assets.datacamp.com/production/repositories/5756/datasets/d0251f26117bbcf0ea96ac276555b9003f4f7372/investment_annual_summary.csv")
investment_services_projects <- read_csv("https://assets.datacamp.com/production/repositories/5756/datasets/bcb2e39ecbe521f4b414a21e35f7b8b5c50aec64/investment_services_projects.csv")
```
## Datasets
### Investment Annual Summary
The `investment_annual_summary` dataset provides a summary of the dollars in millions provided to each region for each fiscal year, from 2012 to 2018.
```{r investment-annual-summary}
investment_annual_summary
```
### Investment Projects in Brazil
The `investment_services_projects` dataset provides information about each investment project from 2012 to 2018. Information listed includes the project name, company name, sector, project status, and investment amounts.
```{r brazil-investment-projects}
brazil_investment_projects <- investment_services_projects %>%
filter(country == "Brazil")
brazil_investment_projects
```
further filtering
---
title: "Investment Report"
date: "`r format(Sys.time(), '%d %B %Y')`"
output: html_document
---
```{r data, include = FALSE}
library(readr)
library(dplyr)
investment_annual_summary <- read_csv("https://assets.datacamp.com/production/repositories/5756/datasets/d0251f26117bbcf0ea96ac276555b9003f4f7372/investment_annual_summary.csv")
investment_services_projects <- read_csv("https://assets.datacamp.com/production/repositories/5756/datasets/bcb2e39ecbe521f4b414a21e35f7b8b5c50aec64/investment_services_projects.csv")
```
## Datasets
### Investment Annual Summary
The `investment_annual_summary` dataset provides a summary of the dollars in millions provided to each region for each fiscal year, from 2012 to 2018.
```{r investment-annual-summary}
investment_annual_summary
```
### Investment Projects in Brazil
The `investment_services_projects` dataset provides information about each investment project from 2012 to 2018. Information listed includes the project name, company name, sector, project status, and investment amounts.
```{r brazil-investment-projects}
brazil_investment_projects <- investment_services_projects %>%
filter(country == "Brazil")
```
### Investment Projects in Brazil in 2018
```{r brazil-investment-projects-2018}
brazil_investment_projects_2018 <- investment_services_projects %>%
filter(country == "Brazil",
date_disclosed >= "2017-07-01",
date_disclosed <= "2018-06-30")
brazil_investment_projects_2018
```