Skip to content

Commit 04f0fec

Browse files
authored
[pre-commit.ci] Updating git hooks. (#54)
<!--pre-commit.ci start--> updates: - [github.com/asottile/pyupgrade: v3.19.1 → v3.20.0](asottile/pyupgrade@v3.19.1...v3.20.0) - [github.com/astral-sh/ruff-pre-commit: v0.11.8 → v0.11.12](astral-sh/ruff-pre-commit@v0.11.8...v0.11.12) - [github.com/igorshubovych/markdownlint-cli: v0.44.0 → v0.45.0](igorshubovych/markdownlint-cli@v0.44.0...v0.45.0) <!--pre-commit.ci end-->
2 parents 6ed08d7 + 877444f commit 04f0fec

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

.markdownlint.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,6 @@
4040
"MD046": {
4141
"style": "fenced"
4242
},
43-
"MD051": false
43+
"MD051": false,
44+
"MD059": false
4445
}

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ repos:
2121
- --markdown-linebreak-ext=md
2222

2323
- repo: https://github.com/asottile/pyupgrade
24-
rev: v3.19.1
24+
rev: v3.20.0
2525
hooks:
2626
- id: pyupgrade
2727
args:
2828
- "--py39-plus"
2929

3030
- repo: https://github.com/astral-sh/ruff-pre-commit
31-
rev: "v0.11.8"
31+
rev: "v0.11.12"
3232
hooks:
3333
- id: ruff
3434
args:
@@ -57,7 +57,7 @@ repos:
5757
- --select=E9,F63,F7,F82
5858

5959
- repo: https://github.com/igorshubovych/markdownlint-cli
60-
rev: v0.44.0
60+
rev: v0.45.0
6161
hooks:
6262
- id: markdownlint
6363
args:

content/posts/2025-03-04_working-with-json-and-postgres.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ For the adventurous, there's a PostgreSQL extension called `btree_gin` that allo
137137

138138
## Table creation
139139

140-
I'm not going to spam you with Data Definition Language (<https://en.wikipedia.org/wiki/Data_definition_language>), but you can find the complete database schema [here](https://gitlab.com/Thomas_szczurek_gayant/bd_insee/-/tree/main/sql/creation_tables?ref_type=heads).
140+
I'm not going to spam you with [Data Definition Language](https://en.wikipedia.org/wiki/Data_definition_language), but you can find the [complete database schema here](https://gitlab.com/Thomas_szczurek_gayant/bd_insee/-/tree/main/sql/creation_tables?ref_type=heads).
141141

142142
However, here's a brief diagram to help you understand the rest of the article:
143143

@@ -288,7 +288,7 @@ Let's retrieve the latest population data from the municipal census [in csv form
288288

289289
All field names begin with P or C, indicating *main survey* (raw answers to census questions) or *complementary survey* (cross-referencing of answers to establish an indicator). Fields from the main survey and those from the complementary survey must not be cross-referenced. This information should obviously be kept, but for personal reasons, I prefer to put it at the end of the name rather than at the beginning. In this way, we move from normalized fields such as `P18_POP` to a normalization of this type `POP_P`.
290290

291-
You'll find [here](https://gitlab.com/Thomas_szczurek_gayant/bd_insee/-/blob/main/sql/import/correction_champs_insee.xlsx?ref_type=heads) a spreadsheet to take care of all this.
291+
You'll find [here a spreadsheet](https://gitlab.com/Thomas_szczurek_gayant/bd_insee/-/blob/main/sql/import/correction_champs_insee.xlsx?ref_type=heads) to take care of all this.
292292

293293
Before inserting the data into our table, we'll go through a temporary table to make the data accessible in Postgres. Using Postgresql's `COPY` would be tedious, as you'd have to specify the hundred or so fields contained in the census population section of the command. And I'm not ashamed to say that I've got a baobab in my hand at the thought. So we pull out this wonderful software called QGIS. We activate the Explorer and Explorer2 panels. We create a connection to the database with creation rights, and with a graceful flick of the wrist, we drag the file from the Explorer panel to the Postgres database in Explorer2. Let the magic happen.
294294

@@ -529,4 +529,4 @@ And for that, we're going to use GDAL, which is truly incredible.
529529
ogr2ogr -of parquet donnees_insee.parquet PG:"dbname='insee' schema='insee' tables='donnees_communes_olap' user='user_name' password='your_password'"
530530
```
531531

532-
And then you can put the file on a cloud space, like [here](https://donnees-insee.s3.fr-par.scw.cloud/donnees_insee_olap.parquet)! You can then get out your best Linkedin publication generator, which will put lots of cute emojis, and show off on social networks (imagine that 90% of Linkedin content has to be made with these things, which are able to generate publications explaining that one of the few advantages of shape over geopackage is that it's a multi-file format, all in a very confident tone).
532+
And then you can put the [file on a cloud space, like here](https://donnees-insee.s3.fr-par.scw.cloud/donnees_insee_olap.parquet)! You can then get out your best Linkedin publication generator, which will put lots of cute emojis, and show off on social networks (imagine that 90% of Linkedin content has to be made with these things, which are able to generate publications explaining that one of the few advantages of shape over geopackage is that it's a multi-file format, all in a very confident tone).

0 commit comments

Comments
 (0)