Summary
Add a FlickrPlugin source plugin that loads a user's photo history from their Flickr account export. Flickr photos carry EXIF timestamps and optional GPS coordinates, making this a dual-type plugin: where-when when photos are geotagged, what-when (album/tag browsing) otherwise.
Phase 1 targets the where-when schema using geotagged photos as location events.
Architecture
This plugin follows the project-wide source plugin contract:
-
Download-then-display — the plugin reads only from a previously downloaded local export file. No outbound network or API calls are made at Streamlit runtime. If the data file is absent, fetch() raises FileNotFoundError with a message directing the user to obtain and place the export file.
-
Data sovereignty — the plugin has no knowledge of other sources. fetch() returns only this source's canonical DataFrame. No filtering, joining, or merging with other sources is performed here; that is the exclusive responsibility of DataBroker.
Data export
How to get: flickr.com → Account → Your Flickr Data → "Request my Flickr data" → download ZIP when ready (email notification, processing time varies)
Format: ZIP containing:
account_profile.json — account metadata
photo_*.json — one JSON file per photo with full metadata
- Original photo files (JPG/PNG etc.) — not needed for this plugin
Key fields in each photo_*.json:
| Field |
Maps to |
date_taken (ISO 8601) |
timestamp |
geo.latitude / geo.longitude |
lat / lng |
name |
place_name (photo title as location label) |
tags[].tag |
preserve as tags |
albums[].title |
preserve as album |
description |
preserve |
photopage |
preserve as url |
Plugin spec
PLUGIN_TYPE: where-when
PLUGIN_ID: flickr
DISPLAY_NAME: Flickr Photo Locations
- Config fields:
export_dir (path to the unzipped Flickr export directory)
geotagged_only toggle (default: True — skip photos without coordinates)
- Glob all
photo_*.json files in the export directory
- Skip photos where
geo is absent or null when geotagged_only is enabled
- Parse
date_taken ISO string to Unix timestamp
place_name → photo title (best available label for the location event)
place_type → "photo"
Normalized output schema
timestamp int Unix timestamp of photo capture (date_taken)
lat float Latitude (WGS84, from geo.latitude)
lng float Longitude (WGS84, from geo.longitude)
place_name str Photo title
place_type str "photo"
source_id str "flickr"
tags str Space-separated tag string (preserved)
album str First album title if present (preserved)
Acceptance criteria
Summary
Add a
FlickrPluginsource plugin that loads a user's photo history from their Flickr account export. Flickr photos carry EXIF timestamps and optional GPS coordinates, making this a dual-type plugin:where-whenwhen photos are geotagged,what-when(album/tag browsing) otherwise.Phase 1 targets the
where-whenschema using geotagged photos as location events.Architecture
This plugin follows the project-wide source plugin contract:
Download-then-display — the plugin reads only from a previously downloaded local export file. No outbound network or API calls are made at Streamlit runtime. If the data file is absent,
fetch()raisesFileNotFoundErrorwith a message directing the user to obtain and place the export file.Data sovereignty — the plugin has no knowledge of other sources.
fetch()returns only this source's canonical DataFrame. No filtering, joining, or merging with other sources is performed here; that is the exclusive responsibility ofDataBroker.Data export
How to get: flickr.com → Account → Your Flickr Data → "Request my Flickr data" → download ZIP when ready (email notification, processing time varies)
Format: ZIP containing:
account_profile.json— account metadataphoto_*.json— one JSON file per photo with full metadataKey fields in each
photo_*.json:date_taken(ISO 8601)timestampgeo.latitude/geo.longitudelat/lngnameplace_name(photo title as location label)tags[].tagtagsalbums[].titlealbumdescriptionphotopageurlPlugin spec
PLUGIN_TYPE:where-whenPLUGIN_ID:flickrDISPLAY_NAME:Flickr Photo Locationsexport_dir(path to the unzipped Flickr export directory)geotagged_onlytoggle (default:True— skip photos without coordinates)photo_*.jsonfiles in the export directorygeois absent or null whengeotagged_onlyis enableddate_takenISO string to Unix timestampplace_name→ photo title (best available label for the location event)place_type→"photo"Normalized output schema
Acceptance criteria
FlickrPluginregistered via@registerand added toload_builtin_plugins()photo_*.jsonfiles from the export directorygeodata excluded whengeotagged_only=True, included with NaN lat/lng whenFalsevalidate_schema()passes on output