Data and society


  • Data collection explosion is transforming society.

  • A tension ...

  • vs. useful tools that make life better: traffic during east-coast storm

  • Data in the news almost every day!

Semester-long data-collection project


  • Find a dataset of interest TO YOU.
  • Wrangle it.
  • Figure out something interesting.
  • Write a report.
  • Tell us all about it!

Classroom setup


  • Every day at the beginning of class we will quietly and quickly arrange the tables and chairs like below. At the end of class we will restore them to their original state.

Exercise 2: More play with text


Exercise 2a: Sort words by right-to-left alphabetical order

*Hints:

In [1]:
w = 'drawer'
w[::-1]
Out[1]:
'reward'

Note that set-membership can be tested much faster than list membership.

Exercise 2b: List all the palindromes

Exercise 2c: List all the reversible words

  • Useful Python features:

    • list element access and slicing with stride
    • string replace
    • list sort
    • functions, def and lambdas