Code Monkey home page Code Monkey logo

dailygraphics's People

Contributors

alykat avatar brmayes avatar dannydb avatar dependabot-support avatar derekkramer avatar eads avatar ghing avatar hilaryfung avatar jeremyjbowers avatar jjelosua avatar katiepark avatar kokonakajima avatar mazhang2718 avatar mileswwatkins avatar oneillclaire avatar onyxfish avatar qdinhbui2 avatar shmcminn avatar stiles avatar thomaswilburn avatar tylerfisher avatar vv-qian 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  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

dailygraphics's Issues

Google spreadsheet shouldn't be required

Not sure if this is bug or if I'm just doing it wrong.

If I delete graphic_config.py, I get an error when I try to load the page. So even if a particular project doesn't have a google doc, I still need to have to connect to one for things to work.

Responsive table not working in IE9?

Running into issues with this table:
http://www.npr.org/templates/story/story.php?storyId=297331252&live=1
(slugged table-televangelists in the repo: https://github.com/nprapps/dailygraphics/tree/master/www/graphics/table-televangelists )

Works fine in my IE9 emulator. But Alicia and Ashley report that when they pull it up in IE9 (compatibility mode on by default), nothing shows up. Alicia found that if she disables compatibility mode, the first few lines of the table show up (the default iframe height before resizing?), but nothing else.

update_copy: more helpful error message

Possible to remind the user to specify a particular slug?

(dailygraphics)alynpr:dailygraphics ahurt$ fab update_copy
Traceback (most recent call last):
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/fabric/main.py", line 717, in main
    *args, **kwargs
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/fabric/tasks.py", line 332, in execute
    results['<local-only>'] = task.run(*args, **new_kwargs)
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/fabric/tasks.py", line 112, in run
    return self.wrapped(*args, **kwargs)
TypeError: update_copy() takes exactly 1 argument (0 given)

(I mean, I guess it does with that TypeError, but it's not very user-friendly. Super-low-pri.)

add_graphic disappeared?

Used to be here:

dailygraphics/fabfile.py

Lines 462 to 468 in a251158

App-specific commands
"""
def add_graphic(slug):
with settings(warn_only=True):
local('mkdir www/graphics/%s' % slug)
local('cp www/child.html www/graphics/%s/child.html' % slug)
local('cp -r www/js www/graphics/%s/js' % slug)

Now I get this error when I fab add_graphic:name-of-graphic

(dailygraphics)alynpr:dailygraphics ahurt$ fab add_graphic:table-olympic-diet

Warning: Command(s) not found:
    add_graphic

Available commands:

    branch               Work on any specified branch.
    deploy               Deploy the latest app to S3 and, if configured, to o...
    master               Work on development branch.
    production           Run as though on production.
    render               Render HTML templates and compile assets.
    shiva_the_destroyer  Deletes the app from s3
    stable               Work on stable branch.
    staging              Run as though on staging.
    assets.assets_rm     Remove an asset from s3 and locally
    assets.sync          Intelligently synchronize assets between S3 and loca...
(dailygraphics)alynpr:dailygraphics ahurt$ 

I see it here, though:

App-specific commands
"""
def add_graphic(slug):
with settings(warn_only=True):
local('mkdir www/graphics/%s' % slug)
local('cp www/child.html www/graphics/%s/child.html' % slug)
local('cp -r www/js www/graphics/%s/js' % slug)

New graphic: Copytext spreadsheet not found

Workflow:

  • Use add_graphic:quiz-economy to create a new graphic
  • Open the app template copy spreadsheet, saved a new copy (to the shared NPR folder).
  • Paste new spreadsheet's ID into graphic_config.py
  • fab update_copy:quiz-economy — error
  • Publish the spreadsheet, run fab update_copy:quiz-economy again — error.
(dailygraphics)alynpr:dailygraphics ahurt$ fab update_copy:quiz-economy
Traceback (most recent call last):
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/fabric/main.py", line 717, in main
    *args, **kwargs
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/fabric/tasks.py", line 332, in execute
    results['<local-only>'] = task.run(*args, **new_kwargs)
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/fabric/tasks.py", line 112, in run
    return self.wrapped(*args, **kwargs)
  File "/Users/ahurt/src/dailygraphics/fabfile/__init__.py", line 210, in update_copy
    download_copy(slug)
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/fabric/tasks.py", line 109, in __call__
    return self.run(*args, **kwargs)
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/fabric/tasks.py", line 112, in run
    return self.wrapped(*args, **kwargs)
  File "/Users/ahurt/src/dailygraphics/fabfile/__init__.py", line 203, in download_copy
    g.get_document()
  File "/Users/ahurt/src/dailygraphics/etc/gdocs.py", line 92, in get_document
    raise KeyError("Error! Your Google Doc does not exist.")
KeyError: 'Error! Your Google Doc does not exist.'

Kill the test rigs

We're unlikely to ever use these for daily projects and I want to simplify the docs

Can't deploy pre-copytext graphics

Deploy script looking for a Google spreadsheet.

(dailygraphics)alynpr:dailygraphics ahurt$ fab production master deploy:slug=college-funding
You are trying to deploy the 'master' branch to production.
You should really only deploy a stable branch.
Do you know what you're doing? [Not at all] yes
Traceback (most recent call last):
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/fabric/main.py", line 717, in main
    *args, **kwargs
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/fabric/tasks.py", line 332, in execute
    results['<local-only>'] = task.run(*args, **new_kwargs)
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/fabric/tasks.py", line 112, in run
    return self.wrapped(*args, **kwargs)
  File "/Users/ahurt/src/dailygraphics/fabfile/__init__.py", line 186, in deploy
    render()
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/fabric/tasks.py", line 109, in __call__
    return self.run(*args, **kwargs)
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/fabric/tasks.py", line 112, in run
    return self.wrapped(*args, **kwargs)
  File "/Users/ahurt/src/dailygraphics/fabfile/__init__.py", line 84, in render
    _render_iterable(glob('www/graphics/*'))
  File "/Users/ahurt/src/dailygraphics/fabfile/__init__.py", line 115, in _render_iterable
    download_copy(slug)
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/fabric/tasks.py", line 109, in __call__
    return self.run(*args, **kwargs)
  File "/Users/ahurt/.virtualenvs/dailygraphics/lib/python2.7/site-packages/fabric/tasks.py", line 112, in run
    return self.wrapped(*args, **kwargs)
  File "/Users/ahurt/src/dailygraphics/fabfile/__init__.py", line 203, in download_copy
    g.get_document()
  File "/Users/ahurt/src/dailygraphics/etc/gdocs.py", line 92, in get_document
    raise KeyError("Error! Your Google Doc does not exist.")
KeyError: 'Error! Your Google Doc does not exist.'

Examples

Can you post some examples of what dailygraphics can build? The wiki here on Github is a good place. There are some good examples listed here https://source.opennews.org/en-US/articles/all-about-dailygraphics/ "We’ve used it for graphs, certainly, but also data tables, before-and-after sliders and small interactives. We’re even building it into a workflow for managing Instagram photo call-outs!"

Localhost is not updating?

localhost:8000 is not consistently reflecting new projects when they're added to the daily graphics rig.

Document: How do you embed more than one?

responsive iframe code moved the loop bits out of the library and, as @onyxfish put it so elegantly, "the user is now responsible for their own loops."

@alykat points out that you can't just paste the block of code twice without a.) duplicating the js import and b.) possible variable name collisions.

So, what's our preferred solution?

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.