<commit_before><% provide(:title, "Flight Historian")%>
<% provide(:meta_description, "How <NAME> created his Flight Historian web application.")%>

<h1>
  Flight Historian<br/>
  <small>Overview</small>
</h1>

<%= render partial: "static_pages/flight_historian/version_picker", locals: {menu: @version_menu} %>

<%= link_buttons(
  LinkButton.new("Visit <strong>Flight Historian</strong>", 'flight-historian', 'https://www.flighthistorian.com/'),
  LinkButton.new("<strong>GitHub</strong> repository", 'github', 'https://github.com/bogardpd/flight_log')
  ) %>

<p>Flight Historian is a personal flight tracking website, allowing me to map and analyze all flights I’ve taken. Flights can be viewed all together, or analyzed by airline, aircraft, airport, route, class, or tail number.</p>

<h2 id="capabilities">Capabilities</h2>

<ul>
  <li>Allows a user to keep track of every aspect of their commercial flight history</li>
  <li>Provides detailed data about individual flights</li>
  <li>Provides aggregate, sortable data about collections of flights</li>
  <ul>
    <li>Flights can be filtered by airline, airport, route, class, or tail number</li>
  </ul>
  <li>Shows maps of all flights, or all flights that meet a specific criteria</li>
  <li>Stores and <%= link_to "parses", boarding_pass_parser_path %> boarding pass barcode data for each flight</li>
</ul>

<h2 id="tools">Tools</h2>

<table class="table table-striped">
	<tbody>
		<tr>
			<th scope="row">Languages &amp; Frameworks</th>
			<td>
				Ruby on Rails (2.3.1, 5.0.0.1)<br/>
				HTML<br/>
				CSS<br/>
        SCSS<br/>
			</td>
		</tr>
		<tr>
			<th scope="row">Database</th>
			<td>PostgreSQL</td>
		</tr>
		<tr>
			<th scope="row">Version Control</th>
			<td><%= link_to("Git", 'https://git-scm.com') %></td>
		</tr>
		<tr>
			<th scope="row">Hosting</th>
			<td><%= link_to("Heroku", 'https://www.heroku.com/') %></td>
		</tr>
		<tr>
			<th scope="row">Project Management</th>
			<td><%= link_to("Trello", 'https://trello.com/') %></td>
		</tr>
	</tbody>
</table>

<h2 id="history">History</h2>

<p>In 2009, I was promoted to a job with frequent travel. Soon thereafter, I started keeping track of all the places I’d been.</p>

<p>My first attempt at keeping track of my travel was to create a simple heat map of the United States, with each state colored depending on how recently I’d visited.</p>

<%= project_image('projects/flight-historian/Heat-Map.png') %>

<p>I kept track of the date of the most recent visit to each state in an Excel spreadsheet, and wrote a function to give me an RGB color based on today’s date and the date of the last visit. I would then manually recolor the states using an image editor. This worked, but it was labor intensive &ndash; every time I took a trip, I would have to recolor dozens of states.<p>
	
<p>I began to search for software that would generate a colored map of the states from an array of state colors. Before I found any, though, I discovered the <%= link_to "Great Circle Mapper", 'http://gcmap.com/' %>.</p>

<%= project_image('projects/flight-historian/map.gif') %>

<p>The Great Circle mapper allows the user to put in a string of airport pairs, and generates a map of <%= link_to "great circle", 'http://en.wikipedia.org/wiki/Great_circle' %> routes. (For example, <code>DAY-DFW-PHX,PHX-ORD-DAY</code> generates <%= link_to "this map", 'http://www.gcmap.com/mapui?P=DAY-DFW-PHX,PHX-ORD-DAY' %>.) Tracking flights was more interesting to me than tracking states, so I went back through my travel receipts, wrote up a string of all of my flights, and saved it in a text file. Updating was relatively simple; I just had to type some more text at the end of my text file and copy and paste it into the Great Circle Mapper.</p>

