All Projects → NYCPlanning → labs-zola

NYCPlanning / labs-zola

Licence: other
NYC Planning's Zoning and Land Use App

Programming Languages

javascript
184084 projects - #8 most used programming language
Handlebars
879 projects
SCSS
7915 projects

Labels

Projects that are alternatives of or similar to labs-zola

DZ-Pharma-Data
Medications data for +4800 drugs sold in Algeria and their labs
Stars: ✭ 23 (-62.3%)
Mutual labels:  labs
robo-chart-web
📊 Transform Google sheets to pretty charts!
Stars: ✭ 28 (-54.1%)
Mutual labels:  labs
labs-factfinder
New York City Census Reporting Tool
Stars: ✭ 34 (-44.26%)
Mutual labels:  labs
Labtainers
Labtainers: A Docker-based cyber lab framework
Stars: ✭ 226 (+270.49%)
Mutual labels:  labs
database labs
initial set of databases labs
Stars: ✭ 19 (-68.85%)
Mutual labels:  labs
APT-Lab-Terraform
Purple Teaming Attack & Hunt Lab - Terraform
Stars: ✭ 144 (+136.07%)
Mutual labels:  labs
Academiccontent
Free tech resources for faculty, students, researchers, life-long learners, and academic community builders for use in tech based courses, workshops, and hackathons.
Stars: ✭ 2,196 (+3500%)
Mutual labels:  labs
labs
learning based labs for Azure Cosmos DB
Stars: ✭ 66 (+8.2%)
Mutual labels:  labs
labs-migration-viz
A single-page interactive visualization of historic U.S. Census migration data for New York City
Stars: ✭ 18 (-70.49%)
Mutual labels:  labs
bsu
🎓Repository for university labs on FAMCS, BSU
Stars: ✭ 91 (+49.18%)
Mutual labels:  labs
advanced-istio-service-mesh-workshop
Advanced Istio Service Mesh Workshop
Stars: ✭ 28 (-54.1%)
Mutual labels:  labs
hackthebox
Notes Taken for HTB Machines & InfoSec Community.
Stars: ✭ 286 (+368.85%)
Mutual labels:  labs
computer-networks
computer networks on docker @ fmi.unibuc.ro
Stars: ✭ 72 (+18.03%)
Mutual labels:  labs
bring-your-own-data-labs
Bring your own data Labs: Build a serverless data pipeline based on your own data
Stars: ✭ 40 (-34.43%)
Mutual labels:  labs
bsuir-csn-cmsn-helper
Repository containing ready-made laboratory works in the specialty of computing machines, systems and networks
Stars: ✭ 43 (-29.51%)
Mutual labels:  labs
Container.training
Slides and code samples for training, tutorials, and workshops about Docker, containers, and Kubernetes.
Stars: ✭ 2,377 (+3796.72%)
Mutual labels:  labs
labs-maputnik-dev-server
An express.js server that allows for quickly loading mapboxGL styles from any project into the Maputnik Style Editor
Stars: ✭ 31 (-49.18%)
Mutual labels:  labs
PythonProblems
The graded lab problems for the author's course CCPS 109 Computer Science I.
Stars: ✭ 27 (-55.74%)
Mutual labels:  labs
BigComputeLabs
Big Compute Learning Labs
Stars: ✭ 19 (-68.85%)
Mutual labels:  labs
login-with-google
Minimal plugin which allows WordPress user to login with google.
Stars: ✭ 34 (-44.26%)
Mutual labels:  labs

ZoLa (New York City’s Zoning & Land Use Map)

ZoLa provides a simple way to research zoning regulations and other information relevant to planners. Find the zoning for your property, discover new proposals for your neighborhood, and learn where City Planning initiatives are happening throughout the City.

image

Requirements

Local development

  • Clone this repository: git clone https://github.com/NYCPlanning/labs-zola.git
  • Navigate to the repo: cd labs-zola
  • Install dependencies: yarn
  • Run the development server: ember serve

Connect to a local or remote Layers Api:

API_HOST=http://localhost:3000 ember serve

Note that you must provide http:// to prevent cross-origin restrictions.

Architecture

ZoLa is an Ember.js single page application (SPA). The frontend handles routing, web mapping, layout, and user interactions, and communicates with various APIs for content and data.

Layer-Groups, Layers and Sources

