Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only year data #1

Open
akastrin opened this issue Apr 8, 2016 · 5 comments
Open

Only year data #1

akastrin opened this issue Apr 8, 2016 · 5 comments

Comments

@akastrin
Copy link

akastrin commented Apr 8, 2016

How should one define timeSeg variable if only year is available?

@dinos66
Copy link
Contributor

dinos66 commented Apr 8, 2016

Hello akastrin and thank you for your interest.

First of all, please download the newer versions (main and communityranking).
The timeSeg variable should be a list of sampling times in seconds (e.g. if it's a year 3600_24_365). If you only have the one choice (say a year), then it should be a list containing that one choice.
Also, please notice that the timeInterval you finally chose should be the same as the one stated in the dataset's if-statement which you will have to write yourself following the examples provided in the main files.

Please let me know as soon as you have more questions. The code is really 2 years old, so if you're using a latest version of python, they could cause errors.

@akastrin
Copy link
Author

Thanks for your quick reply. I'm now struggling with the code. Do you maybe remember which Python version you use?

Best, Andrej

@dinos66
Copy link
Contributor

dinos66 commented Apr 11, 2016

Yes, it was 3.3. Although it should also work with 3.5. The one library that I think could cause problems is the wordcloud one which the owner has actually changed quite a lot since. Is that the error you're getting?

On Monday, April 11, 2016 1:15 PM, akastrin <[email protected]> wrote:

Thanks for your quick reply. I'm now struggling with the code. Do you maybe remember which Python version you use?Best, Andrej—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub

@akastrin
Copy link
Author

When I use your dataset 1.txt which looks like:

15729   20596   "Mon Feb 04 10:06:51   2013"
6754    21340,21176 "Mon Feb 04 10:07:30   2013"
17912   23528   "Mon Feb 04 10:07:48   2013"
3136    10650   "Mon Feb 04 10:08:22   2013"
16768   18570   "Mon Feb 04 10:08:45   2013"
2543    2543    "Mon Feb 04 10:09:25   2013"

everything goes well. Then I supplied my own dataset, which look like:

1942    2657    "2014"
328 13076   "2009"
11237   12737   "2014"
214 818 "1990"
20928   51381   "2013"
29968   11993   "2013"

In the former case, I use timeSeg = [100,200,300,400,500,600] and timeInterval=100, while in the my latter case I use parameters timeSeg = [3600*24*365] and timeInterval=3600*24*365*10. However, using my own data I get the following error:

plt.plot(poi, freqStat[poi], 'ro', hold=True)
TypeError: only integer arrays with one element can be converted to an index

Any idea how to proceed?

@dinos66
Copy link
Contributor

dinos66 commented Apr 12, 2016

OK, so you're obviously using the adaptive version.
Well, for the 1.txt file, the framework works because you are using 100 second intervals which do produce a series of POIs (points of interest). In your case, although you only have one time segment in the timeSeg variable, your timeInterval is entirely different to the one in the timeSeg. The timeInterval should be one of the available timeSegs and more specifically the one you will select when the frequency image question appears.
Also, a couple of things:
a) Use timeSeg = [3600_24_365*10]
b) Also, since I see your dataset is not time sorted, change the rankIrregularTime to 1 in the main file.
c) The 1.txt file was made for the pci13 paper (git branch) and will not fully work with this code. The preferable format is that of Twitter json files as is mentioned in the readme.

Let me know how it went and how I can help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants