https://bit.ly/text2map

Holding a hands-on workshop at SMU in a couple of weeks.

Have a collection of digitized books, music lyrics, letters, or articles, and want to visualize a map of all locations mentioned in the texts?

A combination of Python libraries, including spaCy, Geocoder, and Folium can seamlessly bridge the worlds of text data mining and GIS.

spaCy’s Named Entity Recognition (NER) function will identify all locations (LOC and GPE) and their frequencies. Geocoder will use the Bing Maps API to assign coordinates and help verify that the locations are indeed locations. Folium will create a leaflet.js interactive map of the verified and geocoded locations. Finally, just to drive the power of Python home, the script creates a word cloud, column chart, and treemap of the verified locations.

 

Workshop: Visualizing Text Locations Using Python

Leave a Reply

Your email address will not be published. Required fields are marked *