Friday, March 24, 2017

A complete list of 5,162 cities, municipalities, districts, towns, townships, villages, hamlets in Canada from Stats Canada's Census in 2016

Spreadsheet below is a complete list of 5,162 cities, municipalities, districts, towns, townships, villages, hamlets, etc. according to Statistics Canada (Stats Can) 2017, Population and Dwelling Count Highlight Tables - 2016 Census.

Spreadsheet below contains an analysis and all the Census subdivisions (CSD) for Canada, but you can get the source dataset from Statistics Canada directly (download).

But you must understand this does not include all places in Canada, for that we need 2 other datasets to be involved, the designated places and geographic place name datasets.

Firstly, what is a 
Census subdivision (CSD)?

Stats Can defines Census subdivision (CSD), but generally is term for municipalities which 
including cities, municipalities, districts, hamlets, cree village etc. 
There are
54 Census Subdivisions (CSD) types. NOT all of which are populated and thus does not show up in the Census data collected and therefore not in the spreadsheet/charts below. 

Census Subdivision (CSD) Types Table

Interesting CSDs are Summer District, Township and royalty, and Island Municipality!

List all Canadian Geographic Dimensions Datasets  

Some Interesting Finds in the CSD Dataset

There are 5,162 CSDs refering to cities, municipalities, districts, towns, townships, villages, hamlets, etc.


Funny City/Town/Township/Hamlet/Village names 

Low, Joly, Mono, Webb, Zorra, Vonda, Zelma, O'Leary, Outlook, Zeballos, Ivujivik, Markinch, Spy Hill, Tehkummah, Quispamsis, Burns Lake, Pohénégamook, Whapmagoostui, Aroostook, Asphodel-Norwood, Hoodoo No. 401, Moosomin No. 121, Happy Valley-Goose Bay, Sainte-Madeleine-de-la-Rivière-Madeleine, Sainte-Thérèse-de-Gaspé, Summer Village of Golden Days, Summer Village of Ghost Lake, Saint-Hubert-de-Rivière-du-Loup, Sainte-Catherine-de-la-Jacques-Cartier and lastly 
Saint-Louis-du-Ha! Ha! 
Find and add your favourite in comment section below. See spreadsheet below.

Other Geographic Datasets of Interest
Complete set of geography dimension listed here!
http://www12.statcan.gc.ca/census-recensement/2016/dp-pd/hlt-fst/pd-pl/comprehensive.cfm

Some Interesting Finds in the Designated Places (DPL) Dataset (download)

Designated Places (DPL) is defined as a small community that does not meet the criteria used to define municipalities (not a CSD in other words).

There are
1,629 unique Designated Places (DPL). The shortest DPL name Oba is 3 characters long.The longest DPL name is  "New Chelsea-New Melbourne-Brownsdale-Sibley's Cove-Lead Cove" at 60 characters long. 

Funny Designated Place Names

This were you find the infamous name Dildo, 
Newfoundland and Labrador

Some Interesting Finds in the Geographic Place Names Dataset (download)
 
This dataset comes from Canada Centre for Mapping and Earth Observation, Natural Resources Canada. Geographic "Place Name (PN)" refers to selected names of active and retired geographic areas as well as names from the Canadian Geographical Names Data Base. 

There are
230,549 unique geographic place namesThe shortest PN name "By" is 2 characters longThe longest PN name is  "
Lethbridge, Morley's Siding, Brooklyn, Charleston, Jamestown, Portland, Winter Brook and Sweet Bay" at 98 characters long. 
 
Funny Geographic Place Names

This were you find the infamous name "Blow Me Down", Newfoundland and Labrador.
Other fun names are; 

Also Blow Me Down Bight, Tomahawk Bay, The Boot Leg Bay, Toadstool Island, Toadasses, Toad River Hot Springs Park, Tor Mountain, Tork 7, Zoot Lake and 
Sẁiẁs Park

Neat or "Curious" Places as mention on StatsCan website

Aklaktuk Pingo (a Pingo is an isolated, conical, ice-cored mound occurring in areas of permafrost)
 
Funny Creek Names in the Geographic Place Names dataset

There is no 
Schitt's Creek in Canada, but there is Schist Creek, Schiste Creek, and Etschitka, Scherf Creek, Schimmens Creek, Amazon Creek and Blowhole Creek. Butt to top it all off, there's Mashiter Creek

This a total of 
14,447 uniquely named Creeks in all of Canada 
Interesting names ?yu?h Anta?t Teetshik Creek, 150 Yard Creek, Furry Creek, Tea, Creek, Tzela Creek, Zig Zag Creek, Xenia Creek


Fun Find
Can someone confirm these names - http://www.cbc.ca/stillstanding/blog/the-most-hilarious-town-names-in-canada (note, most of these live in 
designated places and geographic place name datasets)

