Terrapin Maps API

Ethan Meyer
INST414: Data Science Techniques
3 min readSep 25, 2023

One API that I have experience using would be an API that stores all the University of Maryland building locations and information, “https://api.umd.io/v1/map/buildings". I used this API to re-created and re-designed the UMD Campus map to be more efficient and user-friendly. Using the API, I could isolate all the different types of structures such as residence halls, parking lots, libraries, sports facilities, etc. which allowed the user to search for buildings by purpose rather than just names. The user was able to sort and highlight some aspects of our campus to make the layout more user-friendly while keeping the overall structure relatively the same. One non-obvious insight that I was able to use from the API was that the buildings were plotted on the map using longitude and latitude. This allowed me to expand on the map idea to build a GPS feature that allowed the user to start from one building and find the fastest route to the other building of their choosing. How I achieved this was that I used each building in the API as a node and was able to find the fastest path between the two nodes using the Breadth-First Search algorithm. One issue with this was that the script treated the only routes as being the ones through other buildings or neighbors, thus the GPS would calculate the path to take using the closest buildings from the starting point.

The API was collected through Beautiful Soup which allowed me to obtain the longitude and latitude coordinates for all the buildings and assign them to a specific variable. This allowed me to have exact values to use as my nodes’ directions as well as numerical data to use in the Breadth-First Search algorithm. The data for this however was not perfect. The values in the coordinates were very inconsistent, ending at different place values and not staying consistent to significant figures. This was able to be cleaned up through a simple round() command the rounded to the 7th value place in decimals, thus allowing the precision in the geographical location of the buildings while still being able to be manipulated for the GPS and maps.

Overall, using an API that holds all the information of a geographical location can be used in many different ways besides re-designing a map or creating a GPS. For example, the structure that the code was written can be applied to any neighbor-node module that analyses the relationship between nodes, more specifically in the distance separating them. The longitude and latitude coordinates also allow the designer to calculate the distance between the nodes or to group and cluster buildings based on their design purpose or geographical location. Overall, the API did not have many limitations that did not allow me to achieve my ultimate goal, however, there are some small things that could impact a developer. For instance, the API only shows UMD campus buildings while ignoring all the shops or non-campus food options nearby. The building information is also directly dependent on the data in API, thus if a new building is constructed it may not appear in the API until the developer adds the information to the API. Also, the user would also have to round the coordinates for the longitude and latitude location just the same as what did in GitHub.

Github Link: https://github.com/EthanMeyer41/INST377_Final

--

--