Assignment 3: Data Visualization (incarceration)
Due Feb 19 by 10pm Points 100 Submitting a text entry box
Submit Assignment
One of the sharpest manifestations of racism in the United States is its prison system. A complex set
of social and political structures, including the over-policing (https://www.pewresearch.org/f…)
of individuals of color and the
war on drugs (https://www.drugpolicy.org/is…) have led to the
disproportionate incarceration of people of color. These issues are very well summarized in the
documentary 13th, which you can for free (https://www.youtube.com/watch…) .
In this assignment, you will use your data analysis and visualization skills to expose patterns of
inequality using incarceration data collected by the Vera Institute (https://www.vera.org/) . You will
practice producing visualizations of complex data as well as generating reports that include those
visualizations.
Objectives
By completing this assignment you will practice and master the following skills:
Rendering R Markdown files using knitr
Producing data visualizations using the ggplot2 library
Wrangling and shaping real-world data
Generating visualizations of map-based data
Exploring and drawing conclusions from visual data
Setup
Follow the below link to create your private code repo for this assignment. You will need to accept
this assignment to create your code repo. Do not fork this repository!
https://classroom.github.com/… (https://classroom.github.com/…)
Note that you do not have to accept an invitation to the organization (you won’t get one); once you’ve
accepted the assignment you’re done and can access it.
You will need to accept this assignment to create your code repo. This repo will have the name
info201b-wi21/a3-incarceration-yourusername , and you can view it online at
https://github.com/info201b-w… (replacing yourusername with your
GitHub user name).
Do not fork this repository!
2021/2/25 Assignment 3: Data Visualization (incarceration)
https://canvas.uw.edu/courses… 2/13
After you’ve accepted the assignment, clone the repo to your local machine so you can edit the files.
Make sure you don’t clone it inside another repo!
Unlike previous assignments, the repo contains no starter code beyond a .gitignore file; you will
need to generate the script files yourself (see below for details).
Start with creating a file analysis.R that will be your “main” program script; most of your code will
go in here (and you will draw on that file in your R Markdown).
Remember that it is always a good idea to add and commit (and even push) your changes
whenever you finish a section of an assignment or project!
The instructions for this assignment written on this Canvas page, rather than as comments in a .R
file. That means you’ll need to consider on your own how to approach each question/step, how to
name variables, and how to organizing your code effectively. Note that we will be considering some
aspects of coding style—see below for detail.
Note that this write-up is structured around the data analysis, with details on how to present
(report) on that analysis at the end. You can work on this assignment in any order you wish;
but I encourage you to focus on the R code first, separate from the R Markdown report.
The Data
You can access that data for this assignment from this GitHub repository (https://github.com/verainstit…)
(specifically, the CSV file incarceration_trends.csv , for countylevel
data). You can either load the data set directly from GitHub (preferred), or download the file into
your assignment repo (into a data/ folder) to read locally.
This data file is big and messy. A few tips on working with this data:
It may take a minute or two to load the data file because it is so large, so don’t worry if it takes a
while when you start the assignment. Note that your read.csv() call will need to go in your
analysis.R file! Save this data in a variable called e.g., incarceration_df
Read the documentation! You can find the details of this dataset in the “Codebook”
(https://github.com/vera-insti…) . This will help you know
what variables are available, where they come from, and what they mean. You can also crosscheck
your work with the Vera Institute’s own visual tool (http://trends.vera.org/incarc…)
.
Watch out for missing values. You don’t need to impute these (using na.rm = TRUE is fine), but
they should inform your work and analysis.
Part 1: Data Description
In this first part you will do some basic wrangling of the data, as well as generate some summary
statistics to include in your report. Again, remember that all your data wrangling should go in the
analysis.R file!
2021/2/25 Assignment 3: Data Visualization (incarceration)
https://canvas.uw.edu/courses… 3/13
Start by reading in the data set using read.csv() . Once you do so, you’ll want to inspect the data to
get a sense for what you have. Use functions such as colnames() and View() to see what it looks
like. Note that because the data is so large, filtering for just a subset of the data to View (such as a
particular year) can help a lot.
Once you have a sense for what the data will be, you need to calculate some descriptive statistical
values for your report. These values must include:
- The number of observations in the data set (how big is it?)
- The range of years the data set covers (what is the smallest and largest year)? Note that the
range() function can help with this. - For the most recent year with data, how many people are in jail, how many are in prison, and how
many are in the total population as a whole? (Your data description variable needs to also include
what year these numbers came from).
Your analysis.R file must define a single list variable (e.g., data_description) that contains these
values. Note that you can and should use multiple lines of code to produce this variable, but you want
to store all of the numbers into a single variable (a list) for easy accessing from your report. The exact
structure and tags used in this list are up to you, but make it readable so it’s easy to use!
Your completed report will need to include a reflection on the following: “How recent is this data?
Does it e.g., reflect policies of the most recent presidential administration?”. (You don’t need to write
this answer in your analysis.R file, but it’s good to think about now!)
Part 2: Incarceration Trends Over Time
In this part you’ll create a visualization exploring the absolute number of incarcerated persons over
time (on a national level). This will be a line plot indicating the total incarcerated population for
different races for each year in the data set:
You’ll first need to wrangle the data in order to plot it. Save the wrangled data in a data frame called
e.g., incarceration_time_series_df . - You’ll first need to calculate the total incarcerated populations for each race. For our purposes,
this is the sum of the prison and jail populations for each county. You’ll want to mutate the base
incarceration_df to add columns for total incarcerated numbers in total, as well as for those with
race of white, black, latinx, AAPI, and native.
The replace_na() (https://tidyr.tidyverse.org/r…) can help to make
sure you can sum up the numbers even if one of them is undefined (in which case you should
treat it as having a value of 0 for this analysis).
Yes, this wrangling code may be a bit redundant since there are 6 columns (5 race categories - total) to consider.
- In order to generate your time series data, you will need to summarize across each (grouped)
year to calcualte a total for your new incarceration columns. The across()
2021/2/25 Assignment 3: Data Visualization (incarceration)
https://canvas.uw.edu/courses… 4/13
(https://dplyr.tidyverse.org/a…) function can be really useful here to
avoid needing to type the same thing 6 times. - In order to map each variable to a different color, you’ll need to reshape the data frame into a long
format. This will let you map a single column (e.g., “race” or “category”) to a differnet color line.
Use the pivot_longer() function to do so. - Optionally, you can specify a particular “order” for the different categories (so that e.g., “total” is
first in the legend). You can do this by mutating the category column so that it is a factor with
levels specified in a particular order. See this guide (https://www.r-graph-gallery.c…
reorder-a-variable-in-ggplot2.html#dplyr) for an example (look at the mutate() call).
Once you have wrangled the data, you can create the plot. - Use the ggplot2() function to create the plot. The data will be your
incarceration_time_series_df . - The plot should include both point geometry
(https://ggplot2.tidyverse.org…) and line geometry
(https://ggplot2.tidyverse.org…) (so you can see the points and the trend).
Each should have the year mapped to the x-axis, the value mapped to the y-axis, and the race
category mapped to the color. - Use a scale function (https://ggplot2.tidyverse.org…) to give different
colors to the lines. I used Colorbrewer’s “Dark2” palette, but you can choose a different palette (or
define your own set of colors).
Also specify the labels for this scale in order to provide readable names for each line in the
legend. - Specify appropriately detailed title and axis labels for your chart.
- Be sure to save your plot as a variable so that you can include it in your report!
incarceration_over_time_plot is a fine variable name.
In the end, your plot should look mostly like the above example.
Throughout this assignment, you are welcome to adjust the styling of the plots (e.g., make text
different sizes, use different colors, etc), so long as you maintain the effectiveness and
expressiveness of the plots.
Your completed report will need to include a reflection on the following: “What do you notice about
the trend in incarceration rates over time?” (You don’t need to write this answer in your analysis.R
file, but it’s good to think about now!)
Part 3: Highest Black Incarceration Rates
In this part you’ll create a visualization exploring which states currently have the highest rate of
incarceration of black people. (This is not to ignore overpolicing of other races, but rather an
acknowledgement of the direct links between the the US’s history of slavery and the current carcereal
state). This will be a bar chart indicating the rate of incarceration of the black population compared to
the total population for the 10 states with the highest level of black incarceration:
2021/2/25 Assignment 3: Data Visualization (incarceration)
https://canvas.uw.edu/courses… 5/13
You’ll once again need to do some data wrangling in order to create this plot. Save the wrangled data
in a data frame called e.g., top_10_black_incarceration_states_df . - You only need to plot the data for the most recent year with complete data (2016).
- Although the raw data includes calculated prison and jail rates, these are tracked per county,
while for this plot you need rates per state. Thus you will need to calcualte those rates on your
own. You can do this by using the “total incarceration population numbers” that you calculated for
the previous plot, as well as the population data for people aged 15-to-64. Sum up each of these
values (for black people and for the total population) for each state in order to get the total values.
Then divide the number of people incarcerated by the number of people aged 15-to-64 to get the
rate for that state. You’ll need to mutate your data frame to save these new calcualted
incarceration rates. - Once you have have calculated the total rates for each state, you can then arrange by the black
incarceration rate and get the top 10 states. The slice_max()
(https://dplyr.tidyverse.org/r…) function is the preferred way to do this.
Also be sure to save the ordered list of ten states as a separate vector that you can use when
ordering the columns in your plot! - You will once again need to reshape the data frame into a long format so that you can plot both
measures (the black incarceration rate and the total incarceration rate).
As you’re doing this wrangling, be sure to inspect the incarceration rates for each state. Your
completed report will need to include a reflection on the following: “What do you notice about the
state-level incarceration rates? What data is missing?” (You don’t need to write this answer in your
analysis.R file, but it’s good to think about now!)
After wrangling the data, you can create the plot. - This plot will use column geometry (https://ggplot2.tidyverse.org…) ,
with the measure (black incarceration rate or total incarceration rate) mapped to the fill.
Note that if you map the x-values to the “vector or ordered states” (rather than to the state
column itself), you’ll be able to enforce the order of the columns. - Use an alternate coordinate system (https://ggplot2.tidyverse.org…) so
that you have horizontal columns rather than vertical columns. - Use a scale function to specify the colors and labels for the plot.
- Specify appropriately detailed title and axis labels for your chart.
- Be sure to save your plot as a variable so that you can include it in your report!
top_10_black_incarceration_plot is a fine variable name.
Part 4: Racial Incarceration Discrepancy Map
In this part you’ll create a map visualization exploring the disparity in racial incarceration rates in
Washington State. This will be a choropleth map (https://en.wikipedia.org/wiki…) of
the ratio between black and white incarceration rates in Washington:
2021/2/25 Assignment 3: Data Visualization (incarceration)
https://canvas.uw.edu/courses… 6/13
(Again, this is not to discount the incarcation of other races; you alternatively may create a map
visualizating the incarceration discrepancies between e.g., white and non-white populations–which
has its own interesting results–or white and latinx populations).
You may create this map using ggplot2 or using the leaflet
(https://learning.oreilly.com/…)
package; use of other external mapping packages is not allowed. The below instructions cover how to
do this using ggplot2 . For an example using Leaflet, see this tutorial
(https://rstudio.github.io/lea…) (though you’ll need to adapt the example to cover
Washington State).
The data wrangling step is slightly more complex here, as you need to get both the county-level data
but also the shape data in order to draw the map. - You can start by calculating the total incarceration rates for black and white people as with the
previous plot. Note that you will need to calculate the individual rates for each county, rather than
aggregated by state. You can then calculate the ratio between these values by diving them (black
rate / white rate). - You can get a shape data for “county” level mapping maps library by using the map_data()
function. - However, the incarceration data identifies each by FIPS county code
(https://en.wikipedia.org/wiki…) , while the shape file doesn’t have this
information. Thus you will have to add appropriate FIPS codes to each county.
You can do this by joining county.fips data frame provided by the maps library to the shapes
data file. In order to “match” the rows of these two data frames you’ll need to mutate the shape
data frame to have an additional column (e.g., polyname) that will match the state,county
name provided in the county.fips data frame. Inspect each data frame to see these structure
and how they need to be joined!
In addition, the county.fips data frame doesn’t include matching codes for two Washington
counties: “Pierce” and “San Juan” (because those counties have 2 different FIPS codes).
Thus you will need to manually assign the fips values for those rows in the shape file. The
FIPS code for “pierce” county is 53053 and the FIPS code for “san juan” county is 53055
(you can find these values by inspecting the county.fips file, but I’ve provided them here for
simplicity).
You should also filter the shape file to only include counties in Washington State (since that’s
all you’ll be mapping). - Finally, you can join the incarceration data with the shape file to get a plottable data frame.
Once the the data is ready, you can create the choropleth map: - Use polygon geometry (https://ggplot2.tidyverse.org…) to create
the plot. Map the long value to the x coodinate, the lat value to the y coordinate, and group
points together. - Map the fill (not the color) to the incarceration ratio data—this will color the inside of the
polygons, not just the outlines. You must also specify a color scale for the map fill; I used the
“YlOrBr” palette (in reverse).
2021/2/25 Assignment 3: Data Visualization (incarceration)
https://canvas.uw.edu/courses… 7/13
Note that because the ratio is continuous data, you will need to use an appropriate scale
function (https://ggplot2.tidyverse.org…) . - Your plot should use a map coordinate system
(https://ggplot2.tidyverse.org…) . - You should also use a theme (https://ggplot2.tidyverse.org…) to get rid of
the x and y axis labels. You’ll still need to add a title to the plot and an appropriate label for the
legend. Also add a caption with details about how to interpret the ratio value (as in the example).
Your completed report will need to include a reflection on the following: “Do you notice any outliers in
the ratio data? Investigate what might be the reason for this.” (You don’t need to write this answer in
your analysis.R file, but it’s good to think about now!)
Part 5. Your Own Visualization
For this last part, you will create your own visualization exploring some aspect of this data set. This
could be an alternate view of variables considered in the previous parts, or could be an analysis of
other variables (e.g., disparities between gender; effects of admissions rates; prison vs. jail rates,
etc).
Your visualization will need to reflect at least three “data features” (think: columns). Pro tip: you can
often easily produce an “interesting” analysis by taking two seemingly unreleated topics and then
comparing them to show that the are actually related!
You will almost certainly need to do some light data wrangling to get the information you want.
Think about what question your visualization will be able to answer, and then what data you’ll
need for that question.
(But don’t overthink this; the goal here is to practice making visualizations, not to be a time sink!)
Your visualization must be created with the ggplot2 package. It will need to meet the following
requirements:
At a minimum, it will need to include either 2 simple geometries (points, lines, columns) or 1
“complex” geometry (http://ggplot2.tidyverse.org/…) (e.g.,
polygons, hex bins, etc.). A visual element such as facets
(http://ggplot2.tidyverse.org/…) count as a simple geometry (so having a
single point geometry with facets would be sufficient). A map would be considered a “complex”
geometry.
It will need to encode three (3) or more features (columns) to different aesthetics (e.g., x , y ,
and color ).
It needs to include an adjusted scale (https://ggplot2.tidyverse.org…)
for at least one of the aesthetics. Specifying a color palette is sufficient.
(You are not required to specify position adjustments or coordinate systems, though you are
wlecome to if you wish)
It must include appropriate titles and labels
(https://learning.oreilly.com/…
2021/2/25 Assignment 3: Data Visualization (incarceration)
https://canvas.uw.edu/courses… 8/13
for/9780135159071/ch16.xhtml#sec16_3_5) . In particular, make sure that any “legend” labels are
clear and understandable.
When your designing your visualization, think about how you can make it both effective and
expressive. You will need to justify your visualization design decisions (why you created the plot you
did) in your report.
In your analysis.R file, be sure to save your plot in a variable with a descriptive name (and not just
my_plot ).
The Report
You will present your visualizations in a single report created with R Markdown (to make it easy to see
your work).
The report should be written in a file called index.Rmd in the root of your assigment repo. This file will
contain your report, including both text in Markdown and R code that will be executed to dynamically
produce the data shown in the report.
Be sure to specify approprate metadata, including the title (“Incarceration Visualizations” is fine),
your name as the author, and the date the report was generated. These should automatically be
set up through the R Studio wizard.
Include a R code chunk called setup (with include=FALSE as an specified option), as described and
shown in the textbook (https://learning.oreilly.com/…)
. In this code chunk, use the source() function to run your
analysis.R script. Because the chunk has include=FALSE , any printed output from your script will not
be shown, but the variables containing your plots will be defined so you can use them later.
Remember that you can’t have any calls to View() in any code run by R Markdown! Be sure
and remove or comment out any of those calls in your analysis.R
Because plots may take some time to create, it may take a minute for your R Markdown file to
knit. Be patient!
Your report will have five (5) sections (each marked with a second-level heading), one for each
visualization (and one more for the data description.) - Data Description In this first section you will provide a short paragraph describing the data. This
paragraph should include the following:
A source of the data (including a hyperlink where to find it).
The size of the data set (number of observations). This value must be dynamically displayed
(using an inline R expression) from your data_description list.
The range of years the data set covers. This value must be dynamically displayed from your
data_description list.
2021/2/25 Assignment 3: Data Visualization (incarceration)
https://canvas.uw.edu/courses… 9/13
The total number of people incarcerated in the most recent year of the data set (as well as
what that year is). These values must be dynamically displayed from your data_description
list.
In addition, this section must include a 1-2 sentence reflection on the following: “How recent
is this data? Does it e.g., reflect policies of the most recent presidential administration?” - Incarceration Trends Over Time In the second section you will need to include your
Incarceration Over Time line plot.
You can include a plot in the R Markdown by defining a code chunk (separate from the setup
chunk), and having that chunk output the variable in which you stored the visualization.
Optionally, you can use using knitr options (https://yihui.name/knitr/opti…) to
make sure your plots are rendered at a good size in the report.
In addition, this section must include a 1-2 sentence relfection on the following: “What do you
notice about the trend in incarceration rates over time?” - Highest Black Incarceration Rates In this section you will need to include your Highest Black
Incarceration Rates bar chart. Again, you should include the plot via its own code chunk.
In addition, this section must include a 1-2 sentence relfection on the following: “What do you
notice about the state-level incarceration rates? What data is missing?” - Racial Incarceration Discrepancy Map In this section you will need to include your Racial
Incarceration Discrepancy Map. Note that you can optionally include additional maps showing the
racial breakdown across multiple races or locations (it’s interesting data!). Again, you should
include the plot via its own code chunk.
In addition, this section must include a 1-2 sentence reflection on the following: “Do you
notice any outliers in the ratio data? Investigate what might be the reason for this.” - Your Own Visualization In this last section, you will include the visualization that you designed.
In addition to the plot, include a short paragraph that addresses the following:
What question(s) does your visualization attempt to answer?
What answer(s) or insight(s) do you draw from your visualization?
Why did you select this visual layout? Justify your reasoning! (“It was easy” is not a sufficient
justification).
In what way is this an effective and expressive visualization?
Publishing Your Report
As partially described in the course text (https://learning.oreilly.com/…)
(and further detailed in class), you should publish your
knitted report online by deploying it to GitHub Pages (https://help.github.com/artic…)
(as a Project Pages site).
You must publish to GitHub pages by pushing to the gh-pages branch on GitHub (Do not use one of
the other publishing methods). The cleanest way to do this is to create a new gh-pages branch
2021/2/25 Assignment 3: Data Visualization (incarceration)
https://canvas.uw.edu/courses… 10/13
immediately off of your main branch once you’re ready to publish. Be sure and push this new ghpages
branch to the gh-pages branch on GitHub.
Tip: Only publish once everything is working and you are finished with your report!
Once you’ve pushed your report to the gh-pages branch, you should then be able to visit
https://info201b-wi21.github….
in order to view your report online (specifically, the generated index.html file). Note that sometimes it
takes a few minutes for GitHub pages to update with the new report, so be patient if it doesn’t show
up initially. (You can check that the code is pushed correctly by checking the gh-pages branch on the
GitHub web portal; if the code is online but the page isn’t showing, check in with us).
Be sure that any future changes are made on the main branch, not on gh-pages (we’ll be
grading the code on main ). NEVER EDIT CODE ON THE gh-pages BRANCH. If you make
additional changes (on main), you will need to then merge them into the gh-pages branch
(watching out for any merge conflicts). If you hit any problems, ask for help!
Coding Style and Clarity
This assignment specification is more “open-ended”, giving you more flexibility in how you approach
solving the problem. Thus it is up to you how you use the material and tools from class in order to
produce the desired results.
That said, as you implement your solution, you need to make sure that your code is well written. For
this class, well-written code meets the following requirements:
Variable and function names must be descriptive, identifying what the variable references or what
the function does. Name variables with their type (e.g., incarceration_df , states_vec), and name
functions with verbs describing what they do (e.g., analyze_dataframe() ). DO NOT give variables
or functions single-letter names, numbered names (e.g., df1 and df2), or other “placeholders”
(e.g., thing , data).
Use appropriate structure and syntax when writing R code. This means using pipes (%>%) when
working with dplyr functions, not using for loops, etc.
Include some comments (with #) to organize your code and explain what section/work your code
is doing. If you use a complicated expression, please use a comment to explain it. There is no
required documentation format you must follow, but your comments should be intelligible to other
developers. Comments should define information that is NOT present in the code itself. For
example, use a comment to explain what types of variables a function takes as parameters or
returns, and use a comment to describe the motivation and purpose behind a particular algorithm.
Remove any extraneous print() statements that you used for testing/debugging your code.
Similarly, be sure and remove any significant pieces of code not used in the production version, so
2021/2/25 Assignment 3: Data Visualization (incarceration)
https://canvas.uw.edu/courses… 11/13
A3 Incarceration Rubric
it doesn’t get in the way of understanding. Do not submit large blocks of old commented code if
that code will never be used again!
Overall, your code should (mostly) follow the tidyverse style guide (https://style.tidyverse.org/) .
Note that the styler (http://styler.r-lib.org/) and linter (https://github.com/jimhester/…) can
help you match a lot of these rquirements.
If there are any questions about what is “good style”, please check in with the teaching staff!
Submit Your Solution
In order to submit your assignment: - Confirm that you’ve successfully completed the assignment (e.g., that your code is able to
generate the report).
Please proofread your report! Make sure there aren’t any half finished sentences or
egregious typos, and that overall it is cleanly formatted and readable. It should be in better
condition than these assignment write-ups! Think about the user experience of reading the
report! - add and commit the final version of your work, and push your code to your GitHub repository.
- Publish your report to the gh-pages branch on Github, as described above. Make sure you publish
the final version of your knitted report! - Submit the URL of your GitHub Repository AS WELL AS the URL of your published report (two
links!) as your assignment submission on Canvas (this page, at the top).
2021/2/25 Assignment 3: Data Visualization (incarceration)
https://canvas.uw.edu/courses… 12/13
Criteria Ratings Pts - pts
- pts
- pts
- pts
- pts
Data Description
You have wrangled the data and created a list variable with the required values. Each
required value is worth about 1.5 points, and the list itself is worth 1 point.
Incarceration Trends Over Time
You have created the required plot. You have performed the necessary data wrangling
(6pt). The plot has: - correct data (1pt)
- correct geoms & aesthetics (5pt)
- correct scales (2pt)
- appropriate labeling of axes and legends (3pt)
Highest Black Incarceration Rates
You have created the required plot. You have performed the necessary data wrangling
(8pt). The plot has: - correct data (1pt)
- correct geoms and aesthetics (2pt)
- correct positioning (1pt)
- correct coordinate system (1pt)
- correct scales (2pt)
- appropriate labeling of axes and legends (3pt)
Racial Incarceration Discrepancy Map
You have created the required plot. You have performed the necessary data wrangling,
including joining the map data (10pt). The plot has: - correct data (1pt)
- correct geoms and aesthetics (2pt)
- correct coordinate system (1pt)
- correct scales (2pt)
- appropriate labeling of axes and legends (2pt)
- an appropriate theme (1pt)
Your Own Plot
You have created your own plot about data of your choosing - The plot uses appropriate data (1pt)
- The plot uses multiple geometries and maps multiple aesthetics (4pt)
- The plot is well designed and labeled (4pt)
- The plot is effective and expressive (2pt)
2021/2/25 Assignment 3: Data Visualization (incarceration)
https://canvas.uw.edu/courses… 13/13
Total Points: 100
Criteria Ratings Pts - pts
- pts
- pts
The Report
You have created an R Markdown report to display your visualizations. The report has
proper structure, including - correct file names and location
- a
setup
code block that sources the analysis.R file - appropriate headings for each section
- separate code chunks as appropriate for each section
Each of the 5 sections section has the required plots and content (5pt)
You have also answered the reflection question(s) for each of the 5 sections plot (1pt each,
2pt for Your Own Plot reflections)
GitHub Usage and Publication
You have published your report to GitHub Pages, using thegh-pages
branch.
Code Style and Report Clarity
Code is well written, organized, and commented. Variables and functions are properly
named, white space is used for clarity, and sufficient comments are included. Your report is
clear and readable, with dynamic content from R properly integrated and no glaring typos.