Skip to content

Instantly share code, notes, and snippets.

@sirex
sirex / eiis.sh
Created May 17, 2022 16:39
Eismo įvykių duomenys su Policijos departamentu.
#!zsh
# Duomenų rinkinys
# https://data.gov.lt/dataset/eismo-ivykiu-ivykusiu-lietuvos-respublikoje-kuriu-metu-zuvo-ir-ar-buvo-suzeisti-zmones-duomenys
# Struktūros aprašas
# https://github.com/atviriduomenys/manifest/blob/master/datasets/gov/pd/eiis.csv
git clone https://github.com/atviriduomenys/manifest.git
cd manifest/datasets/gov
@sirex
sirex / regitra-tp.sh
Created May 10, 2022 07:39
Transporto priemonių duomenys su Regitra
#!zsh
# https://data.gov.lt/datasets?q=&organization_id=132
# Peržiūrime rinkinius naudodamiesi ADP Public API
http -b "https://data.gov.lt/public/api/1/action/package_search?q=organization_id:132" | jq '
.result.results[] | {
title: .title,
structure: .extras[]? | select(.key == "structure") | first(.value),
resources: [.resources[]? | .url]
@sirex
sirex / notes.py
Last active May 4, 2022 10:55
Statistikos departamento Covid 19 duomenų apžvalga
import pandas as pd
# Užsikraunam duomenis.
atvejai = pd.read_csv('AtvejaiIrMirtys.csv')
# Peržiūrim duomenų sudėtį.
atvejai.info()
atvejai.nunique()
atvejai['sex'].value_counts()
#!zsh
# Inventorizacija
# ###############
#
# Katalogo (Partnerių) API
# ========================
#
# https://httpie.io/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import dateutil.parser
class LtParserInfo(dateutil.parser.parserinfo):
WEEKDAYS = [
("Pr", "Pirmadienis"),
("An", "Antradienis"),
("Tr", "Trečiadienis"),
("Kv", "Ketvirtadienis"),
("Pn", "Penktadienis"),
("Št", "Šeštadienis"),
import itertools
import json
import urllib.parse
from operator import itemgetter
import click
import lxml.etree
import requests
import requests_cache
import tqdm
@sirex
sirex / registru-centro-nt-registras.ipynb
Created July 30, 2019 15:19
Registrų centro nekilnojamojo turto atvirų duomenų apžvalga
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sirex
sirex / cartocon_2018.ipynb
Last active November 29, 2018 17:57
Cartocon 2018: Duomenų analizė su Jupyter ir Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.