Public Lab Research note


Leaflet Environmental Layers Library

by sagarpreet | June 06, 2018 10:49 06 Jun 10:49 | #16437 | #16437

sagarpreet was awarded the Basic Barnstar by warren for their work in this research note.


This library is a made upon the very popular LeafletJS Library and using this we can choose combinations of layers to display on map . Each layers gives some environment - related information on map in form of small markers . Each marker on clicking shows pop-up with detailed information .

The demo of this library is : publiclab.github.io/leaflet-environmental-layers

The Github link to code repository is : github.com/publiclab/leaflet-environmental-layers

How to choose Layers on map :

There is a button on top-right most corner on map which allows to select layers :

Screen_Shot_2018-06-06_at_3.17.32_PM.png

The following layers exists :

Screen_Shot_2018-06-06_at_3.18.47_PM.png

The detailed information about each layer is given below :

1.) SkyTruth :

SkyTruth Alerts delivers real-time updates about environmental incidents in your back yard (or whatever part of the world you know and love).

The small red markers corresponds to each incident . As you will scroll through the map more dots will appear automatically .

More information about SkyTruth Alerts can be found here .

Screen_Shot_2018-06-06_at_3.22.51_PM.png

2.) Odor Report Layer :

To facilitate monitoring of bad odor events through the collection of data using a written odor log and an online map.

This layers shows bad odor events . One can explore and keep track of bad odor events in their vicinity and can also share reports , more information can be found here .

You can add bad odor event yourself here : https://odorlog.ushahidi.io/views/map

Screen_Shot_2018-06-06_at_3.37.45_PM.png

3.) Toxic Release Layer :

The Toxics Release Inventory (TRI) Search retrieves data from the TRI database in Envirofacts.

This layer allows access to basic facility information, all forms submitted to EPA since 1987, aggregate chemical release data for all years reported . The results display any facility that has reported from 1987 to present, even though the facility may or may not have submitted TRI data in the most recent reporting year.

More information can be found here .

Screen_Shot_2018-06-06_at_3.49.26_PM.png

4.) Justice Map Layer :

This layer helps to visualize race and income data for your community , county and country .

Example of multi-race layer :

Screen_Shot_2018-06-06_at_4.24.05_PM.png

INCOME Layer Scale :

Screen_Shot_2018-06-06_at_3.55.09_PM.png

American-Indian Layer Scale :

Screen_Shot_2018-06-06_at_3.57.08_PM.png

Asian Layer Scale :

Screen_Shot_2018-06-06_at_3.58.08_PM.png

Hispanic Layer Scale :

Screen_Shot_2018-06-06_at_4.00.14_PM.png

Multi-racial Layer Scale :

Screen_Shot_2018-06-06_at_4.01.14_PM.png

Non-White Layer Scale :

Screen_Shot_2018-06-06_at_4.01.49_PM.png

White Layer Scale :

Screen_Shot_2018-06-06_at_4.02.24_PM.png

Plurality Group Layer Scale :

Screen_Shot_2018-06-06_at_4.02.42_PM.png

5.) Openweathermap Layers :

We can visualize the cloud coverage , precipation , rain , snow , pressure , temperature , and wind using this layer .

Cloud Layer :

Screen_Shot_2018-06-06_at_4.14.44_PM.png

Pressure Contour Layer :

Screen_Shot_2018-06-06_at_4.37.54_PM.png

There are two real time layers as well - Cities , which shows the real time value of Humitidy , Wind , Pressure , Temperature and wind direction of more than 200,000 cities .

Screen_Shot_2018-06-06_at_4.17.44_PM.png

Windrose , which shows the real time direction of wind on map .

Screen_Shot_2018-06-06_at_4.18.34_PM.png

About Project :

This project is created as a part of Google Summer of Code program by Sagarpreet Chadha .

Mentors for this project :

• Stevie Lewis

• jywarren

• Bronwen Densmore

If you have any suggestions or any doubts regarding the use of this library , kindly open an issue here .

Thank you


21 Comments

This is awesome!

Reply to this comment...


nice work @sagarpreet!

Reply to this comment...


Awesome @sagarpreet! I'll take a close look and shoot you some feedback. Thaaanks!!

Reply to this comment...


@sagarpreet I loved it. Awesome work

Reply to this comment...


Hi @Sagarpreet! I've been thinking about the library. In the case of the Odor reports I'd include a link to the report to be able to check the info of the marker. Now when you click on the link included in the markes opens a text document. In fact there are at least two kinds of databases: those wich accept public contributions like the Odor log and those that are "closed" to public contributions. Maybe some info related to this would be great so the library will also foster contribution in those databases/maps included, that are public contributed. I don't know if I'm expressing myself correctly. Some tag on the marker or a code of colors: a green dot for grassroots contributing maps and a orange for closed to public maps for example.

