Created
November 8, 2016 03:56
-
-
Save fourthdimension/f518ee1ed8d4cf23056eaab9f14803dc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function TRENDLINK(style,state) { | |
var s; | |
if(state == "Ontario") | |
s = "CA-ON"; | |
else if(state == "Manitoba") | |
s = "CA-MB"; | |
else if(state == "Quebec") | |
s = "CA-QC"; | |
else if(state == "Saskatchewan") | |
s = "CA-SK"; | |
else if(state == "Alberta") | |
s = "CA-AB"; | |
else if(state == "Newfoundland") | |
s = "CA-NL"; | |
else if(state == "NovaScotia") | |
s = "CA-NS"; | |
else if(state == "NewBrunswick") | |
s = "CA-NB"; | |
else if(state == "BritishColumbia") | |
s = "CA-BC"; | |
return "https://www.google.ca/trends/explore?geo=" + s + "&q=" + style; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment