Alright. I see you have an interest in how the map works. The thing I do not know is how interested you are. I have separated these details into multiple sections. Each section is split by a checkpoint. If you get into the middle of a section and you find yourself completely lost, please keep reading until you get to the next checkpoint. If you are still lost at the next checkpoint, stop reading. The reason the checkpoint system is in place is because this system may just have one confusing piece in the middle that you can figure out with the pieces around it.
The first thing you need to know is how the map works from the users end. It is simple. You fill out a form, submit it, and after refreshing the page your dot shows up on the map. Most people will know nothing more than the form and the dot on the map. Now here is where things are going to start the gradually increasing complication of the system. The form the user fills out does not plot the point on the map directly. It only serves the purpose of actually collecting the information needed in a way that is extremely friendly and easy to use to the average person. After collecting the data, the form sends this data to a spreadsheet. The spreadsheet performs a wide array of formatting and calculations. After these calculations are complete, it feeds this calculated data into a map plotter. The map plotter then shows up on the webpage. So to summarize, the form collects the data, the spreadsheet calculates the data, and the plotter shows the final point on the map.
Beginners Checkpoint: If the text above confused you, you should probably not continue until you can understand it.
Now to explain deeper. The form on the website is actually a Google Forms site that is embedded directly into the website. When you fill out the survey, you are truly entering information onto a website that is separate from the TALE website. The Google Form still sends the information it collects to the spreadsheet just as before. The spreadsheet is actually a Google Sheets document. If you are not familiar, Google Sheet is basically Excel but it is online and made by Google. Now get this: The Google Sheets document is another independent program. It is not part of the Google Form. It only receives information from the form. Think of the two as teacher and student. The Google Form gives information to the Google Sheet, but the two are not the same thing. The teacher gives information to the student, but the two are not the same person. Once the Google Sheets document has the information from the Google Form, it just does a bunch of calculations. These calculations are necessary because the Form does not give information in a way that the Map Plotter can understand. The Google Sheet basically translates the information between the From and the Map. Once the information gets to the Map Plotter, the plotter is able to place the point on the map. This map is then shown right on the TALE website.
Program Checkpoint: You are headed into the nitty-gritty. We are going to start getting into the technical perspective. No coding yet.
So you know that the process of plotting the point involves three things: The Form, the Sheet, and the Map. Well this is actually a lie. It actually involves the Form, the Sheet, and the Website. This is because the Map is built right into the Sheet. The Sheet and the Map are the same program. I had to explain them as separate for early learners to understand. Everything else up until the Map is the same. The Form gets info, the Sheet takes it and processes it. However, the Sheet also plots the point on the map. That is it. Now we also have to add a step to the end. It is very important for you to know that the Sheet does not upload the website. The Website actually goes and retrieves the map from the sheet. When you load up the page on the TALE website that has the map on it, the website knows to go fetch the latest version of the map from the plotter inside the Sheet. So now we have this system: User fills out Form, Form sends info to Sheet, Sheet calculates the info and plots it on a map. When the page is loaded again, the Website grabs this updated map from the Sheet and displays it for the viewers to take a look at.
Coding Checkpoint: You are entering the coders section. I am not going to be giving you straight lines of code. However, I will be showing you the inner working of the Sheet. It is going to require some basic knowledge of Excel or Google Sheets.
The Sheet is really were the majority of the work actually happens. It is the workings of the system. The Website is the fancy outer shell. The Form is the input. The Sheet is the mechanics on the inside. The map is the finished product for display. So if you really want to know how this thing works, we are going to have to take a while to look at these inner workings.
As you know, the Sheet gets information from the Form. That information is stuck into the Sheet on this page:
Notice that the time, town/city, country, and state are collected here. The issue is this page cannot easily have anything else on it. This is because a new entry will scoot anything in the row down a row if new info is put in. If you put coding in one of the lower rows it will eventually be moved by data being inputted by the form. This can break whatever coding I put in since the coding will be based on the position of the cell it is in. For example, I put some text into the next row manually (without the Form):
Now I will enter another city into the Form. This happens:
As you should notice the New Info entry has been pushed from row 3 down into row 4 by the new data entry. This will break any referential coding (anything that gets data from a different cell) that are entered in. The solution is to copy the text from these columns to another page of the document. This way we can manipulate the numbers however we want and not accidentally break how the form inputs data. The new page we copied the information to looks like this:
Notice columns A, B, and C are the same data as the previous pictures. The timestamp from the previous page is missing. This is because I do not need the time for the map to be able to plot the point. Columns D, E, and F are things that are new. We will skip over Column D for now. Notice the title for Column E says "City + State". This is because this column grabs the information from Column A (City) and Column B (State) to combine them into one cell. Notice there is also a comma in Column E between the city and state. This comma serves the purpose of allowing the map plotter to differentiate between the name of the city and the name of the state when it is plotting the data. If the comma did not exist, the map would think the city name for Damascus was "Damascus Virginia" instead of realizing the city name is "Damascus" and the state name is "Virginia". This error would lead to a mis-plotted or missing point on the map since the map would not be able to determine the correct location of the point. The comma here is copied from Column D to be inserted between the city name and the state name. This turns the data in column E from "DamscusVirginia" to "Damascus, Virginia". The address with the comma can be properly plotted by the map.
Now there is something very small but very critical happening in Column D. Column D is able to determine if a comma is needed or not. I will refer to the comma adding process as "The Comma Act". To get an example, lets add Paris to the chart:
Notice that the entry for Paris does not have a comma in Column D. This is because the comma is not needed. The only time the comma is needed in Column D is when the entry also includes a State entry. Since the entry for Paris only includes a city and a country, the comma is not displayed. This action of deciding if a comma is needed or not is "The Comma Act" that Column D is able to perform. "The Comma Act" works by checking if any text is entered into Column B (the State data). If there is not anything in the box, the Column D knows that there is not a State in this address and that this means it should not display a comma. A no-comma example is the Paris entry. If Column B does have something in it then Column D knows that it needs to display a comma. This is the case of the Damascus and Port Orford entries.
Column E is also programmed so that it adds the comma from Column D only if it is present in column D. For example, the Damascus entry has a state. Column D decides that it does need to show a comma. Column E sees this comma and decides to add the comma between the city name and state name. The result is "Damascus, Virginia". However, the Paris entry does not have a state. Column D sees there is not any state data and decides it should not display a comma. Column E sees there is not a comma in Column D and decides it should not include a comma. The result is "Paris" with no comma.
The last thing on this sheet is Column F. Column F only serves the purpose of copying whatever information is in Column C. That is it. It sees Virginia is Column C, it displays Virginia in Column F. The only reason this copying exists is so Column E (City + State) and Column F (Country) can be read in a way that makes sense to us humans.
Now we move on to the final section of The Sheet: the Places Chart. This section is responsible for actually plotting the data into a map that is shown here on the TALE website. Essentially, this is the cool part. Here is what it looks like:
The first thing to notice is that Column A and B are just copies of Column E and F of the last section. The new processes are in Column C and Column D. Column D has no calculations in it. It is literally a series of numbers placed in a column. Column C is where the calculations are. Column C checks if Column A is empty or not (similar to how "The Comma Act" works). If the cell in Column A is empty, the cell in Column C displays as empty as well. If there is some text in the cell in Column A, the cell in Column C copies whatever number is next to it in Column D. For example, if we simply put some text in Column A, Column C would copy the number next to it:
Notice that TALE was entered in Column A row 5. As a result, Column C row 5 entered the number 4 since the cell to it's right contained the number 4.
Now for the final process. Notice the big blue map. This map is what I referred to as the Map Plotter in the previous sections if this explanation. It may look the same as the map on the TALE website. This is because it is the same. The TALE website simply nabs this chart from this spreadsheet and displays it every time you load the page. (You have to reload the page after your entry so that the website will grab the updated version of the map with your new point on it if you were wondering.) But how does it know where to put the points? The answer lies in Columns A-C. The map is able to take the City and, if available, the State from Column A. It then grabs the Country from Column B. It then plots the point on the blue World Map. It then uses the number in Column C to assign a color to the point. The map knows that the highest number gets the bright green color and the lowest gets the black color. It makes an even color mixing for any number in between (as in making numbers closer to the highest number closer to bright green and numbers closer to the lowest closer to black). It updates all the previously existing points to their new colors since the color scaling has changed. Finally it updates the small key in the bottom left of the map to display the smallest and largest numbers.
How does the map know to do all of this? To be honest, I have no idea how it knows how to plot the point. I know how to show it where to collect the information it needs from. I also know it is scary accurate most of the time. I entered cities in that are so small that I am not sure they are even mapped. The map can still plot these location. In fact, I think the map attempts to plot everything it finds. For example, notice in the image above that it attempted to plot row 5 where I entered the word TALE and ended up sticking it in Florida. I find it fascinating that it was even able to attempt to find some place called TALE. If you have made it this far into the explanation, I assume it fascinates you too.
Well this wraps up everything I know about how the Globe Map works except for the actual coding language of each cell in The Sheet. If somebody reading this actually wants me to give you the coding of each cell, I can put that here and will happily do so. Just let me know by telling me in the General Comments Section on the main page of the entire TALE website. However, as it might take quite a while to explain what each code in each cell does, I am not going to include that unless someone actually wants it. Thanks for reading this if you made it this far or even if you skipped a lot of get here. I hope you have enjoyed learning about the map. Until next time. ~Brady Gorrell
:)