Session Ready
Exercise

Adding a parameter to the report

In this exercise, you'll add a parameter for country to the report and modify the existing code so that you can create new reports about the investment projects for any country included in the investment_services_projects data.

Instructions
100 XP
  • Below the date field in the YAML header, add a section for parameters using params, add a country parameter, and specify Brazil as the country within the country parameter.
  • Review the filter() for "Brazil" throughout the document, and replace it with a reference to the country parameter.
  • In the brazil-investment-projects-2018 code chunk, rename the code chunk to country-investment-projects-2018 and object name and object name references in the text to country_investment_projects_2018.
  • Remove "in Brazil" from the plot titles in the report.