Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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