Editing Community Data Science Workshops (Core)/Day 1 Lecture

From CommunityData
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
{{Template:CDSW Header}}
Welcome to the Saturday lecture section of the Community Data Science Workshop! For about 2 hours, we'll work through an introduction to the Python programming language via both a lecture and hand-on exercises.
Welcome to the Saturday lecture section of the Community Data Science Workshop! For about 2 hours, we'll work through an introduction to the Python programming language via both a lecture and hand-on exercises.


At the beginning of the lecture, we'll give a [[Day 1 pre-lecture|short pre-lecture talk to motivate the sessions]].
At the beginning of the lecture, we'll give a [[Day 1 pre-lecture|short pre-lecture talk to motivate the sessions]].
Screencast videos of both are available:
* [https://communitydata.science/~mako/cdsw-wi2020-pre_lecture-20200118.ogv Pre-lecture introduction to the workshops] (103MB)
* [https://communitydata.science/~mako/cdsw-wi2020-lecture1-20200118.ogv Interactive lecture covering the basics of programming in Python] (384MB)
The links above should be viewable in most browsers. If you have trouble playing it, you can download [https://www.videolan.org/vlc/index.html the VLC media player] which will be a able to play it on Windows, OSX, or GNU/Linux


== Resources ==
== Resources ==
Line 16: Line 7:
* [[Python data types cheat sheet]]
* [[Python data types cheat sheet]]
* [[Python loops cheat sheet]]
* [[Python loops cheat sheet]]
* [https://communitydata.science/~mako/State_Capitals.ipynb State_Capitals.ipynb] -- the state capitals example.
* [http://mako.cc/teaching/2015/cdsw-spring/state_capitals.py state_capitals.py] -- the state capitals example.
* [http://communitydata.cc/~mako/cdsw-sp2016-lecture1-20160410.ogv Screencast/recording of the lecture] (433MB) — The file should be viewable in Firefox and most other browsers. If you have trouble playing it, you can download [https://www.videolan.org/vlc/index.html the VLC media player] which will be a able to play it on Windows, OSX, or GNU/Linux.


== Lecture outline ==
== Lecture outline ==
Line 27: Line 19:
* <tt>type()</tt>
* <tt>type()</tt>
** there are different types of things in python (called objects)
** there are different types of things in python (called objects)
** variables that "know about the decimal place" (floats) and variables that don't (ints)
** variables that "know about the decimal place" (int) and variables that don't (floats)
* variables
* variables
** assignment of variaibles
** assignment of variaibles
Line 34: Line 26:
* strings
* strings
** things within quotation marks
** things within quotation marks
** adding strings with "concatenation" (smushing things together)
** adding strings with "concatination" (smushing things together)
** e.g., <code>print("Hello" + name)</code>
** e.g., <code>print("Hello" + name)</code>
** concatenating strings and integers don't work (e.g., <code>print(1 + "mako")</code>)
** concatenating strings and integers don't work (e.g., <code>print(1 + "mako")</code>)
Line 129: Line 121:
* <tt>input()</tt>
* <tt>input()</tt>


=== walk through State_Capitals.ipynb ===
=== walk through state_capitals.py ===




Where State_Capitals.ipynb from https://communitydata.science/~mako/State_Capitals.ipynb is the grand finale and synthesis of lecture material.
Where state_capitals.py from http://mako.cc/teaching/2015/cdsw-spring/state_capitals.py is the grand finale and synthesis of lecture material.


[[Category:Shared_Content]]
[[Category:Shared_Content]]
Please note that all contributions to CommunityData are considered to be released under the Attribution-Share Alike 3.0 Unported (see CommunityData:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)

Template used on this page: