Skip to content

gwu-libraries/python-learning-examples

Repository files navigation

GW_coding():

Learning Python through projects

GW Python Logo

Introduction

The project-based learning modules included in this repository for designed as short introductions into how Python can be used accomplish interesting things. From scraping the web to collect information on elections to using machine learning to explore historical events, Python can be a valuable tool for students, researchers, faculty, and others as they solve problems, invent to technologies, or just have fun with data. This is as true if you are political science or psychology major, as it is if you are in engineering or business. We have therefore tried to create modules that are applicable to the interest of many diverse students so that everyone can find projects that are interest to them.

The modules are intended to be used for small group (or pair) learning situations. This way someone with more Python experience can help those newer to Python pick up skills more quickly. You could use them for individual self-paced learning, but there are also many (many) other resources online for that purpose.

The current modules are drafts and if you have ideas for improving, please create branch and add your edits. We will continue to add more modules and you can add modules too.

Peer Instruction

The modules have been developed to provide peer instructors with practical content that they can use to help their fellow students learn Python. Some modules are for beginners, while other are for more advanced Python coders, but they are written as Juptyer Notebooks so students should be able to jump write in and start coding.

GW Python Peer Logo

If you are interested in becoming a peer instructor and helping your friends learn Python, let us know and you can attend a short training on how to use the modules as the foundation for peer tutorials. You can lead a peer-instruction event whenever you want, and where ever you want. If you could use a place (for example, at the library or the GW Innovation & Entrepeneurship Lab) just contact us (email coming soon)

GW Python Peer Prep v1

Getting Started with Python Modules

This use of Juptyer Notebooks is based on Prof. Barba's course Getting Data Off the Ground with Python. And her introductory modules (especialy 1 thru 3) are a great starting place for students who have not used Python at all. They start out with writing your first lines of code and take you to the point where you can import short fragments of text to learn about strings. With those foundations, any student should be ready for the beginner modules included in this repository.

Project-based Modules/Scripts

The project-based modules/scripts are resources for peer instructors who want to either "live code" with peers (e.g., you code from the "script" on a screen as the learners write the code on their computers) or as tutorials that you work through together. You and the learners can use the GW Juptyer Hub to code without having to download or set up any software.

Directory Topic Level
Off the Ground with Python Python Basics Beginner
Intro to Stats with Python Take off with Stats in Python Beginner
ML-titanic Machine learning with titanic survivors Beginner
Webscraper Scrape a website to collect data Beginner
social-network-analysis-actors Explore the relationships among actors Beginner
geomap-voting Map voting by geographic area Beginner

More modules/scrips will coming soon. Below are a few ideas we considering. If you have ideas for applied projects that you would like to help us develop, just send us a note.

Discipline/Field Possible Coding Projects
Psychology
  • Social network analysis (example)
  • Analyzing EEG data
  • Building experiments (example)
  • Building a chatbot (example)
  • mTurk (or Prolific) for getting survey responses (example)
  • Statistics
History
  • Webscraping
  • ML of historical data
  • Sentiment analysis (example)
  • Data visualization (example)
  • ML Analysis of Video (example)
Business
World Languages
  • Webscraping (example)
  • Intertextuality Detection (example)
  • Sentiment analysis
  • ML of texts
  • Identifying n-grams (example)
  • Word frequencies (example)
  • Processing string/text data (example)
Biology
  • ML to make predictions based on data (example)
  • Statistics
  • Data mining (example)
  • Plotting data (example)
Political Science
  • Data visualization (example)
  • Social network analysis of people in text (example)
  • GIS data visualization
  • Very basic voting system (example)
  • Getting data from an API (example)
  • Webscraping (example)
  • Webscraping the Congressional Record newspaper (example)
Urban Planning
  • Predicting energy scores (example)
  • Geocoding publicly available data (example)
  • Getting data from an API (example)
  • Social Network Analysis to analyze communities (example)
Economics

What is Jupyter?

Jupyter is a set of open-source tools for interactive computing. At the center of the Jupyter world is the Notebook: a document that combines text and multi-media content with executable code. It is a powerful platform to learn computing because it lets you chunk a program into small, digestible portions, and intermix these with narration and explanation. It is also becoming the staple environment to develop ideas and present finished analyses in data science and engineering.

For the Python project tutorials, you can simply launch the associated Jupyter Notebooks using the free Binder service and work through the tutorials. Each tutorial has a Binder link in the README file.

At GW, we are also fortunate to have a Jupyter Hub (portal) available to all students and faculty. You can use your account on the Jupyter Hub to write code. You can also download any of the Python project tutorials to work further. You can access it at Jupyter Hub.

What does it mean that the course materials are open?

It means that the authors of all the materials available here give everyone in the world a license to use the material in any way, to redistribute, modify and essentially do whatever they like with it. The only condition is that we are given attribution. Content is under a Creative Commons CC-BY 4.0 International license and code is under a BSD 3-clause license.

GW Project Partners

  • GW Data Club
  • SEAS Innovation Center
  • GSEHD
  • SEAS
  • B-School Career Center
  • Innovation & Entrepreneurship Lab
  • GW Libraries and Academic Innovation
  • Our peer instructors (coming in January 2020).

About

Python notebooks -- discipline-based examples

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published