The tutorial is not a complete working example. You have to fill in some values yourself. It even says so on the page.
You need to add suitable arguments to the percent_map() function, which is defined in the helper.R script. For example
percent_map(var = data, color = "darkgreen", legend.title = "USA")
Then it will work.