<commit_before><!DOCTYPE HTML>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; 
    any other head content must come *after* these tags -->
    <title>San Francisco Crimes</title>
    <script type="text/javascript" src="js/d3.js"></script>
    <script type="text/javascript" src="js/vis_helpers.js"></script>
    <link href="css/reset.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">
    <link href='https://fonts.googleapis.com/css?family=Roboto+Condensed' 
      rel='stylesheet' type='text/css'>
    <link href='https://fonts.googleapis.com/css?family=Cinzel' 
      rel='stylesheet' type='text/css'>
  </head>

  <body>
    <div class="heading">
      <h1>San Francisco</h1>
      <h1 id="subtitle"></h1>
      <nav class="vis_nav">
        <button class="nav-button previous" id="nav-prev-button" 
          onclick="PrevPage()">
          <svg viewBox="0 0 10 10">
            <path transform="translate(1,0)" class="arrow" 
            d="M 5,0 L 6,1 L 2,5 L 6,9 L 5,10 L 0,5 Z"></path>
          </svg>
        </button>
        
        <button class="nav-button next" id="nav-next-button" 
          onclick="NextPage()">
          <svg viewBox="0 0 10 10">
            <path transform="translate(3,0)" class="arrow" 
              d="M 1,0 L 6,5 L 1,10 L 0,9 L 4,5 L 0,1 Z"></path>
          </svg>
        </button>
      </nav>
    </div>

    <div class="description page0">
      <p>
        Data about crime activity in San Francisco is publicly available 
        starting from January 1st, 2003 at 
        <a href="http://data.sfgov.org">data.sfgov.org</a>. This data comes from 
        the San Francisco Police Department system.</p>
      <p>
        I explored this data set using R. My analysis can be found here:<br/>
        <a href="https://s3.amazonaws.com/andrei-iusan-ud-dand/P4_-_San_Francisco_Crimes_-_Andrei_Iusan.html">
        San Francisco Crimes Investigation</a>
      </p>
      <p>
        Here you can find a summary of my findings.
        You can navigate through the presentation using the arrows positioned
        next to the title.
      </p>
    </div>

    <div class="description page1">
      <p> This plot represents the number of crimes per day, averaged over 
        30 days.</p>
      <p> You can normalize the plot. This will tell you the proportion of 
        solved crimes rather than the actual number of crimes.</p>
      <p> On the un-normalized plot we see an increasing trend in the number
        of crimes from 2010 until the end of 2015. The number of solved crimes
        is higher for 2013 and 2014, but otherwise it stays at about 150
        solved crimes per day. </p>
      <p> On the normalized plot we see this increase in crime activity
        combined with the relative stable number of solved crimes translated
        in a decrease in the percentage of solved crimes, especially in 2015.</p>
      
    </div>

    <div class="description page2">
      <p> This is the same type of chart, but the data is filtered for the 
        "Larceny/Theft" category. Note that this is a very common type of crime,
        and it became more common in the last years.</p>
      <p> You can normalize this graphic like the previous one, and also superimpose 
        the total number of crimes.</p>
      <p> You can see that theft accounts for a lot of variability 
        in the total number of crimes.</p>
    </div>
    
    <div class="description page3">
      <p> Now let's have a look at the evolution of drug related crimes.
        This is also a very common crime, it's the 6<sup>th</sup> most 
        common crime. I chosed to present this category because like theft,
        the number of drug related crimes changed drastically in the last few 
        years. In this case, however, the number of crimes decreased in the 
        last years.</p>
      <p> Note that the percentage of solved crimes in this category 
        is very high.</p>
    </div>

    <div class="description page4">
      <p> The combination of increasing theft activity and decreasing drug
        activity led to the result we saw in the overview of all crimes, that
        the percentage of solved crimes dropped from 2014 to 2015. </p>
      <p> We can see now that the situation is not due to a change in the way
        police handels crimes, but due to the changing of the number of crimes
        in certain categories (particularly increased theft activity) that are
        difficult to solve.</p>
      <p>
        You can now explore other categories and see how common those 
        categories are and how they evolved in time.</p>
    </div>

    <div class="visualization">
      <button class="button" id="normalize-btn" onclick="normalizeBtnClick()">
        normalize</button>
      <svg class="plot_area" version="1.1" viewBox="0 0 720 520" 
        preserveAspectRatio="xMinYMin meet">
        <script type="text/javascript">
            var page=1;
            load_vis_page(page);
            loadData(function(){
              loadPage(page);
            });
        </script>
      </svg>
    </div>
  </body>
</html><commit_msg>cleaned and commented code<commit_after><!DOCTYPE HTML>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; 
    any other head content must come *after* these tags -->
    <title>San Francisco Crimes</title>
    <script type="text/javascript" src="js/d3.js"></script>
    <script type="text/javascript" src="js/vis_helpers.js"></script>
    <link href="css/reset.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">
    <link href='https://fonts.googleapis.com/css?family=Roboto+Condensed' 
      rel='stylesheet' type='text/css'>
    <link href='https://fonts.googleapis.com/css?family=Cinzel' 
      rel='stylesheet' type='text/css'>
  </head>

  <body>
    <div class="heading">
      <h1>San Francisco</h1>
      <h1 id="subtitle"></h1>
      <nav class="vis_nav">
        <button class="nav-button previous" id="nav-prev-button" 
          onclick="PrevPage()">
          <svg viewBox="0 0 10 10">
            <path transform="translate(1,0)" class="arrow" 
            d="M 5,0 L 6,1 L 2,5 L 6,9 L 5,10 L 0,5 Z"></path>
          </svg>
        </button>
        
        <button class="nav-button next" id="nav-next-button" 
          onclick="NextPage()">
          <svg viewBox="0 0 10 10">
            <path transform="translate(3,0)" class="arrow" 
              d="M 1,0 L 6,5 L 1,10 L 0,9 L 4,5 L 0,1 Z"></path>
          </svg>
        </button>
      </nav>
    </div>

    <div class="description page1">
      <p> This plot represents the number of crimes per day, averaged over 
        30 days.</p>
      <p> You can normalize the plot. This will tell you the proportion of 
        solved crimes rather than the actual number of crimes.</p>
      <p> On the un-normalized plot we see an increasing trend in the number
        of crimes from 2010 until the end of 2015. The number of solved crimes
        is higher for 2013 and 2014, but otherwise it stays at about 150
        solved crimes per day. </p>
      <p> On the normalized plot we see this increase in crime activity
        combined with the relative stable number of solved crimes translated
        in a decrease in the percentage of solved crimes, especially in 2015.</p>
    </div>
    
    <div class="visualization">
      <button class="button" id="normalize-btn" onclick="normalizeBtnClick()">
        normalize</button>
      <svg class="plot_area" version="1.1" viewBox="0 0 720 520" 
        preserveAspectRatio="xMinYMin meet">
        <script type="text/javascript">
            var page=1;
            load_vis_page(page);
            loadData(function(){
              loadPage(page);
            });
        </script>
      </svg>
    </div>
  </body>
</html>
{'fraction_non_alphanumeric': 0.11602344894968246, 'fraction_numerical': 0.023693209574987786, 'mean_word_length': 2.4321039396479462, 'pattern_counts': {'":': 0, '<': 158, '<?xml version=': 0, '>': 158, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4683076', 'n_tokens_mistral': 2525, 'n_tokens_neox': 2333, 'n_words': 879}