I am doing some investigation related to the bitcoin transactions graph and I don't need the whole blockchain, because it would be too much data (and I don't have much space). I just need a part of the blockchain to construct a graph with the transactions and then do some analysis on it. Is it possible to download only a part of the blockchain? Let's say I want only up to 3 million transactions. Or something like the transactions from 2015 and 2016, or the most recent 3 million transactions (these are not requirements I have on the data, it's just to exemplify).
If you write software yourself, with a custom implementation of the P2P protocol, this is certainly possible. Just send
getdata messages for just the blocks in the range you want.
No such feature exists in Bitcoin Core however, as its purpose is fully verifying the state of the chain, it will always start at the very beginning. If you want blocks somewhere from 2015 you can of course just stop the software once it has passed that point.
Note that Bitcoin Core does support a pruned mode, in which only the last N blocks are kept on disk (but they're still all downloaded and verified, just discarded after verification). If you want access to the last 3000000 transactions, and lack diskspace for the full chain, it would be an option to synchronize in pruned mode.