I think the point is that you wouldn’t normally choose to switch named list entries, the result of a multi-select list, to an ordered set of binary digits. In typical circumstances, the former would probably be considerably easier to work with than the latter.
Perhaps you could share some details of why you want to convert to this particular format? Are you maybe aggregating data for a flat file?
That’s right. It’s an idea I’m playing around with.
Say I have a list of activities that I do on weekdays. At the end of each day I mark those that got completed (ie “1”) and get a string with date plus 1’s and 0’s (e.g. 10/6/2019;1;0;1;1;1). This string gets written to a file and at the end of each month I can do some analysis.
I could do this straight into a spreadsheet, but that would require me to open the file, type in, save, etc. With a shortcut it saves so much time every day.
Note: the idea is not to track time but only whether it’s been done or not.
What you want to do at the end is something to keep in mind.
For example, flat files such as the one you created above, or JSON as suggested by @schl3ck don’t really tend lend themselves to basic numeric analysis. Certainly not as much as having it in a spreadsheet might seeing as you mentioned that without prompting.
The assertion that you have to open a spreadsheet app to insert into a spreadsheet file for example is not necessarily so.
Shortcuts could for example trigger an IFTTT web hook, passing in data to be used to auto populate the next available row in a Google spreadsheet. That then gives you access to all of the analytics options in Google Sheets.
Shortcuts could also write the data directly to an Airtable table and you can similarly query the data through database queries that could aggregate and analyse the data in practically any way you might imagine.
End of the day, find the most efficient way to get you to your destination. Sometimes it’s the scenic route around the mountain. Sometimes it’s the quicker but more daring route over it. And sometimes, you might just find that it is possible, with a bit of lateral thinking and effort, to go though
Yes, they don’t offer as much data analysis as a spreadsheet, but if you structure them right (not like in my example), then in this case the wanted analysis is possible pretty easily. I currently think of not storing a JSON dictionary for each day, but extending the lists of each task. Think like a list of the columns from the file format:
1.We don’t actually know what analysis is to be be done ultimately.
2. I would still stand by my earlier statements and as such I would rather do numerical analysis in a spreadsheet rather than by processing a JSON file. I never indicated things couldn’t be done, only that there might be better options that had previously been discounted.
Thanks for this. Using a dictionary is a good idea. It might just be a bit overhead for what I need (having said that you just helped me with another project I have in my to-do list ). I’d prefer to have it in a spreadsheet because it allows me to do some numerical analysis but also build some graphs at the end of each month.
This is ultimately where I want to get to.
I’d like to quickly select from a “pre-defined” list on a daily basis (and @RosemaryOrchard’s Shortcut does this with few tweaks, e.g. adding the short date at the beginning of each line) and then add it into a google sheet.
The csv file was a middle step and I can also open it with a spreadsheet. I don’t fully trust IFTTT (I had a couple of bad experiences in the past) thus have not jumped into it immediately.
totally forgot about this option trying it now. After running Rosemary’s shortcut I could save the results in Airtable. Somehow I associate Airtable with more complex database needs and forget that I can also do simple things with it
I know I’m a complete dinosaur , but something else to think about here is if you really want to rely on the internet existing for this? I’ve been in far too many situations where it didn’t, and with something like a habit tracker which this looks like it might be worth thinking about.
I’d probably create a Shortcut that appended to a csv file, and another one that uploaded that file to Airtable or Google sheets then deleted the CSV file.
Thanks for this thread, BTW. It’s given me some ideas for a project of my own that’s been in the back of my brain for a while, .
Thanks @Yvonnezed. You’re right, these will be primarily for a habit tracker (though I’ll also apply the concept o other projects I have)
Part of the reason I’m not keen on the IFTT solution is exactly that dependency on the Internet + a webservice.
The csv solution only is not great because that means I’ll have to re-create formulas everytime I open it in a spreadsheeet. Though basic these will be basic, I don’t want to repeat them.
That why I like the Airtable approach. Though you need Internet to send your data (which I’ll have 99.99999% of the time in this particular use case), it allows me to keep formulae in AND access data even when I’m offline.