Este algoritmo tem o intuito de gerar um grafo dentro da própria interface do Google Planilhas, sendo composto por 3 arquivos:
- dataGenerator.gs: contém as funções
doGet()
epegador()
. A funçãodoGet()
é responsável por obter a saída do script HTML, enquanto a funçãopegador()
coleta os dados da planilha para a construção do grafo. - printGrafo.gs: contém a função
printGrafo()
, responsável pela renderização da rede dentro de uma dialog box na prórpia UI do Google Sheets. - index.html: contém o script HTML responsável pela criação do output, utilizando a biblioteca cytoscape.js para a construção do grafo.
Para testar, basta acessar o link abaixo, criar uma cópia, e clicar no botão "Network". Na primeira vez, serão solicitadas algumas permissões (do prórpio Google). Após concedê-las, basta clicar em "Network" novamente.
Link para a planilha exemplo: https://docs.google.com/spreadsheets/d/1w6DhXZwvRJgbQOXG1anW13ImxLhmGN7TRJQjwzzuSzI/edit#gid=0
Observação: você precisa utilizar o Google Chrome como navegador, e estar logado com a mesma conta no browser e no G Suite.
This algorithm is intended to generate a graph within the Google Sheets interface, consisting of 3 files:
- dataGenerator.gs: contains the
doGet()
andcatcher()
functions. ThedoGet()
function is responsible for getting the output of the HTML script, while thecatcher()
function collects the data from the spreadsheet for the construction of the graph. - printGrafo.gs: contains the
printGrafo()
function, responsible for rendering the network inside a dialog box in the Google Sheets UI. - index.html: contains the HTML script responsible for creating the output, using the cytoscape.js library to build the graph.
To try it out, just go to the link below, create a copy, and click on the "Network" button. The first time, you will be asked for some permissions (from Google itself). After granting them, just click on "Network" again.
Link to example spreadsheet: https://docs.google.com/spreadsheets/d/1w6DhXZwvRJgbQOXG1anW13ImxLhmGN7TRJQjwzzuSzI/edit#gid=0
Note: You need to use Google Chrome as your browser, and be logged in with the same browser and G Suite account.