#first blackbox
from IPython.display import YouTubeVideo
YouTubeVideo('W8h5OEivJdA')
They took the credit for your second symphony
re-written by machine and new technology
and now I understand the problems you can see.
Oh oh -- I met your children
oh oh -- what did you tell them+
video killed the radio star
video killed the radio star
pictures came and broke your heart
we can't rewind we've gone too far --Buggles, 1979
In my mind and in my car
We can't rewind we've gone too far
Pictures came and broke your heart
Put the blame on VTR
lest point be lost
“radio star” is stuck in a plastic tube from which she cannot escape [1:51]
roughly, a belief that technology causes social, economic and cultural transformation
or, surrender to its (non-extant) inevitability
Letting us direct technology critically, rather than being ruled by it.
too binary: trick to learn the affordances of extant technologies while appreciating tradeoffs
YouTubeVideo('W8h5OEivJdA')
is very easy. All I had to do was copy a part of the web address (aka URL).
black box
We make data from sources: we don't find it pregiven.
Data is made, not born: fully artificial
Big data ideology: more data yield more knowledge
artificial therefore false
Or artificial therefore way to create something positive
technical solutions are integral to ethical and social solutions
First law of data accessibility
never discuss data accessibility
Second law of data accessibility
data is actually useful for data journalism and digital humanists in inverse proportion to its readiblity by mere mortals
In other words, if you can read it easily (and you are not a computer), then the computer probably can't read it easily.
Our gripes with the bad data practices of others leads us to impose a law unto ourselves:
Third law of data accessibility
It is a universal maxim to strive to produce our data findings in formats good for human beings and also in formats open for other computational tools
Learn to take, structure, and present data findings.
We give you several examples of major ways of getting, processing, and organzing data. More importantly, develop skills in getting help when confronted with any data format--from formal documentation and, often more importantly, on-line communities such as Stack Overflow. Data structures enable us, aid communication, and constrain us. We'll be thinking about what produces those constraints and ways to hack them--to work against structures that limit what we are doing.
Like Gaul, roughly three parts
Often three parts to daily assignments
Formal work
You'll remember from Ms. Ersatz's 8th grade algebra class assigning variables such as $x=1$, and from Ms. Candlestick's calculus class functions like $f(x)=x^2$. Using Python, we're going to assign lots of variables and make loads of functions. And it will be way more fun.
Assigning a value to a variable in Python is much like elementary algebra:
x=1
y='Hello, there'
In the first, x is set equal, for now, to one. In the second, y is set equal to a series of characters, something typically not seen in algebra. Such a series of characters is known as a string among computer types, and now among you. Using the quotation marks tells python, "hey, a string is starting here," and then "yo, that string I mentioned, yeah, well, it's done."
Once you've set a variable, you can begin operating with it.
The most basic use of Python is as a big calculator. The IPython notebook is a particularly elegant form of this calculator.
#set x to 1
x=1
#and try adding 2 to x
x+2
#click in this box and then press SHIFT and ENTER at the same time
3
The # just tells Python that the line following is a comment, not a command.
We can 'calculate' with more than numbers. The process above works by analogy with strings, too. By a metaphorical extension, we can "add" them.
y='Hello, there'
y+' big bad wolf'
#click shift plus enter
'Hello, there big bad wolf'
What if you tried to add x, which is a number, and y, a bunch of characters?
y+x
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-16-140f49470644> in <module>() ----> 1 y+x TypeError: cannot concatenate 'str' and 'int' objects
It says:
TypeError: cannot concatenate 'str' and 'int' objects
In other words, python says, "Hello! You can't add together a string and an integer. (Duh.)"
Generally this is seen as positive: python prevents us from making certain and thus enables us to write better code without mistakes.
Like all programming languages, Python has different data types. Some are good for integers, some for text and text-like stuff, and some are good for collections of data. They are artificial kinds. They let us do lots of things and save us from doing some things, and prevent us from doing others.
#let's try adding a non-integer number
z=3.1415
z+x
4.141500000000001
'He'