GithubHelp home page GithubHelp logo

csv-importer's Introduction

A modular, open-source search engine for our world.

Pelias is a geocoder powered completely by open data, available freely to everyone.

Local Installation · Cloud Webservice · Documentation · Community Chat

What is Pelias?
Pelias is a search engine for places worldwide, powered by open data. It turns addresses and place names into geographic coordinates, and turns geographic coordinates into places and addresses. With Pelias, you’re able to turn your users’ place searches into actionable geodata and transform your geodata into real places.

We think open data, open source, and open strategy win over proprietary solutions at any part of the stack and we want to ensure the services we offer are in line with that vision. We believe that an open geocoder improves over the long-term only if the community can incorporate truly representative local knowledge.

Pelias

A modular, open-source geocoder built on top of Elasticsearch for fast and accurate global search.

What's a geocoder do anyway?

Geocoding is the process of taking input text, such as an address or the name of a place, and returning a latitude/longitude location on the Earth's surface for that place.

geocode

... and a reverse geocoder, what's that?

Reverse geocoding is the opposite: returning a list of places near a given latitude/longitude point.

reverse

What are the most interesting features of Pelias?

  • Completely open-source and MIT licensed
  • A powerful data import architecture: Pelias supports many open-data projects out of the box but also works great with private data
  • Support for searching and displaying results in many languages
  • Fast and accurate autocomplete for user-facing geocoding
  • Support for many result types: addresses, venues, cities, countries, and more
  • Modular design, so you don't need to be an expert in everything to make changes
  • Easy installation with minimal external dependencies

What are the main goals of the Pelias project?

  • Provide accurate search results
  • Work equally well for a small city and the entire planet
  • Be highly configurable, so different use cases can be handled easily and efficiently
  • Provide a friendly, welcoming, helpful community that takes input from people all over the world

Where did Pelias come from?

Pelias was created in 2014 as an early project at Mapzen. After Mapzen's shutdown in 2017, Pelias is now part of the Linux Foundation.

How does it work?

Magic! (Just kidding) Like any geocoder, Pelias combines full text search techniques with knowledge of geography to quickly search over many millions of records, each representing some sort of location on Earth.

The Pelias architecture has three main components and several smaller pieces.

A diagram of the Pelias architecture.

Data importers

The importers filter, normalize, and ingest geographic datasets into the Pelias database. Currently there are six officially supported importers:

We are always discussing supporting additional datasets. Pelias users can also write their own importers, for example to import proprietary data into your own instance of Pelias.

Database

The underlying datastore that does most of the query heavy-lifting and powers our search results. We use Elasticsearch. Currently versions 7 and 8 are supported.

We've built a tool called pelias-schema that sets up Elasticsearch indices properly for Pelias.

Frontend services

This is where the actual geocoding process happens, and includes the components that users interact with when performing geocoding queries. The services are:

  • API: The API service defines the Pelias API, and talks to Elasticsearch or other services as needed to perform queries.
  • Placeholder: A service built specifically to capture the relationship between administrative areas (a catch-all term meaning anything like a city, state, country, etc). Elasticsearch does not handle relational data very well, so we built Placeholder specifically to manage this piece.
  • PIP: For reverse geocoding, it's important to be able to perform point-in-polygon(PIP) calculations quickly. The PIP service is is very good at quickly determining which admin area polygons a given point lies in.
  • Libpostal: Pelias uses the libpostal project for parsing addresses using the power of machine learning. We use a Go service built by the Who's on First team to make this happen quickly and efficiently.
  • Interpolation: This service knows all about addresses and streets. With that knowledge, it is able to supplement the known addresses that are stored directly in Elasticsearch and return fairly accurate estimated address results for many more queries than would otherwise be possible.

Dependencies

These are software projects that are not used directly but are used by other components of Pelias.

