aspects of OOP in Python


Write an Earthquake class that demonstrates the following aspects of OOP in Python:

  1. Create a basic class that can hold all relevant earthquake data saved in index.sqlite see below
  2. Appropriately create a constructor to set all data values .
  3. Create a regular class method that returns all or part of the Earthquake data as a dictionary object.
  4. Override the __str__ method to print a reasonable string representation of an Earthquake.
  5. Use the @property decorator to make at least one property in your Earthquake class private.
  6. Use the @???.setter method to validate the private property in some way (e.g. check if its numeric, change it’s data type, change it’s length…) before setting its value.

Write a second class called Point, Position or Time to store one or more pieces of earthquake data.This class can be included in the file.

  • The class could store latitude & longitude OR latitude and longitude and depth OR timestamp
  • You should use this class in the Earthquake class instead of storing the vales as primitive data types
  • This class should include an __init__ method and a __str__ method.  If you create class to stor time, the __str__ method should return a formatted string, not a timestamp.

You may use the Author and Article classes presented in lecture as a starting point for these classes.

Write an Earthquake_stats class that uses the Earthquake object AND a Pandas dataframe to process earthquake data and display basic statistics.

  • You should import the Earthquake module to use in this application.
  • You will read Earthquakes from the database, just like in,  but instead of putting them into individual lists for each type of date, you will create a list of Earthquake objects.
  • You will  list of earthquake objects to a Panda’s Dataframe.

o   See (Links to an external site.) for an example of how to use a custom method to turn you object into a dictionary AND use list comprehension to create a list of Earthquake dictionaries to create your DataFrame.

  • Display either the first 5 or last 5 earthquakes in the dataframe to the screen.
  • Use the dataframe to compute basic statistics for the entire population of earthquakes
  • Compute the same basic statistics for earthquakes filtered on Region. Computer a separate set of statistics for two different regions that have at least 200 earthquakes in your sample.
  • Compute the same basic statistics for all earthquakes filtered by either felt, tsunami or depth
    e.g felt > 0, tsunami > 0, depth < 50 or depth<100.

Calculate the price of your order

Simple Order Process

Fill in the Order Form

Share all the assignment information. Including the instructions, provided reading materials, grading rubric, number of pages, the required formatting, deadline, and your academic level. Provide any information and announcements shared by the professor. Choose your preferred writer if you have one.

Get Your Order Assigned

Once we receive your order form, we will select the best writer from our pool of experts to fit your assignment.

Share More Data if Needed

You will receive a confirmation email when a writer has been assigned your task. The writer may contact you if they need any additional information or clarifications regarding your task

Let Our Essay Writer Do Their Job

Once you entrust us with your academic task, our skilled writers embark on creating your paper entirely from the ground up. Through rigorous research and unwavering commitment to your guidelines, our experts meticulously craft every aspect of your paper. Our process ensures that your essay is not only original but also aligned with your specific requirements, making certain that the final piece surpasses your expectations.

Quality Checks and Proofreading

Upon the completion of your paper, it undergoes a meticulous review by our dedicated Quality and Proofreading department. This crucial step ensures not only the originality of the content but also its alignment with the highest academic standards. Our seasoned experts conduct thorough checks, meticulously examining every facet of your paper, including grammar, structure, coherence, and proper citation. This comprehensive review process guarantees that the final product you receive not only meets our stringent quality benchmarks but also reflects your dedication to academic excellence.

Review and Download the Final Draft

If you find that any part of the paper does not meet the initial instructions, send it back to us with your feedback, and we will make the necessary adjustments.