Skip to content

jonathanccardoso/people-analytics

Repository files navigation

People Analytics

Setup initial

❯ python3 -m venv .wnea
❯ source .wnea/bin/activate
❯ cp .env.sample .env
❯ sudo apt-get install libpq-dev python3-dev python3-venv
❯ pip install -r requirements.txt

Rodando o projeto

Instale o projeto com:

❯ python manage.py migrate
❯ python manage.py populate
❯ python manage.py runserver

Headcount

URL

    GET /headcount/line_chart/

Parâmetros

Parâmetro Tipo Descrição
init_date string Obrigatório. Campo do formato yyyy-MM-dd
end_date string Obrigatório. Campo do formato yyyy-MM-dd

Resposta

  GET http://localhost:8000/headcount/line_chart/?init_date=2022-01-01&end_date=2023-01-01
{
  "xAxis": {
    "type": "category",
    "data": [
      "Jan",
      "Feb",
      "Mar",
      "Apr",
      "May",
      "Jun",
      "Jul",
      "Aug",
      "Sep",
      "Oct",
      "Nov",
      "Dec",
      "Jan"
    ]
  },
  "yAxis": {
    "type": "value"
  },
  "series": {
    "type": "stacked_line",
    "series": [
      {
        "name": 2022,
        "type": "line",
        "data": [45, 44, 37, 43, 48, 43, 43, 44, 36, 54, 37, 36]
      },
      {
        "name": 2023,
        "type": "line",
        "data": [0]
      }
    ]
  },
  "title": "Headcount por Ano",
  "grid": 6,
  "color": ["#D4DDE2", "#A3B6C2"]
}

URL

  GET /headcount/category_charts/

Parâmetros

Parâmetro Tipo Descrição
init_date string Obrigatório. Campo do formato yyyy-MM-dd
end_date string Obrigatório. Campo do formato yyyy-MM-dd
category string Obrigatório. Qualquer campos de category da base

Resposta

  GET http://localhost:8000/headcount/category_charts/?init_date=2022-12-01&end_date=2022-12-31&category=TI
{
  "xAxis": {
    "type": "value",
    "show": true,
    "max": {}
  },
  "yAxis": {
    "type": "category",
    "data": ["East Calvinfurt", "Alexanderton", "East Jenniferview", "Cookfurt"]
  },
  "series": {
    "type": "horizontal_stacked",
    "series": [
      {
        "name": "TI",
        "data": [4, 2, 4, 2],
        "type": "bar"
      }
    ]
  },
  "title": "Empresa",
  "grid": 6,
  "color": ["#2896DC"],
  "is%": false
}

Turnover:

URL

  GET /turnover/line_chart/

Parâmetros

Parâmetro Tipo Descrição
init_date string Obrigatório. Campo do formato yyyy-MM-dd
end_date string Obrigatório. Campo do formato yyyy-MM-dd

Resposta

  GET http://localhost:8000/turnover/line_chart/?init_date=2022-01-01&end_date=2022-12-31
{
  "xAxis": {
    "type": "category",
    "data": [
      "Jan",
      "Feb",
      "Mar",
      "Apr",
      "May",
      "Jun",
      "Jul",
      "Aug",
      "Sep",
      "Oct",
      "Nov",
      "Dec"
    ]
  },
  "yAxis": {
    "type": "value"
  },
  "series": {
    "type": "stacked_line",
    "series": [
      {
        "name": 2022,
        "type": "line",
        "data": [
          0.76, 0.98, 1.16, 1.05, 1.06, 1.05, 0.91, 0.95, 0.89, 0.74, 0.84, 0.83
        ]
      }
    ]
  },
  "title": "Taxa de Turnover por Ano (%)",
  "grid": 6,
  "color": ["#D4DDE2", "#A3B6C2"]
}

URL

  GET /turnover/category_charts/

Parâmetros

Parâmetro Tipo Descrição
init_date string Obrigatório. Campo do formato yyyy-MM-dd
end_date string Obrigatório. Campo do formato yyyy-MM-dd
category string Obrigatório. Qualquer campos de category da base

Resposta

  GET http://localhost:8000/turnover/category_charts/?init_date=2022-01-01&end_date=2022-12-31&category=Vendas
{
  "xAxis": {
    "type": "value",
    "show": true,
    "max": {}
  },
  "yAxis": {
    "type": "category",
    "data": ["Alexanderton", "Cookfurt", "East Jenniferview", "East Calvinfurt"]
  },
  "series": {
    "type": "horizontal_stacked",
    "series": [
      {
        "name": "Vendas",
        "data": [0.77, 1.0, 0.8, 1.09],
        "type": "bar"
      }
    ]
  },
  "title": "Empresa",
  "grid": 6,
  "color": ["#2896DC"],
  "is%": false
}

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published