GithubHelp home page GithubHelp logo

basedosdados / analises Goto Github PK

View Code? Open in Web Editor NEW
101.0 101.0 26.0 16.73 MB

📊 Repositório de códigos simples e replicáveis das análises publicadas.

Home Page: https://info.basedosdados.org/links

License: MIT License

R 0.23% Jupyter Notebook 99.70% Makefile 0.01% Python 0.07%
data-analysis data-visualization open-source

analises's People

Contributors

arthurfg avatar crislanealves avatar d116626 avatar fernandascovino avatar folhesgabriel avatar gabrielle-carv avatar giovanecaruso avatar giovanecarusoredacao avatar gustavoairestiago avatar gustavoalcantara avatar hevsouza avatar hsxavier avatar ingridsrabelo avatar lary-coder avatar laura-l-amaral avatar lucasnascm avatar mahideia avatar mavalentim avatar paolofullone avatar rdahis avatar thaismdr avatar vncsna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

analises's Issues

[analises] br_tse_eleicoes


Data de entrega: 28/08
Responsável:


  • Montar query.
  • Gerar visualização.
  • Fazer análise escrita, se necessário.
  • Entregar para equipe de comunicação.
  • Publicado 🎉

[analises] br_inep_ana


Data de entrega: 01/11
Data prevista para publicação: 03/11


  • Montar query, se necessário
  • Gerar visualização, se necessário
  • Fazer análise escrita, se necessário.
  • Entregar para equipe de comunicação.
  • Publicado 🎉

[analises] br_ibge_pib


Data de entrega: 13/08
Responsável: @lucasnascm


  • Montar query.
  • Gerar visualização.
  • Fazer análise escrita, se necessário.
  • Entregar para equipe de comunicação.
  • Publicado 🎉

[analise] br_inep_enem.escola


Data de entrega: 15/11
Data prevista para publicação: 17/11


  • Montar query, se necessário
  • Gerar visualização, se necessário
  • Fazer análise escrita, se necessário.
  • Entregar para equipe de comunicação.
  • Publicado 🎉

dúvida sobre o bd.read_sql

oi, tudo bom?

estou com um problema para abrir os arquivos via sql

quando eu rodo um arquivo via bd.read_table tudo funciona certinho, mas quando eu tento via bd.read_sql aparece esse erro aqui (abaixo). é algum problema no "billing_project_id", alguma sugestão do que pode ser?

ah..é sensacional o projeto de vocês

cordialmente

Lucas

    Traceback (most recent call last)

~\Anaconda3\lib\site-packages\pandas_gbq\gbq.py in _download_results(self, query_job, max_results, progress_bar_type)
549
--> 550 query_job.result()
551 # Get the table schema, so that we can list rows.

~\Anaconda3\lib\site-packages\google\cloud\bigquery\job.py in result(self, page_size, max_results, retry, timeout, start_index)
3206 try:
-> 3207 super(QueryJob, self).result(retry=retry, timeout=timeout)
3208

~\Anaconda3\lib\site-packages\google\cloud\bigquery\job.py in result(self, retry, timeout)
811 # TODO: modify PollingFuture so it can pass a retry argument to done().
--> 812 return super(_AsyncJob, self).result(timeout=timeout)
813

~\Anaconda3\lib\site-packages\google\api_core\future\polling.py in result(self, timeout, retry)
133 # Pylint doesn't recognize that this is valid in this case.
--> 134 raise self._exception
135

BadRequest: 400 No matching signature for operator = for argument types: INT64, STRING. Supported signature: ANY = ANY at [4:76]

(job ID: f809e509-5d5c-40a2-aff0-72e03de6d998)

                                         -----Query Job SQL Follows-----                                             

|    .    |    .    |    .    |    .    |    .    |    .    |    .    |    .    |    .    |    .    |    .    |

1:
2: SELECT estado.uf AS state, estado.municipio AS town, nomes.nome AS name, nomes.qtde_nascimentos_ate_2010 AS freq
3: FROM basedosdados.br_ibge_nomes_brasil.quantidade_municipio_nome_2010 AS nomes
4: INNER JOIN basedosdados.br_bd_diretorios_brasil.municipio AS estado ON nomes.id_municipio = estado.id_municipio
5:
| . | . | . | . | . | . | . | . | . | . | . |

During handling of the above exception, another exception occurred:

GenericGBQException Traceback (most recent call last)
~\Anaconda3\lib\site-packages\basedosdados\download\download.py in read_sql(query, billing_project_id, from_file, reauth)
162 credentials=credentials(from_file=from_file, reauth=reauth),
--> 163 project_id=billing_project_id,
164 )

