Download (right-click, save target as ...) this page as a jupyterlab notebook from: Lab17-TH
LAST NAME, FIRST NAME
R00000000
ENGR 1330 ES-17 - Homework
Exercise 0: Profile your computer
# Preamble script block to identify host, user, and kernel
import sys
! hostname
! whoami
print(sys.executable)
print(sys.version)
print(sys.version_info)
# Let's import the necessary libraries:
import numpy as np
import pandas as pd
import statistics
import scipy.stats
import matplotlib.pyplot as plt
######### CODE TO AUTOMATICALLY DOWNLOAD THE DATABASE ################
#! pip install requests #install packages into local environment
import requests # import needed modules to interact with the internet
# make the connection to the remote file (actually its implementing "bash curl -O http://fqdn/path ...")
remote_url = 'http://54.243.252.9/engr-1330-webroot/4-Databases/Lubbock_Oct_T&P.csv' # a csv file
response = requests.get(remote_url) # Gets the file contents puts into an object
output = open('Lubbock_Oct_T&P.csv', 'wb') # Prepare a destination, local
output.write(response.content) # write contents of object to named local file
output.close() # close the connection
If you get an error, or an empty file, then download using your browser and mouse.
#code here
# read the data into a dataframe
# info about the dataframe
# descriptive statistics for temperature
# median of precipitation and temperature
# how many modes temperature
# IQR precipitation
# Selected quantiles for temperature
# 5-number summary precipitation
# Boxplot
# Variance and standard deviation of 'precipitation'
# Skewness and kurtosis 'precipitation'