This analysis focuses on Ice cream sales related to temperature. The data is [here][Pandas plotting]
Big Data Analysis with Pandas - Ice cream sales |
Data
The data used is [here]
date,IC,price,income,temp,Lag-temp,Year 1,0.386,0.27,78,41,56,0 2,0.374,0.282,79,56,63,0 3,0.393,0.277,81,63,68,0 4,0.425,0.28,80,68,69,0 5,0.406,0.272,76,69,65,0 6,0.344,0.262,78,65,61,0 7,0.327,0.275,82,61,47,0 8,0.288,0.267,79,47,32,0 9,0.269,0.265,76,32,24,0 10,0.256,0.277,79,24,28,0 11,0.286,0.282,82,28,26,1 12,0.298,0.27,85,26,32,1 13,0.329,0.272,86,32,40,1 14,0.318,0.287,83,40,55,1 15,0.381,0.277,84,55,63,1 16,0.381,0.287,82,63,72,1 17,0.47,0.28,80,72,72,1 18,0.443,0.277,78,72,67,1 19,0.386,0.277,84,67,60,1 20,0.342,0.277,86,60,44,1 21,0.319,0.292,85,44,40,1 22,0.307,0.287,87,40,32,1 23,0.284,0.277,94,32,27,1 24,0.326,0.285,92,27,28,2 25,0.309,0.282,95,28,33,2 26,0.359,0.265,96,33,41,2 27,0.376,0.265,94,41,52,2 28,0.416,0.265,96,52,64,2 29,0.437,0.268,91,64,71,2
Code
An outline of the code is:
import numpy as np import pandas as pd import sys import statsmodels.api as sm