Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"estados": [ | |
{ | |
"sigla": "AC", | |
"nome": "Acre", | |
"cidades": [ | |
"Acrelândia", | |
"Assis Brasil", | |
"Brasiléia", | |
"Bujari", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Retrieves all the rows in the active spreadsheet that contain data and logs the | |
* values for each row. | |
* For more information on using the Spreadsheet API, see | |
* https://developers.google.com/apps-script/service_spreadsheet | |
*/ | |
function readRows() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or | |
distribute this software, either in source code form or as a compiled | |
binary, for any purpose, commercial or non-commercial, and by any | |
means. | |
In jurisdictions that recognize copyright laws, the author or authors | |
of this software dedicate any and all copyright interest in the | |
software to the public domain. We make this dedication for the benefit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##################################################### | |
# Use GPT-3 in R with the OpenAI API. You need to install the reticulate package. | |
# Additionally, an API key is required that must be saved in a separate file, called .openaikey | |
# Get your API key here: https://openai.com/api/ | |
##################################################### | |
# install.packages("reticulate") # run only once | |
library(reticulate) | |
# create python env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### STOPWORDS IN PORTUGUESE | |
## Create a unique dataset from several datasets with stopwords in Portuguese | |
# Lucas Gelape | |
# Packages | |
library(dplyr) | |
library(stringi) | |
library(readr) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tabulizer) | |
library(dplyr) | |
setwd("~/GitHub/oleogate/data") | |
#Extrai tabelas do arquivo pdf. | |
#Esse arquivo foi baixado do seguinte link | |
# https://politica.estadao.com.br/blogs/estadao-verifica/wp-content/uploads/sites/690/2019/10/Ibama.pdf | |
#A tabela é extraída para um arquivo csv de forma a poder trabalhar melhor questões de encoding | |
tabulizer::extract_tables("ibama.pdf", output = "csv",outdir = getwd()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Here are a few methods for getting text from PDF files. Do read through | |
# the instructions carefully! NOte that this code is written for Windows 7, | |
# slight adjustments may be needed for other OSs | |
# Tell R what folder contains your 1000s of PDFs | |
dest <- "G:/somehere/with/many/PDFs" | |
# make a vector of PDF file names | |
myfiles <- list.files(path = dest, pattern = "pdf", full.names = TRUE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(readxl) | |
library(ckanr) | |
library(purrr) | |
ckanr::package_search() | |
package<- ckanr::package_show(id= "22d13d17-bf69-4a1a-add2-25cc1e25f2d7", | |
url= "https://www.tesourotransparente.gov.br/ckan") #busca todos os dados do dataset que se refere aos dados de COFOG | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#------------------------------------------------------------------------ | |
# encoding: utf-8 | |
# @(#)product_generator.rb 1.00 29-Nov-2011 16:38 | |
# | |
# Copyright (c) 2011 Jim Pravetz. All Rights Reserved. | |
# Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php) | |
# | |
# Description: A generator that creates product, products and | |
# ingredients pages for jekyll sites. Uses a JSON data | |
# file as the database file from which to read and |
NewerOlder