Simple wrapper of the Geonames API which provides output in the OpenRefine reconciliation service format.
Clone the repository, install dependencies with npm install and start the service using npm start. Then browse to http://localhost:5060/reconcile.
- To test a search, use http://localhost:5060/reconcile?queries=%7B%22326c79e2%22:%7B%22query%22:%22Binghamton,%20NY%22,%22limit%22:10%7D%7D.
- To test a preview, use http://localhost:5060/reconcile/preview?id=5109177.
The service uses the demo account by default. You should create a username at the Geonames website and activate it for API usage. Then you can set the GEONAMES_USERNAME environment variable with your username.
The preview functionality can show a map of the location if you provide an access token. Create a free account on the MapBox site and add a new access token. Then set the token in the MAPBOX_ACCESS_TOKEN environment variable.
This app uses the aws-serverless-express library to adapt the Express app to AWS Serverless. To deploy the app, set the following NPM configuration (for example in a .npmrc file:)
s3BucketName = <NAME>
region = us-east-1
cloudFormationStackName = GeonamesOpenRefineStack
functionName = GeonamesOpenRefine
accountId = <ACCOUNT>
Then deploy the app with:
$ npm run package-deploy