Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7187455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:50:55+00:00 2026-05-28T18:50:55+00:00

I am trying to gather data from twitter and visualize it through Graphviz. I

  • 0

I am trying to gather data from twitter and visualize it through Graphviz. I have already installed Graphviz and currently I am trying to generate a DOT language output through Python, I ran into the problem of not being able to get any response from my code. I would like to know if my code has generated a DOT file or not and if yes, where is my DOT file? Below is my code.

OUT ="Paul_search_results.dot"
try:
    nx.drawing.write_dot(g, OUT)
except ImportError, e:
    dot = ['"%s" -> "&s" [tweet_id=%s]'% (n1, n2, g[n1][n2]['tweet_id'])\
           for n1, n2 in g.edges()]
    f = open(OUT, 'w')
    f.write('strict digraph {\n%s\n}' % (';\n'.join(dot),))
    f.close()

I am using windows and I know I can’t easy_install pygraphviz, but the code above should do the same thing. According to the book, I should have DOT language output on hand with the code above. But I didn’t get any response from my code.

I already have gathered the information from twitter and the nodes and edges ready.

>>> g.number_of_nodes()
235
>>> g.number_of_edges()
202

Can somebody please help me out here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T18:50:57+00:00Added an answer on May 28, 2026 at 6:50 pm

    Your file is stored in Paul_search_results.dot. If you can’t find that find, then change the name to include the full path so you can put it where you want it.

    The rest of the code looks correct but it is hard to tell without seeing the data. You set f=sys.stdout in order to see the output being generated.

    FYI, there is an on-line version of Graphviz available at http://interactive.blockdiag.com

    Good luck with your project.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to gather Twitter statistics from a specific dataset that was provided to
I am trying to achieve an LDAP query to gather all properties we have
Trying to figure out a way where I can pass some data/fields from a
I have a 3 column ListView. I'm having a hard time trying to gather
I am trying to use WMI to gather system data which in this case
I have a client that I'm trying to do some data migration out of
I'm trying to write an SQL query that will gather certain data in one
I am trying to gather a list (array) of ids in a sector <div
I need to gather some statistics in my software and i am trying to
I've bound data from a SQLite database table to a ListView using a SimpleCursorAdapter

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.