<p>It worked for a while, but things gradually got more complicated. The Great Circle Mapper normally automatically zooms the map to include all of the airports in the user’s flight string. Most of my flights were in the <%= link_to "contiguous United States", 'http://en.wikipedia.org/wiki/Contiguous_United_States' %>, but a few flights to Europe forced the map to be zoomed out, which made the US map difficult to see as I filled in more of the map with flights.  Fortunately, the Great Circle Mapper allows the user to designate that the map should ignore a particular flight when figuring out its zoom by prepending it with <code>o:noext</code>. (For example, <code>CMH-ORD,o:noext,ORD-FRA,o:noext,FRA-EWR,EWR-CMH</code> generates <%= link_to "this map", 'http://www.gcmap.com/mapui?P=CMH-ORD,o:noext,ORD-FRA,o:noext,FRA-EWR,EWR-CMH' %>.) This let me flag all flights that left the continental US so that the map would remain focused on the US, and I could see the details of all those routes. But I also wanted to be able to see my world flights, so I ended up having to maintain two text files &ndash; one for within the continental US, and one for the world.</p>

<%= project_image('projects/flight-historian/Routes-Text.png', alt: "Screenshot of text file containing flight routes") %>

<p>Then, in 2012, I started tracking the aircraft family, <%= link_to "tail number", 'http://en.wikipedia.org/wiki/Aircraft_registration' %>, and what class I sat in for all of my flights, and the data got more complicated. Now, a simple pair of text files was no longer good enough; I also had to keep a spreadsheet of all of the extra information about my flights. For good measure, I went back through my travel receipts again to get the past three years of aircraft family data.</p>

<%= project_image('projects/flight-historian/Flight-Log-Excel.png', alt: "Screenshot of Excel spreadsheet containing flight data") %>

<p>All this extra data let me do some fancy things, like make maps of all my trips on a particular airline or type of airplane, but it was a lot of extra work. I’d have to use filters in Excel, type up the routes and put them in the Great Circle Mapper, all to get a series of maps that would only be good until I took my next flight. I had a lot of data to manage.</p>

<p>At the same time, I’d been teaching myself Ruby on Rails by rewriting my old PHP website. Static pages weren't particularly difficult to write, so I needed something more complex to work on.</p>

<p>Just as I’d used my <%= link_to "EBDB", earthbound_database_path %> project to teach myself PHP and MySQL back in 2004, I decided to create a flight log database website to teach myself Ruby on Rails. I started work on this flight log in 2012, and launched the site in April 2013.</p>

<h2 id="change-log">Change Log</h2>

<table class="table table-striped">
	<thead>
		<tr>
			<th>Date</th>
			<th>Release</th>
			<th>Changes</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td>27 April 2013</th>
			<td>1.0</td>
			<td>Initial release</td>
		</tr>
		<tr>
			<td>24 October 2013</th>
			<td>1.1</td>
			<td><%= link_to("Routes and Top 5 Lists", 'http://onehundredairports.com/2013/10/24/flight-log-version-1-1-routes-top-5-lists-and-more/') %></td>
		</tr>
		<tr>
			<td>27 October 2014</th>
			<td>1.2</td>
			<td><%= link_to("Operators and Codeshares", 'http://onehundredairports.com/2014/10/29/flight-log-version-1-2-operators-and-codeshares') %></td>
		</tr>
		<tr>
			<td>8 February 2015</th>
			<td>1.3</td>
			<td><%= link_to("Distances and Annual Summaries", 'http://onehundredairports.com/2015/02/14/flight-log-version-1-3-distances-and-annual-summaries/') %></td>
		</tr>
		<tr>
			<td>31 January 2016</th>
			<td>2.0</td>
			<td><%= link_to("Flight Historian", 'http://onehundredairports.com/2016/01/31/flight-log-version-2-0-flight-historian/') %></td>
		</tr>
		<tr>
			<td>29 April 2017</th>
			<td>2.1</td>
			<td><%= link_to("Import Flights from Digital Boarding Passes", "https://onehundredairports.com/2017/04/29/flight-log-version-2-1-import-flights-from-digital-boarding-passes/") %></td>
		</tr>
	</tbody>
</table>

<h2 id="specifications">Specifications</h2>

<%= link_buttons(DownloadButton.new('files/flight-historian/Flight Historian 2.1 Specification.pdf')) %>

<h2 id="credits">Credits</h2>

<ul>
	<li>Thanks to <strong><NAME></strong> for reviewing the original specifications.</li>
	<li>Thanks to <strong><NAME></strong> for helping with beta testing and data entry.</li>
</ul><commit_msg>Update Flight Historian page to link to Portfolio version pages<commit_after><% provide(:title, "Flight Historian")%>
<% provide(:meta_description, "How <NAME> created his Flight Historian web application.")%>

