A few months ago, I wrote about the opportunities for developers around Mastodon.
Since then, I've been excited to see the different apps popping up around the Mastodon ecosystem - on iOS alone, the past fortnight saw three or four impressive new client apps emerge (and more are in testing), plus excellent Progressive Web Apps like Elk are gaining attention.
(curious what Mastodon clients are out there? there is a very nice Google Sheet that tries to list out the various options across platforms, as well as the features they implement)
I am pretty varied in my own usage of the platform, and I wanted to take a look at which apps I've been using the most frequently.
Using Python with the Mastodon API (with the Mastodon.py library), plus the lovely tools available in the Python ecosystem - in this case, Pandas and Matplotlib - we can quickly get a sense of where I've been spending my time, and where I've been experimenting.
Here's a quick overview of the code, cut down to the bare minimum:
from mastodon import Mastodon
import pandas as pd
import matplotlib.pyplot as plt
API_KEY = "TOKEN"
mstdn_url = "https://my.instance"
user_id = "ID"
mstdn = Mastodon(access_token=API_KEY,
api_base_url=mstdn_url)
print("Getting All The Statuses ...")
# get only toots from this account (no boosts)
statuses = mstdn.account_statuses(user_id, exclude_reblogs=True)
apps_list = []
while statuses:
statuses = mstdn.fetch_remaining(statuses)
for s in statuses:
apps_list.append(s["application"]["name"])
break
print("Charting ...")
pd.Series(apps_list).value_counts(sort=False).plot(
kind='barh', color='#563ACC', title="Mastodon client usage")
plt.savefig('toot-apps.pdf', bbox_inches='tight')
print('... done!')
Let's step through this:
- we import the Mastodon.py library, along with Pandas
- we set some variables to define our home Mastodon instance, and an API token (we created an app under the Development section in Mastodon settings)
- we call the API to grab all of the statuses (Toots) for our target user (this uses the Pagination feature available in Mastodon.py)
- excluding the boosts, because these do not carry data about the application that was used to boost the Toot.
- for each status, we grab the name of the application used and add it to a list
- finally, we use Pandas and Matplotlib to create a horizontal bar chart, in the Mastodon purple colour, and save to a PDF.
- there is plenty more I could do here, such as showing how different apps have been used at different times (simply by correlating with the date of usage)
Some data points: since I moved my Mastodon presence to my current instance (macaw.social) back in November, I've posted 1609 statuses, of which 954 were my own organic statuses rather than boosts. Half of those were posted using the default web UI. I've been using a variety of mobile apps, and started out mostly using MetaText on iOS - most recently, I've found myself using Ivory (which I've been using in TestFlight), but I really like some of the other options as well... Ice Cubes, Tusker and Mammoth are all great apps.
Of course, this is only showing the apps I've used the most often to actively post, and does not reflect time spent in apps or websites - I think that data would tell another story, but it would need to come from the devices I've been using, rather than from the API.
Just a quick post to summarise some of my own data - let me know what apps you're using, or what you're interested to do with the Mastodon API.
See you in the #Fediverse!
Top comments (2)
I've really been enjoying Elk. Going to have to check out your sheet though. 👀
It is a super interesting and useful spreadsheet, although some new entries are on another tab (MastoDeck is pretty promising, if you are into multi column views) - not mine, crowdsourced from the community, but it has already proved useful to some friends of mine. Elk is very, very nice - and a good replacement for Pinafore, which was my previous PWA of choice but is no longer being developed, another reason my usage of that stayed small over time in this chart.
I mostly find myself switching between apps to get features such as the ability to pin the local instance timelines from different instances, or to pin/find the hashtags that I'm following (the latter is coming in the next web Mastodon release, I think, at least, but Tusker and Mammoth do a nice job of surfacing them).