If you want to track your own weight, then you will need to do a couple of things.
To setup a spreadsheet of your own, first generate the dates that you are interested in to save to a file and copy them into a Google Sheet.
dates <- generate_dates(lubridate::today())
write.table(dates, file = "tmp_dates.csv", row.names = FALSE, col.names = TRUE, sep = ",")
To read your spreadsheet, you need to share it. The easiest way to do this is by creating a sharing link, and then modifying it.
For example, you should get a sharing url like this:
https://docs.google.com/spreadsheets/d/1f7X_60NeRRfXxhc3KGO62NdIz2wwfWIrY_vpOMy9hPY
You then want to add: /export?format=csv
to the end, so that it would be:
You can either input this URL directly each time, or save it in a file and supply the file name instead.
library(trackWeight)
weight_data <- read_sheet_data(url = "https://docs.google.com/spreadsheets/d/1f7X_60NeRRfXxhc3KGO62NdIz2wwfWIrY_vpOMy9hPY/export?format=csv")
plot_weight(weight_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.