Public Lab Research note

Leaflet Environmental Layers Library

by sagarpreet |

Read more:

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 :

The Github link to code repository is :

How to choose Layers on map :

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


The following layers exists :


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 .


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 :


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 .


4.) Justice Map Layer :

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

Example of multi-race layer :


INCOME Layer Scale :


American-Indian Layer Scale :


Asian Layer Scale :


Hispanic Layer Scale :


Multi-racial Layer Scale :


Non-White Layer Scale :


White Layer Scale :


Plurality Group Layer Scale :


5.) Openweathermap Layers :

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

Cloud Layer :


Pressure Contour Layer :


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 .


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


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

mapping gsoc pollution leaflet skytruth weather alerts odor soc gsoc-2018 soc-2018 tri odor-logging odor-mapping geographic toxic-release-inventory justicemap skytruth-alerts



This is awesome!

nice work @sagarpreet!

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

@sagarpreet I loved it. Awesome work

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.

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 - which we already have installed!

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

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

You must be logged in to comment.