SQL : PostgreSQL

  Aggregate Functions Like most other relational database products,  PostgreSQL  supports  aggregate functions . An aggregate function computes a single result from multiple input rows. For example, there are aggregates to compute the  count ,  sum ,  avg  (average),  max  (maximum) and  min  (minimum) over a set of rows. As an example, we can find the highest low-temperature reading anywhere with: SELECT max(temp_lo) FROM weather; max ----- 46 (1 row) If we wanted to know what city (or cities) that reading occurred in, we might try: SELECT city FROM weather WHERE temp_lo = max(temp_lo); WRONG but this will not work since the aggregate  max  cannot be used in the  WHERE  clause. (This restriction exists because the  WHERE  clause determines which rows will be included in the aggregate calculation; so obviously it has to be evaluated before aggregate functions are computed.) However, as is o...

Public datasets

 

Exploring public datasets

Open data helps create a lot of public datasets that you can access to make data-driven decisions. Here are some resources you can use to start searching for public datasets on your own:

  • The Google Cloud Public Datasets allow data analysts access to high-demand public datasets, and make it easy to uncover insights in the cloud. 

  • The Dataset Search can help you find available datasets online with keyword searches. 

  • Kaggle has an Open Data search function that can help you find datasets to practice with.

  • Finally, BigQuery hosts 150+ public datasets you can access and use. 

Public health datasets

  1. Global Health Observatory data: You can search for datasets from this page or explore featured data collections from the World Health Organization.  

  2. The Cancer Imaging Archive (TCIA) dataset: Just like the earlier dataset, this data is hosted by the Google Cloud Public Datasets and can be uploaded to BigQuery.

  3. 1000 Genomes: This is another dataset from the Google Cloud Public resources that can be uploaded to BigQuery. 

Public climate datasets

  1. National Climatic Data Center: The NCDC Quick Links page has a selection of datasets you can explore. 

  2. NOAA Public Dataset Gallery: The NOAA Public Dataset Gallery contains a searchable collection of public datasets.

Public social-political datasets

  1. UNICEF State of the World’s Children: This dataset from UNICEF includes a collection of tables that can be downloaded.

  2. CPS Labor Force Statistics: This page contains links to several available datasets that you can explore.

  3. The Stanford Open Policing Project: This dataset can be downloaded as a .CSV file for your own use.


Comments

Popular posts from this blog

Using BigQuery / MySQL / other SQL

SQL : PostgreSQL

About spreadsheet basics