Overview - Forms, Geocoding, Conditionals, and APIs, oh my!¶
Adding the data from our survey into our mapplication!

Goals
- Create a Google Form with meaningful questions
- Embed a Google Form into a website using an iFrame
- Implement a trigger for geocoding “location” data in Google Sheets
- Understand APIs
- Replace our
fetchGeoJSON with data from a Google Sheet usingpapa parse - Use an
ifstatement with aforloop to add data to our map
Lab outline¶
- Creating a Google Form
- Geocoding with Google Sheets
- Connecting to our Google Sheet with
papa parse - Mapping data with
if-elseconditionals
Start by creating a week4 folder in your lab assignments repo.
Get ahead start
You can also copy the contents of your Lab Assignment’s week3 folder and skip the following setup section.
Starting template code for lab #4¶
styles/style.css
* {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
background-color: aqua;
}
html, body {
height: 80vh;
padding: 1rem;
box-sizing: border-box;
}
body {
display: grid;
grid-template-areas:
"header"
"main"
"footer";
grid-template-rows: auto 1fr auto;
}
main {
display: grid;
grid-template-areas:
"portfolio map";
grid-template-columns: 1fr 1fr;
grid-area: main;
}
header {
grid-area: header;
}
.portfolio {
grid-area: portfolio;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
#map {
grid-area: map;
height: 80vh;
}
#footer {
grid-area: footer;
padding: 5px;
background-color: #4677a0;
color: #fff;
text-align: center;
}
#contents{
display: flex;
justify-content: center;
align-items: center;
gap: 10px;
}