oscargm / air-quality-checker

Air quality stations data visualizer
5 stars 2 forks source link

Use json-server to mock data #1

Closed oscargm closed 5 years ago

oscargm commented 5 years ago

change hard coded data in model for json-server

elboletaire commented 5 years ago

Just a question about this. The current data is using json-server but, it's still hardcoded, right?

oscargm commented 5 years ago

Yes, still hardcoded data but has been extracted from the server requests. I've asked to the api owners to get public access but i think that i wont be possible

elboletaire commented 5 years ago

Why you think so? AFAIK, the Generalitat de Catalunya is always a step forward in these things, at least compared to other governments...

BTW, how do you extract the information manually from there? You could easily do a scrapper using gulp or whatever else.

oscargm commented 5 years ago

Yes, gencat is step forward in opening data, but if you dig in, you'll see that there is no data related to air quality, neither current data or historic data. I found that diputació de Barcelona had data related to air quality here, and I asked for more, at fist they answered me that they would dig in in territori's department but this week I got the answer and they refer to idescat, here and here for historical data.

but these readings are far away from what I can get from here. where they have automated data (with 3-4h delay but still, is more or less current data), from a lot more polluters than the other sources. I asked to the page email for opening the api data, even though i know that they will say no.

I got the data navigating through the web and catching the answers from their server. Even though i know scrapping would be a fair solution, I think this should be a public API, and I'll try with all my efforts

elboletaire commented 5 years ago

You could also create a public api scrapping their website if they finally say "no" :smiley:

Edit: so funny adding (and reading) all those words in catalan among all the other english text..

oscargm commented 5 years ago

Yes, i thought so, it'd be a big effort for me, if anyone wants to do it, for me it's good as it gets the data, but at least I want to try to knock all the doors, and face them that this is important data, and their platform is shitty from an ux point.

I have some ideas for treating the data, p.e. I would like to match special dates for Barcelona like 23/04 (full traffic) or 01/11 (less traffic) or football match days for showing how traffic impacts on pollution in certain areas of the city.

I hope i get the api and I can focus on these things instead of scrapping.

Funny the catalan words thing, I preffer to keep that in english so anyone can use it in the future :wink: