knitr::include_graphics("C:/Users/Geetha/OneDrive/Documents/STAT541/portfolio/images/ggrepel_example.JPG")Independent Learning (IL):
These objectives show your ability to seek out new information and adapt to new tools to solve data analysis problems.
[IL-1] Adding new skills:
- I can find and adopt new packages to accomplish tasks.
- I can adapt to different syntax styles (tidy, base, formula style, data.table).
Level: 1
Justification:
I utilized ggrepel to annotate a plot.
https://hersheyk.github.io/portfolio/posts/2025-05-01-Visualizations/visualizations.html#lab-2
ggplot(france_long, aes(x = reorder(Category, Percentage), y = Percentage, fill = Category)) + geom_bar(stat = “identity”, width = 0.7) + coord_flip() + scale_y_continuous(labels = scales::percent_format(accuracy = 1)) + facet_wrap(~ Group, scales = “free_y”,ncol = 1) + labs(title = “Proportion of people in France who believe vaccines unsafe by Demographic Group”, x = ““, y =”“) + theme_minimal() + theme(legend.position =”none”) + geom_text_repel(aes(label = round(Percentage, 2)), size = 3, box.padding = 0.3)
[IL-2] Online resources:
- I can use online resources (e.g., Google, ChatGPT, StackOverflow, YouTube) to solve problems, debug, or find new tools.
- I can use tutorials, etc. to enhance my understanding of new concepts.
- I can find source code for similar projects to use as starting points for my own.
Level: 3
Justification:
In Lab 2, there are many instances where I cite sources such as stack exchange to show where I found code or learned about specific functions.
{r create nat1} national1 <- national |> fill(QNumber, .direction = “down”) |> #Source for .direction: https://tidyr.tidyverse.org/reference/fill.html filter(QNumber == “Q25”) |> filter(Response == “Strongly agree” | Response == “Somewhat agree”) |> group_by(Country) |> summarize(Agree_Percent = sum(as.numeric(National_Results_Col_Per)), .groups = “drop”) |> mutate(Region = case_when( Country %in% asia ~ “Asia”, Country %in% mena ~ “Middle East and North Africa”, Country %in% americas ~ “Americas”, Country %in% sub_sahara ~ “Sub-Saharan Africa”, Country %in% europe ~ “Europe”, Country %in% former_soviet ~ “Former Soviet Union”, Country %in% oceania ~ “Oceania”,
TRUE ~ "Other" #used to check, there are none that fall in this category
)) #summarize function : https://stackoverflow.com/questions/62891736/sum-sub-groups-with-dplyr –>
IL Summary
Reproducible Workflow (RW):
These objectives show your ability to produce artifacts and deliverables that are organized, documented, version tracked, and responsibly designed.
[RW-1] File, code, and data management:
- I can use Git and GitHub to track my progress (creating repos, cloning, forking, pull requesting).
- I always use R Projects and the {here} package to organize my scripts, notebooks, data, and applications.
- I always use pull requests when collaborating with others.
Level: 2
Justification:
I consistently use RProjects to organize my work and have learned a great deal more about connecting Github to R. I am pretty good about committing my work to the repo after any major changes to my code. I have pull requested in the past, however, have yet to use pull requests in this class.
knitr::include_graphics("C:/Users/Geetha/OneDrive/Documents/STAT541/portfolio/images/commit_history.JPG")[RW-2] Notebooks:
- I can use Quarto to produce a reproducible notebook and polished rendered documents
- I can use appropriate chunk options (echo, error, cache, etc.) to render my Quarto document quickly and cleanly.
Level: 3
Justification:
I have learned more about the various html options provided in quarto including YAML background colors, table of contents, code-folding and embedding resources. I also use code chunk options such as #| message: false to not output messages after specific code chunks(particularly useful in chunks where I call libraries or pull in data). I also label my code chunks, as seen below by {r calling data}
title: “Visualizations” author: “Harshini Karthikeyan” date: ‘04-10-2025’ format: html: backgroundcolor: whitesmoke monobackgroundcolor: lightsteelblue fontcolor: black number_sections: yes #mainfont: default editor: visual toc: true toc_float: true embed-resources: true
{r calling data} #| message: false data<-read_excel(“C:\Users\Geetha\Downloads\wgm2018-dataset-crosstabs-all-countries.xlsx”) –>
[RW-3] Code style
- My code is clear, readable, well-organized, and well-commented.
Level: 2
Justification
I would say that I am very thorough about labeling code chunks(particularly because it makes it easy when I get an error as R informs me of the code chunk by name). I also am good about citing when I find code elsewhere, however I am not great at keeping my code clean and well-commented. Definitely something to work towards.
knitr::include_graphics("C:/Users/Geetha/OneDrive/Documents/STAT541/portfolio/images/labeledchunks.JPG")RW Summary
Technical Communication (TC):
These objectives show your ability to communicate the processes you have implemented in your code, as well as the data conclusions and results.
[TC-1] Project summaries:
- I can create clear and succinct summaries of a project.
- I accurately interpret statistical or modeling results.
- I consider the appropriate scope and impact of my project results.
Level: 1
Justification:
I don’t believe I have done this at all yet
[TC-2] Documentation:
- I can create a user-friendly dashboard.
- I provide ample documentation for my custom functions.
Level: 1
Justification:
I have made a dashboard as seen on shinyapps. I have not made any custom functions to document.
https://ezd0m8-harshini-k.shinyapps.io/lab4/#belief-in-vaccine-safety-statistics
TC Summary
Data Manipulation (DM):
These objectives relate to the collection, cleaning, processing, and preparing of datasets for analysis.
[DM-1] Data Preparation
- I can read in datasets to R, including untidy ones.
- I can clean datasets to deal with missing data, typos, poor formatting, etc.
Level: 2
Justification:
I can read in data and I can pivot it and restructure the data as necessary to deal with formatting, as can be seen in Lab 2 where I restructure the however I do not believe I have had to deal with missing data or typos yet. I can read in different sheets of the same excel file.
{r calling data} #| message: false data<-read_excel(“C:\Users\Geetha\Downloads\wgm2018-dataset-crosstabs-all-countries.xlsx”)
data2<-read_excel(“C:\Users\Geetha\Downloads\wgm2018-dataset-crosstabs-all-countries.xlsx”, sheet = “Full dataset”)
{r subset data} #| message: false national <- data[c(‘…1’, ‘…2’, ‘…3’, ‘National results’,‘…5’)] colnames(national) <- c(“Country”, “Question”, “Response”, “National_Results_Col_Per”, “National_Results_Count”)
national <- national[!(national$Country %in% c(NA, ‘Country’)),] #drop title row since renamed cols alr
{r split to get question number} national\(QNumber <- str_split_i(national\)Question, ” “, 1)
[DM-2] Data Wrangling
- I can cleverly use pivoting, separating, grouping, and joining to wrangle data.
- I can use mapping (
purrr) to perform repeated tasks.
Level: 2
Justification:
While I have not used purrr I have extensively pivoted and joined data to create visualizations that answer specific questions or replicate specific outcomes
{r code for parents} # France’s WP5 is 13 france<- data2|> filter( WP5 == 13) |> select(WP5, Q25, Q27)|>group_by(Q27, Q25) |> summarise(count = n(), .groups = “drop_last”) |> mutate(percentage = round(count / sum(count), 6)) |> ungroup() |> filter(Q25 %in% c(4, 5)) |> group_by(Q27) |> summarise( total_count = sum(count), total_percentage = sum(percentage)) |> pivot_wider( names_from = Q27, values_from = c(total_count, total_percentage), names_glue = “Q27_{Q27}_{.value}“) |> select(Q27_1_total_percentage, Q27_2_total_percentage) |>mutate(Country =”France”)
colnames(france) <- c(“Parents”, “Non-Parents”, “Country”)
{r joining the two data sets} france_all<- merge(national3, france, by = “Country”)
{r pivoting the joined france set to longer} france_long <- france_all |> pivot_longer( cols = -c(Country, National_Results_Col_Per), names_to = “Category”, values_to = “Percentage” )|>mutate(Group = case_when( Category %in% c(“Men”, “Women”) ~ “Gender”, Category %in% c(“15-29”, “30-49”, “50+”) ~ “Age”, Category %in% c(“Elementary education or less”, “Secondary education”, “Post-secondary education”) ~ “Education”, Category %in% c(“Rural/small town”, “Big city/suburb”) ~ “Region”, Category %in% c(“Parents”, “Non-Parents”) ~ “Parenthood”, TRUE ~ “Other” )) france_long –>
[DM-3] Data Formats
- I can use API urls to access JSON data and convert it into a data frame
- I can scrape data from the web and convert it into a data frame
## Fill in the line below with your self-assigned level for this objective.
my_level <- 1
portfolio_levels <- portfolio_levels %>%
bind_rows(tibble(Objective = "DM-3",
Level = my_level))Level: 1
Justification
I have not done this in R or in this class but I have doen it elsewhere? Not sure if that is relevant.
DM Summary
Professional Visualization (PV):
[PV-1] Clear & Accessible Visualizations
- I can make my plots more clear by removing the legend and adding annotations.
- I can edit the titles, subtitles, captions, axis labels, etc. to create a clearly labelled plot.
- I can choose colors (“scales”) and themes to make a visually pleasing and accessible plot.
Level: 2
Justification:
[PV-2] Dynamic Visualizations
- I can use a package like {gganimate} to create self-contained gifs.
- I can use a package like {plotly}, {ggplotly}, {leaflet}, {ggirafe}, etc. to make interactive html widgets.
Level: 2
Justification:
I have not used gganimate to create a self-contained gif. I have, however used leaflet to make interactive widgets as seen on https://ezd0m8-harshini-k.shinyapps.io/lab4/#belief-in-vaccine-safety-statistics
[PV-3] Interactive Visualizations
- I can use Shiny or webR to create visualizations that react to a user’s input.
Level: 2
Justification:
https://ezd0m8-harshini-k.shinyapps.io/lab4/#belief-in-vaccine-safety-statistics
{r}
Slider for minimum vaccination rate
sliderInput(“min_vacc”, “Minimum Vaccination Percentage:”, min = 0, max = 100, value = 0, step = 5)
Checkboxes for region selection
checkboxGroupInput(“selected_regions”, “Select Regions to Display:”, choices = unique(national2\(Region), selected = unique(national2\)Region))
PV Summary
Code Design, Algorithms, Iteration (CDAI):
These objectives ask you to design code-based approaches to statistical computing problems, usually involving iteration to a stopping condition.
[CDAI-1] R Programming Language
- I understand non-standard evaluation (aka “tidy eval” or “unquoted objects”), and I can use tunneling in my functions.
- I understand functional programming, and I can use functions as objects in my code design.
Level: 1
Justification:
I have not done this yet
[CDAI-2] Object Handling
- I have built in checks for possible input problems
- I can make reasonable choices in my code design about when to save intermediate objects.
- I can convert objects between types and structures as needed.
Level: 1
Justification:
I have not done this yet
[CDAI-3] Speed and Efficiency
- I can recognize moments of possible slowdown in my code, and use built-in functions or parallelizing to speed them up.
- I always use and design vectorized functions whenever possible.
Level: 1
Justification:
I have not made any vectorized functions yet
[CDAI-4] Supporting Functions
- I write helper / shortcut functions to streamline repeated tasks and make my code easier to read.
- I use intermediate functions to streamline repeated or looping processes.
Level: 1
Justification:
I have not made any shortcut functions yet
[CDAI-5] Algorithmic Process
- I can invent and implement my own iterative algorithm.
- My loops are clean and efficient.
- I have built in checks for possible problems or extreme cases in the algorithm.
Level: 1
Justification:
I have not made an algorithms in this course yet.
[CDAI-6] Generative Art
- I can apply a variety of generative art functions to make a visually pleasing piece.
- I can explain why particular changes to the code result in particular differences in the visualization.
Level: 1
Justification:
I have not made any generative art yet.
CDAI Summary
Overall Summary
Grade
Based on the summary plot above, I believe I have earned a B in STAT 541.