faker.providers.address.tl_PH
¶
Package Contents¶
Classes¶
Provider for addresses for en_PH locale |
|
No difference from Address Provider for en_PH locale |
- class faker.providers.address.tl_PH.EnPhAddressProvider(generator: Any)¶
Bases:
faker.providers.address.Provider
Provider for addresses for en_PH locale
Like many things in the Philippines, even addresses are more complicated than necessary. This provider is already a gross oversimplification, and it is still a lot more complicated VS providers from other locales despite taking shortcuts. Below are some tidbits of information that, as a whole, shaped the design decisions of this provider.
- There are many levels of geopolitical division, thus many levels of local government:
There are three major island groups - Luzon, Visayas, Mindanao
Those major groups are divided into 17 different regions.
Each region is divided into provinces with the exception of the National Capital Region aka Metro Manila.
Each province is composed of multiple cities/municipalities.
Metro Manila, like a province, is composed of multiple cities/municipalities, but it is a region.
Each city/municipality is composed of multiple smaller local government units called barangays.
In some places, some barangays are divided further, and as of 2019, there are 42,045 barangays on record.
Metro Manila is part of Luzon geographically, but it is almost always treated as a separate entity politically, economically, statistically, and so on, since it is home to around 13% of the population despite being only around 0.2% of the country’s total land area.
Names of cities, municipalities, and barangays vary a lot. Furthermore, if a place has a non-English name, there will almost always be no English translation and vice-versa. It is essentially impossible to generate fake city, municipality, and barangay names in a similar manner used in the other “en” locales while being locale specific.
Subdivisions and other higher density housing (like high-rise condominiums) are popular in real estate.
The 13th floor is omitted in buildings like in many parts of the world.
The floor number distribution is partly based on the tallest buildings in the Philippines and partly anecdotal, but the general idea is that the higher the floor number is, the lower probability of it appearing. Furthermore, as the floor number approaches the highest floors of the tallest buildings, the probability plummets further.
The address distribution is based on the official 2015 population census.
Addresses should include a barangay, but it has been dropped to keep things sane, all things considered.
In addition to numbered floors, buildings have ground floors and may have lower ground, upper ground, mezzanine, and basement floors. Buildings may also have units on any of those floors, but the naming scheme varies, so they have been dropped, again to keep things sane.
Sources: - https://en.wikipedia.org/wiki/Provinces_of_the_Philippines - https://en.wikipedia.org/wiki/List_of_cities_and_municipalities_in_the_Philippines - https://en.wikipedia.org/wiki/Barangay - https://en.wikipedia.org/wiki/Postal_addresses_in_the_Philippines - https://en.wikipedia.org/wiki/List_of_ZIP_codes_in_the_Philippines - https://www.phlpost.gov.ph/ - http://en.wikipedia.org/wiki/List_of_tallest_buildings_in_the_Philippines - https://psa.gov.ph/sites/default/files/attachments/hsd/pressrelease/2015%20population%20counts%20Summary_0.xlsx
- metro_manila_postcodes¶
- luzon_province_postcodes¶
- visayas_province_postcodes¶
- mindanao_province_postcodes¶
- postcodes¶
- metro_manila_lgus = ('Caloocan', 'Las Piñas', 'Makati', 'Malabon', 'Mandaluyong', 'Manila', 'Marikina',...¶
- province_lgus = ('Aborlan', 'Abra de Ilog', 'Abucay', 'Abulug', 'Abuyog', 'Adams', 'Agdangan', 'Aglipay',...¶
- luzon_provinces = ('Abra', 'Albay', 'Apayao', 'Aurora', 'Bataan', 'Batanes', 'Batangas', 'Benguet', 'Bulacan',...¶
- visayas_provinces = ('Aklan', 'Antique', 'Biliran', 'Bohol', 'Capiz', 'Cebu', 'Eastern Samar', 'Guimaras', 'Iloilo',...¶
- mindanao_provinces = ('Agusan del Norte', 'Agusan del Sur', 'Basilan', 'Bukidnon', 'Camiguin', 'Compostela Valley',...¶
- provinces¶
- partitioned_building_number_formats = ('{{standalone_building_number}}?', '{{standalone_building_number}} ?',...¶
- building_unit_number_formats = ('Unit {{floor_unit_number}}', 'Room {{floor_unit_number}}', '{{floor_number}}F',...¶
- building_name_formats = ('{{last_name}} {{building_name_suffix}}', '{{random_object_name}} {{building_name_suffix}}')¶
- building_name_suffixes = ('Apartment', 'Apartments', 'Building', 'Building %', 'Building Tower %', 'Condominiums',...¶
- subdivision_unit_number_formats = ('B{{subdivision_block_number}} L{{subdivision_lot_number}}', 'Block...¶
- subdivision_name_formats = ('{{last_name}} {{subdivision_name_suffix}}', '{{random_object_name}} {{subdivision_name_suffix}}')¶
- subdivision_name_suffixes = ('Cove', 'Cove %', 'Cove Phase %', 'Estates', 'Estates %', 'Estates Phase %', 'Grove', 'Grove...¶
- floor_numbers¶
- street_suffixes¶
- street_name_formats = ('{{last_name}} {{street_suffix}}', '{{ordinal_street_number}} {{street_suffix}}',...¶
- street_address_formats = ('{{standalone_building_number}} {{street_name}}', '{{partitioned_building_number}}...¶
- metro_manila_address_formats = ('{{street_address}}, {{metro_manila_lgu}}, {{metro_manila_postcode}} Metro Manila',)¶
- luzon_province_address_formats = ('{{street_address}}, {{province_lgu}}, {{luzon_province_postcode}} {{luzon_province}}',)¶
- visayas_province_address_formats = ('{{street_address}}, {{province_lgu}}, {{visayas_province_postcode}} {{visayas_province}}',)¶
- mindanao_province_address_formats = ('{{street_address}}, {{province_lgu}}, {{mindanao_province_postcode}} {{mindanao_province}}',)¶
- address_formats¶
- province¶
- class faker.providers.address.tl_PH.Provider(generator: Any)¶
Bases:
faker.providers.address.en_PH.Provider
No difference from Address Provider for en_PH locale