~\Anaconda3\lib\site-packages\pandas_gbq\gbq.py in read_gbq(query, project_id, index_col, col_order, reauth, auth_local_webserver, dialect, location, configuration, credentials, use_bqstorage_api, max_results, verbose, private_key, progress_bar_type)
966 max_results=max_results,
--> 967 progress_bar_type=progress_bar_type,
968 )

~\Anaconda3\lib\site-packages\pandas_gbq\gbq.py in run_query(self, query, max_results, progress_bar_type, **kwargs)
531 max_results=max_results,
--> 532 progress_bar_type=progress_bar_type,
533 )

~\Anaconda3\lib\site-packages\pandas_gbq\gbq.py in _download_results(self, query_job, max_results, progress_bar_type)
564 except self.http_error as ex:
--> 565 self.process_http_error(ex)
566 finally:

~\Anaconda3\lib\site-packages\pandas_gbq\gbq.py in process_http_error(ex)
432
--> 433 raise GenericGBQException("Reason: {0}".format(ex))
434

GenericGBQException: Reason: 400 No matching signature for operator = for argument types: INT64, STRING. Supported signature: ANY = ANY at [4:76]

(job ID: f809e509-5d5c-40a2-aff0-72e03de6d998)

                                         -----Query Job SQL Follows-----                                             

|    .    |    .    |    .    |    .    |    .    |    .    |    .    |    .    |    .    |    .    |    .    |

1:
2: SELECT estado.uf AS state, estado.municipio AS town, nomes.nome AS name, nomes.qtde_nascimentos_ate_2010 AS freq
3: FROM basedosdados.br_ibge_nomes_brasil.quantidade_municipio_nome_2010 AS nomes
4: INNER JOIN basedosdados.br_bd_diretorios_brasil.municipio AS estado ON nomes.id_municipio = estado.id_municipio
5:
| . | . | . | . | . | . | . | . | . | . | . |

During handling of the above exception, another exception occurred:

BaseDosDadosException Traceback (most recent call last)
in
5 INNER JOIN basedosdados.br_bd_diretorios_brasil.municipio AS estado ON nomes.id_municipio = estado.id_municipio
6 ''',
----> 7 billing_project_id='level-datum-268001'
8 )

~\Anaconda3\lib\site-packages\basedosdados\download\download.py in read_sql(query, billing_project_id, from_file, reauth)
165 except (OSError, ValueError):
166 raise BaseDosDadosException(
--> 167 "\nWe are not sure which Google Cloud project should be billed.\n"
168 "First, you should make sure that you have a Google Cloud project.\n"
169 "If you don't have one, set one up following these steps: \n"

BaseDosDadosException:
We are not sure which Google Cloud project should be billed.
First, you should make sure that you have a Google Cloud project.
If you don't have one, set one up following these steps:
1. Go to this link https://console.cloud.google.com/projectselector2/home/dashboard
2. Agree with Terms of Service if asked
3. Click in Create Project
4. Put a cool name in your project
5. Hit create
Copy the Project ID, (notice that it is not the Project Name)
Now, you have two options:

  1. Add an argument to your function poiting to the billing project id.
    Like bd.read_table('br_ibge_pib', 'municipios', billing_project_id=<YOUR_PROJECT_ID>)
  2. You can set a project_id in the environment by running the following command in your terminal: gcloud config set project <YOUR_PROJECT_ID>. Bear in mind that you need gcloud installed.

Facilitar a busca por análises

Contexto:

A tabela no readme esta ficando muito grande e nao ajuda muito na hora de buscar por uma analise especifica, como podemos facilitar essa busca?

Ideias:

  • MVP: Criar um table of contents na documentacao da BD
  • Moonshot: add as análises como objeto no site @rdahis (quando tivermos + tempo em infra)
    • Análises usam 1+ tabelas.

Dúvida sobre RAIS

Estava analisando os dados da RAIS e notei por exemplo que em algumas linhas o valor_remuneracao_media = 0, queria entender se é porque a pessoa realmente não recebe, ou se ela quem não quis responder a pesquisa, pois um valor discrepante desses poderia afetar as análises.

Desde já agradeço pela ajuda.

[analises] br_anp_precos_combustiveis


Data de entrega: 25/10
Data prevista para publicação: 29/10


  • Montar query, se necessário.
  • Gerar visualização, se necessário.
  • Fazer análise escrita, se necessário.
  • Entregar para equipe de comunicação.
  • Publicado 🎉

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.