Giter Site home page Giter Site logo

konkarras / housing-data-cleaning Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 1.0 5.78 MB

Execution of data cleaning procedures in SQL, aiming to manipulate a dataset coming from the housing industry and transform it to a form suitable for further analysis.

data-analysis data-cleaning nashville-housing-data sql

housing-data-cleaning's Introduction

Housing Data Cleaning

Project focused on cleaning the dataset found in the .xlsx file, which contains information about the housing market in Nashville.

After importing that file in SSMS and creating the 'NashvilleHousing' table on which we will be working, we start by displaying and checking the raw data.

Now we are ready to continue with the following steps-procedures:

  1. 'SaleDate' column: arranging values so that only the date is displayed, without the time (using the CONVERT function),

  2. 'PropertyAddress' column: replacing null values with corresponding values from other rows with the same Parcel ID (using the ISNULL function),

  3. 'PropertyAddress' column: diving the column into two new ones where the Address and the City are separated (using the SUBSTRING function),

  4. 'OwnerAddress' column: diving the column into three new ones where the Address, the City and the State are separated (using the PARSENAME function),

  5. 'SoldAsVacant' column: replacing the 'Y' and 'N' values with 'Yes' and 'No' respectively (using a CASE statement),

  6. Removing Duplicates: making use of the ROW_NUMBER function, based on specific columns and ordered by the Unique ID, all included in a CTE (Common Table Expression), in order to identify and delete duplicate values,

  7. Useless Columns: getting rid of the 'SaleDate', 'PropertyAddress' and 'OwnerAddress' columns, which we already manipulated, as well as the 'TaxDistrict' column, which bares no usefull information and

  8. Final Check: simply taking a final look of the updated and cleaned table.

Results

After all those manipulation and cleaning procedures, the original dataset, which initially consisted of 56477 rows, ends up in a table format, including 56373 rows. In conclusion, we can confidently claim that we cleaned the dataset efficiently enough and brought in a format suitable for future analysis, by only missing 104 rows or the 0.002% of the raw data.

housing-data-cleaning's People

Contributors

konkarras avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

flnzba

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.