- Notifications
You must be signed in to change notification settings - Fork0
Dummy Address Data (DAD) - Real addresses from all around the world.
License
Justintime50/dad
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
DAD is the perfect companion to quickly bootstrap address data in your application. DAD provides real addresses from all over the world with a consistent data structure so you can spend less time looking up addresses and address rules and more time coding.
# Add the submodule to your projectgit submodule add https://github.com/Justintime50/dad.git# If DAD is already added and you need to initialize the submodule, run the followinggit submodule init&& git submodule update
git clone https://github.com/Justintime50/dad.git
You can also find the data sets from thereleases page.
Address objects will look like thesample below. The data type of each field on an address object is astring
. A list of addresses is anarray
ofjson
objects.
Attempts have been made to verify addresses and ensure that street1, city, state, and zip are present on all records. Some lists may be shorter than others to avoid complexity or because of a lack of accurate data.
The following files can be found in thesrc/addresses
directory.
Filename | Locations | Address Count |
---|---|---|
australia/vt-addresses.json | Victoria Area | 5 |
Filename | Locations | Address Count |
---|---|---|
canada/bc-addresses.json | BC Area | 5 |
Filename | Locations | Address Count |
---|---|---|
china/bj-addresses.json | Beijing Area | 5 |
china/hk-addresses.json | Hong Kong - Wan Chai Area | 5 |
Filename | Locations | Address Count |
---|---|---|
europe/de-addresses.json | Germany - Wesel Area | 5 |
europe/es-addresses.json | Spain - Countrywide | 5 |
europe/fr-addresses.json | France - Paris Area | 5 |
europe/uk-addresses.json | United Kingdom - England Area | 5 |
Filename | Locations | Address Count |
---|---|---|
mexico/mx-addresses.json | Mexico - Mexico City Area | 5 |
Filename | Locations | Address Count |
---|---|---|
united-states/az-addresses.json | Arizona - Gilbert Area | 100 |
united-states/ca-addresses.json | California - Anaheim Area | 100 |
united-states/id-addresses.json | Idaho - Boise Area | 100 |
united-states/ks-addresses.json | Kansas - Barton County | 100 |
united-states/nv-addresses.json | Nevada - Lincoln Area | 100 |
united-states/ny-addresses.json | New York - Rochester Area | 100 |
united-states/or-addresses.json | Oregon - Portland Area | 100 |
united-states/tx-addresses.json | Texas - Austin Area | 100 |
united-states/ut-addresses.json | Utah - Provo Area | 100 |
united-states/wa-addresses.json | Washington - Spokane Area | 100 |
A sample address object will look like the following:
{"street1":"231 N 1200 W","street2":"UNIT 104","city":"OREM","state":"UT","zip":"84057","country":"US"}
{"country":"United States of America","alpha_2_code":"US","alpha_3_code":"USA"}
# Lint the projectnpm run lint# Run testsnpm runtest
Create Slim List
To create the slim lists from a larger dataset, use thecreateSlimJson.js
tool in theutils
folder. See the script for additional information. This tool will grab 100 random addresses (by default) from a larger JSON dataset and create a new slim file that can be added to DAD.
DATA_SET=path/to/dataset.json STATE=UT COUNTRY=US node utils/createSlimJson.js
Beautify and Minify Lists
Additional tooling is provided for convenience when adding new data sets that allow you to beautify a JSON list or minify it.
INPUT_FILE=path/to/input.json OUTPUT_FILE=path/to/output.json node utils/minifyJson.js
This data is very laborious to build - any contributions are welcome! Open a PR or issue with additions or fixes.
Lists of addresses must contain at least 5 addresses and not exceed 100 records. Both the beautified and minified lists must be present. Addresses that are not a part of the OpenAddress Project must be publicly well-known addresses (government buildings, hospitals, museums, landmarks, etc). All keys of an address record must be present and all of their values must be strings. The current test suite should enforce these standards.
As these addresses are public knowledge and open sourced, I take no responsibility for their use. If you'd like an address removed from the list, submit an issue.
- Many of the addresses are provided from theOpenAddress Project, others are publicly well-known landmarks.
DAD
is conceptually based onRRAD.
About
Dummy Address Data (DAD) - Real addresses from all around the world.