Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bdunogier/689369699adb0586971a570a89c8dda0 to your computer and use it in GitHub Desktop.
Save bdunogier/689369699adb0586971a570a89c8dda0 to your computer and use it in GitHub Desktop.
Utilisation des données du politoscope (https://presidentielle2017.politoscope.org/dashboard) afin de comparer les mentions mediatiques des candidats.

Themes

  • emploi
  • economie
  • democratie
  • recherche_et_education
  • immigration_et_multiculturalisme
  • sante
  • ecologie
  • politique_energetique
  • politique_etrangere
  • securite_interieure
  • agriculture

Candidats

  • EmmanuelMacron
  • MLP_officiel
  • JLMelenchon
  • FrancoisFillon
  • benoithamon
  • UPR_Asselineau

Mentions sur un theme, global

curl 'https://presidentielle2017.politoscope.org/data/json/media_accounts/{candidat}-{theme}'

Exemple:

{
    "results": {
        "hits": [
            {
                "doc_count": 28,
                "key": "BFMTV"
            },

Mentions sur un theme, par jour

curl 'https://presidentielle2017.politoscope.org/data/json/media_histogram_query/{candidat}-{theme}'

Exemple:

{
    "results": {
        "hits": [
            {
                "doc_count": 2,
                "key": 1472342400000,
                "key_as_string": "2016-08-28T00:00:00.000Z"
            },
            {
                "doc_count": 0,
                "key": 1472428800000,
                "key_as_string": "2016-08-29T00:00:00.000Z"
            },
            {
                "doc_count": 0,
                "key": 1472515200000,
                "key_as_string": "2016-08-30T00:00:00.000Z"
            },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment