<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Question 1
Plot the daily temperature over the course of the year. (This should probably be a line chart.) Create a bar chart that shows the average temperature and humidity by month.
Step1:  Question 2
Use a scatterplot to show how the daily rental volume varies with temperature. Use a different series (with different colors) for each season.
Step2:  Question 3
Create another scatterplot to show how daily rental volume varies with windspeed.  As above, use a different series for each season.
Step3:  Question 4
How do the rental volumes vary with geography? Compute the average daily rentals for each station and use this as the radius for a scatterplot of each station's latitude and longitude.
<ASSISTANT_TASK:>
Python Code:
from pandas import DataFrame, Series
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
weather = pd.read_table('data/daily_weather.tsv')
season_mapping = {'Spring': 'Winter', 'Winter': 'Fall', 'Fall': 'Summer', 'Summer': 'Spring'}
weather['season_desc'] = weather['season_desc'].map(season_mapping)
plt.plot(weather['temp'], 'b-')
plt.axis(xmax=365)
plt.axis(ymin=0, ymax=1)
plt.xlabel('Days')
plt.ylabel('Temperature')
plt.show()
weather['Month'] = pd.DatetimeIndex(weather_data.date).month
weather.groupby('Month')['temp', 'humidity'].mean().plot(kind='bar')
Explanation: Question 1
Plot the daily temperature over the course of the year. (This should probably be a line chart.) Create a bar chart that shows the average temperature and humidity by month.
End of explanation
plt.scatter(
    weather[weather.season_desc == 'Winter']['temp'],
    weather[weather.season_desc == 'Winter']['total_riders'],
    s=20, c='b', alpha=.3, label='Winter'
)
plt.scatter(
    weather[weather.season_desc == 'Spring']['temp'],
    weather[weather.season_desc == 'Spring']['total_riders'],
    s=20, c='g', alpha=.3, label='Spring'
)
plt.scatter(
    weather[weather.season_desc == 'Summer']['temp'],
    weather[weather.season_desc == 'Summer']['total_riders'],
    s=20, c='y', alpha=.3, label='Summer'
)
plt.scatter(
    weather[weather.season_desc == 'Fall']['temp'],
    weather[weather.season_desc == 'Fall']['total_riders'],
    s=20, c='r', alpha=.3, label='Fall'
)
plt.title("Daily Rental Volume Versus Temperature")
plt.legend(loc=4)
plt.show()
Explanation: Question 2
Use a scatterplot to show how the daily rental volume varies with temperature. Use a different series (with different colors) for each season.
End of explanation
plt.scatter(
    weather[weather.season_desc == 'Winter']['windspeed'],
    weather[weather.season_desc == 'Winter']['total_riders'],
    s=20, c='b', alpha=.3, label='Winter'
)
plt.scatter(
    weather[weather.season_desc == 'Spring']['windspeed'],
    weather[weather.season_desc == 'Spring']['total_riders'],
    s=20, c='g', alpha=.3, label='Spring'
)
plt.scatter(
    weather[weather.season_desc == 'Summer']['windspeed'],
    weather[weather.season_desc == 'Summer']['total_riders'],
    s=20, c='y', alpha=.3, label='Summer'
)
plt.scatter(
    weather[weather.season_desc == 'Fall']['windspeed'],
    weather[weather.season_desc == 'Fall']['total_riders'],
    s=20, c='r', alpha=.3, label='Fall'
)
plt.title("Daily Rental Volume Versus Windspeed")
plt.legend(loc=4)
plt.show()
Explanation: Question 3
Create another scatterplot to show how daily rental volume varies with windspeed.  As above, use a different series for each season.
End of explanation
stations = pd.read_table('data/stations.tsv')
usage = pd.read_table('data/usage_2012.tsv')
s = stations[['station', 'lat', 'long']]
u = pd.concat([usage['station_start']], axis=1, keys=['station'])
counts = u['station'].value_counts()
c = DataFrame(counts.index, columns=['station'])
c['counts'] = counts.values
c['counts'] = c['counts'].apply(lambda x: x / 365)
m = pd.merge(s, c, on='station')
plt.scatter(m['long'], m['lat'], c='b', label='Location', s=(m['counts'] * 10), alpha=.1)
plt.legend(loc='lower right')
plt.xlabel('Longitude')
plt.ylabel('Latitude')
plt.show()
Explanation: Question 4
How do the rental volumes vary with geography? Compute the average daily rentals for each station and use this as the radius for a scatterplot of each station's latitude and longitude.
End of explanation
<END_TASK>