Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: updated dataset (2020-10-13) #80

Merged
merged 2 commits into from
Oct 20, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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