GithubHelp home page GithubHelp logo

unitedstates / images Goto Github PK

View Code? Open in Web Editor NEW
175.0 34.0 50.0 1.72 GB

Public domain photos of Members of the United States Congress

Home Page: https://theunitedstates.io/images/

License: Creative Commons Zero v1.0 Universal

HTML 1.47% Shell 18.39% Python 80.14%
open-data us-congress congress photos public-domain

images's Introduction

Images of Congress

DOI

Public domain images of members of the US Congress.

Using the photos

Photos are available at predictable URLs, by size and Bioguide ID. Photos are served using GitHub Pages.

https://theunitedstates.io/images/congress/[size]/[bioguide].jpg

[size] can be one of:

  • original - As originally downloaded. Typically, 675x825, but it can vary.
  • 450x550
  • 225x275

[bioguide] must be a Bioguide ID. These are unique IDs for members of Congress, as defined by the Congressional Bioguide. They can be found and connected to many other Congressional datasets, including the partner dataset over at unitedstates/congress-legislators.

Note: Our HTTPS permalinks are provided through CloudFlare's Universal SSL, which also uses "Flexible SSL" to talk to GitHub Pages' unencrypted endpoints. So, you should know that it's not an end-to-end encrypted channel, but is encrypted between your client use and CloudFlare's servers (which at least should dissociate your requests from client IP addresses).

Downloading all images of a particular size

If you want to quickly grab all images of a particular size without cloning the entire repo (and have svn installed), you can just do something like this:

svn checkout https://github.com/unitedstates/images/trunk/congress/225x275

Gathering more photos

GitHub Actions status codecov

This project uses a Python script that scrapes the Government Printing Office's Member Guide for official photos of Members of Congress. You can run the script to find and fetch new photos.

Install dependencies with:

pip install -r requirements.txt

Run the script with:

./scripts/gpo_member_photos.py

Contributing other photos

If GPO doesn't have a photo for someone in their member guide, we may be willing to accept a photo from another source.

In this case, open a ticket, and include:

  • The name and Bioguide ID of the member of Congress.
  • A link to the image you're suggesting we incorporate, and to a page that displays that image.
  • Why you believe the image is definitely official and in the public domain.

Public domain

The photos of members of Congress are from the Government Printing Office, which has assured us that all photos are public domain.

All other files in this project are dedicated to the public domain. As spelled out in CONTRIBUTING:

The project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.

All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.

images's People

Contributors

chrisgherbert avatar daveyoon avatar dwillis avatar hugovk avatar imgbotapp avatar joshdata avatar kenmickles avatar konklone avatar maddarooj avatar msimonborg avatar nickmerwin avatar plantfansam avatar rthbound avatar ryparker avatar timball avatar vic-st 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

images's Issues

Make tests pass

The current commit is only passing under Python 2.6 and 2.7:

https://travis-ci.org/hugovk/images/builds/22171589

Now that we're under Travis' watchful eye, we should get the tests to all pass.

Is scripts/missing.py a good idea to run on Travis? It does network downloads, for example. It might be better to have a script which can run more quickly and doesn't tax Travis as much.

Make script work in new repo

  • Cloning the YAML from git on demand instead of looking for it nearby
  • Have it output to the congress/originals directory
  • Bring over any utils functions it was using

Official portrait for Amata Coleman Radewagen - R000600

amata official portrait

Bioguide: R000600
Name: Amata Coleman Radewagen
This image was received after contacting the office. Below is the correspondence with the office:


Please see attachment.

Jared Michael P. Christel
Legislative Correspondent
Congresswoman Aumua Amata C. Radewagen
American Samoa At Large District (AQ00)
1339 Longworth HOB
T: (202) 225-8577
F: (202)225-8757

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Monday, March 30, 2015 5:05 PM
To: WebForms, RadewagenAQ
Subject: Website Problem

WEB PAGE WITH PROBLEM: https://radewagen.house.gov

NATURE OF PROBLEM:
I can't find Rep. Radewagen's official House portrait. I'm looking to add the government made, copyright free image to a repository of images of members of Congress that others can freely use. Please let me know where I can find this.

Thank you!

Official portrait for Rod Blum - B001294

congressman blum headshot

Bioguide: B001294
Name: Rod Blum

Metadata
name: Photo provided by Rep. Rod Blum's House office over email. Copyright-free status confirmed by a member of his staff.
link: Not available

Eventually: convert URLs to HTTPS

Adding HTTPS support will make these images usable in secure environments, without mixed content warnings.

We have image URLs on a custom domain right now, which is great for portability (we can easily leave Github) but less good for HTTPS. Github supports HTTPS for Github Pages now, but only for *.github.io domains.

However, Cloudflare may change this game if they offer a free SSL-only plan, as they say they will.

When that time comes, it's worth me putting Cloudflare in front of theunitedstates.io so that we can get an SSL terminator in front of everything, and have things encrypted end to end. I'm dropping this here as a reminder.

Github Pages doesn't support HTTPS

The permalinks to these images are unable to be used by an HTTPS website without throwing mixed content warnings. There's no way to address this with Github Pages.

I'll update the README to encourage HTTPS users to mirror the images on their own rather than use the permalinks, and to write Github support if they think they shouldn't have to do that.

Travis CI and Coveralls

I've added a Travis CI build. Everything's in the https://github.com/unitedstates/images/blob/gh-pages/.travis.yml file.

It runs on all available Python versions (2.6, 2.7, 3.2, 3.3 and pypy, with 3.4 coming along any day now). It's allowed to fail for all versions but 2.7. It passes on 2.6 and 2.7 as Python 3 isn't supported yet. (Probably just the prints.)

