A collection of scripts to analyze the frequency of key names and subtypes for collections in the ATmosphere.
Ms Boba, who you should follow on Bluesky, and who *winks winks* has a Patreon.
It uses the microcosm.blue to:
- List all collections seen in the ATmosphere (
download-collections.ts)- This will save data in
collections.json
- This will save data in
- Save a few sample records for each (
download-records.ts)- This will save all sample data downloaded in a
records/folder - It will also create
collections.csv, with:nsid: The namespace id of the collectiondomain: The domain + tld of the collectionurl: The domain + tld of the collection, prefixed with http://namespace: The first 3 segnments of the NSID (e.g.app.bsky.social)collection_type: The portion of the NSID after the namespacecreates: How many have been createdupdates: How many have been updateddeletes: How many have been deleteddids_estimate: How many dids have themlast_seen: When was it last seen according to microcosm.blue
- This will save all sample data downloaded in a
With this data, analize-collections.ts loops through the saved files and
creates:
-
collections-analysis.csv, a CSV file with a line for each collection, containing:collection: the NSID of the collectionkeys_count: how many separate keys are in this collection's recordstypes_count: how many subtypes appear in this collection's recordskeys: all keys in the collection's records, joined by;types: all subtypes in the collection's records, joined by;record_folder: the source folder for these records
-
collections-summary.csv, a CSV file with a line for each collection, containing (assumingapp.bsky.feed.postas example):domain: The tld + domain of the collection (app.bsky)namespace: the namespace of the collection (app.bsky.feed)collection: the full name of the collection (app.bsky.feed.post)
-
keys-to-collections-map.csv, a CSV file with a line for each key that appears in collections, containing:key: a key as it appears collection recordscollections_count: how many collections include that keynamespaces_count: how many namespaces (e.g.app.bsky.feed) include that keydomains_count: how many domains (e.g.app.bsky) include that keycollections: which collections include that key, joined by ";"namespaces: which namespaces include that key, joined by ";"domains: which domains (e.g.app.bsky) include that key, joined by ";"
-
types-to-collections-map.csv, a CSV file with a line for each type that appears as a nested type in a collection, containing:type: a type as it appears in a $type filed of a collection record (but not the top level record)collections_count: how many collections include that typenamespaces_count: how many namespaces (e.g.app.bsky.feed) include that typedomains_count: how many domains (e.g.app.bsky) include that typecollections: which collections include that type, separated by ;namespaces: which namespaces include that type, joined by ";"domains: which domains (e.g.app.bsky) include that type, joined by ";"