<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.9.2">Jekyll</generator><link href="https://spenceryoung66.github.io/stat386-projects/feed.xml" rel="self" type="application/atom+xml" /><link href="https://spenceryoung66.github.io/stat386-projects/" rel="alternate" type="text/html" /><updated>2022-12-22T17:27:25+00:00</updated><id>https://spenceryoung66.github.io/stat386-projects/feed.xml</id><title type="html">Data Science Explanations, Tips, and Tricks</title><subtitle>Blog for the beginner Data Scientist that offers Tips and Tricks for your analyses!</subtitle><author><name>Spencer Young</name></author><entry><title type="html">“Choose Your Fighter”: Analysis of Reviews Between Unity and Unreal Engines</title><link href="https://spenceryoung66.github.io/stat386-projects/2022/12/05/DataStory.html" rel="alternate" type="text/html" title="“Choose Your Fighter”: Analysis of Reviews Between Unity and Unreal Engines" /><published>2022-12-05T00:00:00+00:00</published><updated>2022-12-05T00:00:00+00:00</updated><id>https://spenceryoung66.github.io/stat386-projects/2022/12/05/DataStory</id><content type="html" xml:base="https://spenceryoung66.github.io/stat386-projects/2022/12/05/DataStory.html">&lt;h1 id=&quot;meet-the-fighters&quot;&gt;Meet the Fighters&lt;/h1&gt;

&lt;p&gt;One of the biggest media industries in the current day and age is that of video games. While most gamers have only been able to play games, engines to develop games have become increasingly available. With these engines available, many gamers who want to turn their hobby into a career suddenly have the means to. However, the question becomes where to start, specifically which engine to develop with. While there are many more than just these, the engines I will focus on in this blog post are Unity and Unreal. While both engines are used for all kinds of games, a quick Google search shows that the most popular games in Unity tend to be Indie titles, while the most popular games made in Unreal tend to be AAA games.&lt;/p&gt;

&lt;p&gt;Over the course of the past few blog posts, I have collected and done exploratory analysis on data related to video games made in these engines. I started with finding Wikipedia pages that contain lists of games made in Unity and Unreal. Unfortunately, those lists are both gone now. Then, I used the Steam API to get the information related to those games. After some data cleaning and additional gathering, I performed an exploratory data analysis. To me, the most meaningful metrics available are which engine was used (obviously), how much the game costs, and the number of positive vs. negative reviews.&lt;/p&gt;

&lt;h1 id=&quot;comparing-games-by-engine-price-and-reviews&quot;&gt;Comparing Games by Engine, Price, and Reviews&lt;/h1&gt;