It then runs the tests, with coverage, and checks for missing images. After a successful build it sends coverage to Coveralls and runs some basic static analysis (pep8, pyflakes).

Both Travis CI and Coveralls are free for open source, and you get reports like this (from my fork):
https://travis-ci.org/hugovk/images
https://coveralls.io/r/hugovk/images

Travis is really handy to check nothing gets broken on on other platforms, for each commit. Coverage isn't so useful as coverage is only 33%, but it doesn't hurt to enable.

I don't see any particular need to show the badges in the README.

Please could you enable Travis CI and Coveralls for this repo?

Official portrait for Cory A. Booker - B001288

booker headshot
Bioguide: B001288
Name: Cory A. Booker

Metadata
name: Photo provided by Booker's Senate office over email. Copyright-free status confirmed in email with Director of Scheduling Unjin Lee and Chief of Staff Matt Klapper.
link: Not available

Official portrait for Steve Knight - K000387

headshot

Bioguide: K000387
Name: Steve Knight

Metadata
name: Photo provided by Rep. Steve Knight's House office over email. Copyright-free status confirmed by a member of his staff.
link: Not available

Document public URLs

I've moved the repo to use only the gh-pages branch, so the images will have public URLs. Document these in the README.

Error

I'm running this:

python scripts/gpo_member_photos.py

Getting this:

Traceback (most recent call last):
  File "scripts/gpo_member_photos.py", line 393, in <module>
    member_links = get_front_page(br, args.congress, args.delay)
  File "scripts/gpo_member_photos.py", line 63, in get_front_page
    br.select_form(nr=0)
  File "/usr/local/lib/python2.7/site-packages/mechanize/_mechanize.py", line 524, in select_form
    raise FormNotFoundError("no form matching "+description)
mechanize._mechanize.FormNotFoundError: no form matching nr 0

I'm on a Mac. I don't speak Python.

New member low-res b&w photos

There's no telling when new Members of Congress will get photos on the memberguide site. It could be soon or it could be far off. In the meanwhile, someone could scrape:

http://www.gpo.gov/fdsys/browse/collection.action?collectionCode=GPO&browsePath=Congressional+Pictorial+Directory%2F114th+Congress&isCollapsed=false&leafLevelBrowse=false&isDocumentResults=true&ycord=0

Which has not-very-high-res black and white photos of new members. I used to scrape these PDFs by hand. It was the WORST thing ever. But it's there.

Adding credit files to each image

If we want to include images from other sources, we should add metadata to each image with source information. Might be YAML like:

name: GPO Member Guide
link: http://memberguide.gpo.gov

Where can I find a list of members missing images?

I notice a lot of members post full resolution color images on their .gov sites. I'd like to help track down images to fill the gaps in coverage from the GPO source.

Also could be useful to have a list of members whose images are just the black and white versions.

The to do list:

  • B001288 - Cory A. Booker - see #52
  • R000600 - Amata Coleman Radewagen - see #26
  • S001198 - Daniel Sullivan - see #30
  • P000612 - David Perdue - see #27
  • E000295 - Joni Ernst - see #28
  • T000476 - Thom Tillis - see #85
  • R000605 - Mike Rounds - see #29
  • S001197 - Ben Sasse - see #86
  • D000625 - Daniel M. Donovan Jr.
  • K000388 - Trent Kelly - see #107

Official portrait for Buddy Carter - C001103

official photo

Bioguide: C001103
Name: Buddy Carter

Metadata
name: Photo provided by Rep. Buddy Carter's House office over email. Copyright-free status confirmed by a member of his staff.
link: Not available

Official portrait for Brian Babin - B001291

official headshot
Bioguide: B001291
Name: Brian Babin

Metadata
name: Photo provided by Rep. Brian Babin's House office over email. Copyright-free status confirmed by a member of his staff.
link: Not available

Update script for 114th congress

By default the script is searching for the 113rd congress. It should be changed to 114 by default in:

    parser.add_argument(
        '-n', '--congress', default='113',
        help="Congress session number, for example: 110, 111, 112, 113")

But when running on the 114, it doesn't find any links:

$ python scripts/gpo_member_photos.py -n 114
Updating the congress-legislators repo...
The system cannot find the path specified.
Submit congress session number: 114
Links: 0
Found a total of 0 member links

---
Didn't resolve Bioguide IDs: 0
Welcome to Git (version 1.9.5-preview20141217)


Run 'git help git' to display the help index.
Run 'git help <command>' to display help for specific commands.
Silently Installing...
mkdir: cannot create directory `congress/225x275': File exists
mkdir: cannot create directory `congress/450x550': File exists

To do: find the full-sized color official portraits for these members

This is a list of members currently in /unitedstates/images that have black and white, small or otherwise subpar images that were taken from the GPO's New Member Pictorial Directory: 114th Congress. More background here.

I'd like to improve these images one-by-one. It'll probably take some time, but it's worth having high quality encyclopedic portraits of members trickling down to all the end users of this repo.





































  • M001194 - John Moolenaar - https://moolenaar.house.gov - Waiting on form, press sec, chief of staff, legislative director or scheduler email response. Also called his DC office and they said they would send the photo...























Official portrait for Barry Loudermilk - L000583

official barry_loudermilk

Bioguide: L000583
Name: Barry Loudermilk

Metadata
name: Photo provided by Rep. Barry Loudermilk's House office over email. Copyright-free status confirmed by a member of his staff.
link: Not available

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.