Questions about getting data, files, images etc. from various formats into a form that can be read, tranformed and manipulated by Mathematica

learn more… | top users | synonyms

6
votes
1answer
235 views

HDF5 and complex numbers

I "Export" an array with complex numbers with HDF5 format. When I "Import" it, I only get the real part. Simple example: ...
6
votes
1answer
304 views

Importing images from the web using ImportString & URLFetch

I can bring images from the web using the Import command like this: Import["http://blog.wolfram.com/wp-content/uploads/2008/06/se-30.jpg"] Sometimes the web ...
6
votes
3answers
197 views

Organizing similar datasets using DownValues instead of Contexts

In his answer to this question, Leonid helped me find a way to programmatically generate contexts for holding sets of symbols with the same names. Perhaps a simpler way is to use ...
6
votes
1answer
161 views

Import another Notebook as if it were a Package

Is it possible to import the contents of another (existing) notebook into the current namespace in the same way that I can with a package? I know that it would be best to use a ...
6
votes
1answer
181 views

Is there a way to embed a data set in a notebook?

I have a data set (currently a table in a .csv file). I would like to share this notebook with colleagues either as a notebook, or (even better) as a CDF document. Is there a way to embed the data (...
6
votes
1answer
424 views

How to correctly import data zipped with the “deflate” algorithm?

I'm writing an importer for the GIFTI file format. The details of the format are not particularly important, but the basic idea is that it is a relatively simple XML file which includes binary arrays ...
6
votes
2answers
344 views

Importing multiple images for machine learning classification

I want to create a ML classifier using images just like this example. I have two classes of images in two different folders. Is there an easier way to import all images from both folders rather than ...
6
votes
1answer
180 views

Can I read Chinese characters with ReadList correctly?

Just try this example: Export["a.txt", "这乱码问题该怎么解决呢\n***\n怎么解决嘛"] ReadList["a.txt", Record] ...
6
votes
2answers
776 views

Change character encoding for file read using OpenRead

I have a large bzipped file that I want to read using OpenRead on a pipe with UTF8 encoding. Doing the following does not give me UTF-8 encoding. My ...
6
votes
1answer
442 views

Operations on online files via public URL access

I need Mathematica to access an online public directory via some URL (fake in this case) http://example.com/images and perform operations similar to those Mathematica can do on OS directories and ...
6
votes
1answer
577 views

Accessing data on local machine from remote kernel

I have a remote kernel on a server that I would like to use to process some data. The connection works, i.e, I'm able to use the local front end and the remote kernel. However, I cannot figure out how ...
6
votes
1answer
790 views

Import numeric values from XML

I am trying to import data from an XML file and then perform calculations on those numeric values. When I import the data the values seem to be stored as strings. I tried using a ToExpression ...
6
votes
1answer
1k views

When do I use Mathematica, when do I use Gephi, and how do I use them together?

Mathematica has great operations for analyzing graphs but when the graphs are a bit bigger, Gephi seems to be more efficient (at least on my computer) at drawing and analyzing, i.e. visualizing the ...
6
votes
1answer
80 views

SemanticImport and zip files

I have looked through the documentation and don't see this addressed, but since some of you seem to have knowledge of undocumented features, I thought I'd ask. There is a zip file at http://www....
6
votes
1answer
133 views

Extracting PNG images from AVI movie

I have written the following code to extract all images from an uncompressed AVI movie and to save them as sequential PNGs. ...
6
votes
1answer
361 views

Reading specific entries from a CSV file

This question is related to the following: Speeding up Import and Export in CSV format Stream CSV files Reading periodic elements from a large file I have a set of very large CSV files (a few ...
6
votes
1answer
66 views

Reading data from Google Docs

I am working on a personal project involving a CloudDeploy[ ] that reads data off a Google Doc and then works with it. Ideally, the Google Doc is either a text document or a spreadsheet which contains ...
6
votes
1answer
97 views

Import of data from ODS

With SetDirectory["~/Downloads"]; ifile = "test.xls"; TimeConstrained[idata = Import[ifile, {"Data", 1}], 5]; I can achieve the desired result of importing the ...
6
votes
1answer
385 views

ESRI shape files

ESRI shape files (shp): importing the polygon data can yield a very large list. It is computationally intensive rendering the polygon. I have been trying to convert to ...
6
votes
1answer
96 views

Importing hex values from a text file

This question appeared maybe an hour ago, but was removed by OP. I'm still interested in a solution. Suppose we have a text file with hex numbers separated by tabs (or spaces): ...
6
votes
0answers
134 views

Call Magma in Mathematica

I've written some code in Mathematica, related to some group theory questions I have. Subsequently, I found that part of the code could be significantly sped up if I could just call a routine in ...
6
votes
0answers
73 views

Can't get Mathematica to Import PDF files with diacritics on the file name

Tested with versions 9.0.0, 10.0.2 and 10.3.0, all under OS X 10.10.5. and Linux The drag-...
5
votes
3answers
260 views

How to measure Sample Rate?

How do I measure the sample rate of an imported file in Mathematica? I imported the WAV file: solo = Import["solo.wav"] When I wrote: ...
5
votes
4answers
3k views

Numerical Differentiation using 1500 data points

I have a set of 1500 data points (which are some energy eigenvalues) corresponding to a parameter H0 (which represents magnetic field. H0 values are equispaced going from $-3.0$ to $3.0$ in steps of $...
5
votes
2answers
608 views

How to test if file exists and stop

At the moment I'm using > ...
5
votes
3answers
353 views

Histogram of a very large dataset?

I have a very large dataset stored in a file (over 2GB). The file contains a tab-separated table of floating-point numbers. I want to do an Histogram of all the numbers in the table. But if I try to ...
5
votes
2answers
263 views

Max of imported numerical data will not work

I loaded a list with 400,000 values from a file. The list was loaded correctly as I can get it's length (by Length[]) and I can also plot it. Why can't I get the Max or Min of this list though? When ...
5
votes
2answers
475 views

Image Rotation, Line Symmetry

I'd like to import an image, superimpose it, reduce the opacity of the overlaid image, and then use a manipulate to rotate the top image to illustrate rotational symmetry. The image below is using ...
5
votes
4answers
279 views

Finding relevant parts in XML document

My question is about a XML document and finding parts of strings. test = Import["C:\\Users\\filename.xml", "XMLObject"] This gives the following output: ...
5
votes
2answers
2k views

Converting numbers to integers

I've read the available documentation but I still haven't found an NumberForm -> Integer function yet. No result in this site's search, either. Does it exist? ...
5
votes
1answer
197 views

Tools for Importing/working with SEED seismographic data in Mathematica?

Do you know if exist a library or a package in order to import and work with SEED Seismographic data in Mathematica?
5
votes
2answers
386 views

Sorting a large file

I have some huge logs, which are text files, containing up to a million rows each, and I need them sorted. Because trying to import one obviously makes Mathematica run out of memory, we must rule out ...
5
votes
1answer
457 views

windrose with data from Excel

How to Import data from excel and use them to Plot windrose instead? Example, {{Strength, Angle(degrees)}..} ...
5
votes
1answer
516 views

How can I log in to my Wikipedia account and access my watch list?

Wikipedia's "Edit Watchlist" page (for logged in users) has a list of hyperlinks to the user's watchlist (here is an example from my account). I've tried to use ...
5
votes
2answers
432 views

How to save a web page in mathematica?

For a given web page http://www.nytimes.com/, is it possible to save it as : first: only HTML(within css) second: more elements(include pictures and so on) just like what a browser can do. ...
5
votes
1answer
406 views

Importing tabular data that has been exported from Evernote

In Evernote you can embed HTML tables in the note. You can then export them to an xml format with the extension enex. I am trying to get the data from the table imported into Mathematica. Here is the ...
5
votes
1answer
681 views

Open data file from CDFPlayer?

Using a CDF program running in CDF Player, is it possible to use a system dialog box, or even just an Import statement such as Import["*.CSV"], to import data from a text or comma separated file on a ...
5
votes
1answer
153 views

Efficiently importing data into Mathematica

I have a graph data file infile.txt. 3 2 0 1 1 2 3 2 0 1 2 1 3 2 1 0 1 2 3 3 0 1 1 0 1 2 3 3 0 1 1 0 2 1 3 4 0 1 1 0 1 2 2 1 ...
5
votes
1answer
123 views

Why can't an `Import[]` change $Path?

Does anyone know why Import["http://**server**/file.m"] can't make a change to $Path? It seems like ...
5
votes
1answer
2k views

Combine multiple PDF files into one document

I have multiple single page PDFs I'd like to join together into a single file. (Obviously I mean the file format and not the probability distributions here!) I'm aware of free online services such as ...
5
votes
1answer
763 views

ReadList can't read from file containing high-precision Reals

I want to read a file which contains seven columns of real numbers. Mathematica seems to have a problem with the high precision I need. My code: ...
5
votes
1answer
991 views

Efficiently exporting many images as a video

I have many .gif images and I would like to export them as a single video file (I prefer .mov, but any video format is fine). But what if I have several tens of megabytes of .gif images? Is it ...
5
votes
1answer
60 views

How can I generate a graph from a NetworkX JSON

I have done some network generation and analysis in Python NetworkX. I do most of my visualizations with D3, but for publications I would like to generate some graph plots with Mathematica as well as ...
5
votes
1answer
107 views

ReadList ignore comment lines?

Is there a way to make ReadList ignore certain "comment lines" (say, all lines that start with #, or in general all lines that ...
5
votes
2answers
286 views

How to remove an expression from a file?

To read in expressions from a file, one can do ReadList[file, Expression, 3]. How to do the opposite, i.e. remove a number of expressions from a file, modifying ...
5
votes
1answer
125 views

How to analyze all the data in a directory

I am trying to import, analyze, and save all the .txt files in a specific directory. I can do this with a single .txt file using the following code: ...
5
votes
1answer
352 views

How to import non-text data from std input in a Mathematica script?

Or maybe a better question is - how can I get a stdin stream? I need to run on Linux. I did look at Reading from STDIN, or: how to pipe data into Mathematica, but ...
5
votes
1answer
190 views

Importing Data with Line feeds

I am trying to import data from a CSV file into Mathematica that contains line feeds in certain elements that I wish to be properly rendered in Mathematica. I suppose this has something to do with the ...
5
votes
1answer
621 views

Reading in Huge Text Files

I would like to read in really large text files (about 2GB) into Mathematica. The structure of the file is such that the first row and the first column are text i.e strings. Rest is all numbers. Is it ...