Coder Social home page Coder Social logo

airbreizh-data's Introduction

Air Breizh data

Quelques essais de récupération et danalyse des données de qualité de l'air en Bretagne grâce au site http://www.airbreizh.asso.fr

Usage

$ python airbreizh.py
Air quality for today (08/12/2016)
              City: Ind| SO2 NO2 O3 PM10
             Brest:  5 | 0 2 3 5
          Fougères:  7 | 0 2 2 7
 Lorient ou Vannes:  5 | 0 2 2 5
            Rennes:  7 | 0 2 2 7
         St Brieuc:  4 | 0 2 2 4
           St Malo:  7 | 0 2 2 7
 Vannes ou Lorient:  5 | 0 2 2 5

Petit reverse engineering

8 déc 2016 : analyse réseau de la page d'accueil (applet Flash). Les données semblent passer par requête HTTP POST

(cf. [archive HAR](rev_eng/2016-12-08 Airbreizh Indices.har) + http://www.softwareishard.com/har/viewer/)

POST URL: http://www.airbreizh.asso.fr/index.php?id=36, with param q=demain

Réponse brute:

done=1&Val=8&SO2=1&NO2=3&O3=2&PM10=8&city=1&1[Val]=5&1[SO2]=1&1[NO2]=2&1[O3]=2&1[PM10]=5&1[city]=2&2[Val]=6&2[SO2]=1&2[NO2]=2&2[O3]=2&2[PM10]=6&2[city]=4&3[Val]=6&3[SO2]=1&3[NO2]=2&3[O3]=2&3[PM10]=6&3[city]=5&4[Val]=8&4[SO2]=1&4[NO2]=5&4[O3]=2&4[PM10]=8&4[city]=6&5[Val]=8&5[SO2]=1&5[NO2]=2&5[O3]=2&5[PM10]=8&5[city]=9&laDate=01/12/2016&sortie=1480546800

Champs de la réponse splittée:

done=1
Val=8
SO2=1
NO2=3
O3=2
PM10=8
city=1

1[Val]=5
1[SO2]=1
1[NO2]=2
1[O3]=2
1[PM10]=5
1[city]=2

2[Val]=6
2[SO2]=1
2[NO2]=2
2[O3]=2
2[PM10]=6
2[city]=4

3[Val]=6
3[SO2]=1
3[NO2]=2
3[O3]=2
3[PM10]=6
3[city]=5

4[Val]=8
4[SO2]=1
4[NO2]=5
4[O3]=2
4[PM10]=8
4[city]=6

5[Val]=8
5[SO2]=1
5[NO2]=2
5[O3]=2
5[PM10]=8
5[city]=9

laDate=01/12/2016
sortie=1480546800

NB: il semble que la date soit fausse. Plus tard dans la journée du 8/12, la date devient juste et les données changent.

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.