Skip to content

Instantly share code, notes, and snippets.

@nitinthewiz
Created August 10, 2016 23:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nitinthewiz/260780defd28739c50c05e1c1f83df53 to your computer and use it in GitHub Desktop.
Save nitinthewiz/260780defd28739c50c05e1c1f83df53 to your computer and use it in GitHub Desktop.
change to waybacklapse
def create_payload(url, start_year, stop_year, timelapse_level):
collapse_options = {'yearly': 'timestamp:4', 'monthly': 'timestamp:6'}
collapse = collapse_options[timelapse_level]
payload = {
'url': url,
'output': 'json',
'fl': 'timestamp,original',
'from': start_year,
'to': stop_year
# 'to': stop_year,
# 'collapse': collapse
}
return payload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment