dchaplinsky / declarations.com.ua Goto Github PK
View Code? Open in Web Editor NEWOur project to digitaze and open all declaration of ukrainian officials
Home Page: http://declarations.com.ua
License: MIT License
Our project to digitaze and open all declaration of ukrainian officials
Home Page: http://declarations.com.ua
License: MIT License
rather to the value from spreadsheet.
http://take.ms/LkpgV
Declaration list pages should be paginated.
And migration to import the list:
Загальнодержавний регіон
м. Київ
м. Севастополь
Івано-Франківська область
Вінницька область
Волинська область
Дніпропетровська область
Донецька область
Житомирська область
Закарпатська область
Запорізька область
Кіровоградська область
Київська область
Кримська Автономна Республіка
Луганська область
Львівська область
Миколаївська область
Одеська область
Полтавська область
Рівненська область
Сумська область
Тернопільська область
Харківська область
Херсонська область
Хмельницька область
Черкаська область
Чернівецька область
Чернігівська область
Please remain this exact order in the admin
We have a list of titles/keywords/etc for region-office pair.
We need to create and admin page for it, so one can add/edit meta data for pages like:
http://declarations.com.ua/region/%D0%97%D0%B0%D0%B3%D0%B0%D0%BB%D1%8C%D0%BD%D0%BE%D0%B4%D0%B5%D1%80%D0%B6%D0%B0%D0%B2%D0%BD%D0%B8%D0%B9/%D0%9C%D1%96%D0%BD%D1%96%D1%81%D1%82%D0%B5%D1%80%D1%81%D1%82%D0%B2%D0%BE%20%D1%8E%D1%81%D1%82%D0%B8%D1%86%D1%96%D1%97
It should be possible to render API response as CSV tables without pagination.
While API itself seems gorgeous, we still need some docs.
Because of conversion document->table->document, some of documents now has totally empty dicts.
Please address that problem.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/var/www/venv/lib/python3.4/site-packages/django/core/management/init.py", line 385, in execute_from_command_line
utility.execute()
File "/var/www/venv/lib/python3.4/site-packages/django/core/management/init.py", line 377, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/var/www/venv/lib/python3.4/site-packages/django/core/management/base.py", line 288, in run_from_argv
self.execute(_args, *_options.dict)
File "/var/www/venv/lib/python3.4/site-packages/django/core/management/base.py", line 338, in execute
output = self.handle(_args, *_options)
File "/var/www/declarations.com.ua/declarations_site/catalog/management/commands/analytics.py", line 38, in handle
table = self._generate_table(all_decls)
File "/var/www/declarations.com.ua/declarations_site/catalog/management/commands/analytics.py", line 61, in _generate_table
decl_dict = self._map_fields(decl)
File "/var/www/declarations.com.ua/declarations_site/catalog/management/commands/analytics.py", line 91, in _map_fields
'family_num': len(declaration.general.family_raw.split(';')) if declaration.general.family_raw else 0,
File "/var/www/venv/lib/python3.4/site-packages/elasticsearch_dsl/utils.py", line 405, in getattr
return super(ObjectBase, self).getattr(name)
File "/var/www/venv/lib/python3.4/site-packages/elasticsearch_dsl/utils.py", line 109, in getattr
'%r object has no attribute %r' % (self.class.name, attr_name))
AttributeError: 'InnerObjectWrapper' object has no attribute 'family_raw'
https://github.com/dchaplinsky/declarations.com.ua/blob/master/declarations_site/catalog/management/commands/loadchesno.py
https://github.com/dchaplinsky/declarations.com.ua/blob/master/declarations_site/catalog/data/mapping_chesno.py
Complete the mapping, add a check for existing declarations (don't import them) and load to Elastic.
Not sure if 1.0.rc2 is good enough, however it contains important fix for slug length which Denys is currently needs.
Most recent processed tables contain new columns that must be matched into internal fields during the import:
And settings for postgresql.
https://docs.google.com/spreadsheets/d/13bn_WPAAE2bxwWXnSk2pH5hVA596hcJZn0ZTlPUfEzE/edit#gid=0
It also should be aware about tree structure (consider using mptt or something similar).
You might want to import this data from CSV using data migration or custom manage.py command.
We need a way to integrate analytics that Kirill made: http://pro-media.com.ua/decs/
He is using R/knitr/knitrbootrstrap.
I think we can use following way:
This “offline” way will work as we only updating site once in a while with a big batch of data.
R sources are in your mailbox.
I've sent an email with file, signed by editor.
Now we need to check it and import.
Good thing is that file has column names that corresponds (more or less) to existing schema.
You may find this stuff useful as well:
https://github.com/hotsyk/vulyk-declaration/blob/master/bin/merge_to_json.py
This code is using flatten representation of answers and then convert them back to dictionary.
GET /search
does not return results with declaration source "NACP"
Plus add little subnavigation so user can easily switch from year he is interested in.
All declarations along with search and filtering should be exposed via JSON API.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.