Focus offline maps on cities
Choose city extents and regional projections for Boulder, California cities, New York, Honolulu and Houston using optional state packs.
// Requires the updated native development runtime with city viewports and aner.geo.
// Install packs usa.co, usa.ca, usa.ny, usa.hi and usa.tx before running offline.
// Values are synthetic. Boundaries: generalized Census 2025 1:500,000 source.
// Run the matching notebook for one bounded output cell per city.
import aner.plot
import aner.geo
let cityCaption = "Synthetic index; Census 2025 place boundary. Missing places have no data."
let boulder = plot.map("usa.co.places", List("0807850"), List(8.0))
.focus(key: "0807850", padding: 0.20)
.projection("lambert_azimuthal_equal_area")
.title("Boulder city, Colorado")
.caption("Synthetic index; Census 2025 municipal boundary, distinct from Boulder County.")
boulder.show()
let california = plot.map(region: "usa.ca.places",
keys: List("0667000", "0644000", "0655282"), values: List(12.0, 18.0, 9.0))
california.focus("0667000")
.extent(west: -122.56, south: 37.68, east: -122.32, north: 37.84)
.title("San Francisco urban extent")
.caption("Synthetic index; Census 2025; urban viewport excludes offshore Farallon parts.").show()
california.focus("0644000").title("Los Angeles").caption(cityCaption).show()
california.focus("0655282").title("Palo Alto").caption(cityCaption).show()
// Geographic bounds use longitude/latitude degrees and can be reused across charts.
let bayArea = geo.extent(west: -122.65, south: 37.20, east: -121.70, north: 38.15)
california.extent(bounds: bayArea).projection("auto")
.title("Bay Area places in a fixed geographic extent").caption(cityCaption).show()
plot.map("usa.ny.places", List("3651000"), List(11.0))
.focus("3651000").title("New York City").caption(cityCaption).show()
plot.map("usa.hi.places", List("1571550"), List(7.0))
.focus("1571550").title("Urban Honolulu, Hawaii").caption(cityCaption).show()
plot.map("usa.tx.places", List("4835000"), List(13.0))
.focus("4835000").title("Houston, Texas").caption(cityCaption).show()
plot.map("usa.tx.counties", List("48201"), List(13.0))
.projection("albers").title("Texas counties: Harris County highlighted")
.caption("Synthetic index; Census 2025 counties. Albers is a spherical display projection.").show()
// All 50 states and DC have usa.<lowercase-postal>.counties and .places layers.
// Focus and extent retain the full chart color range and other nearby boundaries.
// Zoom cannot add streets or recover boundary detail absent from the source.
Run step by step in VS Code.
The notebook separates observations and chart construction into cells. It opens with empty outputs and shared variables. Map cells state which optional local packs they need.
- Install a compatible native Aner executable and VS Code extension using the editor guide. Chart construction and interactive geographic navigation require the matching development runtime and editor.
- Download the
.anernbnotebook and open it in your VS Code project. If it appears as JSON, choose Reopen Editor With… → Aner Notebook. - Select the
Aner — notebookkernel and keep Shared variables active. Run code cells from top to bottom, or choose Run All. Later cells reuse observations and chart values from earlier cells. Run cells that need no pack before trying the optional geographic map. - Read the figures below their producing cells. In geographic outputs, drag to pan and use the zoom controls to reveal crowded labels. Static SVG exports retain the initial view. Source observations, units and limitations remain in each caption.
After changing an earlier cell, rerun its dependent cells. Use Aner: Restart Notebook Session, then Run All, for a clean experiment. Saved outputs are historical; reopening the file starts without live variables. The notebook guide explains session state, inspection, and runtime controls.
Make it your experiment.
With a compatible development runtime installed, save this program as examples/plot_city_views.aner inside a folder for your experiment. Open a terminal in that folder, then check and run the program.
aner check examples/plot_city_views.aner
aner run examples/plot_city_views.anerThe aner command must be on your PATH. Follow the installation guide if your terminal cannot find it.
Requires a chart enabled native Aner development runtime and a matching VS Code extension for notebook display and interactive geographic navigation. Aner Plot awaits a binary release and is not included in the published research preview. Development packages are not available on this website. Copy the required matching .anermap files to the computer and install them locally. Install usa.co, usa.ca, usa.ny, usa.hi and usa.tx for the complete city collection. All observations are included, and execution requires no network, credentials or external service. The website shows static native SVG figures; pan and zoom run in the compatible local notebook renderer.
aner maps list
aner maps pathObservations are synthetic teaching inputs. Geographic context comes from optional offline boundary packs and does not add street detail or establish observed traffic conditions.
Read the chart and map contracts