GithubHelp home page GithubHelp logo

hasadna / open-knesset Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ofri/open-knesset

106.0 24.0 175.0 27.36 MB

A project aimed at making the Israeli Knesset more transparent. Python and Django based

Home Page: http://oknesset.org/

License: BSD 3-Clause "New" or "Revised" License

Python 80.39% HTML 10.15% CSS 4.94% Shell 0.01% JavaScript 3.94% Less 0.57%

open-knesset's Introduction

open-knesset's People

Contributors

adayac avatar agamrafaeli avatar akariv avatar alonisser avatar amirnissim avatar amitzur avatar borisd avatar daonb avatar david206 avatar gardenofwine avatar gilz avatar habeanf avatar itayperl avatar livni avatar meirkriheli avatar morchickit avatar mushon avatar neara avatar nurdok avatar ofri avatar orihoch avatar otadmor avatar refack avatar ricardinho avatar rmerom avatar shaib avatar shmichael avatar tudmotu avatar yotammanor avatar zohararad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

open-knesset's Issues

Use API v2 with ?format=csv to restore the export to excel functionality

we need an easy way to export MK, vote and bill data to excel (csv).

API v2 supports that. see the API docs: https://oknesset-api.readthedocs.org/en/latest/index.html . add ?format=csv (not documented yet).

