<commit_before># geo-from-ip

Get geolocation information about an IP using MaxMind's GeoLite2 databases.

[![Build Status](https://travis-ci.org/VikramTiwari/geo-from-ip.svg?branch=master)](https://travis-ci.org/VikramTiwari/geo-from-ip) [![NPM Version](https://img.shields.io/npm/v/geo-from-ip.svg)](https://www.npmjs.com/package/geo-from-ip) [![NPM Download](https://img.shields.io/npm/dm/geo-from-ip.svg)](https://www.npmjs.com/package/geo-from-ip)

## Features

- No frills install
- Downloads databases automatically during installation
- Run `npm install` to upgrade databases == automatic update on deployments

## How to use

- Include package in your project

``` sh
npm install --save geo-from-ip
# or, if you are using yarn
yarn add --save geo-from-ip
```

- Use package to get geo data from IP

``` javascript
const geoip = require('geo-from-ip')
console.log(geoip.allData('172.16.58.3'))

/*
{ code: { state: 'CA', country: 'US', continent: 'NA' },
  city: 'San Francisco',
  state: 'California',
  country: 'United States',
  continent: 'North America',
  postal: '94103',
  location:
   { accuracy_radius: 10,
     latitude: 37.7758,
     longitude: -122.4128,
     metro_code: 807,
     time_zone: 'America/Los_Angeles' } }
 */
```

- Update database

Database will get automatically updated every time deployment happens. But if you would like to force an update, just run:

``` sh
npm install
# or, if you are using yarn
yarn
```

## Debugging / Developing

Run your code using `geo-from-ip` as debug flag. Look into `pacakge.json` for example.

## Credits

### Developer: [<NAME>](https://vikramtiwari.com)

If you found this library helpful, or learned something from it and want to thank me, consider [buying me a cup of coffee.](https://www.paypal.me/vikramtiwari/5)

### Database: Max-Mind

This product includes GeoLite2 data created by MaxMind, available from <https://www.maxmind.com>
gic<commit_msg>remove extra chracters from readme<commit_after># geo-from-ip

Get geolocation information about an IP using MaxMind's GeoLite2 databases.

[![Build Status](https://travis-ci.org/VikramTiwari/geo-from-ip.svg?branch=master)](https://travis-ci.org/VikramTiwari/geo-from-ip) [![NPM Version](https://img.shields.io/npm/v/geo-from-ip.svg)](https://www.npmjs.com/package/geo-from-ip) [![NPM Download](https://img.shields.io/npm/dm/geo-from-ip.svg)](https://www.npmjs.com/package/geo-from-ip)

## Features

- No frills install
- Downloads databases automatically during installation
- Run `npm install` to upgrade databases == automatic update on deployments

## How to use

- Include package in your project

``` sh
npm install --save geo-from-ip
# or, if you are using yarn
yarn add --save geo-from-ip
```

- Use package to get geo data from IP

``` javascript
const geoip = require('geo-from-ip')
console.log(geoip.allData('172.16.58.3'))

/*
{ code: { state: 'CA', country: 'US', continent: 'NA' },
  city: 'San Francisco',
  state: 'California',
  country: 'United States',
  continent: 'North America',
  postal: '94103',
  location:
   { accuracy_radius: 10,
     latitude: 37.7758,
     longitude: -122.4128,
     metro_code: 807,
     time_zone: 'America/Los_Angeles' } }
 */
```

- Update database

Database will get automatically updated every time deployment happens. But if you would like to force an update, just run:

``` sh
npm install
# or, if you are using yarn
yarn
```

## Debugging / Developing

Run your code using `geo-from-ip` as debug flag. Look into `pacakge.json` for example.

## Credits

### Developer: [<NAME>](https://vikramtiwari.com)

If you found this library helpful, or learned something from it and want to thank me, consider [buying me a cup of coffee.](https://www.paypal.me/vikramtiwari/5)

### Database: Max-Mind

This product includes GeoLite2 data created by MaxMind, available from <https://www.maxmind.com>
{'fraction_non_alphanumeric': 0.14208214931542237, 'fraction_numerical': 0.017566520278997674, 'mean_word_length': 4.041666666666667, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 18, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6972618', 'n_tokens_mistral': 1401, 'n_tokens_neox': 1278, 'n_words': 384}