Skip to content

Instantly share code, notes, and snippets.

@sergiolucero
Created April 22, 2020 17:03
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 sergiolucero/453dffbd9f84c4a229e73ab4734e4eeb to your computer and use it in GitHub Desktop.
Save sergiolucero/453dffbd9f84c4a229e73ab4734e4eeb to your computer and use it in GitHub Desktop.
bonobo productos COVID-19
import bonobo
from sqlib import get_CAM_data, summarize, to_excel
def Extracción():
data = get_CAM_data()
print([(key,len(kdata)) for key, kdata in data.items()])
yield data
def Transformación():
data['summary'] = summarize(data) # compute 2019/2020 stats
yield data
def Publicación():
to_excel(data, 'data_cam_full_Apr22.xlsx')
graph = bonobo.Graph(Extracción, Transformación, Publicación)
bonobo.run(graph)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment