MySQL Practices for Data Analysis

This repository focuses on creating different queries for Data Analysis and SQL practice. A Tableu Project was made from the data given from this Repo and was downloaded August 2023.

Data

The data given was from COVID in which we can devide into vaccination data and deaths data in CSV files. Date formatting was given in Excel in order to have YYYY-MM-DD insted of DD/MM/YYYY for SQL purposes.

  • (Home -> Number -> Date).

Data Exploration

Data exploration is important to understand the context of a problem and find patterns in a given dataset. the query file contains different ways to visualize the table for different purposes and exploration. Data Exploration

Importing Data

Some workbench can import CSV files pretty easy and rapidly, on my case I used MySQL Workbench CE 8.0 and was not allowed to import it smoothly so the cvs2sql script on Utili' folder converts CSV to SQL files. (Keep in mind that the data types are all TEXT and require to change the type or cast it altering the tables).

  • Run the 'deaths.sql' and 'vaccs.sql' query to import the data or import directly the CSV.

Data Visualization

Visualizing the data is important to perform different analysis and get to conclusions. Therefore, a map was created with Tableau in which we can see the countries in which more cases and deaths were registered. The redd-ish countries got more deaths than the white-ish ones. Map

Connecting to Python Script

While getting started it is important to understand de basics of DBA and MySQL functions. Using the Utils/SQL_Connection.py script you can get an insight on how to connect you Data Base to a python script and if wanted, manipulated the data. Utils/Graph.py is used in order to graph the data given a query written in the python script, this query will give us the total deaths per day in a country. MexicoGraph

Bibliography

Edouard Mathieu, Hannah Ritchie, Lucas Rodés-Guirao, Cameron Appel, Charlie Giattino, Joe Hasell, Bobbie Macdonald, Saloni Dattani, Diana Beltekian, Esteban Ortiz-Ospina and Max Roser (2020) - "Coronavirus Pandemic (COVID-19)". Published online at OurWorldInData.org. Retrieved from: 'https://ourworldindata.org/coronavirus' [Online Resource]