PHPackages                             dantepiazza/geo-location-data - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. dantepiazza/geo-location-data

ActiveLibrary

dantepiazza/geo-location-data
=============================

v1.0.3(2y ago)029PHP

Since Apr 1Pushed 2y ago1 watchersCompare

[ Source](https://github.com/dantepiazza/geo-location-data)[ Packagist](https://packagist.org/packages/dantepiazza/geo-location-data)[ RSS](/packages/dantepiazza-geo-location-data/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Geo locations data
==================

[](#geo-locations-data)

A JSON library to display countries, states, counties and cities with PHP.

NOTE: This package is under development and should not use ID values as final

Usage
-----

[](#usage)

```
use Dantepiazza\GeoLocationData\Location;

$location = new Location();

// Regenerata a chache file
$location -> cache();

// Search locations by city name
$location -> search('Buenos Ai');

// Get location by city name
$location -> get(6344);

// Returns only the list of countries
$location -> countries();

// Get country by id
$location -> country('id', 11);

// Returns only the list of states
$location -> states();

// Get state by id
$location -> state(788);

// Returns only the list of counties in the country code
$location -> counties('AR');

// Get county by id
$location -> county('AR', 216);

// Returns only the list of cities in the country code
$location -> cities('AR');

// Get city by id
$location -> city('AR', 4867);
```

Responses
---------

[](#responses)

##### Location data

[](#location-data)

```
country_id: int
country_name: string
country_code: string
state_id: int
state_name: string
county_id: int
county_name: string
city_id: int
city_name: string
zip_code: string
name: string
```

##### Country data

[](#country-data)

```
id: int
code: string
name: string
```

##### State data

[](#state-data)

```
id: int
country_id: int
name: string
```

##### County data

[](#county-data)

```
id: int
country_id: int
state_id: int
name: string
```

##### City data

[](#city-data)

```
id: int
country_id: int
state_id: int
county_id: int
zip_code: string
name: string
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

768d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c95b88b0c2c387a90f27ea763404be686d599e8312bedc48bba49c79e3228a20?d=identicon)[dantepiazza](/maintainers/dantepiazza)

---

Top Contributors

[![dantepiazza](https://avatars.githubusercontent.com/u/14875983?v=4)](https://github.com/dantepiazza "dantepiazza (9 commits)")

### Embed Badge

![Health badge](/badges/dantepiazza-geo-location-data/health.svg)

```
[![Health](https://phpackages.com/badges/dantepiazza-geo-location-data/health.svg)](https://phpackages.com/packages/dantepiazza-geo-location-data)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
