Data is Fun

Where data is fun.

June 06, 2020

Aggregate SQL Functions

Count
Sum
Avg
Max/Min

Examples:

Count

Count the number of records in a column or table. Examples:

  • Select count(*) from table;
  • Select count (column) from table;

Count (*) will give you count of all rows – even if some values are null. Counting the column won’t count the null ones

Sum

Sum, or add all the values in the column.

  • Select sum(column) from table;

Avg

Calculate the average.

  • Select avg (column) from table;

Max

Find the maximum/highest/ biggest #.

  • Select max(column) from table;

Min

Find the minimum/ smallest/lowest #.

  • Select min(column) from table;

May 04, 2020

BBQing in NYC

Locations in NYC Boroughs where one can BBQ. Note: BBQing Location is approximate as the latitude and longitude is that of the park. Not necessarly the exact BBQ location.

Originally DataisFun made a similar post with just the Manhattan locations. It’s now expanded to include all the Boroughs. One thing to note is that this includes the locations in NYC parks. If you wanted to BBQ maybe your apt. building or hotel would have BBQ access. (Probably unlikely, but possible).

Another option is Governor’s Island (GI). While it’s not part of the parks department it offers another way of BBQing in Manhattan.

Governor’s Island allows charcoal grills ( no propane). They can be reserved with a permit. For $26 permit it’s an inexpensive way of having a BBQ with friends, or you could just have a bbq in one of the NYC parks.

Data Source: https://www.nycgovparks.org/facilities/barbecue
BBQ icon: made by Freepik from www.flaticon.com

April 30, 2020

Tree requests in NYC

Was a new tree requested in your neighborhood?

April 20, 2020

Queens Public Libraries

There are 5 boroughs in NYC: Queens, Brooklyn, Bronx, Staten Island, Manhattan. One might think they have 1 library system however there are 3:

  • New York Public Library: Serves Manhattan, Bronx, Staten Island
  • Brooklyn Public library – Serves Brooklyn
  • Queens Public library – Serves Queens

This is a visualization of library branches in Queens open on Sunday. One can also un-filter to see branches open all days.

Why visualize Queens and why Sunday?

Even though the Library systems are separate New Yorkers can join all 3.

Why Queens?

Decided to start with Queens since the dataset was available.

Why Sunday?

Although there are 65 locations in Queens only 3 of them are open on Sundays. This is a little less than 5%.

Individuals have varying schedules and it’s interesting that so many locations are closed on Sundays. One might think Saturday and Sunday would be the days with the highest utilization because those that work a M-F job could visit on the weekend.

April 13, 2020

Fire Hydrants in NYC

Preview(opens in a new tab)

Data Source: https://data.cityofnewyork.us/Environment/Hydrants-of-the-City-of-New-York/6pui-xhxz

Fire Hydrant icon : Icons made by Freepik from Flaticon https://www.flaticon.com/

Locations of Fire Hydrants in NYC mapped:

An example of a data quality issue with a dataset. There are only 5 Boroughs in NYC, but the dataset listed 6. Forty (40) data points were not in one of the 5 boroughs. These were classified as borough ‘Unknown’. Based on where they are located on the Map maybe they are located in Nassau County? The dataset doesn’t include any information about borough 6.

April 10, 2020

NYC Firehouse Locations

Fire truck Icon made by Freepik from www.flaticon.com

Data Source: https://data.cityofnewyork.us/Public-Safety/FDNY-Firehouse-Listing/hc8x-tcnd

Mapped Locations of Fire Houses in NYC. Map coloring shows 2018 Household Income (median) by Zip.