ZoLa retrieves layers from the Labs Layers Api. It requests layer groups, which are groups of MapboxGL layers. For example, the "subways" layer group includes the subway lines, subway routes, and subway station entrances layers. Each layer defines has style and some filter definitions. Alongside layers, the Layers API also delivers sources which provide SQL definitions for the layers. One source may correspond to multiple layers. For example, a subways source powers the Subway A line, Subway J line and Subway G line, etc.

Layer Groups, Layers and Sources are represented and managed as Ember Models in ZoLa. These models are provided by the Ember Mapbox Composer custom Addon. On first load, the Application route will query for all necessary Layer Group records (which makes a request to the layer-group/ endpoint of the Layers API). This consequently sideloads all necessary Layer, Source and metadata information as well.

Labs Layer API indeed acts as the backend that Ember Data is tied to. This is specified in the Application Adapter's host variable override.

Vector tiles from Carto Maps API

Along with Layer Groups, the Layers API payload (in the metadata property) contains an extra MapboxStyle object, which provides tile URL definitions for all source layers. These tile url definitions are anonymous maps generated by Layers API using the Carto Maps API.

Zola Search API

Zola Search API provides autocomplete search results, and aggregates results from ZoLa's Carto database with those from the Mapzen Search API. The search API is an express.js app that lives in a separate repo: (https://github.com/NYCPlanning/labs-zola-search-api)

BBL Route

https://zola.planning.nyc.gov/bbl/:bbl

For convenience to other apps that work with NYC BBLs (10-digit Borough, Block, and Lot identifiers), a /bbl route is available for incoming links. Incoming connections on this route will be redirected to the corresponding lot view.

Example BBL route

https://zola.planning.nyc.gov/bbl/1000477501

will redirect to

https://zola.planning.nyc.gov/lot/1/47/7501

Bounding Box Route

https://zola.planning.nyc.gov/bbox/:west/:south/:east/:north

For compliance with NYC Local Law #40 of 2018, the Department of Housing Preservation and Development is required to create a link to ZoLa for all NYC Urban Renewal Areas "that directs to the highest practicable zoom level that contains all blocks and lots within such urban renewal area". The /bbox route allows for specifying a bounding box defined by WGS84 latitude and longitude in decimal degrees. When the ZoLa application loads the bbox route with valid bounds, the map will automatically zoom to fit the supplied bounds into the user's viewport.

Example Bounding Box Route:

https://zola.planning.nyc.gov/bbox/-73.9978/40.5705/-73.9804/40.5785

Testing and checks

  • ESLint - We use ESLint with Airbnb's rules for JavaScript projects

    • Add an ESLint plugin to your text editor to highlight broken rules while you code
    • You can also run eslint at the command line with the --fix flag to automatically fix some errors.
  • Testing

    • Run the test suite: ember test -server
    • Load http://localhost:7357/ to view the test UI
    • Before creating a Pull Request, make sure your branch is updated with the latest develop and passes all tests

Contact us

You can find us on Twitter at @nycplanninglabs, or comment on issues and we'll follow up as soon as we can. If you'd like to send an email, use [email protected]

Updating MapPLUTO Data

  • Indices - When updating MapPLUTO data, be sure to add an index to the BBL column: CREATE INDEX idx_mappluto_{version}_bbl ON mappluto_{version} (bbl)

  • Block Centroids - You also need to regenerate the mappluto_block_centroids data table that provides the centroid of each block. This is used to add block labels to the map.

    • Run the CREATE TABLE SQL below on the Carto Batch UI: https://cartodb.github.io/carto-batch-ui/.
    • Once the batch query runs successfully, you need to query for the table via the regular Carto UI and save it as a dataset.
    • Then you can run DROP TABLE mappluto_block_centroids_new to delete the invisible table saved on Carto's backend.
CREATE TABLE mappluto_block_centroids_new AS (
SELECT
  ST_Centroid(
    ST_Union(
      ST_makevalid(
        the_geom
      )
    )
  ) as the_geom,
  ST_transform(
    ST_centroid(
      ST_Union(
        ST_makevalid(
          the_geom
        )
      )
    ), 3857
  ) as the_geom_webmercator,
  block,
  borocode
FROM planninglabs.mappluto_VERSION
GROUP BY block, borocode)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].