Introduction
In this article, we'll walk through the process of acquiring real geographical data from Kaggle, loading it into QGIS as a CSV layer, and seamlessly integrating it with PostGIS for advanced spatial analysis.
Technical Guide
1. Prepare Data from Kaggle Datasets:
- Navigate to Kaggle Datasets (https://www.kaggle.com/datasets) and explore the vast collection of available datasets.
- Use the search functionality to find geographical datasets relevant to your area of interest. Whether it's demographic data, transportation networks, or environmental parameters, Kaggle likely has what you need.
- Select a dataset that suits your project requirements and download it in CSV format. Ensure that the dataset contains geographical attributes such as latitude and longitude or shapefiles for spatial analysis.
In this article, we will use Riyadh Restaurants Dataset

Then download it


2. Open QGIS and Add your Base map:
- You can Access Tabaqat's free base maps (https://platform.tabaqat.net/base-maps) to enhance the visual representation of your geographical data for Saudi Arabia within QGIS.
- Tabaqat offers a variety of base map styles, including street maps, satellite imagery, and terrain maps, enabling you to choose the most suitable backdrop for your analysis.
- Integrate the Tabaqat base map with your QGIS project to provide context to your geographical data and facilitate spatial interpretation.

Then Copy the WMTS URL Note Obtain your access_token by signing up and replace it on URL before using it for example

Then add the base map to your QGIS Project


Congrats

3. Add CSV as a Layer:
- Launch QGIS, create new project.
- Use the 'Add Layer' button to import the CSV file you

Navigate to the downloaded dataset in file name input and select your file

Your Data is Ready

4. Load Data to PostGIS:
- PostGIS, an extension of PostgreSQL, is a spatial database that allows for advanced storage, retrieval, and analysis of geographical data.
- Before loading data into PostGIS, ensure that you have PostgreSQL and PostGIS installed on your system, or you can Get Free PostGIS Hosted on the Cloud From SupaBase, check this article for more info: (Getting a free PostGIS database in the Cloud).

Then enter your credential and test the connection

Now Drag and Drop Time!!

Congrats, your data imported to PostGIS Successfully!
Conclusion
This guide showed how to obtain real geographical data from Kaggle, visualize it in QGIS, and integrate it with PostGIS for advanced spatial analysis.