Skip to main content

Analyze exif data

Project description

Where - day by day location from your photos

This scripts reads EXIF data from your photos and generates CSV file or Pandas dataframe with day by day location in terms of country.

It relies on my package exif2pandas. It uses reverse-geocoder to convert GPS data to country codes. That module uses a csv file with 150k cities and then uses nearest neighbour algorithm to find the position of each gps data point. This sometimes does not work in border regions so if you are seeing bad data the easiest fix is to copy cities.csv and add your village etc.

In case some of your photos contain bad gps data that show that you have been to countries where you have never been you can use ignore_countries argument.

world map

image-20230727131720726

Generated world map with colored regions according to how many days you have spent in the country.

Pie graph with number of days you spent in a country

image-20230727131816623

CSV file with your travel list:

id,from,to,days,country,country_code
4,2015-11-07,2015-11-09,1,Scotland,GB
5,2015-11-09,2015-12-12,32,Praha,CZ
6,2015-12-12,2015-12-12,0,Budapest,HU
7,2015-12-12,2015-12-12,0,Praha,CZ
8,2015-12-12,2015-12-15,2,Budapest,HU

note that the country column is usually wrong - this is because the cities.csv is not consisent with administrative boundaries beyond country_code.

Year by year histograms

image-20230727132504796

Raw dataframes:

Finally there is a raw dataframe with exif data per image file:

image-20230727132834377

Jupyter examples:

See example.ipynb for example graphs and data frames exported.

Install:

See PYPI Python package.

$ pip install photos-where

Use:

$ photos_where Dropbox/Photos/2020/
$ ls where
cities-pie.jpg      
countries-pie.jpg
intervals.csv
location-by-day.csv 
photos.feather     
years.jpg

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

photos_where-2.1.tar.gz (2.6 MB view details)

Uploaded Source

File details

Details for the file photos_where-2.1.tar.gz.

File metadata

  • Download URL: photos_where-2.1.tar.gz
  • Upload date:
  • Size: 2.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.9.1

File hashes

Hashes for photos_where-2.1.tar.gz
Algorithm Hash digest
SHA256 45bf318c126f74f8752cd3fba497ddeaa121553f6a1a637074a8f9c04eef91b9
MD5 2c2b5991070eb478b9ddabb15acac920
BLAKE2b-256 6a6f335c8231db531435cd4ef6d68e619d5868cee7b6a550abee2ed9fb803811

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page