SQLite as a Tool for Analysis or Small Data is Good for Research

Hi, I’d like to share my guided project " Analyzing CIA Factbook Data Using SQL".

I really enjoyed working on it. I’m not exactly new to using SQL, although my experience is limited. And I’m used to classic SQL. So, at first I got syntax errors one after another, but then it seems that SQLite and I found an understanding of each other.
However, I’d like feedback on the style of my queries, how to deal with this first line error, and whether I was correct in my conclusions.
And, of course, I would appreciate any word about my sqls.

Guided Project_ Analyzing CIA Factbook Data Using SQL.tar (201.5 KB)

SQL_Project_Guided_#One.ipynb (65.0 KB)

Click here to view the jupyter notebook file in a new tab

EDITED based on the feedback:
Click here to view the jupyter notebook file in a new tab

3 Likes

Hello @sv.dolgushina
Thank you for sharing your project. At first glance, the presentation is amazing, the code looks great and awesome explanations.

  • Feedback on SQL Style: The style is great. But for most SQL developers, we usually write SQL commands in UPPER CASE. For me, I usually follow the https://www.sqlstyle.guide/ that guides in terms of STYLING and the GUIDES to follow when writing an SQL code.
  • Eliminating the error in the first line: You can eliminate this by ignoring warnings using the warnings python package (check the documentation)
import warnings
warnings.filterwarnings("ignore")

1 Like

Oh, thank you, it really works. There is the updated project:

SQL_Project_Guided_#One.ipynb (64.6 KB)

About the SQL Style.
Yes, UPPER CASE is a classic. I used it from the very beginning always and everywhere, even in my first steps in Python and JavaScript up to this project. Here I have tried modern style:

Modern SQL Style Guide · GitHub.

It looks unusual, but it seems to work better. Code with UPPER CASE stays plain. In lower case, it is highlined and indents are set automatically. I couldn’t deal with errors in a couple of cells until I set it to lower case (and double ‘-’ instead of old-fashion ‘#’ for comments).

By the way, in Googe Colab for PostgresSQL DB, this also work better:

image.

Thank you for your feedback again.

Click here to view the jupyter notebook file in a new tab

2 Likes