photos-where


Namephotos-where JSON
Version 2.1 PyPI version JSON
download
home_pagehttps://github.com/visgean/where
SummaryAnalyze exif data
upload_time2023-07-27 11:31:14
maintainer
docs_urlNone
authorVisgean
requires_python
licenseMIT
keywords exif sql
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](https://github.com/Visgean/exif2pandas/). It uses [reverse-geocoder](https://github.com/thampiman/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](https://github.com/Visgean/where/blob/main/src/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](assets/image-20230727131720726.png)

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](assets/image-20230727131816623.png)

## 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](assets/image-20230727132504796.png)

## Raw dataframes:

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

![image-20230727132834377](assets/image-20230727132834377.png)



## Jupyter examples:

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

## Install:

See PYPI [Python package](https://pypi.org/project/photos-where/). 

```
$ 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
```
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/visgean/where",
    "name": "photos-where",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "exif sql",
    "author": "Visgean",
    "author_email": "visgean@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/6a/6f/335c8231db531435cd4ef6d68e619d5868cee7b6a550abee2ed9fb803811/photos_where-2.1.tar.gz",
    "platform": null,
    "description": "# Where - day by day location from your photos \n\nThis scripts reads EXIF data from your photos and generates CSV file or Pandas dataframe with day by day location in terms of country. \n\nIt relies on my package [exif2pandas](https://github.com/Visgean/exif2pandas/). It uses [reverse-geocoder](https://github.com/thampiman/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](https://github.com/Visgean/where/blob/main/src/cities.csv) and add your village etc. \n\nIn 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. \n\n## world map\n\n![image-20230727131720726](assets/image-20230727131720726.png)\n\nGenerated world map with colored regions according to how many days you have spent in the country.\n\n## Pie graph with number of days you spent in a country\n\n![image-20230727131816623](assets/image-20230727131816623.png)\n\n## CSV file with your travel list:\n\n``` \nid,from,to,days,country,country_code\n4,2015-11-07,2015-11-09,1,Scotland,GB\n5,2015-11-09,2015-12-12,32,Praha,CZ\n6,2015-12-12,2015-12-12,0,Budapest,HU\n7,2015-12-12,2015-12-12,0,Praha,CZ\n8,2015-12-12,2015-12-15,2,Budapest,HU\n\n```\n\nnote that the country column is usually wrong - this is because the cities.csv is not consisent with administrative boundaries beyond country_code. \n\n## Year by year histograms\n\n![image-20230727132504796](assets/image-20230727132504796.png)\n\n## Raw dataframes:\n\nFinally there is a raw dataframe with exif data per image file:\n\n![image-20230727132834377](assets/image-20230727132834377.png)\n\n\n\n## Jupyter examples:\n\nSee ``example.ipynb`` for example graphs and data frames exported.\n\n## Install:\n\nSee PYPI [Python package](https://pypi.org/project/photos-where/). \n\n```\n$ pip install photos-where\n```\n\n## Use:\n\n```\n$ photos_where Dropbox/Photos/2020/\n$ ls where\ncities-pie.jpg      \ncountries-pie.jpg\nintervals.csv\nlocation-by-day.csv \nphotos.feather     \nyears.jpg\n```",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Analyze exif data",
    "version": "2.1",
    "project_urls": {
        "Homepage": "https://github.com/visgean/where"
    },
    "split_keywords": [
        "exif",
        "sql"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6a6f335c8231db531435cd4ef6d68e619d5868cee7b6a550abee2ed9fb803811",
                "md5": "2c2b5991070eb478b9ddabb15acac920",
                "sha256": "45bf318c126f74f8752cd3fba497ddeaa121553f6a1a637074a8f9c04eef91b9"
            },
            "downloads": -1,
            "filename": "photos_where-2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "2c2b5991070eb478b9ddabb15acac920",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 2645006,
            "upload_time": "2023-07-27T11:31:14",
            "upload_time_iso_8601": "2023-07-27T11:31:14.117350Z",
            "url": "https://files.pythonhosted.org/packages/6a/6f/335c8231db531435cd4ef6d68e619d5868cee7b6a550abee2ed9fb803811/photos_where-2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-27 11:31:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "visgean",
    "github_project": "where",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "photos-where"
}
        
Elapsed time: 0.10130s