Skip to content

Commit 4d79935

Browse files
committed
update readme
1 parent bfaf59b commit 4d79935

File tree

2 files changed

+133
-7
lines changed

2 files changed

+133
-7
lines changed

README-EN.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Brazilian Cities and States Database
2+
3+
This repository contains a database of Brazilian cities and states in SQL format. Although the files are structured as `INSERTS` for MySQL, they can be adapted for any SQL-based database.
4+
5+
The JSON files can be used in applications that require a simpler and more flexible data structure or even to provide data for LLMs.
6+
7+
## Structure
8+
9+
In the `sql` folder, you will find the SQL files, and in the `json` folder, you will find the JSON files. Below is the description of each file:
10+
11+
- **sql/cidades-e-estados.sql**: Main file with the insertion commands to populate the database.
12+
- **sql/estados.sql**: SQL file with the insertion commands for Brazilian states.
13+
- **sql/cidades.sql**: SQL file with the insertion commands for Brazilian cities.
14+
- **json/cidades-e-estados.json**: JSON file containing the complete structure of states and their cities.
15+
- **json/estados.json**: JSON file containing the structure of Brazilian states.
16+
- **json/cidades.json**: Simplified JSON file listing only the cities and their respective states.
17+
18+
## How to Use
19+
20+
1. Choose the format that best suits your project:
21+
22+
- Use the SQL file to load data directly into your database.
23+
- Use the JSON files for integration in applications that handle structured files.
24+
25+
2. If using the SQL file:
26+
27+
- Import the file directly into your database using a command like:
28+
29+
```bash
30+
mysql -u user -p database_name < cidades-e-estados.sql
31+
```
32+
33+
3. If using the JSON files:
34+
- Load the data into your project by importing the files into your code.
35+
36+
## How to Contribute
37+
38+
Contributions are welcome! Follow the steps below:
39+
40+
1. Fork this repository.
41+
2. Create a branch for your contribution:
42+
43+
```bash
44+
git checkout -b my-contribution
45+
```
46+
47+
3. Make your changes and commit:
48+
49+
```bash
50+
git commit -m "Clear description of changes"
51+
```
52+
53+
4. Push your branch to your fork:
54+
55+
```bash
56+
git push origin my-contribution
57+
```
58+
59+
5. Open a Pull Request to the main repository.
60+
61+
## Suggestions or Questions
62+
63+
If you have questions or suggestions, feel free to open an [issue](https://github.com/your-username/your-repository/issues) in the repository. We’ll be happy to help!
64+
65+
## License
66+
67+
This project is licensed under the [MIT License](LICENSE).

README.md

Lines changed: 66 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,69 @@
1-
# Base de Cidades e Estados brasileiros.
2-
[![Build Status](https://travis-ci.org/egermano/cidades-e-estados-brasileiros.svg?branch=master)](https://travis-ci.org/egermano/cidades-e-estados-brasileiros)
1+
# Base de Cidades e Estados Brasileiros
32

4-
Arquivos com `inserts` em mysql porém pode servir para qualquer base de dados baseada em sql.
3+
📄 [English README](README-us.md)
54

6-
## Para contribuir
5+
Este repositório contém uma base de dados com cidades e estados brasileiros em formato SQL e JSON. Embora os arquivos estejam em formato de `INSERTS` para MySQL, eles podem ser adaptados para qualquer banco de dados compatível com SQL.
76

8-
* Faça um fork
9-
* Crie o branch da sua contrinuição
10-
* Solicite um Pull Request do seu novo branch
7+
Já os arquivos JSON podem ser utilizados em aplicações que necessitam de uma estrutura de dados mais simples e flexível ou até mesmo para fornecer dados para LLMs.
8+
9+
## Estrutura
10+
11+
Na pasta `sql` estão os arquivos SQL e na pasta `json` estão os arquivos JSON. A seguir, a descrição de cada arquivo:
12+
13+
- **sql/cidades-e-estados.sql**: Arquivo principal com os comandos de inserção para população da base de dados.
14+
- **sql/estados.sql**: Arquivo SQL com os comandos de inserção para estados brasileiros.
15+
- **sql/cidades.sql**: Arquivo SQL com os comandos de inserção para cidades brasileiras.
16+
- **json/cidates-e-estados.json**: Arquivo em formato JSON contendo a estrutura completa de estados e suas cidades.
17+
- **json/estados.json**: Arquivo JSON contendo a estrutura de estados brasileiros.
18+
- **json/cidades.json**: Arquivo JSON simplificado listando apenas as cidades e seus respectivos estados.
19+
20+
## Como utilizar
21+
22+
1. Escolha o formato mais adequado para seu projeto:
23+
24+
- Use o arquivo SQL para carregar diretamente no banco de dados.
25+
- Use os arquivos JSON para integração em aplicações que utilizam arquivos estruturados.
26+
27+
2. Se estiver utilizando o arquivo SQL:
28+
29+
- Importe o arquivo diretamente no seu banco de dados com um comando como:
30+
31+
```bash
32+
mysql -u usuario -p database_name < cidades-e-estados.sql
33+
```
34+
35+
3. Se estiver utilizando os arquivos JSON:
36+
- Integre os dados no seu projeto carregando os arquivos em seu código.
37+
38+
## Para contribuir
39+
40+
Contribuições são bem-vindas! Siga os passos abaixo:
41+
42+
1. Faça um fork deste repositório.
43+
2. Crie um branch para sua contribuição:
44+
45+
```bash
46+
git checkout -b minha-contribuicao
47+
```
48+
49+
3. Faça suas alterações e commite:
50+
51+
```bash
52+
git commit -m "Descrição clara do que foi alterado"
53+
```
54+
55+
4. Envie seu branch para o seu fork:
56+
57+
```bash
58+
git push origin minha-contribuicao
59+
```
60+
61+
5. Abra um Pull Request para o repositório principal.
62+
63+
## Sugestões ou dúvidas
64+
65+
Se você tiver dúvidas ou sugestões, abra uma [issue](https://github.com/seu-usuario/seu-repositorio/issues) no repositório. Ficaremos felizes em ajudar!
66+
67+
## Licença
68+
69+
Este projeto está licenciado sob a [MIT License](LICENSE).

0 commit comments

Comments
 (0)