Python Lesson 1: Getting Started Vanderbi.Lt/Py

Python Lesson 1: Getting Started Vanderbi.Lt/Py

Python Lesson 1: Getting Started vanderbi.lt/py Steve Baskauf vanderbi.lt/py Digital Scholarship and Communications Office (DiSC) • Unit of the Vanderbilt Libraries • Support for data best practices (DMP tool, repositories), GIS, copyright, Linked Data (including Wikidata), tools (GitHub, ORCID, Open Science Framework, etc.), and Open Access publishing. • Offer on-demand educational programming, consultations, web resources • Currently offering lessons on Python, R, and GIS • More online at: vanderbi.lt/disc • Email: [email protected] vanderbi.lt/py Is Python for you? <root> <tag>text</tag> output XQuery Text <more>something</more> (analysis, </root> structured XML display) beginner Python advanced input branching data structure processing logic looping building and manipulating data structures analysis visualization output transformation advanced R beginner vanderbi.lt/py Uses for Python • Software development • Data wrangling and visualization • Scientific computing (SciPy, Pandas) • Web development (Flask) • Serverless computing (AWS Lambda) • Education • many other things (robots) This series will serve as a basic introduction to all of these topics vanderbi.lt/py Other campus Python resources • Software Carpentries (cosponsored by DiSC and Research IT) March 5-6 • Data Science Institute (DSI) workshops https://www.vanderbilt.edu/datascience/events/data-science-workshops/ • Digital Humanities (DH) Center https://www.vanderbilt.edu/digitalhumanities/ • O'Reilly for Higher Education resources http://www.library.vanderbilt.edu/eres?id=1676 vanderbi.lt/py Python Basics • Free, open source, multiplatform • Python 2 vs. 3 vanderbi.lt/py The Anaconda option • Includes Python, R, IDEs (Spyder and RStudio), Jupyter notebooks, and the VS Code editor as options. • Includes most common add-on packages • Includes a package manager called Conda. • Considerations: size, conflicts with HomeBrew, differences in virtual environments • Link to installation page on home page. vanderbi.lt/py Ways to run Python (demo) • Using the command line interpreter ("shell"; often seen in web examples) • Enter python in Windows • Enter python3 on Mac (if not Anaconda) • Using a code editor (Visual Studio Code in this example) • performs syntax highlighting, autocomplete, autoindentation, etc. • provides access to sophisticated debugging tools • (VS Code is actually almost an IDE) vanderbi.lt/py Ways to run Python (cont.) • Using an Integrated Development Environment (IDE) • Code editor combined with shell • Thonny is a very simple IDE (good option for beginners) • Spyder is a full-featured IDE (included in Anaconda) • Using Jupyter notebooks • Extremely common in Data Science • pros • literate programming • take notes on examples (I'm providing them prewritten) • cons • learning curve to start • not great for loops and functions vanderbi.lt/py Good options from here: • Install Thonny and take the minimalist approach • Install Anaconda and get the whole enchilada • Use this option if Jupyter notebooks appeal to you • Do both (it won't hurt) and switch around • Thonny package downloads will be independent • During the class, you can either cut and paste examples from the website into Thonny, or run the cells in the Jupyter notebook. vanderbi.lt/py After you install • Thonny: from lesson schedule page go to "code examples" • Jupyter notebooks: from lesson schedule page, go to "example notebook", download, load, then run. • Next week: at top of lesson 2 web page, there is a link to the Jupyter notebook with examples..

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    11 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us