In this post I’m going to show you how to implement a data capture system that will allow you to get your data easily into Google SpreadSheets. In my case I need this to be enabled from my Android phone but once you see the method you will see how it can be extended to other applications.
To implement this I’ll be using Google Forms, Google SpreadSheets and Tasker.
The heart of this method is a Google Form. If you have never used these before then the concept is you follow the wizard process to ask some “questions” and you define the format of the “answer”; free format text drop down list box, radio buttons etc. This will then produce a web based form (similar to those web based surveys) and a spreadsheet into which the responses are automatically stored.
First step is to create your first Google Form.
I gave the form a name, gave my first question a generic title and changed the question type to text. You can if you want add data validation, I have not in this case.
Then click “Done” to create the form
This creates your form, you can set further options but what we want to do is click “View live form” which shows us what our “users” will see.
You can test this form by entering some data into it and pressing “Submit”.
If you now go back to your form – step 2) you will see that the menu bar option “Responses (0)” will have changed to “Responses (1)” It is also from this menu that you can change the destination for storing the results – by default a new spreadsheet will have been created. This spreadsheet will have a column called Timestamp which has the date and time for each response and a column for each question you defined, in my case a single new column.
So we now have a method of capturing information over the web. You can navigate to your web form and type in what you want to capture, hit submit and the data is stored in a spreadsheet for your pleasure – result!
Surely we can make this a bit “better”? Do I really want to be navigating to a web form on my mobile browser and typing text into a cell and hitting submit? No.
This is where the android app Tasker can help us. This allows us to automate certain actions on our phones when certain conditions occur.
The action I’m interested in is “HTTP Post” which allows us to send data to a web page …….
Once you have installed Tasker you have to create a new task then click “+” to add an action. Select the “Net” category of actions and specifically the “HTTP Post” action.
Now you have a variety of parameters to fill in:
Server:Port is the root address that you use to access google docs.
Path is where you add the description of your form, I have greyed mine out but this equates to the big long string in the address bar of your equivalent of screenshot 3) above
Data/File is where you supply the contents that you want to pass in.
In this instance I have provided a Tasker variable called %LOGTHIS rather than hard coding a value.
This action allows Tasker to send “something” to your logging spreadsheet. In my case I wanted to log when “something” happened. To do this I set a variety of profiles that set a value to the %LOGTHIS variable and then called my action to log it:
Wfi Near (work network)
entry task = At Work
exit task = Left Work
Wfi Near (home network)
entry task = At Home
exit task = Left Home
Car app running
entry task = Commute Started
exit task = Commute Finished
Now I can scan my spreadsheet and see when any of these events took place, summarise and count them and report on any discrepancies.
One reply on “Quantified Self – Google And Android – Capture”
Thank you so much for posting this! Using this with AutoVoice my wife and I are logging exercise, when we leave for work, I’m logging when I eat lunch – I forget to eat about three days a week 😛 Best of all, my brother is now using this to log my nephew’s blood sugar, carb intake, and insulin injections. He couldn’t believe it when i showed him he could just say “ok google, blood sugar 143” and it was logged!