Giter Club home page Giter Club logo

mission-to-mars's Introduction

Mission-to-Mars

Background

Build a Web Application that Scrapes Various Websites for Data Related to the Mission to Mars and Displays the Information in a Single HTML Page

Objectives

Step 1 - Scraping

NASA Mars News

  • Scrape the NASA Mars News Site and collect the latest News Title and Paragraph Text

JPL Mars Space Images - Featured Image

  • Visit the URL for the JPL Featured Space Image
  • Use Splinter to navigate the site and find the image URL for the current Featured Mars Image and assign the URL string to a variable called featured_image_url
  • Make sure to find the image URL to the full size .jpg image
  • Make sure to save a complete URL string for this image

Mars Weather

  • Visit the Mars Weather Twitter account and scrape the latest Mars Weather Tweet from the page
    • Save the Tweet text for the weather report as a variable called mars_weather

Mars Facts

  • Visit the Mars Facts webpage and use Pandas to scrape the table containing facts about the planet including Diameter, Mass, etc.
  • Use Pandas to convert the data to a HTML table string

Mars Hemispheres

  • Visit the USGS Astrogeology site to obtain high resolution images for each of Mar's hemispheres
  • Save both the image URL string for the full resolution hemisphere image, and the Hemisphere title containing the hemisphere name.
    • Use a Python dictionary to store the data using the keys img_url and title
  • Append the dictionary with the image URL string and the hemisphere title to a list
    • This list will contain one dictionary for each hemisphere

Step 2 - MongoDB and Flask Application

  • Use MongoDB with Flask templating to create a new HTML page that displays all of the information that was scraped from the URLs above
  • Convert Jupyter Notebook into a Python Script called scrape_mars.py with a function called scrape that will execute all of the scraping code from above and return one Python Dictionary containing all of the scraped data
  • Create a route called /scrape that will import the scrape_mars.py script and call the scrape function
    • Store the return value in Mongo as a Python Dictionary
  • Create a root route / that will query the Mongo database and pass the Mars Data into an HTML template to display the data
  • Create a template HTML file called index.html that will take the Mars Data Dictionary and display all of the data in the appropriate HTML elements

mission-to-mars's People

Contributors

bigbluey avatar

Stargazers

 avatar  avatar

Watchers

 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.