There are lots of these, but here are some important ones:

  • model: provide a single library for creating documents that fit the Pelias Elasticsearch schema. This is a core component of our flexible importer architecture
  • wof-admin-lookup: A library for performing administrative lookup using point-in-polygon math. Previously included in each of the importers but now only used by the PIP service.
  • query: This is where most of our actual Elasticsearch query generation happens.
  • config: Pelias is very configurable, and all of it is driven from a single JSON file which we call pelias.json. This package provides a library for reading, validating, and working with this configuration. It is used by almost every other Pelias component
  • dbclient: A Node.js stream library for quickly and efficiently importing records into Elasticsearch

Helpful tools

Finally, while not part of Pelias proper, we have built several useful tools for working with and testing Pelias

Notable examples include:

  • acceptance-tests: A Node.js command line tool for testing a full planet build of Pelias and ensuring everything works. Familiarity with this tool is very important for ensuring Pelias is working. It supports all Pelias features and has special facilities for testing autocomplete queries.
  • compare: A web-based tool for comparing different instances of Pelias (for example a production and staging environment). We have a reference instance at pelias.github.io/compare/
  • dashboard: Another web-based tool for providing statistics about the contents of a Pelias Elasticsearch index such as import speed, number of total records, and a breakdown of records of various types.

Documentation

The main documentation lives in the pelias/documentation repository.

Additionally, the README file in each of the component repositories listed above provides more detail on that piece.

Here's an example API response for a reverse geocoding query
$ curl -s "search.mapzen.com/v1/reverse?size=1&point.lat=40.74358294846026&point.lon=-73.99047374725342&api_key={YOUR_API_KEY}" | json
{
    "geocoding": {
        "attribution": "https://search.mapzen.com/v1/attribution",
        "engine": {
            "author": "Mapzen",
            "name": "Pelias",
            "version": "1.0"
        },
        "query": {
            "boundary.circle.lat": 40.74358294846026,
            "boundary.circle.lon": -73.99047374725342,
            "boundary.circle.radius": 500,
            "point.lat": 40.74358294846026,
            "point.lon": -73.99047374725342,
            "private": false,
            "querySize": 1,
            "size": 1
        },
        "timestamp": 1460736907438,
        "version": "0.1"
    },
    "type": "FeatureCollection",
    "features": [
        {
            "geometry": {
                "coordinates": [
                    -73.99051,
                    40.74361
                ],
                "type": "Point"
            },
            "properties": {
                "borough": "Manhattan",
                "borough_gid": "whosonfirst:borough:421205771",
                "confidence": 0.9,
                "country": "United States",
                "country_a": "USA",
                "country_gid": "whosonfirst:country:85633793",
                "county": "New York County",
                "county_gid": "whosonfirst:county:102081863",
                "distance": 0.004,
                "gid": "geonames:venue:9851011",
                "id": "9851011",
                "label": "Arlington, Manhattan, NY, USA",
                "layer": "venue",
                "locality": "New York",
                "locality_gid": "whosonfirst:locality:85977539",
                "name": "Arlington",
                "neighbourhood": "Flatiron District",
                "neighbourhood_gid": "whosonfirst:neighbourhood:85869245",
                "region": "New York",
                "region_a": "NY",
                "region_gid": "whosonfirst:region:85688543",
                "source": "geonames"
            },
            "type": "Feature"
        }
    ],
    "bbox": [
        -73.99051,
        40.74361,
        -73.99051,
        40.74361
    ]
}

How can I install my own instance of Pelias?

To try out Pelias quickly, use our Docker setup. It uses Docker and docker-compose to allow you to quickly set up a Pelias instance for a small area (by default Portland, Oregon) in under 30 minutes.

Do you offer a free geocoding API?

You can sign up for a trial API key at Geocode Earth. A commercial service has been operated by the core development team behind Pelias since 2014 (previously at search.mapzen.com). Discounts and free plans are available for free and open-source software projects.

What's it built with?

Pelias itself (the import pipelines and API) is written in Node.js, which makes it highly accessible for other developers and performant under heavy I/O. It aims to be modular and is distributed across a number of Node packages, each with its own repository under the Pelias GitHub organization.

