diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..067da57 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,23 @@ +name: ci +on: + push: + branches: + - master + - main + - documentation-mkdocs +permissions: + contents: write +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: 3.x + - uses: actions/cache@v2 + with: + key: ${{ github.ref }} + path: .cache + - run: pip install mkdocs-material + - run: mkdocs gh-deploy --remote-branch gh-pages --force \ No newline at end of file diff --git a/.gitignore b/.gitignore index b0e3907..7545116 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ node_modules npm-debug.log .DS_Store + +.idea/ +.venv/ \ No newline at end of file diff --git a/README.md b/README.md index 609e2db..1ca628e 100644 --- a/README.md +++ b/README.md @@ -31,36 +31,36 @@ Here is where you can find all documentation for the [Pelias geocoder](https://g ### Core Features and API Documentation #### Endpoint descriptions -- [Forward geocoding](search.md) (**/v1/search**) to find a place by searching for an address or name -- [Reverse geocoding](reverse.md) (**/v1/reverse**) to find what is located at a certain coordinate location -- [Autocomplete](autocomplete.md) (**/v1/autocomplete**) to give real-time result suggestions without having to type the whole location -- [Structured Geocoding](structured-geocoding.md) (**/v1/search/structured**) (*beta*) to find a place with data already separated into housenumber, street, city, etc -- [Place endpoint](place.md) (**/v1/place**) for details on a place returned from a previous query +- [Forward geocoding](site/documentation/search.md) (**/v1/search**) to find a place by searching for an address or name +- [Reverse geocoding](site/documentation/reverse.md) (**/v1/reverse**) to find what is located at a certain coordinate location +- [Autocomplete](site/documentation/autocomplete.md) (**/v1/autocomplete**) to give real-time result suggestions without having to type the whole location +- [Structured Geocoding](site/documentation/structured-geocoding.md) (**/v1/search/structured**) (*beta*) to find a place with data already separated into housenumber, street, city, etc +- [Place endpoint](site/documentation/place.md) (**/v1/place**) for details on a place returned from a previous query -_Not sure which Endpoint to use? We have a [page](search-workflows.md) for that_ +_Not sure which Endpoint to use? We have a [page](site/documentation/search-workflows.md) for that_ #### Query parameters and options -- [Global coverage with prioritized local results](search.md#prioritize-results-by-proximity) -- [Language support](language-codes.md) for seeing results in different languages +- [Global coverage with prioritized local results](site/documentation/search.md#prioritize-results-by-proximity) +- [Language support](site/documentation/language-codes.md) for seeing results in different languages #### Response Properties -- [Full list of response properties](response.md) -- [Confidence scores, match\_types and other tools for determining result quality](result_quality.md) +- [Full list of response properties](site/documentation/response.md) +- [Confidence scores, match\_types and other tools for determining result quality](site/documentation/result-quality.md) ### Data Sources -- [Pelias data sources](data-sources.md) +- [Pelias data sources](site/documentation/data-sources.md) ### Running your own Pelias -- [Getting started](getting_started_install.md) Start here if you're looking to install Pelias -- [Pelias from scratch](pelias_from_scratch.md) More in-depth instructions for installing Pelias -- [Full planet build considerations](full_planet_considerations.md) Special information on running a full planet Pelias build -- [Service descriptions](services.md) A description of all the Pelias services, and when they are used -- [Software Requirements](requirements.md) A list of all software requirements for Pelias +- [Getting started](site/documentation/getting-started-install.md) Start here if you're looking to install Pelias +- [Pelias from scratch](site/documentation/pelias-from-scratch.md) More in-depth instructions for installing Pelias +- [Full planet build considerations](site/documentation/full-planet-considerations.md) Special information on running a full planet Pelias build +- [Service descriptions](site/documentation/services.md) A description of all the Pelias services, and when they are used +- [Software Requirements](site/documentation/requirements.md) A list of all software requirements for Pelias ### Pelias project development -- [Release notes](release-notes.md). See notable changes in Pelias over time -- [Development roadmap](development/roadmap.md). Plans for future improvements to Pelias. Read this to see what's coming and how you can help +- [Release notes](site/release-notes.md). See notable changes in Pelias over time +- [Development roadmap](site/development/roadmap.md). Plans for future improvements to Pelias. Read this to see what's coming and how you can help ### Misc -- [Glossary of common terms](glossary.md) +- [Glossary of common terms](site/documentation/glossary.md) diff --git a/installing.md b/installing.md deleted file mode 100644 index ccfcde0..0000000 --- a/installing.md +++ /dev/null @@ -1 +0,0 @@ -See our installation guides list at [https://github.com/pelias/documentation/blob/master/getting_started_install.md](https://github.com/pelias/documentation/blob/master/getting_started_install.md) diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..1befd6b --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,99 @@ +site_name: Pelias Geocoder +docs_dir: site +site_dir: generated +theme: + name: material + font: + text: Inter + code: JetBrains Mono + logo: assets/Pelias-Logo_horizontal_secondary.png + favicon: assets/favicon_64x64.png + features: + - navigation.instant + - navigation.tracking + - navigation.tabs + - navigation.tabs.sticky + - navigation.sections + - navigation.top + - toc.follow + - search.suggest + - search.highlight + - content.tabs.link + - content.code.annotation + - content.code.copy + - navigation.footer + palette: + + # Palette toggle for light mode + - media: "(prefers-color-scheme: light)" + scheme: default + toggle: + icon: material/weather-sunny + name: Switch to dark mode + + # Palette toggle for dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + toggle: + icon: material/weather-night + name: Switch to light mode + +extra_css: + - stylesheets/extra.css + +extra: + social: + - icon: fontawesome/brands/github + link: https://github.com/pelias/ + - icon: fontawesome/brands/twitter + link: https://twitter.com/pelias_geocoder + - icon: fontawesome/brands/gitter + link: https://gitter.im/pelias/pelias + +markdown_extensions: + - pymdownx.highlight: + anchor_linenums: true + - pymdownx.inlinehilite + - pymdownx.snippets + - admonition + - footnotes + - pymdownx.details + - pymdownx.superfences + - pymdownx.mark + - attr_list + +nav: + - Pelias: + - "index.md" + - "fun-facts.md" + - Documentation: + - 'documentation/index.md' + - Getting Started: 'documentation/getting-started-install.md' + - Add Search to a Map: 'documentation/add-search-to-a-map.md' + - Forward Geocoding: 'documentation/search.md' + - Reverse Geocoding: 'documentation/reverse.md' + - Autocomplete: 'documentation/autocomplete.md' + - Structured Geocoding: 'documentation/structured-geocoding.md' + - Place Endpoint: 'documentation/place.md' + - Search Workflows: 'documentation/search-workflows.md' + - Search Response: 'documentation/response.md' + - Result Quality: 'documentation/result-quality.md' + - Searching Address: 'documentation/addresses.md' + - Data Sources: 'documentation/data-sources.md' + - Pelias from Scratch: 'documentation/pelias-from-scratch.md' + - Full Planet Build: 'documentation/full-planet-considerations.md' + - Language Support: 'documentation/language-codes.md' + - Requirements: 'documentation/requirements.md' + - Pelias Services: 'documentation/services.md' + - CORS: 'documentation/use-cors.md' + - HTTP status codes: 'documentation/http-status-codes.md' + - Glossary: 'documentation/glossary.md' + - Development: + - Repository List: 'development/repository-list.md' + - Roadmap: 'development/roadmap.md' + - Code of Conduct: 'development/code-of-conduct.md' + - Contribute: 'contributing.md' + - Release Notes: 'release-notes.md' + - Get an API Key: 'https://geocode.earth/' + +copyright: Pelias is a free open source project. \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..1f8b2e0 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,64 @@ +attrs==22.1.0 +build==0.10.0 +CacheControl==0.12.11 +certifi==2022.9.24 +cffi==1.15.1 +charset-normalizer==2.1.1 +cleo==2.0.1 +click==8.1.3 +colorama==0.4.6 +crashtest==0.4.1 +cryptography==37.0.4 +distlib==0.3.6 +dulwich==0.21.3 +filelock==3.8.0 +ghp-import==2.1.0 +html5lib==1.1 +idna==3.4 +installer==0.7.0 +jaraco.classes==3.2.3 +jeepney==0.8.0 +Jinja2==3.1.2 +jsonschema==4.16.0 +keyring==23.9.3 +lockfile==0.12.2 +Markdown==3.3.7 +MarkupSafe==2.1.2 +mergedeep==1.3.4 +mkdocs==1.4.2 +mkdocs-material==9.1.6 +mkdocs-material-extensions==1.1.1 +more-itertools==8.14.0 +msgpack==1.0.4 +packaging==22.0 +pexpect==4.8.0 +pipenv==2023.3.20 +pkginfo==1.9.6 +platformdirs==2.5.2 +poetry==1.4.2 +poetry-core==1.5.2 +poetry-plugin-export==1.3.0 +ptyprocess==0.7.0 +pycparser==2.21 +Pygments==2.15.0 +pymdown-extensions==9.11 +pyproject_hooks==1.0.0 +pyrsistent==0.18.1 +python-dateutil==2.8.2 +PyYAML==6.0 +pyyaml_env_tag==0.1 +rapidfuzz==2.13.7 +regex==2023.3.23 +requests==2.28.1 +requests-toolbelt==0.9.1 +SecretStorage==3.3.3 +shellingham==1.5.0 +six==1.16.0 +tomli==2.0.1 +tomlkit==0.11.5 +trove-classifiers==2022.12.22 +urllib3==1.26.12 +virtualenv==20.21.0 +virtualenv-clone==0.5.7 +watchdog==3.0.0 +webencodings==0.5.1 diff --git a/site/CNAME b/site/CNAME new file mode 100644 index 0000000..af6c84b --- /dev/null +++ b/site/CNAME @@ -0,0 +1 @@ +pelias-demo-unaffiliated.adhadse.com \ No newline at end of file diff --git a/site/assets/Pelias-Logo_horizontal_secondary.png b/site/assets/Pelias-Logo_horizontal_secondary.png new file mode 100644 index 0000000..32c3e4f Binary files /dev/null and b/site/assets/Pelias-Logo_horizontal_secondary.png differ diff --git a/site/assets/favicon_64x64.png b/site/assets/favicon_64x64.png new file mode 100644 index 0000000..e4c5c86 Binary files /dev/null and b/site/assets/favicon_64x64.png differ diff --git a/site/assets/images/Pelias Architecture.png b/site/assets/images/Pelias Architecture.png new file mode 100644 index 0000000..456af0e Binary files /dev/null and b/site/assets/images/Pelias Architecture.png differ diff --git a/images/basic-webmap.png b/site/assets/images/basic-webmap.png similarity index 100% rename from images/basic-webmap.png rename to site/assets/images/basic-webmap.png diff --git a/images/boundary_london.png b/site/assets/images/boundary_london.png similarity index 100% rename from images/boundary_london.png rename to site/assets/images/boundary_london.png diff --git a/images/developer-console.png b/site/assets/images/developer-console.png similarity index 100% rename from images/developer-console.png rename to site/assets/images/developer-console.png diff --git a/images/focus_point.png b/site/assets/images/focus_point.png similarity index 100% rename from images/focus_point.png rename to site/assets/images/focus_point.png diff --git a/site/assets/images/forward-geocoding.gif b/site/assets/images/forward-geocoding.gif new file mode 100644 index 0000000..ab050da Binary files /dev/null and b/site/assets/images/forward-geocoding.gif differ diff --git a/images/geocoder-address-search.png b/site/assets/images/geocoder-address-search.png similarity index 100% rename from images/geocoder-address-search.png rename to site/assets/images/geocoder-address-search.png diff --git a/images/geocoder-blank-tab.png b/site/assets/images/geocoder-blank-tab.png similarity index 100% rename from images/geocoder-blank-tab.png rename to site/assets/images/geocoder-blank-tab.png diff --git a/images/geocoder-search-icon.png b/site/assets/images/geocoder-search-icon.png similarity index 100% rename from images/geocoder-search-icon.png rename to site/assets/images/geocoder-search-icon.png diff --git a/site/assets/images/interpolation/120px-Logo_by_hind_128x128.png b/site/assets/images/interpolation/120px-Logo_by_hind_128x128.png new file mode 100644 index 0000000..70dfb22 Binary files /dev/null and b/site/assets/images/interpolation/120px-Logo_by_hind_128x128.png differ diff --git a/site/assets/images/interpolation/192-finborough-rd-tags.png b/site/assets/images/interpolation/192-finborough-rd-tags.png new file mode 100644 index 0000000..bacc84e Binary files /dev/null and b/site/assets/images/interpolation/192-finborough-rd-tags.png differ diff --git a/site/assets/images/interpolation/192-finborough-rd.png b/site/assets/images/interpolation/192-finborough-rd.png new file mode 100644 index 0000000..8377745 Binary files /dev/null and b/site/assets/images/interpolation/192-finborough-rd.png differ diff --git a/site/assets/images/interpolation/Housenumber_example_kms_2.png b/site/assets/images/interpolation/Housenumber_example_kms_2.png new file mode 100644 index 0000000..27ffb65 Binary files /dev/null and b/site/assets/images/interpolation/Housenumber_example_kms_2.png differ diff --git a/site/assets/images/interpolation/JrBdQ.png b/site/assets/images/interpolation/JrBdQ.png new file mode 100644 index 0000000..6629231 Binary files /dev/null and b/site/assets/images/interpolation/JrBdQ.png differ diff --git a/site/assets/images/interpolation/earls-court-51-node-tags.png b/site/assets/images/interpolation/earls-court-51-node-tags.png new file mode 100644 index 0000000..94efda4 Binary files /dev/null and b/site/assets/images/interpolation/earls-court-51-node-tags.png differ diff --git a/site/assets/images/interpolation/earls-court-51-node.png b/site/assets/images/interpolation/earls-court-51-node.png new file mode 100644 index 0000000..14886b4 Binary files /dev/null and b/site/assets/images/interpolation/earls-court-51-node.png differ diff --git a/site/assets/images/interpolation/earls-court-51-way-tags.png b/site/assets/images/interpolation/earls-court-51-way-tags.png new file mode 100644 index 0000000..fad6bb5 Binary files /dev/null and b/site/assets/images/interpolation/earls-court-51-way-tags.png differ diff --git a/site/assets/images/interpolation/earls-court-51-way.png b/site/assets/images/interpolation/earls-court-51-way.png new file mode 100644 index 0000000..3d9eda1 Binary files /dev/null and b/site/assets/images/interpolation/earls-court-51-way.png differ diff --git a/site/assets/images/interpolation/earls-court-square.png b/site/assets/images/interpolation/earls-court-square.png new file mode 100644 index 0000000..5024066 Binary files /dev/null and b/site/assets/images/interpolation/earls-court-square.png differ diff --git a/site/assets/images/interpolation/golden-gate-park.png b/site/assets/images/interpolation/golden-gate-park.png new file mode 100644 index 0000000..08a8368 Binary files /dev/null and b/site/assets/images/interpolation/golden-gate-park.png differ diff --git a/site/assets/images/interpolation/oa-extract.png b/site/assets/images/interpolation/oa-extract.png new file mode 100644 index 0000000..7d9f22a Binary files /dev/null and b/site/assets/images/interpolation/oa-extract.png differ diff --git a/site/assets/images/interpolation/oresund-bridge.png b/site/assets/images/interpolation/oresund-bridge.png new file mode 100644 index 0000000..cc9f7bb Binary files /dev/null and b/site/assets/images/interpolation/oresund-bridge.png differ diff --git a/site/assets/images/interpolation/osm-interpolation-coverage.png b/site/assets/images/interpolation/osm-interpolation-coverage.png new file mode 100644 index 0000000..b44ddf7 Binary files /dev/null and b/site/assets/images/interpolation/osm-interpolation-coverage.png differ diff --git a/site/assets/images/interpolation/osm-interpolation-tag.png b/site/assets/images/interpolation/osm-interpolation-tag.png new file mode 100644 index 0000000..3dd4bf5 Binary files /dev/null and b/site/assets/images/interpolation/osm-interpolation-tag.png differ diff --git a/site/assets/images/interpolation/osm-street-multiple-1-tags.png b/site/assets/images/interpolation/osm-street-multiple-1-tags.png new file mode 100644 index 0000000..fc5a7e6 Binary files /dev/null and b/site/assets/images/interpolation/osm-street-multiple-1-tags.png differ diff --git a/site/assets/images/interpolation/osm-street-multiple-1.png b/site/assets/images/interpolation/osm-street-multiple-1.png new file mode 100644 index 0000000..948a34e Binary files /dev/null and b/site/assets/images/interpolation/osm-street-multiple-1.png differ diff --git a/site/assets/images/interpolation/osm-street-multiple-2-tags.png b/site/assets/images/interpolation/osm-street-multiple-2-tags.png new file mode 100644 index 0000000..d61aa3f Binary files /dev/null and b/site/assets/images/interpolation/osm-street-multiple-2-tags.png differ diff --git a/site/assets/images/interpolation/osm-street-multiple-2.png b/site/assets/images/interpolation/osm-street-multiple-2.png new file mode 100644 index 0000000..0f073d8 Binary files /dev/null and b/site/assets/images/interpolation/osm-street-multiple-2.png differ diff --git a/site/assets/images/interpolation/osm-street-multiple-3-tags.png b/site/assets/images/interpolation/osm-street-multiple-3-tags.png new file mode 100644 index 0000000..a8920ad Binary files /dev/null and b/site/assets/images/interpolation/osm-street-multiple-3-tags.png differ diff --git a/site/assets/images/interpolation/osm-street-multiple-3.png b/site/assets/images/interpolation/osm-street-multiple-3.png new file mode 100644 index 0000000..2e80e55 Binary files /dev/null and b/site/assets/images/interpolation/osm-street-multiple-3.png differ diff --git a/site/assets/images/interpolation/osm-street-simple-tags.png b/site/assets/images/interpolation/osm-street-simple-tags.png new file mode 100644 index 0000000..c39c320 Binary files /dev/null and b/site/assets/images/interpolation/osm-street-simple-tags.png differ diff --git a/site/assets/images/interpolation/osm-street-simple.png b/site/assets/images/interpolation/osm-street-simple.png new file mode 100644 index 0000000..fc35781 Binary files /dev/null and b/site/assets/images/interpolation/osm-street-simple.png differ diff --git a/site/assets/images/interpolation/search-conflation-problem.png b/site/assets/images/interpolation/search-conflation-problem.png new file mode 100644 index 0000000..231a207 Binary files /dev/null and b/site/assets/images/interpolation/search-conflation-problem.png differ diff --git a/site/assets/images/interpolation/search-conflation-problem2.png b/site/assets/images/interpolation/search-conflation-problem2.png new file mode 100644 index 0000000..6f2be68 Binary files /dev/null and b/site/assets/images/interpolation/search-conflation-problem2.png differ diff --git a/site/assets/images/interpolation/search-conflation-problem3.png b/site/assets/images/interpolation/search-conflation-problem3.png new file mode 100644 index 0000000..8becd29 Binary files /dev/null and b/site/assets/images/interpolation/search-conflation-problem3.png differ diff --git a/site/assets/images/interpolation/tiger-interpolation-basics.png b/site/assets/images/interpolation/tiger-interpolation-basics.png new file mode 100644 index 0000000..dafd2fb Binary files /dev/null and b/site/assets/images/interpolation/tiger-interpolation-basics.png differ diff --git a/site/assets/images/interpolation/wetherby-mansions-node1-tags.png b/site/assets/images/interpolation/wetherby-mansions-node1-tags.png new file mode 100644 index 0000000..84d9c06 Binary files /dev/null and b/site/assets/images/interpolation/wetherby-mansions-node1-tags.png differ diff --git a/site/assets/images/interpolation/wetherby-mansions-node1.png b/site/assets/images/interpolation/wetherby-mansions-node1.png new file mode 100644 index 0000000..97cedd1 Binary files /dev/null and b/site/assets/images/interpolation/wetherby-mansions-node1.png differ diff --git a/site/assets/images/interpolation/wetherby-mansions-node2-tags.png b/site/assets/images/interpolation/wetherby-mansions-node2-tags.png new file mode 100644 index 0000000..6053d41 Binary files /dev/null and b/site/assets/images/interpolation/wetherby-mansions-node2-tags.png differ diff --git a/site/assets/images/interpolation/wetherby-mansions-node2.png b/site/assets/images/interpolation/wetherby-mansions-node2.png new file mode 100644 index 0000000..bec694c Binary files /dev/null and b/site/assets/images/interpolation/wetherby-mansions-node2.png differ diff --git a/site/assets/images/interpolation/wetherby-mansions-way-tags.png b/site/assets/images/interpolation/wetherby-mansions-way-tags.png new file mode 100644 index 0000000..d03268f Binary files /dev/null and b/site/assets/images/interpolation/wetherby-mansions-way-tags.png differ diff --git a/site/assets/images/interpolation/wetherby-mansions-way.png b/site/assets/images/interpolation/wetherby-mansions-way.png new file mode 100644 index 0000000..b2e4768 Binary files /dev/null and b/site/assets/images/interpolation/wetherby-mansions-way.png differ diff --git a/images/overlapping_boundaries.gif b/site/assets/images/overlapping_boundaries.gif similarity index 100% rename from images/overlapping_boundaries.gif rename to site/assets/images/overlapping_boundaries.gif diff --git a/site/assets/images/reverse-geocoding.gif b/site/assets/images/reverse-geocoding.gif new file mode 100644 index 0000000..1cfa278 Binary files /dev/null and b/site/assets/images/reverse-geocoding.gif differ diff --git a/images/world_all.png b/site/assets/images/world_all.png similarity index 100% rename from images/world_all.png rename to site/assets/images/world_all.png diff --git a/images/world_circle.png b/site/assets/images/world_circle.png similarity index 100% rename from images/world_circle.png rename to site/assets/images/world_circle.png diff --git a/images/world_country.png b/site/assets/images/world_country.png similarity index 100% rename from images/world_country.png rename to site/assets/images/world_country.png diff --git a/images/world_rect.png b/site/assets/images/world_rect.png similarity index 100% rename from images/world_rect.png rename to site/assets/images/world_rect.png diff --git a/site/contributing.md b/site/contributing.md new file mode 100644 index 0000000..a60ef73 --- /dev/null +++ b/site/contributing.md @@ -0,0 +1,53 @@ +Pelias can't succeed without contributions from community members like you! Contributions come in many different shapes and sizes. In this file we provide guidance around two of the most common types of contributions: opening issues and opening pull requests. + +# Community Values + +We ask that you are respectful when contributing to Pelias or engaging with our community. As a community, we appreciate the fact that contributors might be approaching the project from a different perspective and background. We hope that beginners as well as advanced users will be able to use and contribute back to Pelias. We want to encourage contributions and feedback from all over the world, which means that English might not be a contributor's native language, and sometimes we may encounter cultural differences. Contructive disagreements can be essential to moving a project forward, but disrespectful language or behavior will not be tolerated. + +Above all, be patient, be respectful, and be kind! + +# Submitting Issues + +All issues for Pelias are housed in the [pelias/pelias](https://github.com/pelias/pelias) repo. Before opening an issue, be sure to search the repository to see if someone else has asked your question before. If not, go ahead and [open a new issue](https://github.com/pelias/pelias/issues/new). + +## Submitting technical bugs + +When submitting bug reports, please be sure to give us as much context as possible so that we can reproduce the error you encountered. Be sure to include: +- System conditons (OS, browser, etc) +- Steps to reproduce +- Expected outcome +- Actual outcome +- Screenshots, if applicable +- Code that exposes the bug, if you have it (such as a failing test or a barebones script) + +## Submitting issues around search result quality + +It's important to get feedback about the quality of local search results. When it comes to things like address structure, capitalization, and spelling errors, your local knowledge will make it easier for us to understand the problem. When submitting issues be sure to include: +- Where in the world you were searching +- Your search query +- Your expected result +- Your actual result + + +# Pull Requests Welcome! + +## Project standards overview + +Pelias has several miscellaneous standards: + +- we use [JSHint](http://jshint.com/docs/) for linting +- we use [Github Actions](https://github.com/) for continuous integration +- we use [Winston](https://www.npmjs.com/package/winston) for logging +- we *love* tests, especially when written with [tape](https://github.com/substack/tape) +- we use [semver](http://semver.org/) for package versioning +- we *loosely* use [JSDoc](http://usejsdoc.org/index.html) for documenting code, as described [here](in_code_documentation_guidelines.md) + +`jshint` and any unit tests in a project will be automatically invoked when you commit to an existing project; make +sure they exit successfully! + +## Active contributors + +We'll gladly invite active contributors to become members of the [Pelias organization](https://github.com/pelias). New +members will gain direct write permissions, *and with great power comes great responsibility*. To ensure that any new +repositories that you create conform to Pelias standards, we developed [pelias-init](https://github.com/pelias/init), a +simple project generator that will initialize all of the boilerplate needed to get started on something new. \ No newline at end of file diff --git a/site/development/code-of-conduct.md b/site/development/code-of-conduct.md new file mode 100644 index 0000000..c7d46d4 --- /dev/null +++ b/site/development/code-of-conduct.md @@ -0,0 +1,73 @@ +# Contributor Code of Conduct + +This code of conduct outlines our expectations for participants within the **Pelias** community, as well as steps to reporting unacceptable behavior. We are committed to providing a welcoming and inspiring community for all and expect our code of conduct to be honored. Anyone who violates this code of conduct may be banned from the community. + +Our open source community strives to: + +* **Be friendly and patient.** +* **Be welcoming**: We strive to be a community that welcomes and supports people of all backgrounds and identities. This includes, but is not limited to members of any race, ethnicity, culture, national origin, colour, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion, and mental and physical ability. +* **Be considerate**: Your work will be used by other people, and you in turn will depend on the work of others. Any decision you take will affect users and colleagues, and you should take those consequences into account when making decisions. Remember that we're a world-wide community, so you might not be communicating in someone else's primary language. +* **Be respectful**: Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners. We might all experience some frustration now and then, but we cannot allow that frustration to turn into a personal attack. It’s important to remember that a community where people feel uncomfortable or threatened is not a productive one. +* **Be careful in the words that we choose**: we are a community of professionals, and we conduct ourselves professionally. Be kind to others. Do not insult or put down other participants. Harassment and other exclusionary behavior aren't acceptable. +* **Try to understand why we disagree**: Disagreements, both social and technical, happen all the time. It is important that we resolve disagreements and differing views constructively. Remember that we’re different. The strength of our community comes from its diversity, people from a wide range of backgrounds. Different people have different perspectives on issues. Being unable to understand why someone holds a viewpoint doesn’t mean that they’re wrong. Don’t forget that it is human to err and blaming each other doesn’t get us anywhere. Instead, focus on helping to resolve issues and learning from mistakes. + +## Definitions + +Harassment includes, but is not limited to: + +- Offensive comments related to gender, gender identity and expression, sexual orientation, disability, mental illness, neuro(a)typicality, physical appearance, body size, race, age, regional discrimination, political or religious affiliation +- Unwelcome comments regarding a person’s lifestyle choices and practices, including those related to food, health, parenting, drugs, and employment +- Deliberate misgendering. This includes deadnaming or persistently using a pronoun that does not correctly reflect a person's gender identity. You must address people by the name they give you when not addressing them by their username or handle +- Physical contact and simulated physical contact (eg, textual descriptions like “*hug*” or “*backrub*”) without consent or after a request to stop +- Threats of violence, both physical and psychological +- Incitement of violence towards any individual, including encouraging a person to commit suicide or to engage in self-harm +- Deliberate intimidation +- Stalking or following +- Harassing photography or recording, including logging online activity for harassment purposes +- Sustained disruption of discussion +- Unwelcome sexual attention, including gratuitous or off-topic sexual images or behaviour +- Pattern of inappropriate social contact, such as requesting/assuming inappropriate levels of intimacy with others +- Continued one-on-one communication after requests to cease +- Deliberate “outing” of any aspect of a person’s identity without their consent except as necessary to protect others from intentional abuse +- Publication of non-harassing private communication + +Our open source community prioritizes marginalized people’s safety over privileged people’s comfort. We will not act on complaints regarding: + +- ‘Reverse’ -isms, including ‘reverse racism,’ ‘reverse sexism,’ and ‘cisphobia’ +- Reasonable communication of boundaries, such as “leave me alone,” “go away,” or “I’m not discussing this with you” +- Refusal to explain or debate social justice concepts +- Communicating in a ‘tone’ you don’t find congenial +- Criticizing racist, sexist, cissexist, or otherwise oppressive behavior or assumptions + + +### Diversity Statement + +We encourage everyone to participate and are committed to building a community for all. Although we will fail at times, we seek to treat everyone both as fairly and equally as possible. Whenever a participant has made a mistake, we expect them to take responsibility for it. If someone has been harmed or offended, it is our responsibility to listen carefully and respectfully, and do our best to right the wrong. + +Although this list cannot be exhaustive, we explicitly honor diversity in age, gender, gender identity or expression, culture, ethnicity, language, national origin, political beliefs, profession, race, religion, sexual orientation, socioeconomic status, and technical ability. We will not tolerate discrimination based on any of the protected +characteristics above, including participants with disabilities. + +### Reporting Issues + +If you experience or witness unacceptable behavior—or have any other concerns—please report it by contacting us via **team@pelias.io**. All reports will be handled with discretion. In your report please include: + +- Your contact information. +- Names (real, nicknames, or pseudonyms) of any individuals involved. If there are additional witnesses, please +include them as well. Your account of what occurred, and if you believe the incident is ongoing. If there is a publicly available record (e.g. a mailing list archive or a public IRC logger), please include a link. +- Any additional information that may be helpful. + +After filing a report, a representative will contact you personally, review the incident, follow up with any additional questions, and make a decision as to how to respond. If the person who is harassing you is part of the response team, they will recuse themselves from handling your incident. If the complaint originates from a member of the response team, it will be handled by a different member of the response team. We will respect confidentiality requests for the purpose of protecting victims of abuse. + +### Attribution & Acknowledgements + +We all stand on the shoulders of giants across many open source communities. We'd like to thank the communities and projects that established code of conducts and diversity statements as our inspiration: + +* [Django](https://www.djangoproject.com/conduct/reporting/) +* [Python](https://www.python.org/community/diversity/) +* [Ubuntu](http://www.ubuntu.com/about/about-ubuntu/conduct) +* [Contributor Covenant](http://contributor-covenant.org/) +* [Geek Feminism](http://geekfeminism.org/about/code-of-conduct/) +* [Citizen Code of Conduct](http://citizencodeofconduct.org/) + + +_This text was adopted from the [Open Code of Conduct](http://todogroup.org/opencodeofconduct/) published by [TODO](http://todogroup.org). Source text available [here](https://github.com/todogroup/opencodeofconduct/blob/gh-pages/index.md)._ \ No newline at end of file diff --git a/development/repository_list.md b/site/development/repository-list.md similarity index 100% rename from development/repository_list.md rename to site/development/repository-list.md diff --git a/development/roadmap.md b/site/development/roadmap.md similarity index 100% rename from development/roadmap.md rename to site/development/roadmap.md diff --git a/add-search-to-a-map.md b/site/documentation/add-search-to-a-map.md similarity index 97% rename from add-search-to-a-map.md rename to site/documentation/add-search-to-a-map.md index ed4286f..25da931 100644 --- a/add-search-to-a-map.md +++ b/site/documentation/add-search-to-a-map.md @@ -2,7 +2,7 @@ [Pelias](https://mapzen.com/products/search/) is a modern, geographic search service based entirely on open-source tools and open data. Use this functionality to enhance any app that has a geographic context, such as ones that help in delivering goods, locating hotels or venues, or providing local weather forecasts. -Through a process known as [geocoding](https://en.wikipedia.org/wiki/Geocoding), Pelias allows you to enter an address or the name of a landmark or business, and the service translates the result into geographic coordinates for mapping. Pelias is built on [Pelias](pelias.io), an open-source geocoding project. +Through a process known as [geocoding](https://en.wikipedia.org/wiki/Geocoding), Pelias allows you to enter an address or the name of a landmark or business, and the service translates the result into geographic coordinates for mapping. Pelias is built on [Pelias](https://pelias.io), an open-source geocoding project. ## Get ready for the tutorial @@ -42,7 +42,7 @@ _Tip: The end of this page has a finished version of the code that you can use t 4. Name your the document `index.html` (where the file name is `index` and the type is `.html`) and save it. 5. Drag your index.html file onto a web browser tab. It should show your title, `My Geocoding Map`, but the web page canvas will be blank. - ![Blank html page](images/geocoder-blank-tab.png) + ![Blank html page](../assets/images/geocoder-blank-tab.png) Your HTML should look like this: @@ -182,7 +182,7 @@ At this point, you have a map! You should see a map, zoom controls, and attribut To recap how you created this, you added references to the Mapzen JS and CSS files, a map `
+ +
+Pelias is a geocoder powered completely by open data, available freely to everyone.
+ ++ Local Installation · + Cloud Webservice · + Documentation · + Community Chat +
+ +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. + + + +### 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](/assets/images/forward-geocoding.gif){: .center} + +### ... and a reverse geocoder, what's that? + +Reverse geocoding is the opposite: returning a list of places near a given latitude/longitude point. + +![reverse](/assets/images/reverse-geocoding.gif){: .center} + +### 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](https://mapzen.com). After Mapzen's shutdown in 2017, Pelias is now [part of the Linux Foundation](https://www.linuxfoundation.org/press-release/2019/01/mapzen-open-source-data-and-software-for-real-time-mapping-applications-to-become-a-linux-foundation-project/). + +### How does it work? + +Magic! (Just kidding) Like any geocoder, Pelias combines [full text search](https://en.wikipedia.org/wiki/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.](/assets/images/Pelias%20Architecture.png){: .center} + +#### Data importers + +The importers filter, normalize, and ingest geographic datasets into the Pelias database. Currently there are six officially supported importers: + +* **[OpenStreetMap](https://github.com/pelias/openstreetmap/)**: supports importing nodes and ways from [OpenStreetMap](http://openstreetmap.org/) +* **[OpenAddresses](https://github.com/pelias/openaddresses/)**: supports importing the hundreds of millions of global addresses collected from various authoritative government sources by [OpenAddresses](https://openaddresses.io/) +* **[Who's on First](https://github.com/pelias/whosonfirst/)**: supports importing admin areas and venues from [Who's on First](https://www.whosonfirst.org/) +* **[Geonames](https://github.com/pelias/geonames/)**: supports importing admin records and venues from [Geonames](http://www.geonames.org/) +* **[Polylines](https://github.com/pelias/polylines)**: supports any data in the [Google Polyline format](https://developers.google.com/maps/documentation/utilities/polylinealgorithm?csw=1). It's mainly used to import roads from OpenStreetMap +* **[CSV](https://github.com/pelias/csv-importer)**: supports importing any data in CSV format, which is great for custom data or proprietary data + +We are always discussing [supporting additional datasets](https://github.com/pelias/pelias/issues/254). 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](https://www.elastic.co/). Currently versions 6 and 7 are supported. + +We've built a tool called [pelias-schema](https://github.com/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](https://github.com/pelias/api)**: The API service defines the Pelias API, and talks to Elasticsearch or other services as needed to perform queries. + * **[Placeholder](https://github.com/pelias/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](https://github.com/pelias/pip-service)**: For reverse geocoding, it's important to be able to perform [point-in-polygon](https://en.wikipedia.org/wiki/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](https://github.com/pelias/libpostal-service)**: Pelias uses the [libpostal](https://github.com/openvenues/libpostal) project for parsing addresses using the power of machine learning. We use a [Go service](https://github.com/whosonfirst/go-whosonfirst-libpostal) built by the [Who's on First](https://whosonfirst.org) team to make this happen quickly and efficiently. + * **[Interpolation](https://github.com/pelias/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](https://github.com/pelias/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](https://github.com/pelias/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](https://github.com/pelias/query): This is where most of our actual Elasticsearch query generation happens. +* [config](https://github.com/pelias/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](https://github.com/pelias/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](https://github.com/pelias/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](https://github.com/pelias/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/](http://pelias.github.io/compare) +* [dashboard](https://github.com/pelias/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](https://github.com/pelias/documentation) repository. + +Additionally, the README file in each of the component repositories listed above provides more detail on that piece. + +