A directory of essential businesses using Airtable (or Google sheets) as database
- File an issue via this repo's issues page.
- Request a feature via this repo's issues page.
- Comment on issues.
- Write code to fix issues or to create new features. When contributing code, please be sure to:
- Fork this repository, modify the code (changing only one thing at a time), and then issue a pull request for each change.
- Test your code locally before issuing a pull request.
- Clearly state the purpose of your change in the description field for each commit.
This map shows business locations from data hosted in Airtable.
Built using Svelte, Leaflet, and Carto.js.
Icons from Maps Icons Collection.
All data comes from 'public/data/row.csv', which is pulled every hour using get-data-from-airtable.yml github actions script.
If you would like to adapt this code for your project Duplicate the Airtable base using this link.
Afterwards change AIRTABLE_API_KEY , AIRTABLE_BASE_ID, AIRTABLE_TABLE_NAME on github secrets, or your .env file
- The
Appcomponent loads thepublic/data/row.csvinto therowsstore via the util/importData.js script, which pulls styles from constants.js to set up icon and color. - The
Appcomponent separated into two main componentsSidebarandMapViewwhich loads therowsStore. - The
filterstore array filters therowsStore for bothRowItemscomponents andMapView - When an item is selected by either clicking the element on the map or RowItems, it will set the
selectedItemstore (selectedItem.select(item)), and show theItemDetailscomponent.
- Including map and center attributes in the selectedItem.select method will toggle the map to zoom in.
Setup .env
cd public
cp .env.example .envFill in your AIRTABLE_API_KEY
Download data
npm install
npm run startSetup the app
cd ..
npm installYou can either build by running npm run build or run live development environment by running npm run dev, then opening localhost:5000 in your browser.
Please see license file for details.
- Non-code, Creative Commons Attribution 4.0
- Code, GNU General Public License
Email Zhi Keng He