Meta | Nome | Função |
---|---|---|
. |
ponto | um caractere qualquer |
[] |
conjunto | conjunto de caracteres permitidos |
[^] |
conjunto negado | conjunto de caracteres proibidos |
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(tesseract) | |
library(stringr) | |
library(tidyverse) | |
#link do arqtigo | |
#https://observatorio-politica-fiscal.ibre.fgv.br/politica-economica/outros/federacao-em-perspectiva-um-balanco-de-custos-e-beneficios-por-uf#_ftn1 | |
#faz o ocr da primeira imagem | |
text<- ocr("ma11.png") |
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(jsonlite) | |
# load the httr package | |
library(httr) | |
#Você deve ter uma chave gerada de API. Para isso você precisa criar um usuário na página dados.gov.br usando o gov.br | |
my_key<- "<sua_chave_aqui>" | |
# Define the API endpoint and headers | |
url <- "https://dados.gov.br/dados/api/publico/conjuntos-dados" |
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(stringr) | |
library(purrr) | |
library(readr) | |
file_txt<- "<Nome_do_arquivo_baixado.txt>" | |
conversa_txt <- readLines(file(file_txt , encoding = "UTF8")) | |
id_linhas_sujas<- |
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
# Pacotes ----------------------------------------------------------------- | |
library(tidyverse) | |
library(jsonlite) | |
# Configurar -------------------------------------------------------------- | |
#-- codigo pleito |
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(gt) | |
library(gtExtras) | |
library(tidyverse) | |
df_tt <- tidytuesdayR::tt_load(2021, "39") | |
min_data <- df_tt$nominees %>% | |
distinct(page, page_id, .keep_all = TRUE) | |
stream_data <- min_data %>% |
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
<!doctype html> | |
<html class="no-js" lang=""> | |
<head> | |
<meta charset="utf-8"> | |
<title>Data story with flourish</title> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="description" content="how-to-make-a-story"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous"> |
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
## Importing Necessary Modules | |
import requests # to get image from the web | |
import shutil # to save it locally | |
## Set up the image URL and filename | |
image_url = "https://cdn.pixabay.com/photo/2020/02/06/09/39/summer-4823612_960_720.jpg" | |
filename = image_url.split("/")[-1] | |
# Open the url image, set stream to True, this will return the stream content. | |
r = requests.get(image_url, stream = True) |
Based on the Map of Thailand by Master Krist Wongsuphasawat, a simple map of Colombia using GeoJSON and D3.js
Forked from john-guerra's block
As in Krist example:
- Each borough is color-coded by the length of its name in English.
NewerOlder