sicar
This tool is designed for students, researchers, data scientists or anyone who would like to have access to SICAR files
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.6%) to scientific vocabulary
Keywords
Repository
This tool is designed for students, researchers, data scientists or anyone who would like to have access to SICAR files
Basic Info
- Host: GitHub
- Owner: urbanogilson
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://urbanogilson.github.io/posts/sicar/
- Size: 18.2 MB
Statistics
- Stars: 82
- Watchers: 8
- Forks: 42
- Open Issues: 2
- Releases: 15
Topics
Metadata Files
README.md
SICAR
This tool is designed for students, researchers, data scientists, or anyone who would like to have access to SICAR files.
Badges
Features
- Download polygon
- Download state
- Download the entire country
- Tesseract, and PaddleOCR (Optional) drivers to automatically detect captcha
Installation
Install SICAR with pip
bash
pip install git+https://github.com/urbanogilson/SICAR
Prerequisite:
Google Tesseract OCR (additional info on how to install the engine on Linux, Mac OSX, and Windows).
Optional: PaddleOCR (additional info on how to install the engine on Linux, Mac OSX, and Windows).
If you don't want to install dependencies on your computer or don't know how to install them, we strongly recommend Google Colab.
Documentation
Usage/Examples
```python from SICAR import Sicar, State, Polygon import pprint
Create Sicar instance
car = Sicar()
Get release data dates
statedates = car.getreleasedates() pprint.pprint(statedates)
{: '03/06/2025',
: '04/06/2025',
: '03/06/2025',
: '03/06/2025',
: '03/06/2025',
: '04/06/2025',
: '03/06/2025',
: '05/06/2025',
: '04/06/2025',
: '01/06/2025',
: '05/06/2025',
: '08/06/2025',
: '05/06/2025',
: '03/06/2025',
: '05/06/2025',
: '01/06/2025',
: '01/06/2025',
: '03/06/2025',
: '01/06/2025',
: '01/06/2025',
: '01/06/2025',
: '04/06/2025',
: '04/06/2025',
: '01/06/2025',
: '04/06/2025',
: '05/06/2025',
: '04/06/2025'}
Download APPS polygon for the PA state
car.download_state(State.PA, Polygon.APPS) ```
OCR drivers
Optical character recognition (OCR) drivers are used to recognize characters in a captcha.
We currently have two options for automating the download process.
Tesseract OCR (Default)
```python from SICAR import Sicar, State, Polygon from SICAR.drivers import Tesseract
Create Sicar instance using Tesseract OCR
car = Sicar(driver=Tesseract)
Download a state
car.downloadstate(State.SP, Polygon.LEGALRESERVE, folder='SICAR/SP') ```
PaddleOCR
Install SICAR with pip and include Paddle dependencies
bash
pip install 'SICAR[paddle] @ git+https://github.com/urbanogilson/SICAR'
```python from SICAR import Sicar, State, Polygon from SICAR.drivers import Paddle
Create Sicar instance using PaddleOCR
car = Sicar(driver=Paddle)
Download a state
car.downloadstate(State.AM, Polygon.CONSOLIDATEDAREA, folder='SICAR/AM') ```
Run with Google Colab
Using Google Colab, you don't need to install the dependencies on your computer and you can save files directly to your Google Drive.
Run with Docker
Pull Image from Docker Hub urbanogilson/sicar
sh
docker pull urbanogilson/sicar:latest
Run the downloaded Docker Image using an entry point (file) from your machine (host)
sh
docker run -i -v $(pwd):/sicar urbanogilson/sicar:latest -<./examples/docker.py
Note: Update the entry point file ./examples/docker.py or create a new one to download data based on your needs.
or pass a script through STDIN
```sh docker run -i -v $(pwd):/sicar urbanogilson/sicar:latest -<<EOF from SICAR import Sicar, State, Polygon from SICAR.drivers import Paddle
car = Sicar(driver=Paddle)
car.downloadstate(state='MG', polygon=Polygon.CONSOLIDATEDAREA, folder='MG') EOF ```
Note: Using $(pwd) the container will save the download data into the current folder.
Optional: Make an external directory to store the downloaded data and use a volume parameter in the run command to point to it.
Data dictionary
| Attribute | Description | |---------------|--------------------------------------------------------------| | codestado | Unit of the Federation in which the registration is located. | | municipio | Municipality in which the registration is located. | | numarea | Gross area of the rural property or the subject that makes up the registry, in hectare. | | codimovel | Registration number in the Rural Environmental Registry (CAR). | | indstatus | Status of registration in CAR, according to Normative Instruction no. 2, of May 6, 2014, of the Ministry of the Environment (https://www.car.gov.br/leis/INCAR.pdf), and the Resolution No. 3, of August 27, 2018, of the Brazilian Forest Service (https://imprensanacional.gov.br/materia/-/assetpublisher/Kujrw0TZC2Mb/content/id/38537086/do1-2018-08-28-resolucao-n-3-de-27-de-agos-de-2018-38536774), being AT - Active; PE - Pending; SU - Suspended; and CA - Cancelled. | | descondic | Condition in which the registration is in the analysis flow by the competent body. | | indtipo | Type of Rural Property, being IRU - Rural Property; AST - Agrarian Reform Settlements; PCT - Traditional Territory of Traditional Peoples and Communities. | | modfiscal | Number of rural property tax modules. | | nomtema | Name of the theme that makes up the registration (Permanent Preservation Area, Path, Remnant of Native Vegetation, Restricted Use Area, Administrative Easement, Legal Reserve, Hydrography, Wetlands, Consolidated Rural Area, Areas with Altitude Higher than 1800 meters, Areas with Slopes Higher than 45 degrees, Hilltops, Plateau Edges, Fallow Areas, Mangroves and Restinga). |
Acknowledgements
Roadmap
- [ ] Upload to pypi registry
Contributing
The development environment with all necessary packages is available using Visual Studio Code Dev Containers.
Contributions are always welcome!
Feedback
If you have any feedback, please reach me at hello@gilsonurbano.com
License
Owner
- Name: Gilson Urbano
- Login: urbanogilson
- Kind: user
- Location: Denmark
- Website: https://gilsonurbano.com/
- Repositories: 3
- Profile: https://github.com/urbanogilson
Systems Engineer
Citation (CITATION.cff)
cff-version: 1.2.0
title: SICAR Package
type: software
authors:
- family-names: Urbano
given-names: Gilson
email: hello@gilsonurbano.com
url: 'https://github.com/urbanogilson/SICAR'
license: MIT
GitHub Events
Total
- Create event: 7
- Release event: 3
- Issues event: 5
- Watch event: 10
- Delete event: 3
- Issue comment event: 10
- Push event: 7
- Pull request event: 3
- Fork event: 15
Last Year
- Create event: 7
- Release event: 3
- Issues event: 5
- Watch event: 10
- Delete event: 3
- Issue comment event: 10
- Push event: 7
- Pull request event: 3
- Fork event: 15
Committers
Last synced: over 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Gilson Urbano | g****f@h****r | 124 |
| Mateus Morais | m****0@g****m | 11 |
| André Carvalho | a****o@y****r | 8 |
| Gilson Urbano | E****s@d****m | 6 |
| Iago Machado | 3****s | 4 |
| Iago Machado | i****s@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 2
- Total pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 2
- Total pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 2
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 2
- Pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- salesHgabriel (2)
- Tacciaioli (1)
- urbanogilson (1)
- erickfaria (1)
- LucasDevelopers (1)
- EdbertoLima (1)
- emanuel-gf (1)
- DevDiegoSR (1)
Pull Request Authors
- urbanogilson (3)
- rupestre-campos (2)
- michelmetran (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- actions/checkout v2 composite
- psf/black stable composite
- actions/first-interaction v1 composite
- mcr.microsoft.com/vscode/devcontainers/python 0-${VARIANT} build
- python 3 build
- actions/checkout v3 composite
- docker/build-push-action v4 composite
- docker/login-action v2 composite
- docker/metadata-action v4 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- matplotlib >=3.7.1
- numpy >=1.22.4
- opencv-python >=4.6.0.66
- pytesseract ==0.3.10
- requests >=2.27.1
- tqdm >=4.65.0
- urllib3 >=1.26.15