INFO_536_CollaborativeExercise

This is an in-class exercise to help you understand how to collaborate using Git, create branches to work on different parts of a code or project in parallel, merge and resolve conflicts.

  1. Fork the Repository:

Each group will fork this repository to their own GitHub account. This allows you to work independently before integrating your changes back into the main project.

  1. Each student group of three clone their forked repository to their local machines using RStudio.

  2. Within their cloned repositories, each group creates a new branch to work on their assigned task. Name the branches based on the group number, e.g., group1_analysis, group2_analysis, etc.

  3. Each group will focus on a different aspect of the GTD dataset. Within each group, students may choose to take on different roles:

Role 1: Data Wrangling - This student prepares the data for analysis. Role 2: Data Analysis - This student conducts the main analysis. Role 3: Data Visualization - This student visualizes the results.

5. Group Assignments

Group 1: Analyze the Number of Attacks per Year

Role 1: Filter and prepare data by year. Role 2: Count the number of attacks per year. Role 3: Visualize the number of attacks per year using a bar chart.

Group 2: Analyze the Fatalities per Region

Role 1: Group and prepare data by region. Role 2: Calculate total fatalities per region. Role 3: Visualize fatalities by region using a bar chart.

Group 3: Analyze the Most Common Attack Types

Role 1: Group and prepare data by attack type. Role 2: Count the number of each attack type. Role 3: Visualize the most common attack types using a bar chart.

Group 4: Analyze the Target Types

Role 1: Filter and group data by target type. Role 2: Count the number of attacks on each target type. Role 3: Visualize the attack frequency by target type.

Group 5: Analyze Terrorist Activity by Country

Role 1: Group and prepare data by country. Role 2: Count the number of attacks per country. Role 3: Visualize the data using a bar chart of attacks by country.

Group 6: Analyze Attack Success Rate

Role 1: Prepare data by filtering successful vs unsuccessful attacks. Role 2: Calculate the success rate of attacks. Role 3: Visualize the success rate using a pie chart.

Group 7: Analyze Trends Over Time

Role 1: Prepare data by decade. Role 2: Calculate the change in attack frequency over time. Role 3: Visualize trends using a line chart. Development Process:

Each student within a group works on their assigned role. Students commit their changes to their branch with appropriate commit messages.

Merging and Resolving Conflicts

Group Collaboration: Students within each group will merge their individual changes into the group branch. Students may encounter merge conflicts if they’ve edited the same lines of code. They must resolve these conflicts in RStudio by discussing which changes to keep.

Push to GitHub: Once conflicts are resolved and all changes are merged, students push their final branch back to their forked GitHub repository.

Pull Request: Each group creates a pull request to merge their group branch into the main repository (which I maintain).