Places Visited Heatmap
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
LICENSE
README.md

README.md

Places Visited Heatmap

Getting Started

I had a list of cities, addresses, landmarks etc. visited by me over the years and I was looking into ways to visualize those. During my search, I came across Google Maps JavaScript API which not only visualizes location data but also has ways to show places which are visited more often than others. But the API needs location data in a specific format with latitue and longitude coordinates in a JavaScript along with weight for each.

This project is to convert my plain text cities, addresses, landmark etc. data to geographic coordinates and assign weightage to each location. Once I have that, integrate the data with Google Maps to visualize.

End result will look like below. This is generated with a smaller set of test data.

Visit venishjoe.net/post/places-visited-heatmap for more details.

Installation

You will need Google Geo API Key and Google API Key to run Go code and HTML Google maps render. Visit below site to get a free API key from Google.

Clone the repository and create a directory "data" under source. Create two files

  • googlegeoapi.key (contains your Google Geo API Key)
  • location.data (contains your location data. sample below)

location.data
Las Vegas, NV
Niagara Falls, NY
San Francisco, CA
Empire State Building, NY
Acadia National Park, Bar Harbour, ME
Great Smoky Mountains National Park, TN
The White House, Washington, DC
Old Faithful, Yellowstone National Park, WY
Disneyland, Anaheim, CA
Las Vegas, NV

Then run places.go (go run places.go). This will generate locationlatlng.data under data directory and places_data.js under ui directory.

Update Google maps URL in ui/places.html with your Google API key

src="https://maps.googleapis.com/maps/api/js?key=##YOUR_API_KEY_HERE##&libraries=visualization&callback=initMap"

Load places.html in a browser.

Contact

Venish Joe Clarence

License

Places Visited Heatmap source code is available under the MIT License.