{"id":47337826,"url":"https://github.com/haraldofilho/flickrmap","last_synced_at":"2026-03-17T22:08:26.072Z","repository":{"id":108765860,"uuid":"281554926","full_name":"HaraldoFilho/FlickrMap","owner":"HaraldoFilho","description":"A script to generate a map for a Flickr™ photostream","archived":false,"fork":false,"pushed_at":"2025-07-27T16:50:28.000Z","size":1355,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-02T13:51:39.853Z","etag":null,"topics":["flickr","flickr-api","flickr-map","flickr-photostream","html","javascript","map","mapbox","mapbox-api","mapbox-gl-js","python"],"latest_commit_sha":null,"homepage":"https://haraldofilho.github.io/FlickrMap","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HaraldoFilho.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-07-22T02:33:52.000Z","updated_at":"2025-07-27T16:50:32.000Z","dependencies_parsed_at":"2025-01-21T17:28:16.116Z","dependency_job_id":"d357d94a-dac4-43f8-8526-2a50cd636d4f","html_url":"https://github.com/HaraldoFilho/FlickrMap","commit_stats":null,"previous_names":["haraldofilho/flickrmap"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HaraldoFilho/FlickrMap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HaraldoFilho%2FFlickrMap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HaraldoFilho%2FFlickrMap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HaraldoFilho%2FFlickrMap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HaraldoFilho%2FFlickrMap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HaraldoFilho","download_url":"https://codeload.github.com/HaraldoFilho/FlickrMap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HaraldoFilho%2FFlickrMap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30633240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T17:32:55.572Z","status":"ssl_error","status_checked_at":"2026-03-17T17:32:38.732Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flickr","flickr-api","flickr-map","flickr-photostream","html","javascript","map","mapbox","mapbox-api","mapbox-gl-js","python"],"created_at":"2026-03-17T22:08:24.281Z","updated_at":"2026-03-17T22:08:25.887Z","avatar_url":"https://github.com/HaraldoFilho.png","language":"Python","readme":"# Flickr Map\n\nThis script generates a map with markers for all photos in a user's Flickr™ photostream. Click [here](https://haraldofilho.github.io/flickr-map/example/) to see an example.\n\n## Installation\n\nThe script was developed to run on _Linux_ systems and need _Python 3.x_ to run. \n\nTo start, open a terminal and execute the following commands:\n\n```\ngit clone https://github.com/HaraldoFilho/FlickrMap.git\ncd FlickrMap\n```\n\nThe script uses *[Flickr](https://www.flickr.com/)™* and *[Mapbox](https://www.mapbox.com/)™* APIs. To get and use these APIs follow the instructions below.\n\n#### Flickr API key\nFirst, install the [_flickrapi_](https://stuvel.eu/flickrapi) package by typing in a terminal:\n\n```\n% pip3 install flickrapi\n```\nNow, get an API key by visiting the [_Flickr_ API key request page](https://www.flickr.com/services/apps/create/apply/).\n\nAfter that, create a file __api_credentials.py__ with the following code and with the obtained values:\n\n```python\napi_key = u'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'\napi_secret = u'xxxxxxxxxxxxxxx'\nuser_id = 'XXXXXXXXXXXX'\n\n```\n\nThen, [authenticate](https://stuvel.eu/flickrapi-doc/3-auth.html#authenticating-without-local-web-server) on _Flickr_ by running:\n\n```\n% ./auth2flickr.py\n```\nA web browser will be opened to get the user approval (in a non-graphical environment, just copy and paste the authorization url in any external web browser). After approve, type in the terminal the generated code.\n\n#### Mapbox API access token\n\nGet an access token by visiting the [Create an access token](https://account.mapbox.com/access-tokens/create) page on [Mapbox](https://www.mapbox.com/) website.\n\nGive a name to the token (e.g.: \"Flickr Photos Map\") and click on \"**Create token**\".\n\nThen, include the generated code in the file **mapbox_token.js**:\n\n```\nvar mapbox_token =\n'\u003c-- include the mapbox access token here --\u003e'\n```\n\n## Configuration\n\nOpen the file 'config.py' and edit it as following:\n\nAdd the user for whom the map will be generated. It can be the user alias or id.\n\n```\n# user alias or id\nuser = '\u003c-- include user alias or id here --\u003e'\n```\n\nThe map can be generated for just the photos on a user's photoset. In this case, add a valid photoset id to the _photoset_id_ variable.:\n```\n# Photoset id:\n# If this is defined the map will\n# be generated for the photoset\n# To generate for entire user's\n# photostream, leave it empty\nphotoset_id = ''\n```\nIf the variable is empty or have a invalid id the map will be generated for the entire user's photostream.\n\nBy default, the script will generate the map marking only the public photos on the user's photostream, and those with a geolocation set as visible to anyone. \nThis can be changed by editing the variables _photo_privacy_ and/or _geo_privacy_:\n\n```\n# Photo Privacy Filter:\n# 0 = all photos (public and private)\n# 1 = public photos\n# 2 = private photos visible to friends\n# 3 = private photos visible to family\n# 4 = private photos visible to friends \u0026 family\n# 5 = completely private photos\nphoto_privacy = 1\n\n# Geolocation Privacy Filter:\n# 0 = All\n# 1 = Anyone (Recommended)\n# 2 = Your contacts\n# 3 = Your friends\n# 4 = Your family\n# 5 = Your friends and family\n# 6 = Only you\ngeo_privacy = 1\n```\nBut only the authenticated user will be able to see the privated photos of your own photostream, i.e. when generating for a different user only the public photos will be visible, independently of this configuration.\n\nThere is one more option that can be changed, the variable _dont_map_tag_. To exclude a photo from the map, define a tag in this variable and add the same tag to the photo. \nThe default tag is _DontMap_:\n\n```\n# Photos with this tag\n# won't be included on map\ndont_map_tag = 'DontMap'\n```\n\n## Usage\n\nJust run the script:\n\n```\n% ./generate-map-data.py\n```\n\nThe output will be like this:\n\n```\nGenerating map for 'Haraldo Albergaria'\n1065 photos in the photostream\nExtracting photo coordinates and ids...\nBatch 3/3 | 958 photo(s) in 530 marker(s)\nAdding marker(s) to map...\n530 new marker(s) will be added to the map\nAdded marker 530/530\nFinished!\n```\nThree files are generated:\n\n- **locations.py**: Contains all the markers information, as coordinates and photos attached to them.\n- **countries.py**: List of countries where the photos were taken, including number of places and photos for each place.\n- **user.py**: Basic user information, such as user id, name, avatar url, photostream url, number of markers and photos on map.\n\nAfter the script finishes, open the file **index.html** in a web browser, such as _Google Chrome_ and _Microsoft Edge_ \n(doesn't work on _Internet Explorer_ and has not been tested on other browsers) to see the map.\n\nIt is possible to make customizations on the map, by coding them in _Javascript_ in the file **custom.js** and adding any includes, such as styles and additional javascript files in the appropriate field in 'index.html' file:\n\n```\n\u003c!-- Begin of customization includes --\u003e\n\n\u003c!-- End of customization includes --\u003e\n```\n\nAn example of a customization file can be seen [here](https://raw.githubusercontent.com/HaraldoFilho/haraldoalbergaria.page/master/map/custom.js) and its result, where was added a panel with visited countries flags, which zoom in to the country when clicked, can be seen [here](https://haraldoalbergaria.page/map/).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharaldofilho%2Fflickrmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharaldofilho%2Fflickrmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharaldofilho%2Fflickrmap/lists"}