Coder Social home page Coder Social logo

cwd_map's Introduction

Mapping in Leaflet - Data in R

The goal is to produce a leaflet map that can display colour intensities in polygons and a layer of points. The data to inform the location of points and the colour of polygons needs to be injected from R.

Examples of maps that have the features that we need:

Polygon select and display information http://leafletjs.com/examples/choropleth-example.html

Add and drop multiple layers http://leafletjs.com/examples/layers-control.html

Design

  • Use spatial data in R add covariate information and write to .geojson
  • Embed geojson in page to make "standalone"
  • OK to link to websourced css and js
  • All map design is done in javascript

Status

Two working maps:

  1. map.html

This map solves the select polygons with mouseover and display information from the geojson on the map. It also displays some points from another geojson. However, everything in this map is on the same layer.

  1. test/map.html

This map solves multiple layers with different legends that are added dynamically when different layers are selected. But Does not have the feature to display information on from the geojson on mouseover.

I have not been able to figure out how to implement the mouseover event query and display feature in the map with multiple layers.

TODO

  • Combine the features of the two maps into one map that has multiple selectable layers (overlay not baselayers) with different legends and the the feature to display data from the geojson on mouseover.

  • In a final implementation I would drop the click to zoom feature in map.html because it is not intuitive for the user.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.