{
"info": {
"author": "Jake Brehm",
"author_email": "code@jakebrehm.com",
"bugtrack_url": null,
"classifiers": [
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.7"
],
"description": "**GeoPhotos** is a package to pull, analyze, and plot coordinates from photos.\n\n---\n# What is **GeoPhotos**?\n\n**GeoPhotos** is a Python library designed to make it easy to pull coordinates\nfrom photos, analyze them in order to obtain useful information, and plot them\non a map.\n\n## Main features\n\nAn overview of some of the major features of **GeoPhotos** are as follows:\n\n* Extract metadata (timestamp, coordinates, etc.) from one or more files, and\n write to a csv file if desired\n* Plot coordinate data on a fully customizable heatmap, including markers,\n tooltips, layer control, and more\n* Analyze coordinate data to determine unique countries, most common countries,\n and more\n* Highlight certain countries on the heatmap easily and painlessly\n* Save the map to an html file for reference or for use with web development\n frameworks such as *flask*\n* Open the html file directly from the code for debugging\n\n# How to get it\n\n## Dependencies\n\nCurrently, the following packages are required:\n\n* [pillow](https://github.com/python-pillow/Pillow)\n* webbrowser\n* [folium](https://github.com/python-visualization/folium)\n* osgeo\n* [geopandas](https://github.com/geopandas/geopandas)\n\nThere are plans to make certain packages, such as *geopandas*, optional due to\nhow difficult they are to install properly.\n\n## Installation\n\nAssuming you've already got the dependencies covered, you can use pip to install\nthis package:\n\n```\npip install geophotos\n```\n\nHowever, you will most likely run into problems doing it this way.\nUnfortunately, I have tried and failed to overcome these obstacles myself.\nMy recommendation is to install geopandas using Anaconda/conda, and then pip\ninstall it into your current environment:\n\n```\nconda install geopandas\npip install geophotos\n```\n\nThis should handle all of the dependencies for you, although you still might run\ninto some issues (I sure did!).\n\n## Updating\n\nTo update *geophotos* to the latest version, simple use the command:\n\n```\npip install --upgrade geophotos\n```\n\n# Example usage\n\nOne of the main reasons I made this package was to pull GPS information from the\npictures in my iCloud library, then plot them on a map. Skipping the pulling of\nthe coordinates for simplicity's sake, the following code does the following:\n\n1. Read latitudes and longitudes from a csv file\n2. Generate a heatmap using this coordinate data\n3. Add a marker that marks my hometown\n4. Analyze the data and determine which countries I've visited\n5. Highlight only the countries I've been to on a separate layer\n6. Save the map as an html file and open it in a web browser\n\nThe html file is completely interactive, and I hope to eventually use it on my\npersonal website! Unfortunately, I had to post a still image of the map because\nGithub doesn't like cool things.\n\n```python\nimport geophotos as gp\n\n# Read coordinate data from csv\ndata = gp.coordinates_from_csv(r'coordinates.csv', 2, 3)\n# Initialize the Map object\nnys_center = [42.965000, -76.016667]\nheatmap = gp.Map(location=nys_center, zoom_start=7)\n# Feed the Heatmap object the coordinates\nheatmap.coordinates = data\n# Create the heatmap\nheatmap.create_heatmap(max_zoom=10, min_opacity=0.05, radius=13, blur=25,\n name='Photo Heatmap')\n# Add a marker to the heatmap\nhamburg_ny = [42.715746, -78.829416]\nheatmap.add_marker(location=hamburg_ny,\n tooltip='Hamburg, NY
Hometown')\n# Analyze the data to determine which countries are unique\nanalyzer = gp.Analyzer(data)\nunique_countries = analyzer.unique_countries(),\n# Use the data to determine which countries to highlight\nborder_layer = gp.BorderLayer(unique_countries, name='Countries Visited')\nborder_layer.add_to(heatmap)\n# Add layer control functionality to the map\nheatmap.add_layer_control()\n# Save the heatmap and open it in a browser\nheatmap.save_html('sample.html', open_html=True)\n```\n\n
\n \n