Using SQLite within Python to create database and analyze Starcraft 2 units data (Pandas also used)

Overview

SQLite python Starcraft 2

English

This project shows the usage of SQLite with python.

To create, modify and communicate with the SQLite database from within python I'll use the SQLite3 library that comes by default with python.

The content of the database I'll be working on will be statistics of the units from the Starcraft 2 game. Reason being that working with some mock data is not that interesting to me, so in order to keep it more interesting and not just create dummy 'customer' or 'celebrity' tables I will create a table where I INSERT few of the terran units with simplified stats.

Starcraft 2 is an RTS (Real Time Strategy) game, where the commander(player) controls various kinds of units. The goal of the game is to build attacking units to destroy all of the opponents buildings. To achieve that goal one can improve one's economy by creating more workers and expand to more bases. That's where statistics of the units come into play. The damage, speed, etc. of each unit has profound effect on the game and that's what I want to explore.

There are several jupyter notebooks that either do the actual SQL modifications or perform tasks that are needed for the SQL work (like spraping page of liquipedia using pandas and 'exporting' it to a SQLite database).

Here is the description of what do I actually do in each notebook.

SQLite_basic_operations_SC2units.ipynb

Here I create some close to real data for Starcraft 2 terran units. I create a database and enter 4 rows each corresponding to one unit type, with 5 columns, including name and excluding rowid. In reality terran race in Starcraft 2 has about 23 units (depends on what you actually count as a unit or as a building) and each unit has close to 20 characterists, depending on race (which boil down to columns in a Starcraft 2 game).

This mock data is saved in the data/sc2_basic_units.db file.

Here I want to show basic SQL skills that are most basic and most commonly used but the data is mock data (even though it's based on real data). In this notebook I'm not exploring or solving any real problem. Just basic SQL stuff :)

units_sc2_scraping.ipynb

Here I scrape data from the Liquipedia website section with all the data about Starcraft 2 units. Liquipedia is one of the best encyclopedias about Starcraft franchise and other esport games. Below is the exact address of the scraped page: https://liquipedia.net/starcraft2/Unit_Statistics_(Legacy_of_the_Void)

The data is saved in the sc2_data.db. Here the goal is just to get the data of the webpage and save it to the database. I'll actually work on the data in the next notebook.

Polski

Starcraft 2 jest grą RTS (Strategia czasu rzeczywistego) gdzie gracz zarządza jedną z trzech ras. Celem gry jest wytrenowanie jednostek atakujących w celu zniczszenia budynków przeciwnika. Gracz może zwiększyć swoje zasoby poprzez tworzenie więcej jednostek zbierających zasoby i rozbudowania swojej bazy. W tym zeszycie będę dodawał wiersze do tabeli terran_units odpowiadające uproszczonym statystykom 4 jednostek terrana.

The repository is my code for various types of data visualization cases based on the Matplotlib library.

ScienceGallery The repository is my code for various types of data visualization cases based on the Matplotlib library. It summarizes the code and cas

Warrick Xu 2 Apr 20, 2022
Python script to generate a visualization of various sorting algorithms, image or video.

sorting_algo_visualizer Python script to generate a visualization of various sorting algorithms, image or video.

146 Nov 12, 2022
Matplotlib JOTA style for making figures

Matplotlib JOTA style for making figures This repo has Matplotlib JOTA style to format plots and figures for publications and presentation.

JOTA JORNALISMO 2 May 05, 2022
Chem: collection of mostly python code for molecular visualization, QM/MM, FEP, etc

chem: collection of mostly python code for molecular visualization, QM/MM, FEP,

5 Sep 02, 2022
Certificate generating and sending system written in Python.

Certificate Generator & Sender How to use git clone https://github.com/saadhaxxan/Certificate-Generator-Sender.git cd Certificate-Generator-Sender Add

Saad Hassan 11 Dec 01, 2022
A program that analyzes data from inertia measurement units installed in aircraft and generates g-exceedance curves.

A program that analyzes data from inertia measurement units installed in aircraft and generates g-exceedance curves.

Pooya 1 Dec 02, 2021
EPViz is a tool to aid researchers in developing, validating, and reporting their predictive modeling outputs.

EPViz (EEG Prediction Visualizer) EPViz is a tool to aid researchers in developing, validating, and reporting their predictive modeling outputs. A lig

Jeff 2 Oct 19, 2022
Easily convert matplotlib plots from Python into interactive Leaflet web maps.

mplleaflet mplleaflet is a Python library that converts a matplotlib plot into a webpage containing a pannable, zoomable Leaflet map. It can also embe

Jacob Wasserman 502 Dec 28, 2022
Lightspin AWS IAM Vulnerability Scanner

Red-Shadow Lightspin AWS IAM Vulnerability Scanner Description Scan your AWS IAM Configuration for shadow admins in AWS IAM based on misconfigured den

Lightspin 90 Dec 14, 2022
Fast 1D and 2D histogram functions in Python

About Sometimes you just want to compute simple 1D or 2D histograms with regular bins. Fast. No nonsense. Numpy's histogram functions are versatile, a

Thomas Robitaille 237 Dec 18, 2022
A central task in drug discovery is searching, screening, and organizing large chemical databases

A central task in drug discovery is searching, screening, and organizing large chemical databases. Here, we implement clustering on molecular similarity. We support multiple methods to provide a inte

NVIDIA Corporation 124 Jan 07, 2023
Generate a 3D Skyline in STL format and a OpenSCAD file from Gitlab contributions

Your Gitlab's contributions in a 3D Skyline gitlab-skyline is a Python command to generate a skyline figure from Gitlab contributions as Github did at

Félix Gómez 70 Dec 22, 2022
Typical: Fast, simple, & correct data-validation using Python 3 typing.

typical: Python's Typing Toolkit Introduction Typical is a library devoted to runtime analysis, inference, validation, and enforcement of Python types

Sean 171 Jan 02, 2023
WhatsApp Chat Analyzer is a WebApp and it can be used by anyone to analyze their chat. 😄

WhatsApp-Chat-Analyzer You can view the working project here. WhatsApp chat Analyzer is a WebApp where anyone either tech or non-tech person can analy

Prem Chandra Singh 26 Nov 02, 2022
This is a Boids Simulation, written in Python with Pygame.

PyNBoids A Python Boids Simulation This is a Boids simulation, written in Python3, with Pygame2 and NumPy. To use: Save the pynboids_sp.py file (and n

Nik 17 Dec 18, 2022
A programming language built on top of Python to easily allow Swahili speakers to get started with programming without ever knowing English

pyswahili A programming language built over Python to easily allow swahili speakers to get started with programming without ever knowing english pyswa

Jordan Kalebu 72 Dec 15, 2022
Function Plotter: a simple application with GUI to plot mathematical functions

Function-Plotter Function Plotter is a simple application with GUI to plot mathe

Mohamed Nabawe 4 Jan 03, 2022
Generate knowledge graphs with interesting geometries, like lattices

Geometric Graphs Generate knowledge graphs with interesting geometries, like lattices. Works on Python 3.9+ because it uses cool new features. Get out

Charles Tapley Hoyt 5 Jan 03, 2022
Visualizations of some specific solutions of different differential equations.

Diff_sims Visualizations of some specific solutions of different differential equations. Heat Equation in 1 Dimension (A very beautiful and elegant ex

2 Jan 13, 2022