gp.plotly_location_mode = 'USA-states' gp.plotly_choropleth_field = 'Val' gp.plotly_scope = 'usa' gp.plotly_projection = 'albers usa' gp.plotly_url = country_group + data_type.replace(' ', '-') gp.plotly_world_readable = False gp.title = title gp.units = 'Value' # do a map plot by US state pf.plot_generic_graph(df, type = 'choropleth', adapter = 'cufflinks', gp = gp) #### uses CommonEconDataFactory to get more common forms of economic data and plot #### if True: logger = LoggerManager.getLogger(__name__) cedf = CommonEconDataFactory() start_date = '01 Jan 2014' finish_date = datetime.datetime.utcnow() # select as appropriate! # cedf.g10_plot_gdp_cpi_une(start_date, finish_date) # cedf.usa_plot_une(start_date, finish_date) # cedf.world_plot_une(start_date, finish_date) # cedf.world_plot_cpi(start_date, finish_date) # cedf.europe_plot_une(start_date, finish_date) # cedf.g10_line_plot_cpi(start_date, finish_date) cedf.g10_line_plot_une(start_date, finish_date)
gp.plotly_location_mode = 'USA-states' gp.plotly_choropleth_field = 'Val' gp.plotly_scope = 'usa' gp.plotly_projection = 'albers usa' gp.plotly_url = country_group + data_type.replace(' ', '-') gp.plotly_world_readable = False gp.title = title gp.units = 'Value' # do a map plot by US state pf.plot_generic_graph(df, type='choropleth', adapter='cufflinks', gp=gp) #### uses CommonEconDataFactory to get more common forms of economic data and plot #### if True: logger = LoggerManager.getLogger(__name__) cedf = CommonEconDataFactory() start_date = '01 Jan 2014' finish_date = datetime.datetime.utcnow() # select as appropriate! # cedf.g10_plot_gdp_cpi_une(start_date, finish_date) # cedf.usa_plot_une(start_date, finish_date) # cedf.world_plot_une(start_date, finish_date) # cedf.world_plot_cpi(start_date, finish_date) # cedf.europe_plot_une(start_date, finish_date) # cedf.g10_line_plot_cpi(start_date, finish_date) cedf.g10_line_plot_une(start_date, finish_date)