<h1>
  Flight Historian<br/>
  <small>Overview</small>
</h1>

<%= render partial: "static_pages/flight_historian/version_picker", locals: {menu: @version_menu} %>

<%= link_buttons(
  LinkButton.new("Visit <strong>Flight Historian</strong>", "flight-historian", "https://www.flighthistorian.com/"),
  LinkButton.new("<strong>GitHub</strong> repository", "github", "https://github.com/bogardpd/flight_log")
  ) %>

<p>Flight Historian is a personal flight tracking website, allowing me to map and analyze all flights I’ve taken. Flights can be viewed all together, or analyzed by airline, aircraft, airport, route, class, or tail number.</p>

<%= link_header "Capabilities", 2 %>

<ul>
  <li>Allows a user to keep track of every aspect of their commercial flight history</li>
  <li>Provides detailed data about individual flights</li>
  <li>Provides aggregate, sortable data about collections of flights</li>
  <ul>
    <li>Flights can be filtered by airline, airport, route, class, or tail number</li>
  </ul>
  <li>Shows maps of all flights, or all flights that meet a specific criteria</li>
  <li>Stores and <%= link_to "parses", boarding_pass_parser_path %> boarding pass barcode data for each flight</li>
</ul>

<%= link_header "Tools", 2 %>

<table class="table table-striped">
	<tbody>
		<tr>
			<th scope="row">Languages &amp; Frameworks</th>
			<td>
				Ruby on Rails (2.3.1, 5.0.0.1)<br/>
				HTML<br/>
				CSS<br/>
        SCSS<br/>
			</td>
		</tr>
		<tr>
			<th scope="row">Database</th>
			<td>PostgreSQL</td>
		</tr>
		<tr>
			<th scope="row">Version Control</th>
			<td><%= link_to("Git", "https://git-scm.com", target: "_blank") %></td>
		</tr>
		<tr>
			<th scope="row">Hosting</th>
			<td><%= link_to("Heroku", "https://www.heroku.com/", target: "_blank") %></td>
		</tr>
		<tr>
			<th scope="row">Project Management</th>
			<td><%= link_to("Trello", "https://trello.com/", target: "_blank") %></td>
		</tr>
	</tbody>
</table>

<%= link_header "History", 2 %>

<p>In 2009, I was promoted to a job with frequent travel. Soon thereafter, I started keeping track of all the places I’d been.</p>

<p>My first attempt at keeping track of my travel was to create a simple heat map of the United States, with each state colored depending on how recently I’d visited.</p>

<%= project_image("projects/flight-historian/Heat-Map.png") %>

<p>I kept track of the date of the most recent visit to each state in an Excel spreadsheet, and wrote a function to give me an RGB color based on today’s date and the date of the last visit. I would then manually recolor the states using an image editor. This worked, but it was labor intensive &ndash; every time I took a trip, I would have to recolor dozens of states.<p>
	
<p>I began to search for software that would generate a colored map of the states from an array of state colors. Before I found any, though, I discovered the <%= link_to "Great Circle Mapper", "http://gcmap.com/", target: "_blank" %>.</p>

<%= project_image("projects/flight-historian/map.gif") %>

<p>The Great Circle mapper allows the user to put in a string of airport pairs, and generates a map of <%= link_to "great circle", "http://en.wikipedia.org/wiki/Great_circle", target: "_blank" %> routes. (For example, <code>DAY-DFW-PHX,PHX-ORD-DAY</code> generates <%= link_to "this map", "http://www.gcmap.com/mapui?P=DAY-DFW-PHX,PHX-ORD-DAY", target: "_blank" %>.) Tracking flights was more interesting to me than tracking states, so I went back through my travel receipts, wrote up a string of all of my flights, and saved it in a text file. Updating was relatively simple; I just had to type some more text at the end of my text file and copy and paste it into the Great Circle Mapper.</p>