Just need to create a link from MK list page, vote list page, and bill list page to the respective API URL (note that we would like to preserve the user's filters if possible. so for example, the page https://oknesset.org/bill/?stage=2 should link to oknesset.org/api/v2/bill/?stage=2&format=csv&limit=0 (the limit=0 is to disable pagination - give all results in 1 file).

Fix agenda circle visualization

The visualization is supposed to present the supported in green from the top clockwise (to the right) and the opposed in red from the top counter-clockwise (to the left). It currently doesn't work like this.

broken-visualization ong

should be:

visualization-should-be

This should be addressed or ideally fixed by @ydaniv

Installation guidelines do not specify Linux users must fork the repository before cloning it

https://github.com/hasadna/Open-Knesset/

Suggestion:

Activate the virutalenv cd oknesset; . bin/activate Note the changed prompt which includes the virtualenv's name.

""" add:
Fork the repository [or do whatever else needs to be done for the rest to work]
""" and then continue with:
Clone the repository:

git clone https://github.com/your-username/Open-Knesset.git
This creates a copy of the project on your local machine.

Errors in MK residence

The map here (gist) uses Oknesset API for place_of_residence* and additional MK information.

We've discovered various errors there (based on a small sample of MKs and ex-MKs):

  • In some cases (e.g. all MKs with residence in Jerusalem), several MKs get the same geodata (we had to add noise to make the map more usable).
  • For some MKs, the textual place_of_residence doesn't match the geodata. For example, Yariv Levin:
    yariv Levin
  • Some MKs are "homeless" ๐Ÿ˜‰.

Does the place_of_residence* information come straight from a gov site?

If it does โ€” it could help if we could quote a gov URL to people who ask where the data comes from.
If not (i.e. it's maintained at some hasadna project) โ€” is there a procedure to suggest corrections?

Kavod,
The Dod

ืœืชืงืŸ ืืช ื“ื‘ืจื™ ื”ื”ืกื‘ืจ ื‘ื“ืฃ ื”ืฆื‘ืขื” (ื•ื‘ื›ืœืœ, ืœืขื‘ื•ืจ ืขืœ ื“ื‘ืจื™ ื”ื”ืกื‘ืจ ื•ืœืฉืคืจ).

ื™ืฉ ืœืชืงืŸ ืืช ื“ื‘ืจื™ ื”ื”ืกื‘ืจ ืœืžืฉืชืžืฉ ื‘ื“ืฃ ื”ื”ืฆื‘ืขื” ืœื“ื•ื’ืžื ื›ืืŸ:
: http://oknesset.org/vote/5678/
(ื”ื˜ืงืกื˜ ืฉืžืกื•ืžืŸ ื‘ื›ื—ื•ืœ)
ื™ืฉ ืœืฉื™ื ืœื‘ ื›ื™ ื”ื“ืฃ ืขื•ืกืง ืขืœ ื”ืฆื‘ืขื•ืช ื‘ืžืœื™ืื”. ื”ืฆื‘ืขื•ืช ื‘ืžืœื™ืื” ืœื ื—ื™ื™ื‘ื•ืช ืœื”ื™ื•ืช ืขืœ ื”ืฆืขื•ืช ื—ื•ืง, ืืœื ืœืžืฉืœ ืขืœ ืžื™ื ื•ื™ื™ื ืฉื•ื ื™ื ื‘ื›ื ืกืช, ืื™ ืืžื•ืŸ ื•ื›ื•'.

ืœื›ืชื•ื‘ ื“ื‘ืจื™ ื”ืกื‘ืจ ืœืกื˜ื˜ื™ืกื˜ื™ืงื•ืช ื”ืฉื•ื ื•ืช ืฉืžื•ืคื™ืขื•ืช ื‘ื“ืฃ ื—ื‘ืจ ื›ื ืกืช ื•ื‘ื“ืคื™ ื”ืฉื•ื•ืื” ื‘ื™ืŸ ื—"ื›ื™ื ื•ื‘ื™ืŸ ืกื™ืขื•ืช

.ื‘ืžืฉื™ืžื” ื–ื• ื™ืฉ ืœื“ื‘ืจ ืขื ืขืคืจื™, ืžื•ื‘ื™ืœ ื”ืคืจื•ื™ื™ืงื˜ ืื• ืœืขืฉื•ืช ื‘ื™ื—ื“ ืขื ืžืชื›ื ืช, ื•ืœื”ืกื‘ื™ืจ ืžื” ืื•ืžืจืช ื›ืœ ืกื˜ื˜ื™ืกื™ื˜ื™ืงื” ืขืœ ืคืขื™ืœื•ืช ื—"ื›ื™ื ื‘ื›ื ืกืช ืคืชื•ื—ื”
:ื‘ื“ืฃ ื—"ื›

ื ื•ื›ื—ื•ืช ื‘ืžืฉื›ืŸ
ื ื•ื›ื—ื•ืช ื‘ื•ืขื“ื•ืช
ืžืฉืžืขืช ืกื™ืขืชื™ืช
ืžืฉืžืขืช ืงื•ืืœื™ืฆื™ื”

Tagging

Current tagging situation is a mess and should be improved.

  • Tags Relationships:
    • FK to the master tag
    • When someone tags with a "child" tag, show notification that it was tagged as the master tag
    • Auto complete on all tags (Master and children)
    • django-taggit with our custom tag model
    • django-tagging remains for the planet functionality
  • New tags:
    • Users can't create tags no more
    • Should go through the suggestions mechanism, and approved by the editors
  • API
    • Expose the taggit models

Add filter by proposing MK to bill list, and add link to that filter from the MK page

This type of page http://oknesset.org/bill/?member=826 exists, but the only way to get to it is from page like http://oknesset.org/member/by/bills_proposed/ (see also the other stage filters) Need to add it to the bill list filter, and then link from each MK page to the list, filtered to show bills proposed by that MK (possibly, add links to the list filtered by different bill stages - proposed, passed pre vote, etc.).

Feedback form puts /feedback/ as URL

all the suggested feedback objects have /feedback/ as their URL.
The URL should contain the URL which the user was at, when clicking the feedback button (to help the person reading the feedback get the proper context).

splitting MK roles by comma causes incorrect presentation

in https://oknesset.org/member/739/%D7%A2%D7%9E%D7%A8%D7%9D-%D7%9E%D7%A6%D7%A0%D7%A2/ the role description says:
ื™ื•"ืจ ื•ืขื“ืช ื”ื—ื™ื ื•ืš | ื”ืชืจื‘ื•ืช ื•ื”ืกืคื•ืจื˜
as if ื™ื•"ืจ ื•ืขื“ืช ื”ื—ื™ื ื•ืš is one role, and ื”ืชืจื‘ื•ืช ื•ื”ืกืคื•ืจื˜ is another role.

the is caused by the roles property (mks/models.py:359) splitting the role string by comma. this specific role happens to contain a comma.

suggested fix: change to splitting by some other character (e.g, pipe - |), and make sure the scraping code concatenates different roles with | in between. use content people to help if needed.

Untranslated strings in login page

go to login page, enter incorrect username / password. you'll get the error message:
"Please enter a correct ืฉื ืžืฉืชืžืฉ and password. Note that both fields may be case-sensitive"
which is partially translated.
need to add django he translations to our po/mo files.

Site search results contain absolute links to oknesset.org

This confused us earlier when we ran a search in a dev server and suddenly found ourselves on the production server.

This is caused by the results coming as is from the google custom search. I don't know if it's worth the hack, but perhaps we should rewrite the urls to be relative before displaying them.

The downside to this is that there's a good chance that the linked page isn't part of the dev db, and will be broken, so feel free to mark as "won't fix".

Add link from vote to relevant part in matching plenum protocol

in vote, such as http://oknesset.org/vote/6196/ it would be nice to have a link to the relevant part in the plenum protocol http://oknesset.org/plenum/7678/ - the correct plenum meeting can be easily found by date (there is only 1 plenum protocol per day. possible edge case - votes that are after midnight might be in the plenum protocol of the previous date! need to check this). the relevant part inside the protocol may be found by using vote.vote_number, and matching it against a protocol part header (see below).

from datetime import date
p = Committee.objects.get(name='Plenum')
// p is the plenum "committee" object.
m = p.meetings.get(date=date(2013, 03, 19))
// m is the meeting object. m.protocol_text is a bulb of text of the protocol, m.parts is the protocol, parsed to small chunks.

parts = m.parts.filter(header__contains=u'ื”ืฆื‘ืขื”')
// these are all the parts that have ื”ืฆื‘ืขื” in their name. each should also have a number. just find the one where the number matches vote.vote_number. we'll assume we put it in the variable part
part.get_absolute_url should give you the direct link to it.

The link should be added using the Links app. need to make sure it is presented in the vote page.
Link.objects.create(...)

This whole thing should be written as a management command, with options to run it on all the votes in the db, or just on votes from last x days.

When agenda editor submits an invalid VoteLinkingForm no error is dispayed.

in pages like https://oknesset.org/vote/5894/ if the logged in user is an editor of an agenda, he gets a form to link the current vote to his agenda(s). The form is submitted to a generic view (update_editors_agendas in agendas/view.py) that deals with several types of similar forms. After a form is submitted, we return a redirect. if the form is invalid (for example, the 'reasoning' field contains more than the allowed 1000 chars), we don't show any error message.

This view should render the appropriate view (vote detail, bill detail, or committee meeting detail, according to the one that sent the form), with a bound form, to display the errors to the user.

Votes against party/coalition are wrong

for example, in http://oknesset.org/member/105/%D7%A2%D7%9E%D7%99%D7%A8-%D7%A4%D7%A8%D7%A5/ , click the question mark near ืžืฉืžืขืช ืงื•ืืœื™ืฆื™ื” and you get a list of votes this MK voted against the coalition. its computed wrong - because in the previous knesset he was in a different party than other MKs in his current party, it is counted as if he voted against them, but they were not really his party/coalition at the time of those votes.

Distribuite in devel docs for windows is gone

The link to distribute in the Windows section of the developers documentation is no longer valid.

Alternate means of installing distribute is required, and documentation update to match it.

Error reading committee meeting protocol RTF

the code is in simple.management.commands.syncdata:936

it works OK for most committee meeting protocols, but for some, it returns an empty string.

to recreate the problem run in a django shell:

from simple.management.commands.syncdata import Command
x = Command()
y = x.get_committee_protocol_text('www.knesset.gov.il/protocols/data/rtf/huka/2013-10-08.rtf')
y
Out: ''

You should get a very long unicode of the protocol text, and not an empty string. This specific RTF opens OK in LibreOffice, so its not too badly broken.

as an example of an RTF that is scrapped correctly, you can use
y = x.get_committee_protocol_text('http://www.knesset.gov.il/protocols/data/rtf/kalkala/2013-10-09.rtf')

Vote/Bill API does not respect filters

Vote API should use the same filters format as out /vote/ page, because in /vote/ page we have an "export to csv" button. For example, after setting the filter to a date range, the "export to csv" link seems to update correctly to http://oknesset.org/api/v2/vote/?from_date=2012-03-01&tagged=all&vtype=all&order=time&to_date=2012-03-15&format=csv&limit=0 but the resulting file still contains votes outside the specified range. The same happens if you change the format to json.

related issue: there is a limit=0 param, but it is also ignored, and 1000 results are returned.

In bills the issue is similar, but stage=all seems to cause an empty result list (and the rest of the filters are ignored).

Turn the Homepage "Tidbits" area into a flexible feature slider

Right now the homepage slider only shows tidbits, which creates sad incidents of ugly huge banners in the homepage. We need to:

  • Allow marketing messages (aka banners) in the slider
  • Finish the design of the slider
  • limit the number of characters in an item
  • define some rules about the dynamic image (for example, use MK profile image on items concerning them)

After defining and designing these items, they can be turned into new issues to be implemented separately.

banner-incident

No native search

There is no native search option within the Open Knesset database. The current google search is not good enough. Information is not accessible because of this.

vote API error when an agenda with no image is ascribed to the vote

example: in /api/v2/vote/685/

File "/oknesset_web/oknesset/Open-Knesset/laws/api.py", line 91, in dehydrate_agendas
    'image': agenda.image.url,

  File "/oknesset_web/oknesset/local/lib/python2.7/site-packages/django/db/models/fields/files.py", line 63, in _get_url
    self._require_file()

  File "/oknesset_web/oknesset/local/lib/python2.7/site-packages/django/db/models/fields/files.py", line 41, in _require_file
    raise ValueError("The '%s' attribute has no file associated with it." % self.field.name)

ValueError: The 'image' attribute has no file associated with it.

need to deal with agenda.image is None case.

Design icons for the card titles

Card titles are built to present an icon next to their title. This has been a part of Adi's original design. We need to conclude the icon design and to crop them to the right sizes.

Fix responsive footer menu for small screeens

See in the following image:

footer_responsive

  • The menu should be centred, preferably without the right border.
  • The box shadow is visible on the sides, remove it for small screens.
  • The location of the search icon is outside of the search box.
  • There's lots of spacing between the seach box and next header, but no spacing between twitter and facebook icons and "ืคืจื•ื™ื™ืงื˜ ืฉืœ ื”ืกื“ื ื ืœื™ื“ืข ืฆื™ื‘ื•ืจื™".
  • This should happen only on small screens. The design should stay as is for large (desktop) screens.

โ€ŽTips

  • Make sure to check on smartphones as well.
  • Firefox has "Responsive Design View" accessible by the shortcut Ctrl+Shift+M.
  • Don't edit app.css directly, edit the less files and compile the final css. See: Working on CSS in our developer docs.

Write explanation for the ืกื™ืขื•ืช metric in the ืื’'ื ื“ื•ืช section of the website.

Your mission, should you choose to accept it, is to write a clear explanation for the ืกื™ืขื•ืช metric found in the ืื’'ื ื“ื•ืช section of the website, so that the layman oknesset user will be able to make sense of what this metric means.

(link to image:
https://googledrive.com/host/0B09gtBbVkTqnN1lQc2ZubkkyTm8/%D7%90%D7%92'%D7%A0%D7%93%D7%95%D7%AA_%D7%A1%D7%99%D7%A2%D7%95%D7%AA.png)

Please include:

a. A simple clarification of what this metric measures.

b. Where the data collected to create this metric comes from.

c. How we analyze/manipulate the data to arrive at the metric.

In case you've chosen to tackle this mission, please indicate you've done so in the comments section.

Once your done, please upload the explanation in the comments section, and indicate where you received the information from, and when.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.