GithubHelp home page GithubHelp logo

opennorth / represent-canada-data Goto Github PK

View Code? Open in Web Editor NEW
45.0 45.0 17.0 628.1 MB

Digital electoral boundary files for Canada, its provinces and municipalities

Home Page: http://represent.opennorth.ca/

License: Other

Python 53.36% Shell 0.28% Ruby 0.30% HTML 45.73% Dockerfile 0.33%

represent-canada-data's People

Contributors

belambic avatar courtneycl avatar dependabot[bot] avatar drmeers avatar elliemarshall avatar jpmckinney avatar marichelleleclair avatar michaelmulley avatar mirabuck 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

represent-canada-data's Issues

alberta electoral districts 2019 redistribution

To help prep for upcoming elections - would be super helpful to be able to retrieve

the newly approved:
boundary-sets/alberta-electoral-districts-2019-redistribution
http://www.elections.ab.ca/wp-content/uploads/2019Boundaries_ED-Shapefiles.zip

in addition to the currently active one:
boundary-sets/alberta-electoral-districts

@jpmckinney - please let us know how we may be able to help make this happen. Perhaps we can help fund this - or would you consider a PR?

Cc: @adixon

clarifying maintenance

Going through the maintenance tasks here, which I haven't really done before, and having some confusion.

  • invoke definitions fails with an exception in an OCD package, but I'm not sure what the fix should be. Can open an issue there if I'm not missing anything?
 File "opennorth/represent-canada-data/tasks.py", line 336, in definitions
    expected_slug, expected_config = get_definition(division_id, path=config['file'])
  File "opennorth/represent-canada-data/tasks.py", line 105, in get_definition
    division = Division.get(division_id, from_csv=ocd_division_csv)
  File "represent-env/lib/python3.6/site-packages/opencivicdata/divisions.py", line 56, in get
    for d in self.all(country, from_csv):
UnboundLocalError: local variable 'country' referenced before assignment
  • when I run invoke shapefiles --base=SOME/BASE I end up with new untracked files in a particular boundaries subdir. I presume these are supposed to replace existing files? This isn't mentioned in any of the docs that I could find.

  • It is unclear if the 'Process shapefiles' maintenance step is required after updates, or only when certain things change, or only when adding new datasets?

Rename representative sets

Keep the current slugs, but use the official names:

  • Legislative Assembly of British Columbia
  • Legislative Assembly of Alberta
  • Legislative Assembly of Saskatchewan
  • Legislative Assembly of Manitoba
  • Legislative Assembly of Ontario
  • Assemblée nationale du Québec
  • Legislative Assembly of New Brunswick
  • Legislative Assembly of Prince Edward Island
  • Newfoundland and Labrador House of Assembly
  • Nova Scotia House of Assembly

Update provincial boundaries

  1. Recent work on ocd-division-ids has shown that some of our provincial data is out-of-date, e.g. BC.
  2. Write script to fetch data according to definition.py files

Site Scraper not grabbing address information correctly

it looks like the site scraper is grabbing the address for some representatives and not others. for example take the endpoint below
https://represent.opennorth.ca/postcodes/B0A1G0/?format=apibrowser
in here you will see John white his office list did mange to pull the phone number form the url end point being https://nslegislature.ca/members/profiles/john-white but it failed to get the mailing address of the office witch is available form the same source.

        {
            "email": "[email protected]",
            "name": "John White",
            "url": "https://nslegislature.ca/members/profiles/john-white",
            "personal_url": "",
            "party_name": "Progressive Conservative Association of Nova Scotia",
            "related": {
                "boundary_url": "/boundaries/nova-scotia-electoral-districts-2019/glace-bay-dominion/",
                "representative_set_url": "/representative-sets/nova-scotia-legislature/"
            },
            "source_url": "https://nslegislature.ca/members/profiles",
            "representative_set_name": "Nova Scotia House of Assembly",
            "last_name": "White",
            "first_name": "John",
            "gender": "",
            "extra": {},
            "offices": [
                {
                    "type": "constituency",
                    "tel": "1 902 849-8930"
                }
            ],
            "photo_url": "https://nslegislature.ca/sites/default/files/styles/photo_thumbnail/public/mla-thumbnails/john_White_I2098_0.jpg?itok=V7RcCpT2",
            "district_name": "Glace Bay-Dominion",
            "elected_office": "MLA"
        },

where as others like Amanda Mcdougall dose have her office mailing address available

 {
            "email": "[email protected]",
            "name": "Amanda McDougall",
            "url": "",
            "personal_url": "",
            "party_name": "",
            "related": {
                "boundary_url": "/boundaries/census-subdivisions/1217030/",
                "representative_set_url": "/representative-sets/cape-breton-regional-council/"
            },
            "source_url": "http://www.cbrm.ns.ca/mayor",
            "representative_set_name": "Cape Breton Regional Council",
            "last_name": "McDougall",
            "first_name": "Amanda",
            "gender": "",
            "extra": {},
            "offices": [
                {
                    "type": "legislature",
                    "postal": "320 Esplanade - Suite 400",
                    "tel": "1 902 563-5000"
                }
            ],
            "photo_url": "https://www.cbrm.ns.ca/media/system/images/arrow.png",
            "district_name": "Cape Breton",
            "elected_office": "Mayor"
        },

4 Waterloo-region image hotlinks are pointing to wrong file

Add district_name for mayors

All representatives should have a district_name for CSV exports to work nicely.

Add a test to represent-canada-dashboard. Also, enumerate possible values, if that's not done already.

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.