So people seem to deal with this differently. It can definitely be confusing, since a file path, such as the one you have above, essentially evaluates differently when you run it locally in the IDE, as opposed to when you build the post with serve_site(). (I recommend taking a look at the Paths of figures and other dependencies section of the blogdown book– getting a good grasp on that idea took me a beat, but definitely saved me future trouble).
Depending on your preference, you can use different approaches: run it locally and cache the data for the post or specific chunk (consistent with knitr cache features), you can do the remote file option (this should work fine, you just have to remember to use the raw url from GitHub), you can use the here package (see Jenny's tribute to here for a nice explanation, which builds the path to the file when you execute it.
Personally, I like to stash the data in a repo, or a gist, since it makes the analysis reproducible, and also means that I can easily update the post with new data, if I so choose.
Hopefully this helps.
Mara