https://github.com/datasets/geoip2-ipv4
GeoIP2 - free IP geolocation database.
https://github.com/datasets/geoip2-ipv4
Last synced: about 1 year ago
JSON representation
GeoIP2 - free IP geolocation database.
- Host: GitHub
- URL: https://github.com/datasets/geoip2-ipv4
- Owner: datasets
- License: cc0-1.0
- Created: 2015-04-21T17:19:51.000Z (about 11 years ago)
- Default Branch: main
- Last Pushed: 2025-04-06T01:53:00.000Z (about 1 year ago)
- Last Synced: 2025-04-06T02:32:32.625Z (about 1 year ago)
- Language: Python
- Homepage: https://datahub.io/core/geoip2-ipv4
- Size: 8.11 MB
- Stars: 64
- Watchers: 7
- Forks: 20
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Database of IPv4 address networks with their respective geographical location.
## Data
Based on GeoLite2 Country Free Downloadable Databases as of Apr 21, 2015 http://dev.maxmind.com/geoip/geoip2/geolite2/
Two files were used to generate this dataset:
```
GeoLite2-Country-Blocks-IPv4.csv
GeoLite2-Country-Locations-en.csv
```
with the following considerations:
- Where geoname_id was not available, registered_country_geoname_id was used.
- Where geoname_id and registered_country_geoname_id where empty, geoname_id, continent_code, continent_name, country_iso_code and country_name are empty.
## Preparation
Process is recorded and automated in python script:
```bash
# Install the requirements
pip install -r scripts/requirements.txt
# Make sure to add your own Account_ID and License_key password as env variables
username = os.getenv('MAXMIND_USERNAME')
password = os.getenv('MAXMIND_PASSWORD')
# Run the code
python scripts/process.py
```
## Automation
Up-to-date (auto-updates every week) geoip2-ipv4 dataset could be found on the datahub.io: https://datahub.io/core/geoip2-ipv4
## License
Datapackage: Creative Commons Zero
Original CSV: This dataset includes GeoLite2 data created by MaxMind, available from www.maxmind.com