New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added a prototype for aqicnLayer and tileLayer #79
Conversation
@jywarren @sagarpreet-chadha |
@jywarren @sagarpreet-chadha The markers were created using CSS, and popups were generated through their JSON API and their widget API when possible. The issue with the widget API is that it requires a specific city name that is not readily available, so only large cities, such as Beijing and London, can include it currently. Currently the token used is linked to my own email. While I am perfectly fine with this, you may want to change it. As you likely noticed, the AQI displayed by the widget and on the marker are different. This is most likely because the widget data is updated only every so often. Please let me know if there are any changes you would like me to make. Anyway, thank you so much for giving me the opportunity of working on this. Kevin Luo |
AWESOME WORK 🎉 👍 😃 ! Adding some links first for other reviewers to see the documentations : The API limit is 1000 requests per minute so we are good to go for now 👍 ! |
@jywarren Map-tile-layer on leaflet works smoothly : What do you think @kevinzluo ? |
Yep. I also saw the map tile layer and implemented it in my first commit before removing it. I created the other layer to add the popups and additional info. The layer I created does not lag too badly unless at low zoom levels, and I changed it to only fetch station specific data on popup open so the quota is not an issue. I am fine with whichever we choose to use. Would you like me to re add the tileLayer? |
Okay , no need to add the tile-layer then 👍 . Awesome 🎈 ! |
f90f86d
to
b4158db
Compare
Hi. This one has been rebased too. |
This is /fantastic/ -- really tremendous work. I'm going to bump the version number in |
Fixes #49 and #57
I have begun to implement the AQI Layer. Luckily there is no CORS blocked error this time!
The first of the AQI layers (waqiLayer) is a tileLayer provided by AQICN. The issue with it is that it does not provide any more specific information, such as the city name.
The second of the layers (AQICNLayer) is one I am trying to build.
Currently I first grab data for stations within a region, which provides only their AQI, lat, lng, and uid. Then for each station in the region I grab more specific data using their ID (which for some reason changes to being called idx in their API?). The specific data includes measurements beyond the AQI, such as ozone measurements.
The problem with this is that there is a 1000 query per minute quota on each token ID, and because there are so many stations, the quota is quickly reached, even though I have tried to adjust the hashMap to only call for new stations.
Features to implement:
Current Issues: