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
App
component loads thepublic/data/row.csv
into therows
store via the util/importData.js script, which pulls styles from constants.js to set up icon and color. - The
App
component separated into two main componentsSidebar
andMapView
which loads therows
Store. - The
filter
store array filters therows
Store for bothRowItems
components andMapView
- When an item is selected by either clicking the element on the map or RowItems, it will set the
selectedItem
store (selectedItem.select(item)), and show theItemDetails
component.
- Including map and center attributes in the selectedItem.select method will toggle the map to zoom in.
Setup .env
cd public
cp .env.example .env
Fill in your AIRTABLE_API_KEY
Download data
npm install
npm run start
Setup the app
cd ..
npm install
You 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