• Stars
    star
    130
  • Rank 277,575 (Top 6 %)
  • Language
    Jupyter Notebook
  • License
    MIT License
  • Created about 6 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Practice basic SQL syntax with Jupyter notebook. SQL is particularly useful in handling structured data where there are relations between different entities/variables of the data. SQL is a very important tool for data scientists to have in their repertoire.

Practice-SQL-with-SQLite-and-Jupyter-Notebook

Practice basic SQL syntax with Jupyter notebook. SQL is particularly useful in handling structured data where there are relations between different entities/variables of the data. SQL is a very important tool for data scientists to have in their repertoire.

In this tutorial, we will practice

  1. How to create/connect a SQLite database
  2. How to create a table from scratch/from an existing table
  3. How to drop a table
  4. How to insert data into/update a table
  5. How to retrieve data
  6. How to do maths across table columns
  7. How to aggregate data
  8. How to join tables
  9. How to create/drop views to simplify queries
  10. How to deal with NULLs
  11. How to convert query results into Pandas's DataFrame
  12. How to rollback and commit a transaction (this one used the sqlite3 package as ipython_sql does not support transactions).
  13. (Bonus)How to access a SQLite database directly with Pandas
  14. Dealing with date and time.

It is worth noting that this tutorial mainly focuses on how to retrieve data from a database, instead of database management. That is also why we slected SQLite rather than more complicated Databases such as MySQL or PostgreSQL, etc.

Moreover, this SQLite tutorial would not cover everything about SQLite. Some important features are left to be explored by users such as triger and tansaction, primary or foreigh index, etc.

The most efficient way to master SQL is to keep practicing through extensive hands-on practices. Hope that you could start using SQLite effectively and comfortably.

April/2021

Window Functions based on the latest version of SQLite and add an extra tutorial

  1. s03-Window Functions within SQLite

More Repositories

1

Python-Practical-Application-on-Climate-Variability-Studies

This tutorial is a companion volume of Matlab versionm but add more. Main objective is the transference of know-how in practical applications and management of statistical tools commonly used to explore meteorological time series, focusing on applications to study issues related with the climate variability and climate change. This tutorial starts with some basic statistic for time series analysis as estimation of means, anomalies, standard deviation, correlations, arriving the estimation of particular climate indexes (NiΓ±o 3), detrending single time series and decomposition of time series, filtering, interpolation of climate variables on regular or irregular grids, leading modes of climate variability (EOF or HHT), signal processing in the climate system (spectral and wavelet analysis). In addition, this tutorial also deals with different data formats such as CSV, NetCDF, Binary, and matlab'mat, etc. It is assumed that you have basic knowledge and understanding of statistics and Python.
Jupyter Notebook
231
star
2

A-Beginner-Guide-to-Carry-out-Extreme-Value-Analysis-with-Codes-in-Python

A beginner's guide to carry out extreme value analysis, which consists of basic steps, multiple distribution fitting, confidential intervals, IDF/DDF, and a simple application of IDF information for roof drainage design. The guide mainly focuses on extreme rainfall analysis. However, the basic steps are also suitable for other climatic or hydrologic variables such as temperature, wind speed or runoff.
Jupyter Notebook
50
star
3

Work-with-DEM-data-using-Python-from-Simple-to-Complicated

Work with DEM data using Python from Simple to Complicated. Many python packages will be touched such as GDAL, numpy, xarray, rasterio, folium, cartopy, geopandas etc.
Jupyter Notebook
46
star
4

Calculate-Precipitation-based-Agricultural-Drought-Indices-with-Python

Precipitation-based indices are generally considered as the simplest indices because they are calculated solely based on long-term rainfall records that are often available. The mostly used precipitation-based indices consist of Decile Index (DI) Hutchinson Drought Severity Index (HDSI) Percen of Normal Index (PNI) Z-Score Index (ZSI) China-Z Index (CZI) Modified China-Z Index (MCZI) Rainfall Anomaly Index (RAI) Effective Drought Index (EDI) Standardized Precipitation Index (SPI).
Jupyter Notebook
30
star
5

Overlay-GeoTiff-Raster-with-nodata-On-Interactive-Map

Overlay a GeoTiff raster data on Interactive map created by folium python. This tutorial will finish three tasks: (1) Export a NetCDF data to a time series of geotiff images.; (2) Overlay a geotiff raster onto an interactive map created by folium python; (3) Create a custom OpenStreetMap tile server on a local machine with docker.
Jupyter Notebook
11
star
6

pySQLiteSWAT

This is a part of the training material of capacity building for hydrological modeling under climate change based on SWAT. In this part, SWAT simulations are post-processed by python-based tools such as Pandas, GeoPandas, PySAL, folium, etc.
Jupyter Notebook
7
star
7

pyFastAPI_PointsInPolygons

A Tutorial shows how to build simple Point-In-Polygon(PIP) Web API using FastAPI and other python packages.
Jupyter Notebook
5
star
8

FastAPI-Zarr-Xarray-Dask

A demo of FastAPI application to extract data at the specific points defined by [latitudes and longitudes] from a zarr dataset using Dask and Xarray. The key aim to speed up point data extraction from data in zarr formats using dask's local cluster.
Python
4
star
9

pyRaster2GeoTiff

A piece of Python code to convert rater data such as NetCDF to GeoTIFF format. The code was extracted from my LinkedIn article at https://www.linkedin.com/pulse/convert-netcdf4-file-geotiff-using-python-chonghua-yin/
Python
3
star
10

fortran-ls-svm

Support Vector Machine aplication written in fortran 90
Fortran
2
star
11

Fill-Missing-Values

Functions used to fill missing values in a 2D array or matrix. Mostly written by Fortran.
Fortran
2
star
12

Explain-100-Year-Weather-Events-with-Python

Jupyter Notebook
1
star
13

Create-Concise-Charts-for-Reporting

Some practical tutorials for creating concise charts for project summary reporting. At present, only focus on Line and Bar Charts. It might be extended in the future
1
star
14

DockerMet

Using Docker Compose to rapidly deploy a Jupyter Notebook environment for processing meteorological and climatic data. The Dockerfile was created based on the data-science stack image from Jupyter project. Besides default tools and packages, only added several met-clim specific packages such as xarray and dask for netCDF, sfgrib for Grib1/2, and MetPy for met.
Jupyter Notebook
1
star
15

myEvaPy

Using Numba.njit to speed up extreme value analysis (EVA)
Jupyter Notebook
1
star