For a select few components that have performance requirements that Node.js cannot meet, we prefer to write things in Go. A good example of this is the pbf2json tool that quickly converts OSM PBF files to JSON for our OSM importer.

Elasticsearch is our datastore of choice because of its unparalleled full text search functionality, scalability, and sufficiently robust geospatial support.

Contributing

Gitter

We built Pelias as an open source project not just because we believe that users should be able to view and play with the source code of tools they use, but to get the community involved in the project itself.

Especially with a geocoder with global coverage, it's just not possible for a small team to do it alone. We need you.

Anything that we can do to make contributing easier, we want to know about. Feel free to reach out to us via Github, Gitter, email, or Twitter. We'd love to help people get started working on Pelias, especially if you're new to open source or programming in general.

We have a list of Good First Issues for new contributors.

Both this meta-repo and the API service repo are worth looking at, as they're where most issues live. We also welcome reporting issues or suggesting improvements to our documentation.

The current Pelias team can be found on Github as missinglink and orangejulius.

Members emeritus include:

csv-importer's People

Contributors

benetis avatar blackmad avatar greenkeeper[bot] avatar jossefaz avatar joxit avatar mansoor-sajjad avatar missinglink avatar orangejulius avatar pushkar-geospoc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

csv-importer's Issues

Add/update/remove custom addresses

Hello,
I have couple of questions:

  1. Is id is important. I mean can i use same id for all addresses ? If i do what will happen ?
  2. How can i modify a single record which was previously imported ?
  3. How can i remove a single record.
  4. How can i remove all custom imported addresses ?
  5. Is duplication handled ?

Search by Postcode

Use-cases

I am trying to import a CSV with postcode data. It will be great if I can search by postcode as a parameter

Attempted Solutions

I made changes in the Pelias config file and add postcode in the coarse layer. but in search, I am unable to search with the value.

Proposal

The request can be something like this

  • Forward geocoding
myurl/v1/search?text=text&postcode=12015

and even directly postcode can be searched

myurl/v1/search?text=12015
  • Reverse geocoding
myurl/v1/reverse?point.lat=23.84&point.lon=90.38967&postcode=12015

References

source name changed if use more than one csv file

If import multiple csv files, the source name automatically changed to csv (note: in files source column is properly named to custom).

source, popularity, layer, id, lat, lon, name, postalcode, country, name_json
custom_name, 1, layer_name, .... etc

source has name csv in imported data

Problem doesnt exist if i use one csv file.

image
Example:
image

An in-range update of csv-parse is breaking the build 🚨

The dependency csv-parse was updated from 4.4.1 to 4.4.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

csv-parse is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build is in progress (Details).
  • ci/circleci: build: Your tests failed on CircleCI (Details).

Commits

The new version differs by 7 commits.

  • 858c38a Bump to version 4.4.2
  • 5e7ea6c changelog: add parsing for BOM character
  • 713e95f ts: add sync definition
  • 8cedaef Added test
  • e003c1d Fix bom constant
  • 8cea3bc Fix parsing for BOM character
  • 8a817e4 package: replace npm ignore with file field

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Not support field Category

Hey team!

I was using your awesome geocoding engine when I noticed something interesting.
Let me tell you more about it.


Here's what I did 😇


Here's what I got 🙀


Here's what I was expecting ✨


Here's what I think could be improved 🏆

The option to store city/town information as locality/localadmin when importing

When importing commercial datasets, there is good reason to preserve the locality/localadmin value, rather than cast that information aside. When Corelogic give me a City, (through the pelias.json configuration) I would like to save that value to either locality or localadmin. A) all cases or B) if nothing was return from PIP-service for this record. My testing shows this may apply to as many as 25 million USA addresses.

erros at import csv

Describe the bug
I'm trying to import some data we have, but an error appears