Fun Quick Stats of CSD Dataset, in Spreadsheet below

There are no cities / CSDs with a name of length of 1 in Canada.
There are no 
cities /CSDs with a name of length of 2 in Canada.
There are 4 cities / CSDs with a name of length of 3 in Canada.

Table 1 
   Length  Name                                         CSD
         3   Emo Township of
 Tay Township of
 Low Township
 Oka Municipality


Some Edge Cases of City Name Lengths in Canada

Longest CSD name in Canada has 50 characters.

Indian reserve of "Buffalo River Dene Nation 193 (Peter Pond Lake 193)"

Table 2:
CSD (3x3) Edge Cases Table
Length
of
Names
          Count

3 4
4 34
5
...
145
...
47 1
49 1
51 3

Total Numbers

Total number is 354, 631 named places with repeats in all 3 data-sets, specifically 348,107 PNs + 1, 632 DPLs + 5,162 CSDs. 

There are 237,340 uniquely named places in 3 data-sets. 

(This does not represent all names on a map of Canada, for it does not not including provincial names, roads, marine names like waterways, etc.)

Fun Find
? Can someone confirm these names - http://www.cbc.ca/stillstanding/blog/the-most-hilarious-town-names-in-canada
(NOTE: Most of these live in 
designated places and geographic place name datasets)


Excel Spreadsheet of 5,162 cities, municipalities, districts, towns, townships, villages, hamlets, etc. aka CSDs in Canada according Statistics Canada 2017, Population and Dwelling Count Highlight Tables - 2016 Census.

This is a LIVE embedded Excel Workbook shared from OneDrive. You can play with it and screw it up, its read only data. Refresh this page will refresh with spreadshee. See my post on how embed this on your site.

The workbook contains 4 worksheets you may have to slide over to reveal. The worksheets  are named "All-Canada-QuickStats-2016", "All-CSDName(City+Town)-Analysis", "CSD Types Count" and "All-Canada-STATSCAN-SOURCE-2016".



If you haven't figured out how to download this entire Excel Workbook, you can send contact me in the contact form. Else, Easter egg (think bigger picture). Drop a comment if you use this.

Wednesday, March 22, 2017

Google Site Search aka Google Custom Search end of life April 1, 2018 no joke

Google Site Search or Google Custom Search End-of-Life

On April 1, 2017, Google will discontinue sales of the Google Site Search. All new purchases and renewals must take place before this date. The product will be completely shut down by April 1, 2018.

Google Site Search
(formerly Google Custom Search Business Edition) is an edition of Google Custom Search specifically designed for businesses looking to create a highly customized and Google-hosted site search solution - with the option to include other websites and pages outside of their own. For a fee, Google Site Search provides technical support, customization of search results using XML API, a tailored look and feel, optional Google branding, and no ads next to the search results. While Google Custom search allows you to search the entire web, Google Site Search doesn't permit you to search the entire web but only a specific set of web sites.

Official notice : https://support.google.com/customsearch/answer/72325?hl=en

Work Around

Looks like I have to build a custom solution using BING WEB SEARCH API. Contact me if you need this done! 
This will be  gone by April 1, 2018

Disappointed to see this go, this will affect loads of my customers. 

Wordpress and Buddypress Min/Max Lengths of Username, Password, Display Name, URL and BP Registration text fields

WP_Users Table

UserName is maximum of 60 characters long, min 1 character, technically albeit not good. To prevent collisions, the bigger min size the better. 

1 ID bigint(20)  
2 user_login varchar(60) utf8mb4_unicode_ci
3 user_pass varchar(255) utf8mb4_unicode_ci
4 user_nicename varchar(50) utf8mb4_unicode_ci
5 user_email varchar(100) utf8mb4_unicode_ci
6 user_url varchar(100) utf8mb4_unicode_ci
7 user_registered datetime  
8 user_activation_key varchar(255) utf8mb4_unicode_ci
9 user_status int(11)  
10 display_name varchar(250) utf8mb4_unicode_ci

A Buddypress field can be a maximum length of 4,294,967,295 or 4GB (232 − 1) characters.

WP_BP_xprofile_data Table 

This table contains all text fields entered data from BuddyPress Edit/Registration Form.

1 id bigint(20)  
2 field_id bigint(20)  
3 user_id bigint(20)  
4 value longtext utf8mb4_unicode_520_ci
For example, a edit/registration form to collect City, will be housed in field 4, value, longtext value = "New York".


A full list MYSQL datatypes is defined here ->
https://dev.mysql.com/doc/refman/5.7/en/string-type-overview.html

  • LONGTEXT 4,294,967,295 bytes ~4GB
  • MEDIUMTEXT 16,777,215 bytes ~16MB
  • TEXT 65,535 bytes ~64kb
  • TINYTEXT 256 bytes