&lt;p&gt;Now, the moment we’ve all been waiting for, time to see how Unity and Unreal compare in regard to price and reviews. Reviews is an important indicator because the number of reviews a game has is strongly related to how many copies of the game have been sold (see &lt;a href=&quot;https://vginsights.com/insights/article/how-to-estimate-steam-video-game-sales&quot;&gt;vginsights&lt;/a&gt; for a more in-depth explanation). Because Steam does not release the number of copies sold, the closest we can get is looking at the number of reviews. This graph shows the relationship between game engine, price, and median amount of reviews.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/SpencerYoung66/stat386-projects/raw/main/assets/images/DataStory/PriceEngineReviewGraph.png&quot; alt=&quot;Figure&quot; /&gt;&lt;/p&gt;

&lt;p&gt;As can be seen in the graph, the number of reviews for games made with Unity have an overall higher amount of median reviews for the lower price buckets. This supports the assumption already described, which is that the most popular Unity games tend to be Indie games that inevitably cost less. Then, as the price increases, we see a massive increase in Unreal game reviews, and a decrease in Unity game reviews.&lt;/p&gt;

&lt;p&gt;While this is not an exhaustive list of games made in either engine, the trend shows that Unity is favored by Indie game makers (who tend to have cheaper games), while Unreal is preferred by bigger studios. It could be beneficial for a person to start developing in Unity and eventually move towards Unreal if the goal is to work with bigger companies. However, which engine is used by the new game developer should be decided by their goals. If they only want to work with a big company, then maybe they should dive right into Unreal to get the experience. If they want to make Indie games, then they should consider starting with Unity.&lt;/p&gt;

&lt;p&gt;If you are interested in checking out this data for yourself, or seeing the code used to make this graph, check out the GitHub repo &lt;a href=&quot;https://github.com/SpencerYoung66/UnityUnrealSteamData&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h4 id=&quot;title-photo&quot;&gt;Title Photo&lt;/h4&gt;
&lt;p&gt;Photo by Igor Karimov on Unsplash&lt;/p&gt;</content><author><name>Spencer Young</name></author><summary type="html">Meet the Fighters</summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://spenceryoung66.github.io/stat386-projects/assets/images/DataStory/Controller.jpeg" /><media:content medium="image" url="https://spenceryoung66.github.io/stat386-projects/assets/images/DataStory/Controller.jpeg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Press EDA to Continue: Exploring Unity and Unreal Game Engine Data</title><link href="https://spenceryoung66.github.io/stat386-projects/2022/11/18/PressEDA.html" rel="alternate" type="text/html" title="Press EDA to Continue: Exploring Unity and Unreal Game Engine Data" /><published>2022-11-18T00:00:00+00:00</published><updated>2022-11-18T00:00:00+00:00</updated><id>https://spenceryoung66.github.io/stat386-projects/2022/11/18/PressEDA</id><content type="html" xml:base="https://spenceryoung66.github.io/stat386-projects/2022/11/18/PressEDA.html">&lt;h1 id=&quot;chapter-1-the-data&quot;&gt;Chapter 1: The Data&lt;/h1&gt;

&lt;p&gt;Video games becoming an increasingly popular and mainstream source of entertainment. With this surge of gaming, many people gain the desire to develop games. Unfortunately, knowing where to start is a task all of its own. One of the biggest decisions to make is which game engine to create your game in. Two of the most popular open source game engines are Unity and Unreal. I gathered the data we will look at in this blog post through Wikipedia and Steam. This data contains information such as the number of positive, negative, and total game reviews, game prices, ratings, etc. I have added the price columns, along with the available platforms, for a more rich analysis. The main topics that will be discussed are games that support Mac OS and differences between Unity and Unreal games.&lt;/p&gt;

&lt;h1 id=&quot;chapter-2-platform&quot;&gt;Chapter 2: Platform&lt;/h1&gt;

&lt;p&gt;The first variable we are going to look at is what platforms are used the most. While I have the data for windows, linux, and mac, I was most curious about the mac (since that is what I use). A scatter plot and summary table of mac game prices, positive reviews, and negative reviews are found below.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/SpencerYoung66/stat386-projects/raw/main/assets/images/EDAPhotos/MacPlot.png&quot; alt=&quot;Figure&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/SpencerYoung66/stat386-projects/raw/main/assets/images/EDAPhotos/MacTable.png&quot; alt=&quot;Figure&quot; /&gt;&lt;/p&gt;

&lt;p&gt;It appears that overall games that appear on the mac os are cheaper than when they are not available on mac. This is most likely due to the fact that a lot of Triple A games are only available on Windows. However, it is interesting that overall there are more positive reviews for Mac than not Mac.&lt;/p&gt;

&lt;h1 id=&quot;chapter-3-engine&quot;&gt;Chapter 3: Engine&lt;/h1&gt;

&lt;p&gt;The main aspect I wanted to learn about is differences between the different game engines, Unity and Unreal. Below are some of the summary statistics for the differences between Unity and Unreal.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/SpencerYoung66/stat386-projects/raw/main/assets/images/EDAPhotos/UnityUnrealTables.png&quot; alt=&quot;Figure&quot; /&gt;&lt;/p&gt;

&lt;p&gt;One of the main takeaways from these tables is overall, it appears that Unity is performing better than Unreal. The mean prices are lower than Unreal (as seen from this graph as well):&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/SpencerYoung66/stat386-projects/raw/main/assets/images/EDAPhotos/EnginePriceDensity.png&quot; alt=&quot;Figure&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The mean positive reviews are also greater for Unity than Unreal:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/SpencerYoung66/stat386-projects/raw/main/assets/images/EDAPhotos/UnityUnrealPositiveReviewsGraph.png&quot; alt=&quot;Figure&quot; /&gt;&lt;/p&gt;

&lt;p&gt;While there are more variables and aspects to take into account, price and number of positive reviews seem to be some of the more important aspects to consider.&lt;/p&gt;

&lt;h1 id=&quot;final-chapter-conclusion&quot;&gt;Final Chapter: Conclusion&lt;/h1&gt;
&lt;p&gt;After viewing a few aspects of the data, it seems that Unity performs a little better in terms of pricing and ratings than Unreal. While these are not the only aspects to consider, they are some important aspects. Every person will need to decide for themselves if Unity or Unreal is better for them, but for the sample I have, it looks like Unity performs somewhat better.&lt;/p&gt;

&lt;p&gt;If you are interested in seeing the code used for this post, or the plots and tables created, check out my GitHub repository &lt;a href=&quot;https://github.com/SpencerYoung66/UnityUnrealSteamData&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h4 id=&quot;title-photo&quot;&gt;Title Photo&lt;/h4&gt;
&lt;p&gt;Photo by Markus Winkler on Unsplash&lt;/p&gt;</content><author><name>Spencer Young</name></author><summary type="html">Chapter 1: The Data</summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://spenceryoung66.github.io/stat386-projects/assets/images/EDAPhotos/GraphTitlePhoto.jpeg" /><media:content medium="image" url="https://spenceryoung66.github.io/stat386-projects/assets/images/EDAPhotos/GraphTitlePhoto.jpeg" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">APIs, Requests, and Beautiful Soup: A Game of Scraping</title><link href="https://spenceryoung66.github.io/stat386-projects/2022/10/21/APIs-Requests-BeautifulSoup-A-Game-Of_Scrapping.html" rel="alternate" type="text/html" title="APIs, Requests, and Beautiful Soup: A Game of Scraping" /><published>2022-10-21T00:00:00+00:00</published><updated>2022-10-21T00:00:00+00:00</updated><id>https://spenceryoung66.github.io/stat386-projects/2022/10/21/APIs-Requests-BeautifulSoup-A-Game-Of_Scrapping</id><content type="html" xml:base="https://spenceryoung66.github.io/stat386-projects/2022/10/21/APIs-Requests-BeautifulSoup-A-Game-Of_Scrapping.html">&lt;h1 id=&quot;the-game-begins&quot;&gt;The Game Begins&lt;/h1&gt;

&lt;p&gt;Data surrounds us on every front. It can be found as part of everything we do. Data can lead us to learn about and optimize whatever we love. Something I enjoy doing is playing video games. I have also very recently started making games. While learning some of the basics of game making, I learned about some of the various game engines available. To learn more about these engines, I started looking on the internet. I thought that it would be interesting to compare the reception and popularity of games made in two of the more popular engines: Unity and Unreal. So, I started looking for data about these game engines. This led me to finding some lists on Wikipedia, as well as the Steam API. I will cover my process of getting first the Unity game list, then the Steam game list, followed by the Unreal game list, and finally combining and filtering the data.&lt;/p&gt;

&lt;h1 id=&quot;unity-engine&quot;&gt;Unity Engine&lt;/h1&gt;

&lt;p&gt;For the list of Unity games, I went to the following &lt;a href=&quot;https://en.wikipedia.org/wiki/List_of_Unity_games&quot;&gt;link&lt;/a&gt;. Unfortunately, this list has now been deleted. However, the following code is what I used to get the information.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/SpencerYoung66/stat386-projects/raw/main/assets/images/ScrappingPhotos/UnityGamesRequest.png&quot; alt=&quot;Figure&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I sent a request to the website with the requests library. This enabled me to get all of the html. I then converted the html to a Beautiful Soup object. 
Converting the html to a Beautiful Soup object is preferred because Beautiful Soup (referred to hereafter as BS) has many methods that allow you to search through the html for the information you want.&lt;/p&gt;

&lt;p&gt;After looking at the html, I noticed that the titles for the games all were contained in unordered list elements. This is something that you will want to do when scraping. By right-clicking the text in the webpage, you can click “inspect” and see in the html what type of element your desired data is.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/SpencerYoung66/stat386-projects/raw/main/assets/images/ScrappingPhotos/UnorderedLists.png&quot; alt=&quot;Figure&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Within the lists, the actual titles of the games were within “a” elements. Every website has a different format, so you can use the model I used, but you will need to apply it to your own webpage. The structure may be different, but the principles are the same. Get as unique of web elements as possible that describe all of your data, then keep getting more and more descriptive until you can access the data.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/SpencerYoung66/stat386-projects/raw/main/assets/images/ScrappingPhotos/AElements.png&quot; alt=&quot;Figure&quot; /&gt;&lt;/p&gt;

&lt;h1 id=&quot;steam-game&quot;&gt;Steam Game&lt;/h1&gt;

&lt;p&gt;Getting the Steam games was a different process entirely. Steam has a very nice API that is open to use. The documentation for the API can be found &lt;a href=&quot;https://partner.steamgames.com/doc/home&quot;&gt;here&lt;/a&gt;. The easiest way to get a list of games from Steam is to get a list of all of the apps available on Steam.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/SpencerYoung66/stat386-projects/raw/main/assets/images/ScrappingPhotos/GetAllSteam.png&quot; alt=&quot;Figure&quot; /&gt;&lt;/p&gt;

&lt;p&gt;While this may not be ideal, given the options available, this is the easiest route. This &lt;a href=&quot;https://stackoverflow.com/questions/46330864/steam-api-all-games&quot;&gt;link&lt;/a&gt; talks more about why, as well as gives the endpoint needed to get all of the games.&lt;/p&gt;

&lt;p&gt;With this giant list of games, I needed to filter it down. An important step is to convert the response to a json file. In Python, this will show up as a dictionary. For me, this was a triple-nested dictionary/list.&lt;/p&gt;

&lt;p&gt;Part of the data cleaning process involves making the data, even data from APIs, usable. For me, I ended up looping through the outer dictionary and list so I could convert the inner lists to dictionaries for later use. I also made a list of the Steam games and a list of AppIDs (unique game identifiers for Steam) for later comparison use.&lt;/p&gt;

&lt;h1 id=&quot;unreal-engine&quot;&gt;Unreal Engine&lt;/h1&gt;

&lt;p&gt;Next, for the last scrape, I scraped Wikipedia again for a list of Unreal Engine games from the following &lt;a href=&quot;https://en.wikipedia.org/wiki/List_of_Unreal_Engine_games&quot;&gt;link&lt;/a&gt;. Unfortunately, this page has also been deleted. Fortunately, however, after my first successful scrape, I saved all of my data to a CSV for later use.&lt;/p&gt;

&lt;p&gt;This is an example of different webpages from the same website being different. The games in this list were stored as tables, instead of unordered lists. This was actually a benefit to me, because it is easier to just get tables with pandas than to use requests and BS.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/SpencerYoung66/stat386-projects/raw/main/assets/images/ScrappingPhotos/ReadHTML.png&quot; alt=&quot;Figure&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The tables were stored as a list of DataFrames. So, I looped through this list and combined all the DataFrames.&lt;/p&gt;

&lt;p&gt;I then proceeded to filter my complete DataFrame in the following ways:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Erase Missing Platforms&lt;/li&gt;
  &lt;li&gt;Only Get PC Games&lt;/li&gt;
  &lt;li&gt;Get Rid of Games that Hadn’t Released Yet&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I continued to clean my data, as was best to do while getting the data.&lt;/p&gt;

&lt;h1 id=&quot;combining-unity-and-unreal&quot;&gt;Combining Unity and Unreal&lt;/h1&gt;

&lt;p&gt;To combine the two lists of games, I used the property of sets known as intersection. By converting the two lists of games to sets and comparing those with the set of games from Steam, I could get all of the games that Steam had and that were also in the Unreal and Unity lists.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/SpencerYoung66/stat386-projects/raw/main/assets/images/ScrappingPhotos/Sets.png&quot; alt=&quot;Figure&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Then, with my finished game list and appID list (which I was able to make due to having the game list), I was able to make a DataFrame with these two lists.&lt;/p&gt;

&lt;h1 id=&quot;getting-game-review-info&quot;&gt;Getting Game Review Info&lt;/h1&gt;

&lt;p&gt;Now, with a DataFrame that contains game titles and appIDs, I could request the information from Steam’s API for the ratings and reviews of the games. So, using a slightly different endpoint for the API than before (shown &lt;a href=&quot;https://stackoverflow.com/questions/53451458/get-positive-and-negative-review-from-steam-api&quot;&gt;here&lt;/a&gt;), I got the total ratings, positive ratings, negative ratings, review scores, and review score descriptions for each game.&lt;/p&gt;

&lt;p&gt;From the number of total reviews, it is possible to estimate the number of units sold for the game, as described by &lt;a href=&quot;https://vginsights.com/insights/article/how-to-estimate-steam-video-game-sales&quot;&gt;vginsights&lt;/a&gt;. To be safe, I used 20 times the number of reviews, instead of 30 like the link says, because the multiplier was trending downwards, and the article is a couple years old. I also added the engine of the game to the DataFrame. With all of this data, I finally had my data. I saved to it a CSV, which I did not realize would be such an important step until the time of writing.&lt;/p&gt;

&lt;h1 id=&quot;the-game-ends&quot;&gt;The Game Ends&lt;/h1&gt;

&lt;p&gt;Finally, after all of the different scraping techniques employed, I have my dataset. While I did not realize this when starting, this project would be important to help preserve some of the information about these games that has now been lost. In a future blog post I will be analyzing this data to see how Unity vs. Unreal compare. If you are interested in seeing the code used for this post, or the data created, check out my GitHub repository &lt;a href=&quot;https://github.com/SpencerYoung66/UnityUnrealSteamData&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h1 id=&quot;ethics-acceptable-usage&quot;&gt;Ethics: Acceptable Usage&lt;/h1&gt;

&lt;p&gt;To ensure that scraping Wikipedia would be acceptable, I read the &lt;a href=&quot;https://en.wikipedia.org/robots.txt&quot;&gt;robots.txt page&lt;/a&gt;. The page referenced many different crawlers that it would not allow, but said “Friendly, low-speed bots are welcome viewing article pages, but not dynamically-generated pages please.” Since the pages I referenced are not dynamically-generated, as long as I kept my speed relatively slow, I would be fine scraping the page.&lt;/p&gt;

&lt;p&gt;Next, I needed to check Steam’s API requirements. On their &lt;a href=&quot;https://steamcommunity.com/dev/apiterms#:~:text=You%20are%20limited%20to%20one,these%20API%20Terms%20of%20Use&quot;&gt;website&lt;/a&gt;, they say, “You are limited to one hundred thousand (100,000) calls to the Steam Web API per day.” Since my data only has about 800 rows, and I am waiting two seconds between API calls, I appear to be okay using the Steam API.&lt;/p&gt;

&lt;h4 id=&quot;title-photo&quot;&gt;Title Photo&lt;/h4&gt;
&lt;p&gt;Photo by Sigmund on Unsplash&lt;/p&gt;</content><author><name>Spencer Young</name></author><summary type="html">The Game Begins</summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://spenceryoung66.github.io/stat386-projects/assets/images/ScrappingPhotos/GameOver.png" /><media:content medium="image" url="https://spenceryoung66.github.io/stat386-projects/assets/images/ScrappingPhotos/GameOver.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Git Good with Git Version Control</title><link href="https://spenceryoung66.github.io/stat386-projects/2022/09/28/Git-Good.html" rel="alternate" type="text/html" title="Git Good with Git Version Control" /><published>2022-09-28T00:00:00+00:00</published><updated>2022-09-28T00:00:00+00:00</updated><id>https://spenceryoung66.github.io/stat386-projects/2022/09/28/Git-Good</id><content type="html" xml:base="https://spenceryoung66.github.io/stat386-projects/2022/09/28/Git-Good.html">&lt;h1 id=&quot;the-need-for-git&quot;&gt;The Need for Git&lt;/h1&gt;

&lt;p&gt;One of the most frustrating feelings when coding is when you have working code, then through unfortunate circumstances the code no longer functions. There can be a variety of reasons for this. When working with others, they may change the code in a way that you are unfamiliar with. When you try something new in the code, you make unknowingly break part of the functional code. Without a proper version control tool, this can lead to hours of trying to recreate the code that you already had.&lt;/p&gt;

&lt;h1 id=&quot;git-and-version-control&quot;&gt;Git and Version Control&lt;/h1&gt;

&lt;p&gt;Git can help with this situation. Git is one of the most, if not the most, popular version control tools. Version control is exactly what it sounds like, a tool to control the different versions of your code. There are a few main aspects of Git that I will cover in this post. The main aspects are initializing the Git repository, add files to the staging area, committing the files, and switching the head. This post will deal with how to perform these steps on a Mac device.&lt;/p&gt;

&lt;h1 id=&quot;initializing-the-git-repository&quot;&gt;Initializing the Git Repository&lt;/h1&gt;

&lt;p&gt;The first step, initializing the Git repository, is a fairly simple step, but a very important one. The first thing you need to do is ensure that you are in the directory you want to initialize as the Git repository. After maneuvering to the correct folder in the Terminal, type the following command: “git init”.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/SpencerYoung66/stat386-projects/raw/main/assets/images/TutorialPhotos/GitInit.png&quot; alt=&quot;Figure&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This will initialize the folder as a repository. To verify the folder was correctly initialized, type “git status”. If the terminal has a fatal error, then the folder was not initialized.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/SpencerYoung66/stat386-projects/raw/main/assets/images/TutorialPhotos/GitStatusNoRepo.png&quot; alt=&quot;Figure&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If the terminal says “on branch main” with some additional information, then the repository was properly initialized.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/SpencerYoung66/stat386-projects/raw/main/assets/images/TutorialPhotos/GitStatusRepo.png&quot; alt=&quot;Figure&quot; /&gt;&lt;/p&gt;

&lt;h1 id=&quot;staging-area&quot;&gt;Staging Area&lt;/h1&gt;

&lt;p&gt;After the Git repository is initialized, you can begin to work with the files in the repository. The process that files go through with Git are the following:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Saved&lt;/li&gt;
  &lt;li&gt;Added to Staging Area&lt;/li&gt;
  &lt;li&gt;Committed to Git&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The first step, saved, is saving the file like you would any other file on your computer. After you save the file, add it to the staging area. This area is designed so that you can add and remove files before committing them as a version of your code you can go back to. This is nice in case you add a file that you did not mean to add; you can remove the file before it is committed. The staging area also allows you to commit many files as once. To add a specific file, use the command “git add {filename}”.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/SpencerYoung66/stat386-projects/raw/main/assets/images/TutorialPhotos/GitAdd.png&quot; alt=&quot;Figure&quot; /&gt;&lt;/p&gt;

&lt;p&gt;To add all the files in a repository, use the command “git add .”. To remove a file from the staging area, use the command “git rm {filename} –cached”.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/SpencerYoung66/stat386-projects/raw/main/assets/images/TutorialPhotos/GitRm.png&quot; alt=&quot;Figure&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This will keep the file saved but will remove the file from the staging area. To remove all the files from the staging area, use the command “git rm . –cached -r”.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/SpencerYoung66/stat386-projects/raw/main/assets/images/TutorialPhotos/GitRmAll.png&quot; alt=&quot;Figure&quot; /&gt;&lt;/p&gt;

&lt;h1 id=&quot;git-commit&quot;&gt;Git Commit&lt;/h1&gt;

&lt;p&gt;Once you have all the files you want in the staging area, the next step is to commit the files. Once you commit the files, you will be able to go to the repository at the specific point in time you committed it. No more losing hours of your life recoding what you have already done!&lt;/p&gt;

&lt;p&gt;Committing is very easy, in the case of Git, at least. Once all of the desired files are in the staging area, type the following command “git commit -m “{commit message}””.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/SpencerYoung66/stat386-projects/raw/main/assets/images/TutorialPhotos/GitCommit.png&quot; alt=&quot;Figure&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The commit message is a short statement about what you did in the commit. Usually commit messages will start with a verb and will deal with a single topic, like fixing a specific bug.&lt;/p&gt;

&lt;h1 id=&quot;switching-the-head&quot;&gt;Switching the Head&lt;/h1&gt;

&lt;p&gt;Once you have several commits, you may want to backtrack to a specific commit in the past. This can be done by switching the head. The head is the term that denotes which commit your repository is currently at. Switching the head can be done by using “git checkout”. However, you need to be able to reference which commit you want to make the new head. The commit ID is how you can accomplish this. To get the ID associated with each commit, type “git log” or “git log –oneline” for a more condensed version of the log. The number on the top above the author (when using git log)&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/SpencerYoung66/stat386-projects/raw/main/assets/images/TutorialPhotos/GitLog.png&quot; alt=&quot;Figure&quot; /&gt;&lt;/p&gt;

&lt;p&gt;or left of the commit message (when using git log –oneline)&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/SpencerYoung66/stat386-projects/raw/main/assets/images/TutorialPhotos/GitLogOneline.png&quot; alt=&quot;Figure&quot; /&gt;&lt;/p&gt;

&lt;p&gt;is the number you will need. When you have the number, you can then type “git checkout {ID}”.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/SpencerYoung66/stat386-projects/raw/main/assets/images/TutorialPhotos/GitCheckout.png&quot; alt=&quot;Figure&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Checking out to a previous commit will put you in “detached head” state. There is limited capability in this mode, but all the files will appear as if you were in that commit. There are other intricacies with working in “detached head” state. However, those will not be discussed in this article. It is suggested that you continue research to learn more about the finer points of “detached head” state. To maneuver back to the latest commit, simply type “git switch main”.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/SpencerYoung66/stat386-projects/raw/main/assets/images/TutorialPhotos/GitSwitchMain.png&quot; alt=&quot;Figure&quot; /&gt;&lt;/p&gt;

&lt;h1 id=&quot;what-now&quot;&gt;What now?&lt;/h1&gt;

&lt;p&gt;While learning about Git is very important, like any other coding principle, the most important thing to do is to practice. Practice getting good with Git, practice adding files, removing files, and committing files, so that you will not run into the issue of having functional code ruined. Continue to become more advanced in Git so that you can use this incredible tool to its full potential.&lt;/p&gt;

&lt;p&gt;For additional information about Git commands, find the documentation at &lt;a href=&quot;https://git-scm.com/docs&quot;&gt;Git’s Website&lt;/a&gt;.&lt;/p&gt;

&lt;h4 id=&quot;title-photo&quot;&gt;Title Photo&lt;/h4&gt;
&lt;p&gt;Photo by Mohammad Rahmani on Unsplash&lt;/p&gt;</content><author><name>Spencer Young</name></author><summary type="html">The Need for Git</summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://spenceryoung66.github.io/stat386-projects/assets/images/TutorialPhotos/CodePhoto.png" /><media:content medium="image" url="https://spenceryoung66.github.io/stat386-projects/assets/images/TutorialPhotos/CodePhoto.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry></feed>