Geocoder icon indicating copy to clipboard operation
Geocoder copied to clipboard

AdminLevel documentation

Open jbelien opened this issue 6 years ago • 10 comments

I may have missed it but I didn't find any documentation about AdminLevel.

If I understand correctly it goes from 1 to 5 ; but what's level 1 and what's level 5 ? Is it a standard ? Where can I find documentation about this ?

Thanks a lot :)

jbelien avatar Jun 05 '18 14:06 jbelien

That is an excellent question. I'm sorry but the answer is "it depends".

Even with the same provider, you can never be sure that level 3 is the same thing. For one lookup level 3 may be state for an other lookup it may be city.

But yes, it should be documented better.

Nyholm avatar Jun 05 '18 14:06 Nyholm

Shit, that's what I was afraid about :P But good to know that I can do "whatever I want to" with it ! :D

I suppose 1 is the "bigger" (like country) and 5 is the smaller (like "neighborhood") or is it the other way around ?

jbelien avatar Jun 05 '18 14:06 jbelien

I think it is the other way around. 1- neigbourhood 2- 3- 4- 5- County

And of course. Sometimes you may only have 1-3.

Nyholm avatar Jun 05 '18 14:06 Nyholm

Okay, I'll have a look to some other providers and do "something similar" with mine ! 👍

Thanks !

jbelien avatar Jun 05 '18 14:06 jbelien

Great. If you don't mind, could you add a row or two about this in the documentation?

Nyholm avatar Jun 05 '18 14:06 Nyholm

I do not mind ! I'll submit a PR in the next few days ! Do not hesitate to ping me if I forget 😂

jbelien avatar Jun 05 '18 14:06 jbelien

I found Google Maps API documentation about this : https://developers.google.com/maps/documentation/geocoding/intro#Types.

administrative_area_level_1 indicates a first-order civil entity below the country level. Within the United States, these administrative levels are states. Not all nations exhibit these administrative levels. In most cases, administrative_area_level_1 short names will closely match ISO 3166-2 subdivisions and other widely circulated lists; however this is not guaranteed as our geocoding results are based on a variety of signals and location data.

administrative_area_level_2 indicates a second-order civil entity below the country level. Within the United States, these administrative levels are counties. Not all nations exhibit these administrative levels.

administrative_area_level_3 indicates a third-order civil entity below the country level. This type indicates a minor civil division. Not all nations exhibit these administrative levels.

administrative_area_level_4 indicates a fourth-order civil entity below the country level. This type indicates a minor civil division. Not all nations exhibit these administrative levels.

administrative_area_level_5 indicates a fifth-order civil entity below the country level. This type indicates a minor civil division. Not all nations exhibit these administrative levels.

I guess we can base our documentation on this !

jbelien avatar Jun 08 '18 14:06 jbelien

Sure. That seams reasonable.

This issue is related to #856

Nyholm avatar Jun 26 '18 16:06 Nyholm

ping @jbelien, seems you forgot 😜

Happy to have a go if you want instead.

atymic avatar Jul 01 '19 00:07 atymic

Haha, thanks for the reminder! It indeed slipped of my mind. I'll take care of it ASAP :)

jbelien avatar Jul 01 '19 05:07 jbelien