Skip to content

LocalVisionCommunity-data dashboards

Interactive maps + linked KPI charts, built on US Census boundaries. See a city's internal dynamics, or compare it to its peers.

Install ​

LocalVision is not published to npm. Get the code from GitHub:

bash
git clone https://github.com/mfaldet/localvision.git
cd localvision
npm install
npm run dev        # serves the full demo, examples/acs-binding.html

To use it in a project of your own, build it once and install it from the folder you cloned:

bash
npm run build                    # in the localvision folder: library β†’ dist/
npm install ../localvision       # in your project: adjust the path to where you cloned it

A dashboard in ten lines ​

ts
import { LocalVisionApp, BoundaryLoader, CensusACS, bindDataToBoundaries } from 'localvision'

const loader = new BoundaryLoader({ persistentCache: true })
const acs    = new CensusACS({ apiKey: import.meta.env.VITE_CENSUS_API_KEY })

const [boundaries, table] = await Promise.all([
  loader.counties('MN'),
  acs.fetch({ variables: ['median_household_income'], geography: { state: 'MN', level: 'county' } }),
])

new LocalVisionApp({
  container: '#app',
  outer: { binding: bindDataToBoundaries(boundaries, table), activeKpi: 'median_household_income' },
  inner: { /* … */ },
})

Head to the getting-started guide for the full walkthrough including city search, drill-down, and templates.

Released under the MIT License.