~/pelias/docker/projects/brazil$ sudo pelias import csv
info: [csv-importer] Importing 1 files.
info: [csv-importer] Creating read stream for: /data/csv_files/geoSource.csv
info: [wof-pip-service:master] starting with layers neighbourhood,borough,locality,localadmin,county,macrocounty,macroregion,region,dependency,country,empire,continent,marinearea,ocean
warn: [csv-importer] Record import failed on line 0 due to Invalid centroid. <?xml version="1.0" encoding="UTF-8"?>=<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>VY9GYSCV9131KJMG</RequestId><HostId>iQODN57zEkngOcexQVCLncHALdHxVPHMjQR2bv2Oy2KpcB7H4fbunLix9M4WFMl1rCn5+ud1E9c=</HostId></Error>
info: [csv-importer] Finished import from /data/csv_files/geoSource.csv, goodRecordCount=0 badRecordCount=1
info: [wof-admin-lookup] Shutting down admin lookup service
info: [wof-admin-lookup] Ensure your input file is valid before retrying
info: [csv-importer] Total time taken: 6.051s

image
image

I'm running the latest version on an instance in aws, using pelias/docker
the instance is working normally, I'm just not able to import the csv.

here is an example of the csv i'm importing
Does anyone know what I'm doing wrong?

id,source,layer,housenumber,street,postalcode,lat,lon,name -20.0288417-48.9297093,teste,venue,450,Rua Dom Bôsco,38200-000,-20.0288417,-48.9297093,450 Rua Dom Bôsco -23.5769295-46.834069,teste,venue,100,Rua Sete Barras,06343-280,-23.5769295,-46.834069,100 Rua Sete Barras -23.0238474-45.5286309,teste,venue,97,Rua Terenzo Amadei,12081-240,-23.0238474,-45.5286309,97 Rua Terenzo Amadei -23.475265-46.5560647,teste,venue,451,Rua Fluminense,07053-000,-23.475265,-46.5560647,451 Rua Fluminense -23.489566-46.9502985,teste,venue,30,Alameda Caraceres,06429-290,-23.489566,-46.9502985,30 Alameda Caraceres

Custom data are not augmented with wof data

Hi,
I am trying to import custom data that look like this:

id,number,street,lon,lat,city,postcode,region,layer,source,street_de,city_de,street_fr,city_fr,street_it,city_it,street_ro,city_ro
1-0,20,Grossholzerstrasse,47.26911713561371,8.44909571341747,Affoltern am Albis,8910,ZH,address,admin_ch,Grossholzerstrasse,Affoltern am Albis,,,,,,
1000001-0,2,Chemin des Avallons,46.270537085094865,6.22018143204421,Anières,1247,GE,address,admin_ch,,,Chemin des Avallons,Anières,,,,
...

These are based on openly available data from the swiss confederation. I am not using the openaddresses importer as these have been preprocessed, selected, and also support multi-language.

I am running into an issue though, if I import my data, a final record might look like that:

{
  'id': '2376396-0',
  'gid': 'admin_ch:address:2376396-0',
  'layer': 'address',
  'source': 'admin_ch',
  'source_id': '2376396-0',
  'housenumber': '2',
  'street': 'Chemin de Vers',
  'postalcode': '1228',
  'confidence': 1,
  'match_type': 'exact',
  'accuracy': 'point'
}

Whereas when I was using openaddresses, it use to have the whole WOF hierarchy:

{
  'id': 'ch/geneva:3f9a77e579e4b7b7',
  'gid': 'openaddresses:address:ch/geneva:3f9a77e579e4b7b7',
  'layer': 'address',
  'source': 'openaddresses',
  'source_id': 'ch/geneva:3f9a77e579e4b7b7',
  'name': 'Chemin De Vers 2',
  'housenumber': '2',
  'street': 'Chemin De Vers',
  'postalcode': '1228',
  'confidence': 1,
  'match_type': 'exact',
  'accuracy': 'point',
  'country': 'Switzerland',
  'country_gid': 'whosonfirst:country:85633051',
  'country_a': 'CHE',
  'region': 'Geneva',
  'region_gid': 'whosonfirst:region:85682291',
  'region_a': 'GE',
  'county': 'Genève',
  'county_gid': 'whosonfirst:county:102062917',
  'localadmin': 'Plan-les-Ouates',
  'localadmin_gid': 'whosonfirst:localadmin:404328619',
  'locality': 'Plan-les-Ouates',
  'locality_gid': 'whosonfirst:locality:1125887615',
  'neighbourhood': "La Queue D'arve",
  'neighbourhood_gid': 'whosonfirst:neighbourhood:85862377',
  'continent': 'Europe',
  'continent_gid': 'whosonfirst:continent:102191581',
  'label': 'Chemin De Vers 2, Plan-les-Ouates, Switzerland'
}

I checked what data openaddresses uses, but it just look like that:

LON,LAT,NUMBER,STREET,UNIT,CITY,DISTRICT,REGION,POSTCODE,ID,HASH
8.4490957,47.2691171,20,Grossholzerstrasse,,Affoltern am Albis,,ZH,8910,1-0,de1b19138df2ef57
6.2201814,46.2705371,2,Chemin des Avallons,,Anières,,GE,1247,1000001-0,713cbbb216c5de64
...

Which is very similar to what I have in my custom csv.

Looking into the code, I found that the wof-admin-lookup module was used. In the openaddresses importer, the code was slightly different, so I made my own csv-importer image and added the following lines to lib/importPipeline.js:

...
const adminLayers = ['neighbourhood', 'borough', 'locality', 'localadmin',
  'county', 'macrocounty', 'region', 'macroregion', 'dependency', 'country',
  'empire', 'continent'];
...
    .pipe(adminLookup.create(adminLayers))
...

As it is what is done in the openaddresses importer import pipeline.

But this didn't solve the issue. I event tried to import my custom data using the openaddresses-importer, but the records didn't have the wof infos.

What am I missing?

An in-range update of pelias-wof-admin-lookup is breaking the build 🚨


☝️ Important announcement: Greenkeeper will be saying goodbye 👋 and passing the torch to Snyk on June 3rd, 2020! Find out how to migrate to Snyk and more at greenkeeper.io


The dependency pelias-wof-admin-lookup was updated from 6.4.0 to 6.5.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

pelias-wof-admin-lookup is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ci/circleci: build: CircleCI is running your tests (Details).
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v6.5.0

6.5.0 (2020-03-18)

Features

  • local: gracefully handle shutting down workers before the service has finished instantiating (828fb2f)
Commits

The new version differs by 4 commits.

  • d25718e Merge pull request #290 from pelias/local_worker_premature_shutdown
  • 828fb2f feat(local): gracefully handle shutting down workers before the service has finished instantiating
  • b7c61a6 Merge pull request #286 from pelias/greenkeeper/nock-12.0.0
  • e64494e chore(package): update nock to version 12.0.0

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Import into Pelias German house numbers with CSV importer

Hi there,

What I am doing:
in my project I want to import a CSV file with German addresses into Pelias. Using the defaults, I mapped my address data to the Pelias import CSV accordingly.

Problem:
However, I encountered a problem in the process:
German house numbers consist of a number and often an additional house number suffix, e.g. "11b" or "7a". Pelias expects the attribute "housenumber" to be a number and not a string, otherwise it returns an error message during import.

Question:
Is there any way to import my house number with the house number suffix into Pelias using the CSV importer?

Many thanks in advance for the answers!
Dawid

repo still contains references to openaddresses

looks like we missed a few references to openaddresses which were retained when copying some of the source code from that importer:

