Skip to content
[email protected] edited this page Jul 18, 2024 · 8 revisions

We use Pinia for the stores.

The stores are:

  • 311Store.js -
  • CondosStore.js - holds AIS data that does include units
  • DorStore.js - holds all the data for the Deeds topic
  • GeocodeStore.js - holds the AIS data that does not include units that corresponds to the address search or map click
  • LiStore.js - holds all the data for the L&I topic
  • MainStore.js - holds variables used for data collection that are not suitable for other stores
  • MapStore.js - holds the maplibre-gl map object and other map variables
  • NearbyActivityStore.js - holds all the data for the Nearby Activity topic
  • OpaStore.js - holds all the data for the Property topic
  • ParcelsStore.js - holds the PWD and DOR parcels that correspond to the address search or map click
  • StormwaterStore.js -
  • VotingStore.js -
  • ZoningStore.js -

GeocodeStore.js

GeocodeStore.js contains an empty AisData object in the state, and a fillAisData() function in the actions.

fillAisData() is ONLY called by getGeocodeAndPutInStore() of '@/router/index.js'.

ParcelsStore.js

ParcelsStore.js contains empty 'pwd' and 'dor' objects in the state, and 'fillPwdParcelData()' and 'fillDorParcelData()' in the actions. They are ONLY called within '@/router/index.js' inside 'dataFetch()'.

It also contains 'checkParcelDataByLngLat(lng, lat, parcelLayer)' in the actions. This function is called:

  1. within the 'fillPwdParcelData()' function above, if the AIS data does not contain a 'pwd_parcel_id'.
  2. within the 'fillDorParcelData()' function above, if the AIS data does not contain a 'dor_parcel_id'.
  3. within '@/router/index.js', inside 'getParcelAndPutInStore()'
  4. within '@/router/index.js', inside 'dataFetch()'

Topic Store Files

Each of the store files that correspond with a topic contain empty objects in the state for each data source used by that topic, and an action for filling that object.

For instance, LiStore.js contains 'liInspections: {}' in the state, and 'fillLiInspections()' in the actions.

Often the contents of the action are copied directly over from the corresponding data source file of the original atlas.phila.gov.

These functions are eventually called from within 'TopicDataFetch()' of '@/router/index.js', after an address has been searched, the map clicked, or the topic changed.

Clone this wiki locally