Reply to this comment...


In addition to colors let's think about either different icons or labels since it everyone will see the color difference clearly.

A good resource for icons is https://fontawesome.io - which we already have installed!

Reply to this comment...


Reply to this comment...


Thank you @xose , @warren ! Will surely do the changes .

Reply to this comment...


@warren awards a barnstar to sagarpreet for their awesome contribution!

Reply to this comment...


WOW. Can we see questions that people have asked on publiclab.org located on the same map with these layers of environmental information?

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Hi @liz...i am opening an issue regarding the same on github , so that @warren and i can discuss this . Thanks !

Reply to this comment...


hi there! if you're looking for another layer this one might be good if it would work. These are sites federally classified in the US as priority sites for environmental clean up (think Really bad contamination!)

https://www.epa.gov/superfund/search-superfund-sites-where-you-live#map

Reply to this comment...


also check out the layers on this map! https://ofmpub.epa.gov/apex/cimc/f?p=cimc:map:0:::71

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Here's a website that has a lot of different content types about disaster management, humanitarian aid and resilience building efforts in an Airtable: http://recola.org/knowledge/. Perhaps these could be added to the map displays. @devinb is the developer and could answer any questions.

Reply to this comment...


thanks, liz - you mentioned an "organization" type -- what would be an API endpoint for that one, @devinb?

On Thu, Aug 2, 2018 at 2:20 PM \<notifications@publiclab.org> wrote:

Hi! There's been a response to a discussion you're involved in. Do NOT reply to this email; click this link to respond:

https://publiclab.org/notes/sagarpreet/06-06-2018/leaflet-environmental-layer-library#c20265

liz wrote:


Here's a website that has a lot of different content types about disaster management, humanitarian aid and resilience building efforts in an Airtable: http://recola.org/knowledge/. Perhaps these could be added to the map displays. @devinb is the developer and could answer any questions.


Look like spam? Mark this as Spam

Reply at: https://publiclab.org/notes/sagarpreet/06-06-2018/leaflet-environmental-layer-library#comments

Report abuse to: moderators@publiclab.org

Check out the blog at https://publiclab.org/blog | Love our work? Become a Public Lab Sustaining Member today at https://publiclab.org/donate

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Actually it's an entity type. "Entities" are self-defined things (people, organizations, projects, etc) while "facets" aren't self-descriptive but rather describe something (concepts, workflows, tutorials, etc).

Endpoints can be found here: http://recola.org/knowledge-api/

Let me know if you try to access stuff, have ideas for improvements, etc.

You'd be the first person to try to use our API so very excited about the prospect!

Reply to this comment...


Reply to this comment...


Appreciating this work more and more each day!

I just thought of a way to make it easier for people to know that there are layers to turn on, and wanted to share it as a possible goal!

Proposal: when the in-line map tag is used, it would not only add the map on the page as shown, but also above it, include a line of text saying, "to turn on environmental layers, click the icon in the top right!"

Maybe we could try a version which also said, "To learn about this project and give feedback, visit [link-to-this-post]"

If this line of text was present, when new people visit https://publiclab.org/wiki/puerto-rico, they would see a map and be invited to click the icon at top right to turn on layers.

Hi! Not exactly related but yes i am working on something related to adding LEL layers to inline map here : https://github.com/publiclab/plots2/pull/6204 . Thanks!


oh this is great news :D


Reply to this comment...


I wonder if there is a simpler map convention that would not take up as much vertical space -- could the label control have text next to it, or could we have it open by default? 

On Wed, Oct 3, 2018 at 6:15 PM \<notifications@publiclab.org> wrote:

Hi! There's been a response to a discussion you're involved in. You can reply to this email or visit this link:

https://publiclab.org/notes/sagarpreet/06-06-2018/leaflet-environmental-layer-library#c20786

liz wrote:


Appreciating this work more and more each day! I just thought of a way to make it easier for people to know that there are layers to turn on, and wanted to share it as a possible goal! Proposal: when the in-line map tag is used, it would not only add the map on the page as shown, but also above it, include a line of text saying, "to turn on environmental layers, click the icon in the top right!" Maybe we could try a version which also said, "To learn about this project and give feedback, visit [link-to-this-post]" If this line of text was present, when new people visit https://publiclab.org/wiki/puerto-rico, they would see a map and be invited to click the icon at top right to turn on layers.


Look like spam? Mark this as Spam

Reply at: https://publiclab.org/notes/sagarpreet/06-06-2018/leaflet-environmental-layer-library#comments

Report abuse to: moderators@publiclab.org

Check out the blog at https://publiclab.org/blog | Love our work? Become a Public Lab Sustaining Member today at https://publiclab.org/donate

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Login to comment.