Skip to content

Commit

Permalink
feat: updated dataset (2020-10-13) (#80)
Browse files Browse the repository at this point in the history
Co-authored-by: Irakli Gozalishvili <contact@gozala.io>
  • Loading branch information
lidel and Gozala authored Oct 20, 2020
1 parent 00f72f9 commit 1de0d2b
Show file tree
Hide file tree
Showing 9 changed files with 372 additions and 298 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ Returns a promise that resolves to an object of the form
"postal_code": "94040",
"latitude": 37.3860,
"longitude": -122.0838,
"metro_code": "807",
"area_code": "650",
"planet": "Earth"
}
```
Expand All @@ -85,6 +83,11 @@ a `formatted` property that looks like this: `Mountain View, CA, United States,

The utility geoip-gen reads csv files provided from GeoLite, and turns them into a 32-way branching b-tree, which is stored as ipfs json objects.

**Note:** this library uses old type of ipfs json objects for legacy reasons,
be mindful of that and do not use its code as an example. Modern code should
use [`dag-cbor`](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)
and [`ipfs.dag`](https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/DAG.md) API.

There is a generator included, that can be run with

```bash
Expand All @@ -107,8 +110,6 @@ Result: {
"postal_code": "94040",
"latitude": 37.386,
"longitude": -122.0838,
"metro_code": "807",
"area_code": "650",
"planet": "Earth"
}
Pretty result: Mountain View, CA, USA, Earth
Expand All @@ -130,4 +131,6 @@ This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/c

## License

[MIT](LICENSE)
ipfs-geoip is [MIT](LICENSE) licensed.

This library includes GeoLite2 data created by MaxMind, available from [maxmind.com](http://www.maxmind.com).
Loading

0 comments on commit 1de0d2b

Please sign in to comment.