Data visualization of using temperatures, stations, and countries data!

Objective

In this post, we create some interactive data graphics using the NOAA climate data that we’ve explored in the first several weeks of lectures.

Code

import pandas as pd
import matplotlib.pyplot as plt
import sqlite3

temperatures = pd.read_csv('temps_stacked.csv')
temperatures.head()

conn = sqlite3.connect("temps.db")
temperatures.to_sql("temperatures", conn, if_exists="replace", index=False)

cmd = " SELECT id, temp, year \
FROM temperatures"
cursor = conn.cursor()
cursor.execute(cmd)
result = cursor.fetchall()
result[:10]

#stations = pd.read_csv('station-metadata.csv')
#stations.head()

#countries = pd.read_csv('countries.csv')
#countries.head()
Written on April 1, 2022