top of page

London Bikes Analysis

This project involves the analysis of a London bike-sharing dataset sourced from Kaggle. The dataset provides insights into bike-sharing patterns in London, including weather conditions, seasons, and usage statistics. The project focuses on data cleaning and transformation to prepare the dataset for visualizations in Tableau.

DALL·E 2024-01-29 16.48.58 - Create an image featuring the theme of London bikes. The imag

This data cleaning and transformation process involved making the dataset more readable and suitable for visualization in Tableau. The dataset was enriched with descriptive column names, adjusted values, and mapped categorical values, ensuring it's ready for meaningful and insightful visualizations in Tableau.

​

Data Retrieval and Preparation

To embark on this data adventure, we harnessed the power of Python and its libraries: pandas, zipfile, and kaggle. These tools allowed us to work with data efficiently, extract files from archives, and access datasets from Kaggle with ease.

​

​

​

​

​

​

 

Data Download from Kaggle

With our tools in hand, we downloaded the London bike-sharing dataset directly from Kaggle. This seamless process was facilitated by the Kaggle API.

​

​

​

​

Data Extraction

After obtaining the dataset, we unzipped the downloaded file, revealing the treasure trove of data hidden within.

​

​

​

​

 

Data Loading 

Our next move was to load the dataset into a Pandas DataFrame that we named 'bikes.' This allowed us to dive into the heart of the data and understand its structure. 

​

​

​

​

Data Exploration

Once we had our dataset comfortably nestled within the 'bikes' DataFrame, we utilized the bikes.info() command as our initial step into this exploration journey.

​

​

​

Output:

​

​

​

​

​

​

​

​

​

​

​

​

Inference: 

  • Each column has 17,414 non-null entries, matching the total number of entries in the dataset. This indicates that there are no missing values in any of the columns, which is a positive sign, as it suggests the data is clean and may not require extensive preprocessing for handling missing values.

 

Then, we employ bikes.shape to ascertain the dimensions of the 'bikes' DataFrame, effectively revealing the total count of rows and columns within our dataset.

​

​

​

​

Next, we delve into specific attributes of our dataset by using bikes.weather_code.value_counts() and bikes.season.value_counts(). These commands are instrumental in quantifying the distinct occurrences within the 'weather_code' and 'season' columns, offering us a clearer insight into the diversity and frequency of weather conditions and seasons represented in our data.

  • Weather 

​

​

​

Output:

​

​

​

​

​

​

​​

​

  • Season

​

​

​

Output:

​

​

​

​

​

​

 

Data Cleaning and Column Renaming

We started tidying up our dataset by renaming the columns for clarity. We crafted a dictionary that served as our guide to replace cryptic column names with meaningful and easily understood alternatives. The Pandas 'rename' method was our ally, efficiently applying these changes. For instance, we transformed 'timestamp' into 'time' and 'cnt' into 'count,' enhancing the clarity of our data.

​

​

​

​

​

​

​

​

​

​

 

Data Transformation

During the transformation phase, we turned our focus to refining the humidity values. To provide a consistent and user-friendly representation, we converted these values into percentages. This small but significant change made the data more interpretable.

​

​

​

Data Mapping

We dived into data mapping, using handy dictionaries to convert numeric codes into plain, easy-to-read labels. This simple step made the dataset much more user-friendly. One dictionary turned those plain integers (0-3) into friendly season names like 'spring,' while another gave those mysterious weather codes a makeover into familiar weather descriptions like 'Clear.

​

​

​

​

​

​

​

​

​

​

​

​

​

​

​

​

​

Data Export for Visualization

Our journey concluded with a mission to prepare the dataset for visual storytelling. We saved our cleaned and transformed DataFrame into an Excel file. This digital tome was dedicated to 'Data,' where it would serve as the foundation for in-depth analysis and captivating visualizations in Tableau.

​

​

 

 

Click on the picture to open the dashboard and try it out 

​

​

​

London_Bike.png
bottom of page