No point upon uploading CSV in QGIS - plot

I'm using QGIS in mac, I'm following this tutorial yet the points isn't visible in my layers. I'm using csv that is separated by semicolon. I assigned value successfully yet no effect. How can I plot coordinates using google roads. Attached is my settings. Thanks in advance.
config 1
config 2

A comma, not a semi-colon, separates the fields in the "config" file.
In my installed QGIS version (3.3.0 Master) I was able to do this
-select a comma separated file
-indicate that the field delimiter is a comma
-indicate the "x" and "y" fields
-return to the custom delimiter area of the form and select a semi-colon
In my install, QGIS crashes. I'd rather see an error message.
If instead, I select a comma as a delimiter, the point layer is created and shown.
Hope this helps.

Related

How to get relation from csv in Neo4J/Cypher using CSV LOAD

I use Neo4J Community Edition version 3.2.1.
Consider this CSV-file with edges:
node1,relation,node2,type
1,RELATED_TO,2,Married
2,RELATED_TO,1,Married
1,RELATED_TO,3,Child
2,RELATED_TO,3,Child
3,RELATED_TO,4,Sibling
3,RELATED_TO,5,Sibling
4,RELATED_TO,5,Sibling
I have allready created the nodes for this. I then run the following csv load command:
load csv with headers from
"file:///test_dataset/edges.csv" as line
match (person1:Person {pid:line.node1}),
(person2:Person {pid:line.node2})
create (person1)-[:line.relation {type:line.type}]->(person2)
But this returns the following error:
Invalid input '.': expected an identifier character, whitespace, '|', a length specification, a property map or ']' (line 5, column 24 (offset: 167))
"create (person1)-[:line.relation {type:line.type}]->(person2)"
It seems that I cannot use "line.relation" like this. How can I use the relation from the csv-file (second column) using csv load?
I have seen this answer, but I would like to do this using native query language.
To verify that the rest of the query is correct I have managed to create the edges correctly by hardcoding the relation like this:
load csv with headers from
"file:///test_dataset/edges.csv" as line
match (person1:Person {pid:line.node1}),
(person2:Person {pid:line.node2})
create (person1)-[:RELATED_TO {type:line.type}]->(person2)
Natively it's not possible to create a node with a dynamic label and a relationship with a dynamic type.
That's why there is a procedure for that.
If you want to do it natively and you know all the distinct value of your relation column, you can create many cypher script like that (one per value):
LOAD CSV WITH HEADERS FROM "file:///test_dataset/edges.csv" AS line
WITH line WHERE line.relation ='RELATED_TO'
MATCH (person1:Person {pid:line.node1})
MATCH (person2:Person {pid:line.node2})
CREATE (person1)-[:RELATED_TO {type:line.type}]->(person2)

How can I replace variable names across files?

I am using atom as editor. I'd like to replace variable names across files. I've replaced jpy_usd by usd_jpy. I want to do that to all occurrences of jpy_usd in my rails project. Could you tell me if you know how to do it?
First you need to find word 'jpy_usd' by using this shortcut
cmd-shift-f
Then you can click replace all after fill the word that you want to replace.
Refer image below
You may refer to here for more details.
I've tried the following way.
type cmd+shift+f, then search all of jpy_usd in my project
move to one file
select one jpy_usd word, then type cmd+d in order to select the others jpy_usd in the same file. Thus edit them simultaneously
contine 2 & 3

list of files with space in the name

I would like to get the list of files with a specific extention in a folder. However, these files has space in the name. So for example, imagining I have files named file test1.txt, file test2.txt, file test3.txt, file test4.txt, if I do
list.files(pattern="file test*.txt")
I got
character(0)
NOTA: Apparentely, using simply pattern="file test*" it works fine but I need the extention file as well.
Try:
list.files(pattern="file test.*.txt")
Actually, what this says is:
list.files(pattern="file test(.*).txt")
(which also works). . refers to any character and * refers to the idea that this character should be present 0 or more times (see ?regex).
In your kast example you said that using pattern="file test*" works but you need a way to search for the extension as well.
All you have to do is Change your code to pattern="file test.*.txt". This would make your code search for any filename that matched "file testX.txt" with any one character in place of X.

inserting line breaks after every record in the textpad

I have a textpad file that has rows of text. For e.g.
Cat: Meaning - animal. The cat ran up the house
Rat: Meaning- rodent. The rat lives in the borough and feeds on leftovers
Word 3: Description
Word 4: Description
I have many such record in my file. I want to insert a line break at the end of every record for proper presentation. Doing it manually is tedious. Please help if you know an automated process to insert line break.
You can quickly do this by using a feature called "Regular Expressions" to find and add empty lines.
Open up the Find/Replace (Search menu > Replace)
In the "Find what" field, type the following: (^.+$)\n(^.+$)
In the "Replace with" field, type the following: \1\n\n\2
Tick the "Regular expression" checkbox
Click the Replace All button at least twice, but perhaps 3 times, until you get the message Cannot find the Regular Expression
Untick the "Regular expression" checkbox
Close the Replace dialog
Confirm the file is formatted as you are expecting
Save the file.
You can write a simple C# prgram that uses a loop that adds this code after every line :
But first add the namespace using System.Enviorment
Enviorment.NewLine;
If you have any more trouble i'll help with some code to get started
Open up the Find/Replace (Search menu > Replace)
In the "Find what" field, type the following so that the replace occurs at the end of each line: $
In the "Replace with" field, type the following. Note each 'n' represents a <return>. In this instance, I added a return at the end of a SQL statement, the word 'GO' on the next line and another <return>: \n\GO\n
Started with text file containing:
select * from <tablename>
select * from <tablename>
Ended with text file containing:
select * from <tablename
GO
select * from <tablename>
GO
Hope that helps.
from your text it is difficult to understand what you are intending to do. I'll give you some questions. The answers will help others to help you.
Do you really mean textpad as the product from company helios in UK or do you use this word as a general word for a class of tools (like notepad - but there is a general definition AND the tool as part of Windows).
Your file hase line breaks yet. You don't see them, but in the file itself they are present (in Unix systems line feed (hex code 0A) or in the windows world carriage return followed by line feed (hex code 0D 0A)).
Or would you like to publish your text in HTML? So you have to put the necessary tags around each line like paragraph, line break, list item etc.?

ipython notebook rearrange command history order

I am working on a demo notebook. While working on it I am inserting commands and sometimes going back at a previous cell to insert more commands. At the end, I want the command numbering to be increasing order, not the random order I entered them while preparing the notebook.
Any way to conveniently do this from the notebook? I can go and edit the .ipynb file associated with the notebook and edit the "prompt_number" fields to make the command ordering as I want, but a more convenient way is better.
Based on no responses, I am posting the editing of the underlying .ipynb file as the answer to rearrange numbering.
When you edit the ipynb file, note that most of the time the numbers are paired (output and input):
"output_type": "pyout",
"prompt_number": 35,
"text": [
"Empty DataFrame\n",
"Columns: [utilization]\n",
"Index: []"
]
}
],
"prompt_number": 35
},
vim tip: I did a /prompt_n/b+16 search on vim which takes you to the beginning of the number, then just doing cw to the new number you want works. For the second number of the pair, just do .
Note: Be careful about the paired numbers, I found the first one is the output one and ends with a comma. The second one is the input one without a comma. But if you have intentionally deleted a particular in/out cell from the web interface, the pair may be missing so be careful to put same new number to same in/out pair, and not give same number to different in/out cells, which will garble the notebook and web interface will complain about errors.

Resources