Giter VIP home page Giter VIP logo

flirtable's Introduction

Flirtable

This is a web component used to visualize the data of an Airtable with search, filtering and mapping functionality.

Screenshot

Getting started

The underlying project can be used to create a web application out of a Table with a particular structure:

  • Title - the headline of an item or location
  • Summary - a short text for an overlay or gallery
  • Placename - an address or other bit of information
  • Lat - the latitude of the location
  • Lon - the longitude of the location
  • Category - for a map legend or filters
  • Details - free text for a larger popup
  • Link - URL to link to instead of the popup
  • Images - attachments used as a thumbnail

Use these default column names in your Table, or configure a translation of any of your differing column names with a BASE_FIELDS parameter like this (to use "Name" instead of "Title", etc.):

Title=Name;Summary=Headline;Link=URL;Images=Bilder

Map view

Points on the map for each row along with a details popup on tap are shown. Right clicking anywhere on the map shows the current latitude and longitude, which is helpful if you want to add new points to your spreadsheet without geocoding.

A legend is automatically generated from the category field. An optional button, "Add", can link to an Airtable form where new data points can be added. The data is refreshed by tapping "Refresh" and your current position can be shown with the target button.

Gallery view

This is a grid of squares, inspired from Airtable's own gallery.

Getting started

The following environment keys can be used to configure this project:

  • AIRTABLE_BASE, AIRTABLE_TABLE and AIRTABLE_KEY from the Airtable API
  • AIRTABLE_FORM (optional) is the URL of the shared add (Form) view
  • AIRTABLE_LINK (optional) is the URL of the shared detail (Gallery) view
  • MAPBOX_KEY (optional) for map view - get an access token first
  • BASE_FIELDS (optional) are the mapping of your column names to the standard ones, as described above
  • POPUP_FIELDS (optional) are a comma-delimited list of columns which are shown in the detail pop-up
  • REQUIRED_FIELDS (optional) are a comma-delimited list of columns which are required for row to be shown
  • SORT_KEY (optional) to indicate which column to sort on, prefixed with - to reverse the order
  • START_EMPTY (optional) set to 1 if you do not want any results visible on loading

Deployment

These can be added using Heroku's add project or Settings interface:

Deploy on Heroku

Or through the environment variables on Vercel:

Deploy with Vercel

Tech stack

Project structure

Location Content
/data Sample data structure
/static Frontend resources
/templates Web templates
/index.py Flask API (/api)

Contributing

First, clone this repository and make sure to set up the following dependencies:

Setup a virtual environment, install dependencies, and activate it using Poetry:

$ poetry shell
$ poetry install

Create a file called .flaskenv (or .env if using gunicorn in production) in the root folder and add development settings and required keys from the Configuration section above - for example:

BASE_FIELDS="Title=Name;Summary=Headline;Link=URL;Images=Logo"
POPUP_FIELDS=Category,Details,Relevance
SORT_KEY=Headline

AIRTABLE_BASE=...
AIRTABLE_KEY=...
AIRTABLE_TABLE=...

AIRTABLE_LINK=https://airtable.com/shr...
AIRTABLE_FORM=https://airtable.com/shr...

MAPBOX_KEY=pk...

# Required to use Flask cli
FLASK_APP=index.py

# When not in production:
FLASK_ENV=development
FLASK_DEBUG=true

Now start the development server:

$ flask run

Dependency management

We are using poetry (and GitHub bots) to keep this project up to date. To check if you have the latest versions of upstream libraries, run:

poetry update

Heroku's buildpack currently does not support loading Python dependencies from poetry automatically. We're working on it ... in the meantime, please remember to run this command after upgrading dependencies:

poetry export -f requirements.txt --without-hashes > requirements.txt

(* If you include hashes, vercel complains about setuptools)

History

Originally developed by @loleg as part of the Urbane Dörfer project.

Thanks to contributions from @Brieden and @Ceeced

License

MIT License

flirtable's People

Contributors

brieden avatar ceeced avatar dependabot[bot] avatar loleg avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ceeced loleg

flirtable's Issues

Initial release checklist

We agreed that the first release of the project will include the following changes:

  • Name (+ Adresse)
  • Anzahl Personen
  • Farbcodes / Legende
  • Lat/Long direkt auf die Karte
  • Notizen mit "Mehr ..." Dialog

Livemark support

Currently the API in this project serves a couple of Mustache/Jinja-enabled HTML template pages. It would be interesting to see how this could become a compelling use case for the Livemark project. At least in helping to set up a process to export Data Packages from Airtable. I'll add more thoughts, be happy to hear any comments later.

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.