Mapping Brooklyn Historical Society

April 12, 2018 - All

I chose to webscrape the Brooklyn Historical Society’s digital images collection for my final project. I thought this might be easily achieved because the site itself presents all search results in a table that seemed like it would be easy to loop through. My initial goal was to create a map in Google Maps with URLs to each image. However, by the end of class my code mostly exists in three pieces and requires some imagination to put the whole together. All my code can be found on Github. In, while each title is successfully gathered from each page, the code keeps returning to the first page to get image URLs. So those URLs do not accurately match up the titles to the photos. In the file, I used regular expressions to print a list of titles that included a street address starting with the # sign. The names of pictures in the collection overall varies but luckily for me a collection of photos from John Morrell all had street addresses when they were known in the same format, example ‘#1 Argyle Rd’. The file writes the original, erroneous json file to csv. Since that proved to be an unusable file, I ultimately copied the addresses that were printed in the regex file to a spreadsheet, cleaned the data up, and uploaded that file to Google Maps. I added a few images manually since that had been my goal but unfortunately, the semester came to an end before I could figure out how to make everything work together. My map:≪=40.661612171044524%2C-73.94808869999997&z;=12.

› tags: culture / programming / python /