<p>It worked for a while, but things gradually got more complicated. The Great Circle Mapper normally automatically zooms the map to include all of the airports in the user’s flight string. Most of my flights were in the <%= link_to "contiguous United States", "http://en.wikipedia.org/wiki/Contiguous_United_States", target: "_blank" %>, but a few flights to Europe forced the map to be zoomed out, which made the US map difficult to see as I filled in more of the map with flights.  Fortunately, the Great Circle Mapper allows the user to designate that the map should ignore a particular flight when figuring out its zoom by prepending it with <code>o:noext</code>. (For example, <code>CMH-ORD,o:noext,ORD-FRA,o:noext,FRA-EWR,EWR-CMH</code> generates <%= link_to "this map", "http://www.gcmap.com/mapui?P=CMH-ORD,o:noext,ORD-FRA,o:noext,FRA-EWR,EWR-CMH", target: "_blank" %>.) This let me flag all flights that left the continental US so that the map would remain focused on the US, and I could see the details of all those routes. But I also wanted to be able to see my world flights, so I ended up having to maintain two text files &ndash; one for within the continental US, and one for the world.</p>

<%= project_image("projects/flight-historian/Routes-Text.png", alt: "Screenshot of text file containing flight routes") %>

<p>Then, in 2012, I started tracking the aircraft family, <%= link_to "tail number", "http://en.wikipedia.org/wiki/Aircraft_registration" %>, and what class I sat in for all of my flights, and the data got more complicated. Now, a simple pair of text files was no longer good enough; I also had to keep a spreadsheet of all of the extra information about my flights. For good measure, I went back through my travel receipts again to get the past three years of aircraft family data.</p>

<%= project_image("projects/flight-historian/Flight-Log-Excel.png", alt: "Screenshot of Excel spreadsheet containing flight data") %>

<p>All this extra data let me do some fancy things, like make maps of all my trips on a particular airline or type of airplane, but it was a lot of extra work. I’d have to use filters in Excel, type up the routes and put them in the Great Circle Mapper, all to get a series of maps that would only be good until I took my next flight. I had a lot of data to manage.</p>

<p>At the same time, I’d been teaching myself Ruby on Rails by rewriting my old PHP website. Static pages weren’t particularly difficult to write, so I needed something more complex to work on.</p>

<p>Just as I’d used my <%= link_to "EBDB", earthbound_database_path %> project to teach myself PHP and MySQL back in 2004, I decided to create a flight log database website to teach myself Ruby on Rails. I started work on this flight log in 2012, and launched the site in April 2013.</p>

<%= link_header "Version History", 2 %>

<table class="table table-striped">
	<thead>
		<tr>
			<th>Date</th>
			<th>Release</th>
			<th>Changes</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td>27 April 2013</th>
			<td>1.0</td>
			<td><%= link_to "Initial release", flight_historian_path(version: "1-0") %></td>
		</tr>
		<tr>
			<td>24 October 2013</th>
			<td>1.1</td>
			<td><%= link_to "Routes and Top 5 Lists", flight_historian_path(version: "1-1") %></td>
		</tr>
		<tr>
			<td>27 October 2014</th>
			<td>1.2</td>
			<td><%= link_to "Operators and Codeshares", flight_historian_path(version: "1-2") %></td>
		</tr>
		<tr>
			<td>8 February 2015</th>
			<td>1.3</td>
			<td><%= link_to "Distances and Annual Summaries", flight_historian_path(version: "1-3") %></td>
		</tr>
		<tr>
			<td>31 January 2016</th>
			<td>2.0</td>
			<td><%= link_to "Flight Historian", flight_historian_path(version: "2-0") %></td>
		</tr>
		<tr>
			<td>29 April 2017</th>
			<td>2.1</td>
			<td><%= link_to "Import Flights from Digital Boarding Passes", flight_historian_path(version: "2-1") %></td>
		</tr>
	</tbody>
</table>

<%= link_header "Specification", 2 %>

<%= link_buttons(DownloadButton.new("files/flight-historian/Flight Historian 2.1 Specification.pdf")) %>

<%= link_header "Credits", 2 %>

<ul>
	<li>Thanks to <strong><NAME></strong> for reviewing the original specifications.</li>
	<li>Thanks to <strong><NAME></strong> for helping with beta testing and data entry.</li>
</ul>
{'fraction_non_alphanumeric': 0.13363272241776913, 'fraction_numerical': 0.014504187401383662, 'mean_word_length': 4.234752223634054, 'pattern_counts': {'":': 0, '<': 404, '<?xml version=': 0, '>': 404, 'https://': 11, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3139822', 'n_tokens_mistral': 5812, 'n_tokens_neox': 5239, 'n_words': 2055}