Git Product home page Git Product logo

president-speech-topics's Introduction

Mr. President, what did you say?

Look at the final result of this project! If you want to read the blog post for this project take a look here.

There is more information about the motivation for this project and the process on the blog so I'll try to keep this short.

Scripts

project_fletcher_cleaning.py - this file contains the scripts that I used to scrape the information from The American Presidency Project.

  • The process of scraping was more or less the same for each of the different types of speeches (state of the union, inaugural address, etc.)
    1. scrape the links for each of the speeches of a certain type (state of the union, inaugural address, etc.)
    2. use those links to scrape the individual speech page for the speech text, president name, date, and title
    3. create a dictionary for a particular speech
    4. loop through all the links to create a list of dictionaries (one for each speech)
    5. put everything into MongoDB

project_fletcher_processing.py - this file contains the scripts and functions used to generate topics via latent dirichlet allocation (LDA) and similarity scores using the document matrix after latent semantic indexing (LSI)

  • I commented out the code that I wasn't using but I wanted to keep the code in the files because I wanted to have a record of what I did

Final Product

president.html - The eventual product was a webpage with a couple visualizations created using D3.js.

president-speech-topics's People

Contributors

jeffwen avatar

Stargazers

George McIntire avatar

Watchers

James Cloos avatar Matt Stringer avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.