Skip to content

Commit

Permalink
Built site for gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
defuneste committed Jun 10, 2024
1 parent b25ebeb commit f632374
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .nojekyll
Original file line number Diff line number Diff line change
@@ -1 +1 @@
576e65c8
b6d76e81
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ <h3 class="no-anchor listing-title">
</a>
</div>
</div>
<div class="quarto-post image-right" data-index="1" data-categories="cli,code,geojson,json,spatial data" data-listing-date-sort="1710046800000" data-listing-file-modified-sort="1717686051257" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="5" data-listing-word-count-sort="999">
<div class="quarto-post image-right" data-index="1" data-categories="cli,code,geojson,json,spatial data" data-listing-date-sort="1710046800000" data-listing-file-modified-sort="1718022757062" data-listing-date-modified-sort="NaN" data-listing-reading-time-sort="5" data-listing-word-count-sort="990">
<div class="thumbnail">
<p><a href="./posts/awesomejq/index.html" class="no-external"></a></p><a href="./posts/awesomejq/index.html" class="no-external">
<p><img src="./posts/awesomejq/thumbnail.png" class="thumbnail-image"></p>
Expand Down
12 changes: 6 additions & 6 deletions posts/awesomejq/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -305,12 +305,12 @@ <h4 class="anchored" data-anchor-id="second-make-them-into-a-csv">Second make th
</div></div><ul>
<li><code>@csv</code> convert to a csv and we redirect the output later in <code>data/sample.csv</code></li>
</ul>
<p>We have just explored the surface! <code>jq</code> can help to filter some specific features: (</p>
<pre><code>- every geometries "served" in our file?

- the first node in every geometries)?

- etc!</code></pre>
<p>We have just explored the surface! <code>jq</code> can help to filter some specific features:</p>
<ul>
<li><p>every geometries “served” in our file?</p></li>
<li><p>the first node in every geometries)?</p></li>
<li><p>etc!</p></li>
</ul>
<p><code>jq</code> is a generic tool for filtering json and lot of people are using by following the JSON spec in geojson we can build on top of all their monumental work!</p>


Expand Down
2 changes: 1 addition & 1 deletion search.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"href": "posts/awesomejq/index.html#jq-please-give-me-a-data-frame",
"title": "Awesome jq and GeoJSON",
"section": "jq , please give me a data frame:",
"text": "jq , please give me a data frame:\nBut wait what if we just want the properties?\n\nFirst let’s get their keys:\nAt the top level if we do ..\njq `keys` data/better_sample.geojson\n#[\n# \"crs\",\n# \"features\",\n# \"type\"\n]\n.. we get the keys for the first array. We need to go in the features object to get properties and pass it to the keys function. Here we went a bit lazy just asking for the first feature.\njq '.features[0].properties | keys' data/better_sample.geojson\n\n\nSecond make them into a csv\nHere we will need to buckle up a bit as it would become quite a big line:\njq -r '(.features[0].properties | keys_unsorted), (.features[].properties | to_entries | map(.value))| @csv' data/better_sample.geojson &gt; data/sample.csv\n\n(.features[0].properties | keys_unsorted) here nothing new we added parentheses to enforce precedence. We are getting the header of our csv\n(.features[].properties | to_entries | map(.value)) :\n\nwe are starting from all our properties (not the first one)\npassing it to to_entries convert our object to multiple objects with “key” / “value” (see margin)\nfinaly, map(.value) gets all “value” for every selected features\n\n\n\n\n{\n\"key\": \"state_abbr\",\n\"value\": \"VT\"\n},\n{\n\"key\": \"geoid_st\",\n\"value\": \"50\"\n},\n{\n\"key\": \"geoid_co\",\n\"value\": \"50005\"\n}\n\n@csv convert to a csv and we redirect the output later in data/sample.csv\n\nWe have just explored the surface! jq can help to filter some specific features: (\n- every geometries \"served\" in our file?\n\n- the first node in every geometries)?\n\n- etc!\njq is a generic tool for filtering json and lot of people are using by following the JSON spec in geojson we can build on top of all their monumental work!"
"text": "jq , please give me a data frame:\nBut wait what if we just want the properties?\n\nFirst let’s get their keys:\nAt the top level if we do ..\njq `keys` data/better_sample.geojson\n#[\n# \"crs\",\n# \"features\",\n# \"type\"\n]\n.. we get the keys for the first array. We need to go in the features object to get properties and pass it to the keys function. Here we went a bit lazy just asking for the first feature.\njq '.features[0].properties | keys' data/better_sample.geojson\n\n\nSecond make them into a csv\nHere we will need to buckle up a bit as it would become quite a big line:\njq -r '(.features[0].properties | keys_unsorted), (.features[].properties | to_entries | map(.value))| @csv' data/better_sample.geojson &gt; data/sample.csv\n\n(.features[0].properties | keys_unsorted) here nothing new we added parentheses to enforce precedence. We are getting the header of our csv\n(.features[].properties | to_entries | map(.value)) :\n\nwe are starting from all our properties (not the first one)\npassing it to to_entries convert our object to multiple objects with “key” / “value” (see margin)\nfinaly, map(.value) gets all “value” for every selected features\n\n\n\n\n{\n\"key\": \"state_abbr\",\n\"value\": \"VT\"\n},\n{\n\"key\": \"geoid_st\",\n\"value\": \"50\"\n},\n{\n\"key\": \"geoid_co\",\n\"value\": \"50005\"\n}\n\n@csv convert to a csv and we redirect the output later in data/sample.csv\n\nWe have just explored the surface! jq can help to filter some specific features:\n\nevery geometries “served” in our file?\nthe first node in every geometries)?\netc!\n\njq is a generic tool for filtering json and lot of people are using by following the JSON spec in geojson we can build on top of all their monumental work!"
},
{
"objectID": "index.html",
Expand Down
2 changes: 1 addition & 1 deletion sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</url>
<url>
<loc>https://ruralinnovation.github.io/blog/posts/awesomejq/index.html</loc>
<lastmod>2024-06-06T15:00:51.257Z</lastmod>
<lastmod>2024-06-10T12:32:37.062Z</lastmod>
</url>
<url>
<loc>https://ruralinnovation.github.io/blog/index.html</loc>
Expand Down

0 comments on commit f632374

Please sign in to comment.