looking at the farmers market data
play

Looking at the farmers market data IMP R OVIN G YOU R DATA VISU - PowerPoint PPT Presentation

Looking at the farmers market data IMP R OVIN G YOU R DATA VISU AL IZATION S IN P YTH ON Nick Stra y er Instr u ctor First e x plorations of a dataset Take a broad v ie w Sho w as m u ch info as possible Don ' t f u ss o v er appearances


  1. Looking at the farmers market data IMP R OVIN G YOU R DATA VISU AL IZATION S IN P YTH ON Nick Stra y er Instr u ctor

  2. First e x plorations of a dataset Take a broad v ie w Sho w as m u ch info as possible Don ' t f u ss o v er appearances IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  3. Using y o u r head () pollution.head() IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  4. # Just show median pollution.describe(percentiles=[0.5] # Describe all columns include='all') IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  5. pd.plotting.scatter_matrix(pollution, alpha = 0.2); IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  6. IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  7. IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  8. markets.head() IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  9. Let ' s e x plore o u r data IMP R OVIN G YOU R DATA VISU AL IZATION S IN P YTH ON

  10. E x ploring the patterns IMP R OVIN G YOU R DATA VISU AL IZATION S IN P YTH ON Nick Stra y er Instr u ctor

  11. Digging in deeper In v estigating correlations Are correlations dri v en b y confo u nding ? An y thing s u rprising ? IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  12. Target a u diences Shared w ith peers Be smart abo u t design decisions Remember the y aren ' t as familiar w ith data IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  13. sns.regplot('NO2', 'CO', ci=False, data=pollution, # Lower opacity of points scatter_kws={'alpha':0.2, 'color':'grey'} ) IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  14. Profiling patterns Fo u nd interesting pa � ern in data Ho w to q u ickl y e x plore and e x plain the pa � ern ? Use te x t ! IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  15. Using te x t scatters to id o u tliers IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  16. g = sns.scatterplot("SO2","CO", data=long_beach_avgs) # Iterate over the rows of our data for _, row in long_beach_avgs.iterrows(): # Unpack columns from row month, SO2, CO = row # Draw annotation in correct place g.annotate(month, (SO2,CO)) plt.title('Long Beach avg SO2 by CO') IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  17. IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  18. Let ' s dig in IMP R OVIN G YOU R DATA VISU AL IZATION S IN P YTH ON

  19. Making y o u r v is u ali z ations efficient IMP R OVIN G YOU R DATA VISU AL IZATION S IN P YTH ON Nick Stra y er Instr u ctor

  20. What is efficient ? Red u ce the e � ort needed to see stor y Re - organi z e plots to keep foc u s Impro v e ' ink ' to info ratio Don ' t compromise the message IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  21. IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  22. # Create a subplot w/ one row & two columns. f, (ax1, ax2) = plt.subplots(1, 2) # Pass each axes to respective plot sns.lineplot('month', 'NO2', 'year', ax=ax1, data=pol_by_month) sns.barplot('year', 'count', ax=ax2, data=obs_by_year) IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  23. Clear u nnecessar y legends IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  24. sns.lineplot('month', 'NO2', 'year', ax=ax1, data=pol_by_month, palette='RdBu',) sns.barplot('year', 'count', 'year', ax=ax2, data=obs_by_year, palette='RdBu', dodge=False) # Remove legends for both plots ax1.legend_.remove() ax2.legend_.remove() IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  25. Let ' s practice IMP R OVIN G YOU R DATA VISU AL IZATION S IN P YTH ON

  26. T w eaking y o u r plots IMP R OVIN G YOU R DATA VISU AL IZATION S IN P YTH ON Nick Stra y er Instr u ctor

  27. Looking at the small things P u t y o u rself into the v ie w er ' s shoes IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  28. Is the aesthetic appropriate ? Is the aesthetic appropriate for the conte x t ? IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  29. Font - si z es Is e v er y thing legible ? IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  30. IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  31. IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  32. IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  33. IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  34. IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  35. Remo v ing spines from plots IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  36. Remo v ing spines from plots IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  37. IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  38. Let ' s t w eak some plots IMP R OVIN G YOU R DATA VISU AL IZATION S IN P YTH ON

  39. Wrap - Up IMP R OVIN G YOU R DATA VISU AL IZATION S IN P YTH ON Nick Stra y er Instr u ctor

  40. IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  41. Using color responsibl y IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  42. IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  43. IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  44. Going f u rther Blogs Flo w ing data C u rated list of data v is u ali z ations . Data w rapper Blog Articles that dig deep into v is u ali z ation techniq u es and mistakes . T w i � er # data v is An ongoing stream of cool projects and inspiration . IMPROVING YOUR DATA VISUALIZATIONS IN PYTHON

  45. Thank y o u! IMP R OVIN G YOU R DATA VISU AL IZATION S IN P YTH ON

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend