GithubHelp home page GithubHelp logo

angang-li / mars_web_scraping Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 12.28 MB

Scrape web data related to Mars, store in MongoDB, and display on webpage

Home Page: https://mars-web-scraper.herokuapp.com/

Python 21.48% Jupyter Notebook 42.65% CSS 11.90% HTML 23.97%
web-scraping flask mongodb html

mars_web_scraping's Introduction

Mission to Mars

1. Project summary

A web application that scrapes various websites for real-time data related to the Mission to Mars, stores scraped data in MongoDB, and displays the latest information in a single HTML page. Check out the web application here!

2. File descriptions

  • mission_to_mars.ipynb: the Jupyter Notebook file that outlines all the scraping.

  • scrape_mars.py: declares a function called scrape that executes all the above scraping and returns the scraped data.

  • app.py: creates an app route called /scrape that calls the scrape function and store data in Mongo database; creates a root route / that queries the Mongo database and pass the mars data into an HTML template to display the data.

  • templates

    • index.html: a template HTML file that display all data in the appropriate HTML elements.
  • static

    • css
      • reset.css, style.css: CSS stylesheets.

3. Instructions to run the web application

  1. Clone this repository.
  2. Make sure MongoDB is installed. Here is installation instruction from Northwestern Data Science Bootcamp.
  3. In terminal (or command line in Windows), type mongod
  4. Open another terminal window, navigate to mars-web-scraping/ directory (where this README file is located).
  5. In the terminal, type python app.py. The webpage will display on local browser.

4. Python version and libraries

The code was developed using the Anaconda distribution of Python version 3.6. The following dependencies were used.

pandas
Flask
BeautifulSoup
splinter
Flask-PyMongo

5. Web app screenshots

webpage screenshot 1
webpage screenshot 2
webpage screenshot 2

mars_web_scraping's People

Contributors

angang-li 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.