module datainc.data_bikes
#
Short summary#
module ensae_projects.datainc.data_bikes
Data related to a challenge, streets in Seattle
Functions#
function |
truncated documentation |
---|---|
After aggregation, it usually happens that the series is sparse. This function adds rows for missing time. |
|
Makes a cross join (cartesian product) between two dataframes by using a constant temporary key. Also sets a MultiIndex … |
|
Returns a folium map which shows stations in different colors. |
|
Retrieves processed data from Divvy Data. |
Documentation#
@file @brief Data related to a challenge, streets in Seattle
- ensae_projects.datainc.data_bikes.add_missing_time(df, column, values, delay=10)#
After aggregation, it usually happens that the series is sparse. This function adds rows for missing time.
@param df dataframe to extend @param column column with time @param values columns which contain the values, the others are considered as the keys @aram delay populate every delay minutes @return new dataframe
- ensae_projects.datainc.data_bikes.df_crossjoin(df1, df2, **kwargs)#
Makes a cross join (cartesian product) between two dataframes by using a constant temporary key. Also sets a MultiIndex which is the cartesian product of the indices of the input dataframes. Source: Cross join / cartesian product between pandas DataFrames.
@param df1 dataframe 1 @param df2 dataframe 2 @param kwargs keyword arguments that will be passed to pd.merge() @return cross join of df1 and df2
- ensae_projects.datainc.data_bikes.folium_html_stations_map(stations, html_width=None, html_height=None, radius=5, **kwargs)#
Returns a folium map which shows stations in different colors.
@param stations list
[ (lat, lon), color ]
or[ (lat, lon), (name, color) ]
@param kwargs extra parameters for Map @param html_width sent to function- @param html_height sent to function
@param radius size of the circles @return see function
- ensae_projects.datainc.data_bikes.get_chicago_stations(folder='.', as_df=False)#
Retrieves processed data from Divvy Data.
@param folder temporary folder where to download files @param as_df @return filename or 2 dataframes (as_df=True)