I hereby claim:
- I am ashomah on github.
- I am ashomah (https://keybase.io/ashomah) on keybase.
- I have a public key ASDEHxWVtwEwTVsSmLzYhIF4EzMdZoUKb-9SuwVa3sWUaAo
To claim this, I am signing this object:
timer = pd.DataFrame(columns=['pipeline', 'section', 'step', 'start', 'end', 'total']) | |
def start_timer(pipeline, section, step): | |
global running_step | |
timer_start = datetime.now() | |
running_step = {'pipeline': pipeline, 'section': section, 'step': step, 'start': timer_start, 'end': np.nan, 'total': np.nan} | |
def stop_timer(): | |
global running_step | |
global timer |
def df_desc(df, shape_only=False): | |
''' Describe the structure of a dataframe | |
''' | |
import pandas as pd | |
print('Shape of the dataframe:') | |
print('{:<10} {:>10,} | {:<10} {:>10,}'.format('Rows:', df.shape[0], 'Columns:', df.shape[1])) | |
if not shape_only: | |
desc = pd.DataFrame({'dtype': df.dtypes, | |
'NAs': df.isna().sum(), |
I hereby claim:
To claim this, I am signing this object:
Rank,SBScore,Rating,User,Subscribers,VideoViews | |
369,16291,B,[tackle4826] - Tackle Minecraft,1065156,369380165 | |
55,602,A,?FavijTVª,3497915,1528502327 | |
338,8483,B-plus,876TV,580006,398182103 | |
430,5318,B-plus,AA9skillz,1432948,323783596 | |
460,2944,B-plus,Achievement Hunter,1258943,309111013 | |
458,1686122,C-and-D,AdvertisingMZ,9582,309091356 | |
381,964,A,Afreim,3017030,365152536 | |
481,3177,B-plus,AJ3,1209291,298600504 | |
91,3353,B-plus,aLexBY11,6593009,1025986329 |
Year,Winner_s_avg_speed,Total_distance_km,Number_of_stages,Finishers,Entrants,Winner,Winner_s_Nationality,Winner_s_Team,Start_Date,End_Date,Starting_city,Starting_city_Latitude,Starting_city_Longitude,Starting_country,Finishing_city,Finishing_city_Latitude,Finishing_city_Longitude | |
1903,25.68,2428.00,6.00,21.00,60.00,Maurice Garin,France,La Française,01/07/1903,21/07/1903,Paris,48.8566,2.3522,France,Paris,48.8566,2.3522 | |
1904,25.27,2420.00,6.00,27.00,88.00,Henri Cornet,France,Cycles JC,02/07/1904,24/07/1904,Paris,48.8566,2.3522,France,Paris,48.8566,2.3522 | |
1905,27.11,2994.00,11.00,24.00,60.00,Louis Trousselier,France,Cycles Peugeot,09/07/1905,30/07/1905,Paris,48.8566,2.3522,France,Paris,48.8566,2.3522 | |
1906,24.46,4545.00,13.00,14.00,82.00,René Pottier,France,Cycles Peugeot,04/07/1906,29/07/1906,Paris,48.8566,2.3522,France,Paris,48.8566,2.3522 | |
1907,28.47,4488.00,14.00,33.00,93.00,Lucien Petit-Breton,France,Cycles Peugeot,08/07/1907,04/08/1907,Paris,48.8566,2.3522,France,Paris,48.8566,2.3522 | |
1908,28.74,4488.00,14.0 |
Series 1;Series 2;Series 3;Series 4;Series 5;Series 6;Series 7 | |
0,837;1,438;-1,629;0,916;-0,138;-0,234;9,087 | |
0,032;1,059;-1,175;-0,394;-0,486;-0,286;8,895 | |
0,488;-0,165;0,455;-2,384;-0,924;0,468;9,478 | |
0,744;-1,268;2,141;-3,112;-1,757;-1,865;7,426 | |
0,197;-1,256;2,119;-4,593;-0,199;-0,911;7,261 | |
-0,181;-0,669;-0,323;-6,848;0,953;-1,218;6,408 | |
-0,116;-0,364;-2,178;-12,048;-0,730;-0,129;6,766 | |
-1,059;-0,744;-4,479;-18,241;-0,116;0,847;7,664 | |
1,173;-1,646;-4,914;-26,297;-0,698;0,549;7,874 |
### We have selected a dataset about statistics of the Tour de France results, from 1903 to 2016. | |
### The dataset has been selected from this list: [Tour de France Dataset](http://www.makeovermonday.co.uk/data/data-sets-2017/). | |
### All documents of this project can be found on GitHub: [Assignment 01 - GitHub](https://github.com/ashomah/Data-Vizualization-Course/tree/master/Assignment%2001%20-%20R). | |
### The code can be found on GitHub as a Gist: [Assignment 01 - Gist](https://gist.github.com/ashomah/a4d041e1965c4b41e783228a9c43fc06). | |
# INSTALL AND LOAD PACKAGES ---- | |
packages_list <- c('ggplot2', | |
'ggalt', |
license: mit |
Year,Winner's avg speed,Total distance (km),Number of stages,Finishers,Entrants,Winner,Winner's Nationality,Winner's Team,Start Date,End Date,Starting city,Starting city Latitude,Starting city Longitude,Starting country,Finishing city,Finishing city Latitude,Finishing city Longitude | |
1903,25.68,2428.00,6.00,21.00,60.00,Maurice Garin,France,La Française,01/07/1903,21/07/1903,Paris,48.8566,2.3522,France,Paris,48.8566,2.3522 | |
1904,25.27,2420.00,6.00,27.00,88.00,Henri Cornet,France,Cycles JC,02/07/1904,24/07/1904,Paris,48.8566,2.3522,France,Paris,48.8566,2.3522 | |
1905,27.11,2994.00,11.00,24.00,60.00,Louis Trousselier,France,Cycles Peugeot,09/07/1905,30/07/1905,Paris,48.8566,2.3522,France,Paris,48.8566,2.3522 | |
1906,24.46,4545.00,13.00,14.00,82.00,René Pottier,France,Cycles Peugeot,04/07/1906,29/07/1906,Paris,48.8566,2.3522,France,Paris,48.8566,2.3522 | |
1907,28.47,4488.00,14.00,33.00,93.00,Lucien Petit-Breton,France,Cycles Peugeot,08/07/1907,04/08/1907,Paris,48.8566,2.3522,France,Paris,48.8566,2.3522 | |
1908,28.74,4488.00,14 |