I need the coding program and one UML file with the class digram From this website: https://www.esrl.noaa.gov/gmd/aggi/aggi.html Scrape this table: Table 2. Global Radiative Forcing, CO2-equivalent...

1 answer below »

I need the coding program and one UML file with the class digram


From this website:


https://www.esrl.noaa.gov/gmd/aggi/aggi.html


Scrape this table:


Table 2. Global Radiative Forcing, CO2-equivalent mixing ratio, and the AGGI 1979-2018


Scrapping this website is significantly easier than the website used in lab2. Store the data in a SQLite database.


Create 6 threaded agents: CO2,CH4,N2O,CFC12,CFC11,15-minor. These agents extract the data for their respective columns a year a time over the range 1979 thru 2018. When the data has been extracted, the agents plot a linear regression for each CO2-equivalent mixing ratio.


Only one agent can access the database at a time. The database only releases one line per request for data. The agents must make repeated requests for data. When all the data has been acquired, the agent plots the data.

Answered 2 days AfterNov 04, 2021

Answer To: I need the coding program and one UML file with the class digram From this website:...

Dinesh answered on Nov 07 2021
119 Votes
class_diagram.png
doc/lab-3-12q5r053.png
global_radiative_forcing_data.db
plots/year_vs_CFC11.png
plots/year_vs_CFC12.
png
plots/year_vs_CH4.png
plots/year_vs_CO2.png
plots/year_vs_MINOR15.png
plots/year_vs_N2O.png
threading_app.py
# importing python packages
import threading # threading package
import requests # Open web pages
import sqlite3
from bs4 import BeautifulSoup as bs
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
import time
class ScrapeData:
def __init__(self): # Initialized with the self variable to access the attributes of the object
# Create db file and establish connection
conn = sqlite3.connect('global_radiative_forcing_data.db')
# Cursor
cur = conn.cursor()
# Create table
create_table = "CREATE TABLE IF NOT EXISTS radiative_forcing (Year VARCHARS(20), CO2 VARCHARS(20), CH4 VARCHARS(20), N2O VARCHARS(20), CFC12 VARCHARS(20), CFC11 VARCHARS(20), MINOR15 VARCHARS(20))"
# Execute create new table query
cur.execute(create_table)
def get_data(self):
'''
This method retrive data from URL and save it on the database.
'''
data_url =...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here