➜  csv-importer git:(master) git grep -i openaddresses
README.md:It's originally based off of the [OpenAddresses importer](https://github.com/pelias/openaddresses), which also uses a CSV format.
README.md:OpenAddresses, and Who's on First.
import.js: * @file Entry-point script for the OpenAddresses import pipeline.
lib/parameters.js: *    used to call `importOpenAddressesDir`:
lib/parameters.js:    'A tool for importing OpenAddresses data into Pelias. Usage:',
lib/parameters.js:    '\tnode import.js --help | [--deduplicate] [--admin-values] [OPENADDRESSES_DIR]',
lib/parameters.js:    '\tOPENADDRESSES_DIR: A directory containing OpenAddresses CSV files.',
lib/parameters.js:    '\t\t`imports.openaddresses.datapath` will be used.',
lib/streams/recordStream.js: * Create a stream of Documents from an OpenAddresses file.
lib/streams/recordStream.js: * @param {string} filePath The path of an OpenAddresses CSV file.
test/streams/recordStream.js:    // all caps number accepted as housenumber (OpenAddresses style)
test/test.js: * @file The main entry point for the OpenAddresses importer's unit-tests.

An in-range update of pelias-logger is breaking the build 🚨

The dependency pelias-logger was updated from 1.4.0 to 1.4.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

pelias-logger is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build is in progress (Details).
  • ci/circleci: build: Your tests failed on CircleCI (Details).

Release Notes for v1.4.1

1.4.1 (2019-05-08)

Bug Fixes

  • package: update pelias-config to version 4.0.0 (f777bb4), closes #49
Commits

The new version differs by 2 commits.

  • 7b391df Merge pull request #50 from pelias/greenkeeper/pelias-config-4.0.0
  • f777bb4 fix(package): update pelias-config to version 4.0.0

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

pelias import csv : no errors, files detected, but data not loaded

Describe the bug

After following step by step the data import process, with no visible bug / errors, my data is not loaded in the Elastic Search instance

Steps to Reproduce

  1. go to this repo and clone it (it contains all the required configuration based on the documentation)

  2. Run the pelias build commands

  3. Perform this request : http://localhost:4000/v1/search?text=האוניברסיטה

  4. Even if the street name האוניברסיטה ("University" in hebrew) is present in the data -see the street column - You should get an empty features array as I get :


{
  "geocoding": {
    "version": "0.2",
    "attribution": "http://localhost:4000/attribution",
    "query": {
      "text": "האוניברסיטה",
      "size": 10,
      "layers": [
        "street",
        "country",
        "region",
        "county",
        "locality",
        "continent",
      ],
      "private": false,
      "focus.point.lat": 31.3,
      "focus.point.lon": 35.45,
      "lang": {
        "name": "English",
        "iso6391": "en",
        "iso6393": "eng",
        "via": "header",
        "defaulted": false
      },
      "querySize": 20,
      "parser": "pelias",
      "parsed_text": {
        "subject": "האוניברסיטה"
      }
    },
    "warnings": ["performance optimization: excluding 'address' layer"],
    "engine": {
      "name": "Pelias",
      "author": "Mapzen",
      "version": "1.0"
    },
    "timestamp": 1599579340661
  },
  "type": "FeatureCollection",
  "features": []
}

When I ran the command curl localhost:9200/_cat/count I got 1420. Even If my csv contains more than 50K+ records.

Here are some screenshot of pelias import csv command stdout :

Screenshot from 2020-09-08 18-49-02

Screenshot from 2020-09-08 18-34-48

As we can see here, the csv import has detected the csv files and even instantiate a stream reader for them..no error output.
But the records are not loaded.

In my repo I put a sample of the csv that I attempt to load.

There is also my configuration pelias.json and my docker-compose there.

Expected behavior

As I followed step by step the required csv format and applied all the build / import command, I should be able to see the records appears after performing the request as shown ahead.

An in-range update of pelias-config is breaking the build 🚨

The dependency pelias-config was updated from 4.3.0 to 4.4.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

pelias-config is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ci/circleci: build: Your tests passed on CircleCI! (Details).
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v4.4.0

4.4.0 (2019-11-25)

Features

  • elasticsearch: support for dynamically specifying the elasticsearch _type from config (cabddf4)
Commits

