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.

A Python library for plotting hockey rinks with Matplotlib.

Hockey Rink A Python library for plotting hockey rinks with Matplotlib. Installation pip install hockey_rink Current Rinks The following shows the cus

24 Jan 02, 2023
Gallery of applications built using bqplot and widget libraries like ipywidgets, ipydatagrid etc.

bqplot Gallery This is a gallery of bqplot examples. View the gallery at https://bqplot.github.io/bqplot-gallery. Contributing new examples Clone this

8 Aug 23, 2022
Type-safe YAML parser and validator.

StrictYAML StrictYAML is a type-safe YAML parser that parses and validates a restricted subset of the YAML specification. Priorities: Beautiful API Re

Colm O'Connor 1.2k Jan 04, 2023
:art: Diagram as Code for prototyping cloud system architectures

Diagrams Diagram as Code. Diagrams lets you draw the cloud system architecture in Python code. It was born for prototyping a new system architecture d

MinJae Kwon 27.5k Dec 30, 2022
哔咔漫画window客户端,界面使用PySide2,已实现分类、搜索、收藏夹、下载、在线观看、waifu2x等功能。

picacomic-windows 哔咔漫画window客户端,界面使用PySide2,已实现分类、搜索、收藏夹、下载、在线观看等功能。 功能介绍 登陆分流,还原安卓端的三个分流入口 分类,搜索,排行,收藏夹使用同一的逻辑,滚轮下滑自动加载下一页,双击打开 漫画详情,章节列表和评论列表 下载功能,目

1.8k Dec 31, 2022
100 data puzzles for pandas, ranging from short and simple to super tricky (60% complete)

100 pandas puzzles Puzzles notebook Solutions notebook Inspired by 100 Numpy exerises, here are 100* short puzzles for testing your knowledge of panda

Alex Riley 1.9k Jan 08, 2023
Manim is an animation engine for explanatory math videos.

A community-maintained Python framework for creating mathematical animations.

12.4k Dec 30, 2022
A small script written in Python3 that generates a visual representation of the Mandelbrot set.

Mandelbrot Set Generator A small script written in Python3 that generates a visual representation of the Mandelbrot set. Abstract The colors in the ou

1 Dec 28, 2021
Python+Numpy+OpenGL: fast, scalable and beautiful scientific visualization

Python+Numpy+OpenGL: fast, scalable and beautiful scientific visualization

Glumpy 1.1k Jan 05, 2023
Personal IMDB Graphs with Bokeh

Personal IMDB Graphs with Bokeh Do you like watching movies and also rate all of them in IMDB? Would you like to look at your IMDB stats based on your

2 Dec 15, 2021
Learn Data Science with focus on adding value with the most efficient tech stack.

DataScienceWithPython Get started with Data Science with Python An engaging journey to become a Data Scientist with Python TL;DR Download all Jupyter

Learn Python with Rune 110 Dec 22, 2022
Movies-chart - A CLI app gets the top 250 movies of all time from imdb.com and the top 100 movies from rottentomatoes.com

movies-chart This CLI app gets the top 250 movies of all time from imdb.com and

3 Feb 17, 2022
Extract data from ThousandEyes REST API and visualize it on your customized Grafana Dashboard.

ThousandEyes Grafana Dashboard Extract data from the ThousandEyes REST API and visualize it on your customized Grafana Dashboard. Deploy Grafana, Infl

Flo Pachinger 16 Nov 26, 2022
AB-test-analyzer - Python class to perform AB test analysis

AB-test-analyzer Python class to perform AB test analysis Overview This repo con

13 Jul 16, 2022
🧇 Make Waffle Charts in Python.

PyWaffle PyWaffle is an open source, MIT-licensed Python package for plotting waffle charts. It provides a Figure constructor class Waffle, which coul

Guangyang Li 528 Jan 02, 2023
Use Perspective to create the chart for the trader’s dashboard

Task Overview | Installation Instructions | Link to Module 3 Introduction Experience Technology at JP Morgan Chase Try out what real work is like in t

Abdulazeez Jimoh 1 Jan 22, 2022
Ana's Portfolio

Ana's Portfolio ✌️ Welcome to my Portfolio! You will find here different Projects I have worked on (from scratch) 💪 Projects 💻 1️⃣ Hangman game (Mad

Ana Katherine Cortes Sobrino 9 Mar 15, 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
Political elections, appointment, analysis and visualization in Python

Political elections, appointment, analysis and visualization in Python poli-sci-kit is a Python package for political science appointment and election

Andrew Tavis McAllister 9 Dec 01, 2022
Customizing Visual Styles in Plotly

Customizing Visual Styles in Plotly Code for a workshop originally developed for an Unconference session during the Outlier Conference hosted by Data

Data Design Dimension 9 Aug 03, 2022