CityOfPhiladelphia / mapboard

This repo is deprecated. mapboard is no longer used for atlas.phila.gov and cityatlas.phila.gov
29 stars 9 forks source link

New data source type for transforming existing data #156

Open ajrothwell opened 6 years ago

ajrothwell commented 6 years ago

Use case: buffering parcel polygon for RCO notification radius.

This would be a new type of data source which does not fetch data form an API, but instead takes in-memory data and transforms it arbitrarily. In the config file this could look like:

    rcoNotificationBuffer: {
      type: 'transform',
      deps: ['parcels.pwd'],
      options: {
        transforms: ['buffer320Ft'],
      },
    },

where buffer320Ft is a transform defined in config.transforms. Currently the logic for applying transforms is located in TopicComponent.vue, so that would need to be extracted into a reusable util.

See the rco-notification-buffer branch for some initial work on this.

To pick this back up again: finalize the API for transform data sources (see rcoNotificationBuffer in the Polling example's config.js), and then make it work.