The new version differs by 1 commits.

  • cabddf4 feat(elasticsearch): support for dynamically specifying the elasticsearch _type from config

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Cannot query custom data after successful import

I imported the following csv file (extract):

name,address,source,layer,lat,lon
AD,AD,custom,postalcode,42.5357,1.5571
AR,36,custom,postalcode,-25.0178,-59.6472
AR,41,custom,postalcode,-26.883,-65.1956
AR,44,custom,postalcode,-25.0513,-65.2488
AR,45,custom,postalcode,-23.5455,-64.0472
AR,46,custom,postalcode,-23.2252,-65.5236
BD,55,custom,postalcode,26.1669,89.1228
BD,53,custom,postalcode,26.0142,88.9168
BD,50,custom,postalcode,25.9689,88.6808

The idea is to have 2 digit postalcodes of all countries (I used geonames' csv file for this). How can I query the api to get the coordinates for a 2 digit postalcode in a country?

import address not work

hi I need to import a custom list of addresses from CSV files, I have coded the columns as indicated in the documentation
but after I execute import in ealstich search nothing is shown

this is a sample of my csv file

lon,lat,number,zipcode,street,layer,source
11.1258038738599,46.0384255604388,4,38123,,address,csv
11.1352742761045,46.0539734971077,101,38122,,address,csv
11.1251450165258,46.0535672621879,46,38123,Via Antonio Gramsci,address,csv
11.1363143019353,46.0627887491022,10,38122,,address,csv
11.126024700547,46.0564461996177,22,38122,,address,csv
11.1192645125392,46.0599223809797,1,38122,Via fratelli Perini,address,csv
11.1359105131297,46.0617807770361,9,38122,,address,csv
11.1467344763048,46.0752138268721,21,38121,,address,csv
11.1399449465559,46.0777789405135,13,38121,Via delle Marnighe,address,csv

this is my pelias.json file

{
  "logger": {
    "level": "debug",
    "timestamp": false,
    "colorize": true
  },
  "esclient": {
    "apiVersion": "5.6",
    "hosts": [
      {
        "host": "elasticsearch"
      }
    ]
  },
  "elasticsearch": {
    "settings": {
      "index": {
        "refresh_interval": "10s",
        "number_of_replicas": "0",
        "number_of_shards": "1"
      }
    }
  },
  "acceptance-tests": {
    "endpoints": {
      "docker": "http://api:4000/v1/"
    }
  },
  "api": {
    "textAnalyzer": "libpostal",
    "services": {
      "placeholder": {
        "url": "http://placeholder:4100"
      },
      "pip": {
        "url": "http://pip:4200"
      },
      "interpolation": {
        "url": "http://interpolation:4300"
      },
      "libpostal": {
        "url": "http://libpostal:4400"
      }
    },
    "defaultParameters": {
      "focus.point.lat": 45.52,
      "focus.point.lon": -122.67
    }
  },
  "imports": {
    "adminLookup": {
      "enabled": false
    },
    "openstreetmap": {
      "leveldbpath": "/tmp",
      "datapath": "/data/openstreetmap",
      "import": [
        {
          "filename": "trentino-alto-adige.osm.pbf"
        }
      ]
    },
    "csv": {
      "datapath": "/data/csv",
      "files": [
        "trento_civici_strade.csv"
      ]
    },
    "whosonfirst": {
      "datapath": "/data/whosonfirst",
      "importVenues": false,
      "importPostalcodes": true,
      "importPlace": [
        "85685277"
      ]
    }
  }
}

An in-range update of tape is breaking the build 🚨

The devDependency tape was updated from 4.9.2 to 4.10.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

tape is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: build: Your tests failed on CircleCI (Details).
  • continuous-integration/travis-ci/push: The Travis CI build passed (Details).

Commits

The new version differs by 60 commits.

  • 34b1832 v4.10.0
  • 6209882 Merge all orphaned tags: 'v1.1.2', 'v2.0.2', 'v2.1.1', 'v2.2.2', 'v2.3.3', 'v2.4.3', 'v2.5.1', 'v2.6.1', 'v2.7.3', 'v2.8.1', 'v2.9.1', 'v2.10.3', 'v2.11.1', 'v2.13.4', 'v2.14.0', 'v2.14.1', 'v3.6.1'
  • 82e7b26 [Deps] update glob
  • 9e3d25e [Dev Deps] update eslint, js-yaml
  • fd807f5 v1.1.2
  • eddbff5 v2.14.1
  • 6ce09d9 Minor test tweaks due to whitespace differences in v2 vs v4.
  • 71af8ba gitignore node_modules
  • 4c0d9e6 Merge pull request #268 from ljharb/throws_non_function_should_fail
  • d0a675f v3.6.1
  • d22b5fc Minor test tweaks due to output differences in v1 vs v4.
  • 8b3c1b7 Add missing concat-stream devDep
  • 3495543 gitignore node_modules
  • db81846 Merge pull request #268 from ljharb/throws_non_function_should_fail
  • 7ed6651 Minor test tweaks due to whitespace differences in v3 vs v4.

There are 60 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Can't import custom data in pelias

Hey guys,
I have problem when import custom csv file.
I've deploy pelias in k8s and I want import my custom csv file.
When import custom csv, I got error :

unable to locate sqlite folder

Steps to Reproduce
Steps to reproduce the behavior:

  1. download code :
git clone https://github.com/pelias/csv-importer
  1. add config file pelias.json in same directory with package.json
{
  "logger": {
    "level": "info",
    "timestamp": false
  },
  "esclient": {
    "apiVersion": "7.5",
    "hosts": [
      {
        "protocol": "http",
        "host": "localhost",
        "port": 9200
      }
    ]
  },
  "elasticsearch": {
    "settings": {
      "index": {
        "refresh_interval": "10s",
        "number_of_replicas": "0",
        "number_of_shards": "1"
      }
    }
  },
  "imports": {
    "csv": {
      "datapath": "./data",
      "files": ["example.csv"]
    }
  }
}

  1. add file example.csv in data folder
id,source,layer,name,housenumber,street,postcode,lat,lon,addendum_json_pelias
1,custom,address,Tòa nhà Hoàng Ngọc,82,Dịch Vọng Hậu,100000,21.0301873359366,105.785161098654,
  1. Run command:
export PELIAS_CONFIG=./pelias.json
npm run start 

  1. See error
/home/mypc/workingcsv-importer/node_modules/pelias-wof-admin-lookup/src/localPipResolver.js:19
      throw err;
      ^
unable to locate sqlite folder
Thrown at:
    at /home/mypc/workingcsv-importer/node_modules/pelias-wof-admin-lookup/src/localPipResolver.js:19:7
    at createPIPService (/home/mypc/workingcsv-importer/node_modules/pelias-wof-admin-lookup/src/pip/index.js:47:12)
    at LocalPipService (/home/mypc/workingcsv-importer/node_modules/pelias-wof-admin-lookup/src/localPipResolver.js:17:3)
    at module.exports (/home/mypc/workingcsv-importer/node_modules/pelias-wof-admin-lookup/src/localPipResolver.js:99:10)
    at localResolver (/home/mypc/workingcsv-importer/node_modules/pelias-wof-admin-lookup/index.js:28:43)
    at resolver (/home/mypc/workingcsv-importer/node_modules/pelias-wof-admin-lookup/index.js:22:12)
    at create (/home/mypc/workingcsv-importer/node_modules/pelias-wof-admin-lookup/index.js:11:42)
    at createFullImportPipeline (/home/mypc/workingcsv-importer/lib/importPipeline.js:13:23)
    at /home/mypc/workingcsv-importer/import.js:37:18
    at Module._compile (node:internal/modules/cjs/loader:1155:14)

Expected behavior
import success custom csv data

Environment (please complete the following information):

  • OS: Ubuntu 20.04 LTS

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.