Question
Visualizing the Investment Annual Summary data Now that you have all of the data ready for the report you're creating, you can start making plots
Visualizing the Investment Annual Summary data
Now that you have all of the data ready for the report you're creating, you can start making plots that will be included in the report to help your audience visualize the data when they're reading the report. You'll start by creating a line plot of the investment_annual_summary data.
Instructions:
Load the ggplot2 package in the first code chunk, after the dplyr package on line 10.
In the investment-annual-summary code chunk, create a line plot using the investment_annual_summary data.
Plot the fiscal year (fiscal_year) on the x-axis, and investment amounts (dollars_in_millions) on the y-axis.
Color the plot by region, so that the plot in the final report displays each region as a different color in the line plot.
---
title: "Investment Report"
date: "`r format(Sys.time(), '%d %B %Y')`"
output: html_document
---
```{r data, include = FALSE}
library(readr)
library(dplyr)
# Load the ggplot2 package here
library('ggplot2')
investment_annual_summary
investment_services_projects
```
## 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}
ggplot(investment_annual_summary, aes(x = fiscal_year,y = dollars_in_millions)
geom_line(color = region)
labs(
title = "Investment Annual Summary",
x = "Fiscal Year",
y = "Dollars in Millions"
)
```
### 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 %
filter(country == "Brazil")
```
### Investment Projects in Brazil in 2018
```{r brazil-investment-projects-2018}
brazil_investment_projects_2018 %
filter(country == "Brazil",
date_disclosed >= "2017-07-01",
date_disclosed
```
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started